Date: Tue, 7 Oct 2003 15:19:14 +0200 (CEST) From: Alex Dupre <sysadmin@alexdupre.com> To: FreeBSD-gnats-submit@FreeBSD.org Cc: nork@FreeBSD.org Subject: ports/57698: Add USE_APACHE knob to bsd.port.mk. Message-ID: <200310071319.h97DJEwt076012@vaio.alexdupre.com> Resent-Message-ID: <200310071320.h97DK6k2051546@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 57698 >Category: ports >Synopsis: Add USE_APACHE knob to bsd.port.mk. >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Oct 07 06:20:06 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Alex Dupre >Release: FreeBSD 4.9-ALEXDUPRE i386 >Organization: >Environment: System: FreeBSD 4.9-ALEXDUPRE i386 >Description: Add support in bsd.port.mk for Apache dependency. Define USE_APACHE in ports to enable the dependency. Define WANT_APACHE_VER if the port run only with a specific version. User can set WITH_APACHE_VER to choose the version (and portdir) or fallback to autodetect or DEFAULT_APACHE_VER. This patch is required for the next mega-patch to php ports. >How-To-Repeat: >Fix: --- bsd.port.mk.diff begins here --- --- bsd.port.mk.orig Tue Oct 7 11:45:46 2003 +++ bsd.port.mk Tue Oct 7 12:46:34 2003 @@ -357,6 +357,13 @@ # If set to an unkown value, the port is marked BROKEN. # ## +# USE_APACHE - Add Apache web server dependency. +# +# DEFAULT_APACHE_VER - Default Apache version. Can be overriden within a +# port. Default: 2. +# WANT_APACHE_VER - Says that the port requires this version. Legal +# values: 13, 2. +## # USE_JAVA - Says that the port relies on the Java language. # Implies inclusion of bsd.java.mk. (Also see # that file for more information on USE_JAVA_*). @@ -1045,6 +1052,34 @@ BROKEN= "unknown OpenLDAP version: ${WANT_OPENLDAP_VER}" .endif .endif + +.if defined(USE_APACHE) +DEFAULT_APACHE_VER?= 2 + +# Setting/finding Apache version we want. +.if defined(WANT_APACHE_VER) +APACHE_VER= ${WANT_APACHE_VER} +.elif defined(WITH_APACHE_VER) +APACHE_VER= ${WITH_APACHE_VER} +.elif exists(${LOCALBASE}/include/apache2/apr.h) +APACHE_VER= 2 +.elif exists(${LOCALBASE}/include/apache/ap.h) +APACHE_VER= 13 +.else +APACHE_VER= ${DEFAULT_APACHE_VER} +.endif # WANT_APACHE + +APXS?= ${LOCALBASE}/sbin/apxs +APACHE_PORT?= ${PORTSDIR}/www/apache${APACHE_VER} + +# And now we are checking if we can use it +.if exists(${APACHE_PORT}) +BUILD_DEPENDS+= ${APXS}:${APACHE_PORT} +RUN_DEPENDS+= ${APXS}:${APACHE_PORT} +.else +BROKEN= "unknown Apache version: ${APACHE_VER}" +.endif # Check for correct deps +.endif # USE_APACHE .if defined(EMACS_PORT_NAME) .include "${PORTSDIR}/Mk/bsd.emacs.mk" --- bsd.port.mk.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200310071319.h97DJEwt076012>