From 4144fa08afa568b558f9126c2747824698101125 Mon Sep 17 00:00:00 2001 From: joerg Date: Tue, 10 Jan 2006 13:42:29 +0000 Subject: 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. --- devel/pthread-sem/Makefile | 16 ++++---------- devel/pthread-sem/PLIST | 8 ++----- devel/pthread-sem/files/Makefile | 46 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 18 deletions(-) create mode 100644 devel/pthread-sem/files/Makefile (limited to 'devel') diff --git a/devel/pthread-sem/Makefile b/devel/pthread-sem/Makefile index 9143350075f..ab1a82b6ece 100644 --- a/devel/pthread-sem/Makefile +++ b/devel/pthread-sem/Makefile @@ -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 @@ COMMENT= Semaphore implementation for (PTH) pthreads 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 --git a/devel/pthread-sem/PLIST b/devel/pthread-sem/PLIST index fa1c0829cd8..c09c35d6f10 100644 --- a/devel/pthread-sem/PLIST +++ b/devel/pthread-sem/PLIST @@ -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 --git a/devel/pthread-sem/files/Makefile b/devel/pthread-sem/files/Makefile new file mode 100644 index 00000000000..80605496f14 --- /dev/null +++ b/devel/pthread-sem/files/Makefile @@ -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} -- cgit v1.2.3