diff options
author | jlam <jlam@pkgsrc.org> | 2001-05-24 16:41:08 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2001-05-24 16:41:08 +0000 |
commit | 79c34b827b59f66b9751c03b8342a4ad2fc27a57 (patch) | |
tree | 8d22415923180819a9b80ab3c8e5152379fe9562 | |
parent | d9a13bd4660dce5ace702d6d4796ac192376712d (diff) | |
download | pkgsrc-79c34b827b59f66b9751c03b8342a4ad2fc27a57.tar.gz |
Add buildlink.mk file to link libraries and headers into ${WRKDIR}, to be
used by other packages.
-rw-r--r-- | print/cups/buildlink.mk | 57 | ||||
-rw-r--r-- | security/PAM/buildlink.mk | 59 |
2 files changed, 116 insertions, 0 deletions
diff --git a/print/cups/buildlink.mk b/print/cups/buildlink.mk new file mode 100644 index 00000000000..51bee5d0cb4 --- /dev/null +++ b/print/cups/buildlink.mk @@ -0,0 +1,57 @@ +# $NetBSD: buildlink.mk,v 1.1 2001/05/24 16:41:08 jlam Exp $ +# +# This Makefile fragment is included by packages that use libcups. +# +# To use this Makefile fragment, simply: +# +# (1) Optionally define CUPS_REQD to the version of cups 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. + +CUPS_REQD?= 1.1.1 + +CUPS_INCDIR= ${LOCALBASE}/include/cups +LIBCUPS= ${LOCALBASE}/lib/libcups.a +LIBCUPS= ${LOCALBASE}/lib/libcups.so* +LIBCUPSIMAGE= ${LOCALBASE}/lib/libcupsimage.a +LIBCUPSIMAGE= ${LOCALBASE}/lib/libcupsimage.so* +DEPENDS+= cups>=${CUPS_REQD}:../../print/cups + +BUILDLINK_INCDIR?= ${WRKDIR}/include +BUILDLINK_LIBDIR?= ${WRKDIR}/lib + +BUILDLINK_TARGETS+= link-cups-headers +BUILDLINK_TARGETS+= link-cups-libs + +# This target links the headers into ${BUILDLINK_INCDIR}, which should +# be searched first by the C preprocessor. +# +link-cups-headers: + @${ECHO} "Linking cups headers into ${BUILDLINK_INCDIR}." + @${MKDIR} ${BUILDLINK_INCDIR}/cups + @for inc in ${CUPS_INCDIR}/*; do \ + dest=${BUILDLINK_INCDIR}/cups/`${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-cups-libs: + @${ECHO} "Linking cups libraries into ${BUILDLINK_LIBDIR}." + @${MKDIR} ${BUILDLINK_LIBDIR} + @for lib in ${LIBCUPS} ${LIBCUPSIMAGE}; do \ + dest=${BUILDLINK_LIBDIR}/`${BASENAME} $${lib}`; \ + if [ -f $${lib} ]; then \ + ${RM} -f $${dest}; \ + ${LN} -sf $${lib} $${dest}; \ + fi; \ + done diff --git a/security/PAM/buildlink.mk b/security/PAM/buildlink.mk new file mode 100644 index 00000000000..97867e6cfe8 --- /dev/null +++ b/security/PAM/buildlink.mk @@ -0,0 +1,59 @@ +# $NetBSD: buildlink.mk,v 1.1 2001/05/24 16:41:08 jlam Exp $ +# +# This Makefile fragment is included by packages that use libpam. +# +# To use this Makefile fragment, simply: +# +# (1) Optionally define PAM_REQD to the version of pam 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. + +PAM_REQD?= 0.72 + +PAM_INCDIR= ${LOCALBASE}/include/security +LIBPAM= ${LOCALBASE}/lib/libpam.a +LIBPAM+= ${LOCALBASE}/lib/libpam.so* +LIBPAMC= ${LOCALBASE}/lib/libpamc.a +LIBPAMC+= ${LOCALBASE}/lib/libpamc.so* +LIBPAMMISC= ${LOCALBASE}/lib/libpam_misc.a +LIBPAMMISC+= ${LOCALBASE}/lib/libpam_misc.so* +DEPENDS+= PAM>=${PAM_REQD}:../../security/PAM + +BUILDLINK_INCDIR?= ${WRKDIR}/include +BUILDLINK_LIBDIR?= ${WRKDIR}/lib + +BUILDLINK_TARGETS+= link-pam-headers +BUILDLINK_TARGETS+= link-pam-libs + +# This target links the headers into ${BUILDLINK_INCDIR}, which should +# be searched first by the C preprocessor. +# +link-pam-headers: + @${ECHO} "Linking pam headers into ${BUILDLINK_INCDIR}." + @${MKDIR} ${BUILDLINK_INCDIR}/security + @for inc in ${PAM_INCDIR}/*; do \ + dest=${BUILDLINK_INCDIR}/security/`${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-pam-libs: + @${ECHO} "Linking pam libraries into ${BUILDLINK_LIBDIR}." + @${MKDIR} ${BUILDLINK_LIBDIR} + @for lib in ${LIBPAM} ${LIBPAMC} ${LIBPAMMISC}; do \ + dest=${BUILDLINK_LIBDIR}/`${BASENAME} $${lib}`; \ + if [ -f $${lib} ]; then \ + ${RM} -f $${dest}; \ + ${LN} -sf $${lib} $${dest}; \ + fi; \ + done |