pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/pthread-sem Switch to manual written Makefile an...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5d2d4b4890de
branches:  trunk
changeset: 505996:5d2d4b4890de
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Tue Jan 10 13:42:29 2006 +0000

description:
Switch to manual written Makefile and use libtool. This fixes
compilation on DragonFly and helps platforms where bsd.lib.mk
is not fully implemented as well. Bump revision.

diffstat:

 devel/pthread-sem/Makefile       |  16 +++----------
 devel/pthread-sem/PLIST          |   8 +-----
 devel/pthread-sem/files/Makefile |  46 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 52 insertions(+), 18 deletions(-)

diffs (99 lines):

diff -r f7b36572bf33 -r 5d2d4b4890de devel/pthread-sem/Makefile
--- a/devel/pthread-sem/Makefile        Tue Jan 10 13:25:01 2006 +0000
+++ b/devel/pthread-sem/Makefile        Tue Jan 10 13:42:29 2006 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.2 2005/04/11 21:45:37 tv Exp $
+# $NetBSD: Makefile,v 1.3 2006/01/10 13:42:29 joerg Exp $
 #
 
 DISTNAME=      pthread-sem-1.0
+PKGREVISION=   1
 CATEGORIES=    devel
 MASTER_SITES=  http://www.cit.gu.edu.au/teaching/2105CIT/software/
 
@@ -10,17 +11,8 @@
 
 PTHREAD_OPTS+= require
 
-TEST_TARGET=   test
-
-MAKE_ENV+=     LIBDIR=${PREFIX}/lib
-MAKE_ENV+=     MANDIR=${PREFIX}/man
-MAKE_ENV+=     DESTDIR=/       # trick bsd.lib.mk into adding -R
-MAKE_ENV+=     NOPROFILE=1
-
-MANCOMPRESSED_IF_MANZ= yes
-
-post-install:
-       ${INSTALL_DATA} ${WRKSRC}/semaphore.h ${PREFIX}/include
+post-extract:
+       ${CP} ${FILESDIR}/Makefile ${WRKSRC}
 
 .include "../../mk/pthread.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r f7b36572bf33 -r 5d2d4b4890de devel/pthread-sem/PLIST
--- a/devel/pthread-sem/PLIST   Tue Jan 10 13:25:01 2006 +0000
+++ b/devel/pthread-sem/PLIST   Tue Jan 10 13:42:29 2006 +0000
@@ -1,10 +1,6 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2004/01/20 21:29:10 rh Exp $
+@comment $NetBSD: PLIST,v 1.2 2006/01/10 13:42:29 joerg Exp $
 include/semaphore.h
-lib/libsemaphore.a
-lib/libsemaphore.so
-lib/libsemaphore.so.1
-lib/libsemaphore.so.${PKGVERSION}
-lib/libsemaphore_pic.a
+lib/libsemaphore.la
 man/man3/sem_destroy.3
 man/man3/sem_getvalue.3
 man/man3/sem_init.3
diff -r f7b36572bf33 -r 5d2d4b4890de devel/pthread-sem/files/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/pthread-sem/files/Makefile  Tue Jan 10 13:42:29 2006 +0000
@@ -0,0 +1,46 @@
+# $NetBSD: Makefile,v 1.1 2006/01/10 13:42:29 joerg Exp $
+
+LIB=           libsemaphore
+LIB_VER=       1:0
+LIBS?=         ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}
+
+SRCS=          sem.c
+HDRS=          semaphore.h
+
+PREFIX?=       /usr/local
+LIBDIR?=       ${PREFIX}/lib
+INCLUDEDIR?=   ${PREFIX}/include
+MANDIR?=       ${PREFIX}/man
+MANDIR3?=      ${MANDIR}/man3
+
+BSD_INSTALL?=          install
+BSD_INSTALL_DIR?=      ${BSD_INSTALL} -d
+BSD_INSTALL_DATA?=     ${BSD_INSTALL} -m 444
+BSD_INSTALL_LIB?=      ${BSD_INSTALL} -m 644
+LIBTOOL?=      libtool
+LN?=           ln
+RM?=           rm
+
+.SUFFIXES: .lo
+.PHONY: all clean install
+
+.c.lo:
+       ${LIBTOOL} --mode=compile ${CC} -o $@ -c ${CFLAGS} ${CPPFLAGS} $<
+
+all: ${LIB}.la
+
+clean:
+       -${LIBTOOL} --mode=clean ${RM} ${OBJS} ${LIB}.la
+
+install:
+       ${BSD_INSTALL_DIR} ${LIBDIR} ${INCLUDEDIR}
+       ${BSD_INSTALL_DATA} ${HDRS} ${INCLUDEDIR}
+       ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} ${LIB}.la ${LIBDIR}/${LIB}.la
+       ${BSD_INSTALL_DIR} ${MANDIR3}
+       ${BSD_INSTALL_DATA} sem_destroy.3 sem_getvalue.3 sem_init.3 sem_post.3 \
+           sem_wait.3 ${MANDIR3}
+       ${LN} -s sem_wait.3 ${MANDIR3}/sem_trywait.3
+
+${LIB}.la: ${OBJS}
+       ${LIBTOOL} --mode=link ${CC} -o $@ ${CFLAGS} ${LDFLAGS} \
+           -rpath ${LIBDIR} -version-info ${LIB_VER} ${OBJS} ${LIBS}



Home | Main Index | Thread Index | Old Index