diff options
author | jlam <jlam@pkgsrc.org> | 2001-05-31 22:51:17 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2001-05-31 22:51:17 +0000 |
commit | 3d1ca8b38d3af41dc1385a29aeee92553943e011 (patch) | |
tree | 63b5a25ab842c05fe32c97168b0b74b20ee6ee94 /devel | |
parent | f31766f12509a5746a38ea7166ca00e3152ca934 (diff) | |
download | pkgsrc-3d1ca8b38d3af41dc1385a29aeee92553943e011.tar.gz |
* Add buildlink.mk file to link appropriate libraries and headers into
${BUILDLINK_INCDIR} and ${BUILDLINK_LIBDIR}, to be used by other packages.
* Remove unnecessary include of bsd.prefs.mk.
* Change how we disable pthreaded version of lwp by passing values to the
configure script via the environment, instead of requiring an extra file.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/lwp/Makefile | 7 | ||||
-rw-r--r-- | devel/lwp/buildlink.mk | 60 | ||||
-rw-r--r-- | devel/lwp/files/config.cache | 3 |
3 files changed, 62 insertions, 8 deletions
diff --git a/devel/lwp/Makefile b/devel/lwp/Makefile index 68687149bae..632867a8804 100644 --- a/devel/lwp/Makefile +++ b/devel/lwp/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 2001/04/27 19:00:36 phil Exp $ +# $NetBSD: Makefile,v 1.10 2001/05/31 22:51:17 jlam Exp $ # DISTNAME= lwp-1.6 @@ -19,10 +19,7 @@ USE_LIBTOOL= YES LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig -.include "../../mk/bsd.prefs.mk" - # Don't even to try to use pthreaded version. -pre-configure: - ${CP} ${FILESDIR}/config.cache ${WRKSRC}/ +CONFIGURE_ENV+= ac_cv_lib_pthread_pthread_create=no .include "../../mk/bsd.pkg.mk" diff --git a/devel/lwp/buildlink.mk b/devel/lwp/buildlink.mk new file mode 100644 index 00000000000..cf19393932b --- /dev/null +++ b/devel/lwp/buildlink.mk @@ -0,0 +1,60 @@ +# $NetBSD: buildlink.mk,v 1.1 2001/05/31 22:51:17 jlam Exp $ +# +# This Makefile fragment is included by packages that use lwp. +# +# To use this Makefile fragment, simply: +# +# (1) Optionally define LWP_REQD to the version of lwp desired. +# (2) Include this Makefile fragment in the package Makefile, +# (3) Optionally define BUILDLINK_INCDIR and BUILDLINK_LIBDIR, +# (4) Add ${BUILDLINK_TARGETS} to the prerequisite targets for pre-configure, +# (5) Add ${BUILDLINK_INCDIR} to the front of the C preprocessor's header +# search path, and +# (6) Add ${BUILDLINK_LIBDIR} to the front of the linker's library search +# path. + +.if !defined(LWP_BUILDLINK_MK) +LWP_BUILDLINK_MK= # defined + +LWP_REQD?= 1.6 +DEPENDS+= lwp>=${LWP_REQD}:../../devel/lwp + +LWP_HEADERS= ${LOCALBASE}/include/lwp/* +LWP_LIBS= ${LOCALBASE}/lib/liblwp.* + +BUILDLINK_INCDIR?= ${WRKDIR}/include +BUILDLINK_LIBDIR?= ${WRKDIR}/lib + +BUILDLINK_TARGETS+= link-lwp-headers +BUILDLINK_TARGETS+= link-lwp-libs + +# This target links the headers into ${BUILDLINK_INCDIR}, which should +# be searched first by the C preprocessor. +# +link-lwp-headers: + @${ECHO} "Linking lwp headers into ${BUILDLINK_INCDIR}." + @${MKDIR} ${BUILDLINK_INCDIR}/lwp + @${RM} -f ${BUILDLINK_INCDIR}/lwp/* + @for inc in ${LWP_HEADERS}; do \ + dest=${BUILDLINK_INCDIR}/lwp/`${BASENAME} $${inc}`; \ + if [ -f $${inc} ]; then \ + ${RM} -f $${dest}; \ + ${LN} -sf $${inc} $${dest}; \ + fi; \ + done + +# This target links the libraries into ${BUILDLINK_LIBDIR}, which should +# be searched first by the linker. +# +link-lwp-libs: + @${ECHO} "Linking lwp libraries into ${BUILDLINK_LIBDIR}." + @${MKDIR} ${BUILDLINK_LIBDIR} + @for lib in ${LWP_LIBS}; do \ + dest=${BUILDLINK_LIBDIR}/`${BASENAME} $${lib}`; \ + if [ -f $${lib} ]; then \ + ${RM} -f $${dest}; \ + ${LN} -sf $${lib} $${dest}; \ + fi; \ + done + +.endif # LWP_BUILDLINK_MK diff --git a/devel/lwp/files/config.cache b/devel/lwp/files/config.cache deleted file mode 100644 index 48da25f2138..00000000000 --- a/devel/lwp/files/config.cache +++ /dev/null @@ -1,3 +0,0 @@ -# $NetBSD: config.cache,v 1.1 1999/12/30 09:58:16 fredb Exp $ - -ac_cv_lib_pthread_pthread_create=${ac_cv_lib_pthread_pthread_create='no'} |