From owner-freebsd-ports@FreeBSD.ORG Sat Jun 28 10:39:02 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0F7EC37B401 for ; Sat, 28 Jun 2003 10:39:02 -0700 (PDT) Received: from mail.liwing.de (mail.liwing.de [213.70.188.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id CCA1443FCB for ; Sat, 28 Jun 2003 10:39:00 -0700 (PDT) (envelope-from rehsack@liwing.de) Received: (qmail 43628 invoked from network); 28 Jun 2003 17:38:57 -0000 Received: from stingray.liwing.de (HELO liwing.de) ([213.70.188.164]) (envelope-sender ) by mail.liwing.de (qmail-ldap-1.03) with SMTP for ; 28 Jun 2003 17:38:57 -0000 Message-ID: <3EFDD2B1.4050100@liwing.de> Date: Sat, 28 Jun 2003 19:38:57 +0200 From: Jens Rehsack Organization: LiWing IT-Services User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 (Compact - Build 2) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Alex Dupre Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: ports cc: "Benjamin Thelen \(CCGIS\)" cc: Norikatsu Shigemura Subject: lang/php4: questions and suggestions X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jun 2003 17:39:02 -0000 Another question: A FreeBSD user (Benjamin Thelen) request some php support for an addon named 'umn-mapserver' which requires www/php4-cgi (and maybe others) compiled with configure arg '--with-regex=system'. I've seen you don't enable '--with-regex', neither php4 builtin one nor system (what isn't recommented to be used, of course). To give Benjamin a better support for his requirement, maybe a port addition of the program he uses may a nice thing :-) Before I start it (or maybe you want to do it), I just want to talk back to you how the requirement of --with-regex or --with-regex=system should be handled for those systems? A quick solution will be the define of a constant named WITH_REGEX, and if it's sth. like [Ss][Yy][Ss][Tt][Ee][Mm], '--with-regex=system' is added to CONFIGURE_ARGS, '--with-regex' otherwise. To avoid overwiting PHP4_OPTIONS defined in /etc/make.conf, Makefile.local, /usr/local/etc/pkgtools.conf or sucked in from ${PHP4_OPTFILE}, sth. like PHP4_ALSO_OPTIONS (only used from ports which require php4) could be a nice way. What's your oppinion to that problem? Another conflict I see is the huge usage of constants of the form WITH_${EXT}. Let me explain it more detailed of the quote: On 5/5/2002 12:47 AM, Andrey A. Chernov wrote: AC> And please rename all variables using APACHE_* and WITH_APACHE_* prefixes AC> not only to eliminate potential conflicts but to allow all Apache port AC> variables appearse as single block in /etc/make.conf Former I bothered you with my php4 requirements, I bothered some others with some patches, too :-) One of the was Andrey A. Chernov, the maintainer of www/apache13 and many more. He told me, and I had to agree because he was right, that all variables and constants which will be used/recognized in the port, should have a prefix. The argument that don't do that may conflict with dependend ports and other ones (when defined in /etc/make.conf) is a real good one. And especially lang/php4 and it's slave ports should respect this arguments more than others, because it defines previously unknown variables when an option in the configuration is turned on. I imagine 'bout sth. like .if defined(WITH_MYSQL) WITH_PHP4_MYSQL=${WITH_MYSQL} .endif ... if defined(WITH_PHP4_MYSQL) DEFAULT_PHP4_MYSQL?= 41 .if (${WITH_PHP4_MYSQL} != 3) && (${WITH_PHP4_MYSQL} != 40) && \ (${WITH_PHP4_MYSQL} != 41) .if exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.10) WITH_PHP4_MYSQL=3 .elif exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.14) WITH_PHP4_MYSQL=40 .elif exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.12) WITH_PHP4_MYSQL=41 .endif .endif .if (${WITH_PHP4_MYSQL} != 3) && (${WITH_PHP4_MYSQL} != 40) && \ (${WITH_PHP4_MYSQL} != 41) WITH_PHP4_MYSQL=${DEFAULT_PHP4_MYSQL} .endif .if ${WITH_PHP4_MYSQL} == 3 LIB_DEPENDS+= mysqlclient.10:${PORTSDIR}/databases/mysql323-client .elif ${WITH_PHP4_MYSQL} == 40 LIB_DEPENDS+= mysqlclient.12:${PORTSDIR}/databases/mysql40-client .elif ${WITH_PHP4_MYSQL} == 41 LIB_DEPENDS+= mysqlclient.14:${PORTSDIR}/databases/mysql41-client .endif CONFIGURE_ARGS+=--with-mysql=${LOCALBASE} .endif Ok, I see MYSQL as an example was a little bit unlucky, but you can also see what in my humble oppinion would be a good solution for such complex dependencies. I will be very interested in comments about each point. Best, Jens