diff options
author | jlam <jlam@pkgsrc.org> | 2001-10-23 15:42:05 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2001-10-23 15:42:05 +0000 |
commit | ce061a4a99af8eefbd61f3ab492ff34774458dbd (patch) | |
tree | 89fb421ae2d6b1553ab1d5ce78ad2ed5a9cec605 /www/apache | |
parent | b476b722de34b39ad7bc82e9c8f278e8158b1321 (diff) | |
download | pkgsrc-ce061a4a99af8eefbd61f3ab492ff34774458dbd.tar.gz |
Add a buildlink.mk file for use primarily by packages that use apxs to
compile Apache extension modules. This is usable by packages that depend
on either apache or apache6.
Diffstat (limited to 'www/apache')
-rw-r--r-- | www/apache/buildlink.mk | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/www/apache/buildlink.mk b/www/apache/buildlink.mk new file mode 100644 index 00000000000..027dd1a6750 --- /dev/null +++ b/www/apache/buildlink.mk @@ -0,0 +1,60 @@ +# $NetBSD: buildlink.mk,v 1.1 2001/10/23 15:42:05 jlam Exp $ +# +# This Makefile fragment is included by packages that use apxs from Apache. +# +# To use this Makefile fragment, simply: +# +# (1) Optionally define BUILDLINK_DEPENDS.apache to the dependency pattern +# for the version of apache desired. +# (2) Include this Makefile fragment in the package Makefile, +# (3) Add ${BUILDLINK_DIR}/include to the front of the C preprocessor's header +# search path, and +# (4) Add ${BUILDLINK_DIR}/lib to the front of the linker's library search +# path. + +.if !defined(APACHE_BUILDLINK_MK) +APACHE_BUILDLINK_MK= # defined + +.include "../../mk/bsd.buildlink.mk" + +BUILDLINK_DEPENDS.apache?= apache{,6}-1.3.* + +# For "apxs": +BUILD_DEPENDS+= perl>=${PERL5_REQD}:../../lang/perl5 +BUILD_DEPENDS+= ${BUILDLINK_DEPENDS.apache}:../../comms/apache + +EVAL_PREFIX+= BUILDLINK_PREFIX.apache=apache +BUILDLINK_PREFIX.apache_DEFAULT= ${LOCALBASE} +BUILDLINK_FILES.apache= include/httpd/*/*.h +BUILDLINK_FILES.apache+= include/httpd/*.h + +BUILDLINK_TARGETS.apache= apache-buildlink +BUILDLINK_TARGETS.apache+= apache-apxs-buildlink +BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.apache} + +APXS?= ${BUILDLINK_DIR}/sbin/apxs +.if defined(GNU_CONFIGURE) +CONFIGURE_ARGS+= --with-apxs="${APXS}" +.endif + +pre-configure: ${BUILDLINK_TARGETS.apache} +apache-buildlink: _BUILDLINK_USE + +_APACHE_APXS_SED= \ + -e "s|${BUILDLINK_PREFIX.apache}\(/include/httpd\)|${BUILDLINK_DIR}\1|g" + +apache-apxs-buildlink: + ${_PKG_SILENT}${_PKG_DEBUG} \ + cookie=${BUILDLINK_DIR}/.apache_apxs_buildlink_done; \ + if [ ! -f $${cookie} ]; then \ + file=sbin/apxs; \ + ${ECHO_MSG} "Creating script ${BUILDLINK_DIR}/$${file}."; \ + ${MKDIR} `${DIRNAME} ${BUILDLINK_DIR}/$${file}`; \ + ${SED} ${_APACHE_APXS_SED} \ + ${BUILDLINK_PREFIX.apache}/$${file} \ + > ${BUILDLINK_DIR}/$${file}; \ + ${CHMOD} +x ${BUILDLINK_DIR}/$${file}; \ + ${ECHO} ${BUILDLINK_PREFIX.apache}/$${file} >> $${cookie}; \ + fi + +.endif # APACHE_BUILDLINK_MK |