From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Oct 7 06:20:14 2003 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E8A0E16A4B3 for ; Tue, 7 Oct 2003 06:20:13 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8766044001 for ; Tue, 7 Oct 2003 06:20:06 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h97DK6FY051547 for ; Tue, 7 Oct 2003 06:20:06 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h97DK6k2051546; Tue, 7 Oct 2003 06:20:06 -0700 (PDT) (envelope-from gnats) Resent-Date: Tue, 7 Oct 2003 06:20:06 -0700 (PDT) Resent-Message-Id: <200310071320.h97DK6k2051546@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Alex Dupre Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 62B1416A4B3; Tue, 7 Oct 2003 06:19:31 -0700 (PDT) Received: from relay.gufi.org (civetta.gufi.org [212.110.23.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD47944051; Tue, 7 Oct 2003 06:19:17 -0700 (PDT) (envelope-from alex@vaio.alexdupre.com) Received: from vaio.alexdupre.com (host245-49.pool8288.interbusiness.it [82.88.49.245]) by relay.gufi.org (Postfix) with ESMTP id DF19720FA1; Tue, 7 Oct 2003 15:19:15 +0200 (CEST) Received: from vaio.alexdupre.com (localhost [127.0.0.1]) by vaio.alexdupre.com (8.12.9/8.12.9) with ESMTP id h97DJFbB076013; Tue, 7 Oct 2003 15:19:15 +0200 (CEST) (envelope-from alex@vaio.alexdupre.com) Received: (from alex@localhost) by vaio.alexdupre.com (8.12.9/8.12.9/Submit) id h97DJEwt076012; Tue, 7 Oct 2003 15:19:14 +0200 (CEST) Message-Id: <200310071319.h97DJEwt076012@vaio.alexdupre.com> Date: Tue, 7 Oct 2003 15:19:14 +0200 (CEST) From: Alex Dupre To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: roam@FreeBSD.org cc: nork@FreeBSD.org Subject: ports/57698: Add USE_APACHE knob to bsd.port.mk. X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Alex Dupre List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2003 13:20:14 -0000 >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: