Date: Sun, 6 Feb 2005 20:11:04 +0200 From: Peter Pentchev <roam@ringlet.net> To: apache@FreeBSD.org Subject: Fix the mod_php3 port dependency issues Message-ID: <20050206181104.GB29361@straylight.m.ringlet.net>
next in thread | raw e-mail | index | archive | help
--nmemrqcdn5VTmUEE Content-Type: multipart/mixed; boundary="PmA2V3Z32TCmWXqI" Content-Disposition: inline --PmA2V3Z32TCmWXqI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 'Lo there, Attached is a patch that fixes the various dependency issues of the www/mod_php3 port. The only exception is mcrypt support, and I'll get it working in the next day or so. With this patch, and with the BROKEN part commented out by hand, the port gets at least as far as compilation, installation, loading in Apache, and executing phpinfo(), with a maximum of options enabled. This means four cases: - sybasedb, !sybasect, !interbase, !mcrypt - !sybasedb, sybasect, interbase, !mcrypt - !sybasedb, !sybasect, interbase, !mcrypt (all the rest are turned on) As mentioned above, I'll probably get mcrypt running RSN. The sybasedb/interbase conflict seems to stem from both of them redefining a couple of C types, which I don't think the mod_php3 port can work around by itself. The funny part is that I could not see any dependencies on MySQL 3.x; what exactly is the BROKEN comment referring to? Or is it something that had been fixed in the meantime, or something that I am simply not seeing since I have a DEFAULT_MYSQL_VER?=3D40 setting in /etc/make.conf? If there are no objections, I could commit this (possibly leaving the BROKEN comment intact until the situation is cleared up), and maybe even take over maintainership of www/mod_php3 and lang/php3, since I have something of a vested interest in keeping mod_php3 running for a couple more months at least :) G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@cnsys.bg roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 Do you think anybody has ever had *precisely this thought* before? --PmA2V3Z32TCmWXqI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="php3-dep.patch" Content-Transfer-Encoding: quoted-printable Index: ports/www/mod_php3/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/ports/www/mod_php3/Makefile,v retrieving revision 1.145 diff -u -r1.145 Makefile --- ports/www/mod_php3/Makefile 22 Dec 2004 02:19:21 -0000 1.145 +++ ports/www/mod_php3/Makefile 6 Feb 2005 18:10:09 -0000 @@ -32,6 +32,7 @@ =20 SLAVEDIRS=3D lang/php3 =20 +USE_REINPLACE=3D yes USE_SUBMAKE=3D yes GNU_CONFIGURE=3D yes =20 @@ -72,6 +73,10 @@ pre-fetch: @${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.php =20 +post-patch: + ${FIND} ${WRKSRC} -type f | ${XARGS} ${REINPLACE_CMD} -e 's/malloc\.h/std= lib.h/' + ${REINPLACE_CMD} -e 's/-lsnmp/-lnetsnmp/' ${WRKSRC}/configure + post-install: .if !defined(STANDALONE) @${INSTALL_DATA} ${WRKSRC}/php3.ini-dist ${PREFIX}/etc @@ -102,6 +107,10 @@ .include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc" .endif =20 +.if !empty(LIB_DEPENDS:Mgds.*) && !empty(LIB_DEPENDS:Msybdb.*) +BROKEN=3D Conflicts between the Interbase and SybaseDB drivers +.endif + # XXX: # Has to be kept in sync with the defaults in configure.php .ifndef(WITHOUT_MYSQL) Index: ports/www/mod_php3/files/patch-functions::ldap.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: ports/www/mod_php3/files/patch-functions::ldap.c diff -N ports/www/mod_php3/files/patch-functions::ldap.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ ports/www/mod_php3/files/patch-functions::ldap.c 6 Feb 2005 17:18:15 -0= 000 @@ -0,0 +1,110 @@ +--- functions/ldap.c.orig Sun Feb 6 19:17:23 2005 ++++ functions/ldap.c Sun Feb 6 19:17:29 2005 +@@ -400,12 +400,18 @@ +=20 + if (ldap_bind_s(ldap, ldap_bind_rdn, ldap_bind_pw, LDAP_AUTH_SIMPLE) != =3D LDAP_SUCCESS) { + #if !HAVE_NSLDAP ++# if LDAP_API_VERSION > 3000 ++ int ldaperror; ++ ldap_get_option(ldap, LDAP_OPT_RESULT_CODE, &ldaperror); ++ php3_error(E_WARNING,"LDAP: Unable to bind to server: %s",ldap_err2str= ing(ldaperror)); ++#else + # if LDAP_API_VERSION > 2000 + /* New versions of OpenLDAP do it this way */ + php3_error(E_WARNING,"LDAP: Unable to bind to server: %s",ldap_err2str= ing(ldap_get_lderrno(ldap,NULL,NULL))); + # else + php3_error(E_WARNING,"LDAP: Unable to bind to server: %s",ldap_err2str= ing(ldap->ld_errno)); + # endif ++# endif + #else + php3_error(E_WARNING,"LDAP: Unable to bind to server: %s",ldap_err2str= ing(ldap_get_lderrno(ldap,NULL,NULL))); + #endif +@@ -431,11 +437,19 @@ + if (ldap =3D=3D NULL) RETURN_LONG(0); +=20 + #if !HAVE_NSLDAP ++# if LDAP_API_VERSION > 3000 ++ { ++ int ldaperror; ++ ldap_get_option(ldap, LDAP_OPT_RESULT_CODE, &ldaperror); ++ RETURN_LONG(ldaperror); ++ } ++#else + # if LDAP_API_VERSION > 2000 + RETURN_LONG(ldap_get_lderrno(ldap, NULL, NULL)); + # else + RETURN_LONG(ldap->ld_errno); + # endif ++# endif + #else + RETURN_LONG(ldap_get_lderrno(ldap, NULL, NULL)); + #endif +@@ -459,11 +473,15 @@ + if (ldap =3D=3D NULL) RETURN_FALSE; +=20 + #if !HAVE_NSLDAP ++# if LDAP_API_VERSION > 3000 ++ ldap_get_option(ldap, LDAP_OPT_RESULT_CODE, &ld_errno); ++#else + # if LDAP_API_VERSION > 2000 + ld_errno =3D ldap_get_lderrno(ldap, NULL, NULL); + # else + ld_errno =3D ldap->ld_errno; + # endif ++# endif + #else + ld_errno =3D ldap_get_lderrno(ldap, NULL, NULL); + #endif +@@ -601,11 +619,17 @@ +=20 + if (ldap_search_s(ldap, ldap_base_dn, scope, ldap_filter, ldap_attrs, at= trsonly, &ldap_result) !=3D LDAP_SUCCESS) { + #if !HAVE_NSLDAP ++# if LDAP_API_VERSION > 3000 ++ int ldaperror; ++ ldap_get_option(ldap, LDAP_OPT_RESULT_CODE, &ldaperror); ++ php3_error(E_WARNING,"LDAP: Unable to perform the search: %s",ldap_err= 2string(ldaperror)); ++#else + # if LDAP_API_VERSION > 2000 + php3_error(E_WARNING,"LDAP: Unable to perform the search: %s",ldap_err= 2string(ldap_get_lderrno(ldap,NULL,NULL))); + # else + php3_error(E_WARNING, "LDAP: Unable to perform the search: %s", ldap_er= r2string(ldap->ld_errno)); + # endif ++# endif + #else + php3_error(E_WARNING,"LDAP: Unable to perform the search: %s",ldap_err= 2string(ldap_get_lderrno(ldap,NULL,NULL))); + #endif +@@ -972,11 +996,17 @@ +=20 + if ((ldap_value =3D ldap_get_values(ldap, ldap_result_entry, attribute))= =3D=3D NULL) { + #if !HAVE_NSLDAP ++# if LDAP_API_VERSION > 3000 ++ int ldaperror; ++ ldap_get_option(ldap, LDAP_OPT_RESULT_CODE, &ldaperror); ++ php3_error(E_WARNING, "LDAP: Cannot get the value(s) of attribute %s",l= dap_err2string(ldaperror)); ++#else + # if LDAP_API_VERSION > 2000 + php3_error(E_WARNING, "LDAP: Cannot get the value(s) of attribute %s", = ldap_err2string(ldap_get_lderrno(ldap,NULL,NULL))); + # else + php3_error(E_WARNING, "LDAP: Cannot get the value(s) of attribute %s", = ldap_err2string(ldap->ld_errno)); + # endif ++# endif + #else + php3_error(E_WARNING, "LDAP: Cannot get the value(s) of attribute %s", = ldap_err2string(ldap_get_lderrno(ldap,NULL,NULL))); + #endif +@@ -1027,10 +1057,16 @@ +=20 + if ((ldap_value_len =3D ldap_get_values_len(ldap, ldap_result_entry, att= ribute)) =3D=3D NULL) { + #if !HAVE_NSLDAP ++# if LDAP_API_VERSION > 3000 ++ int ldaperror; ++ ldap_get_option(ldap, LDAP_OPT_RESULT_CODE, &ldaperror); ++ php3_error(E_WARNING,"LDAP: Cannot get the value(s) of attribute %s",ld= ap_err2string(ldaperror)); ++#else + # if LDAP_API_VERSION > 2000 + php3_error(E_WARNING, "LDAP: Cannot get the value(s) of attribute %s", = ldap_err2string(ldap_get_lderrno(ldap,NULL,NULL))); + # else + php3_error(E_WARNING, "LDAP: Cannot get the value(s) of attribute %s", = ldap_err2string(ldap->ld_errno)); ++# endif + # endif + #else + php3_error(E_WARNING, "LDAP: Cannot get the value(s) of attribute %s", = ldap_err2string(ldap_get_lderrno(ldap,NULL,NULL))); Index: ports/www/mod_php3/files/patch-functions::snmp.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: ports/www/mod_php3/files/patch-functions::snmp.c diff -N ports/www/mod_php3/files/patch-functions::snmp.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ ports/www/mod_php3/files/patch-functions::snmp.c 6 Feb 2005 17:23:22 -0= 000 @@ -0,0 +1,37 @@ +--- functions/snmp.c.orig Sun Feb 6 19:18:38 2005 ++++ functions/snmp.c Sun Feb 6 19:23:02 2005 +@@ -70,6 +70,7 @@ + #ifdef HAVE_DEFAULT_STORE_H + #include <default_store.h> + #endif ++#include <net-snmp/net-snmp-config.h> + #include <asn1.h> + #include <snmp_api.h> + #include <snmp_client.h> +@@ -283,7 +284,7 @@ + continue; /* not part of this subtree */ +=20 + if (st!=3D11) +- sprint_value(buf,vars->name, vars->name_length, vars); ++ snprint_value(buf,sizeof(buf),vars->name, vars->name_length, vars); + #if 0 + Debug("snmp response is: %s\n",buf); + #endif +@@ -293,7 +294,7 @@ + /* Add to returned array */ + add_next_index_string(return_value,buf,1); + } else if (st=3D=3D3) { +- sprint_objid(buf2, vars->name, vars->name_length); ++ snprint_objid(buf2, sizeof(buf2), vars->name, vars->name_length); + add_assoc_string(return_value,buf2,buf,1); + } + if (st>=3D2 && st!=3D11) { +@@ -310,7 +311,7 @@ + if (response->errstat =3D=3D SNMP_ERR_NOSUCHNAME) { + for(count=3D1, vars =3D response->variables; vars && count !=3D res= ponse->errindex; + vars =3D vars->next_variable, count++); +- if (vars) sprint_objid(buf,vars->name, vars->name_length); ++ if (vars) snprint_objid(buf, sizeof(buf), vars->name, vars->name_le= ngth); + php3_error(E_WARNING,"This name does not exist: %s\n",buf); + } + if (st=3D=3D1) { Index: ports/www/mod_php3/scripts/configure.php =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/ports/www/mod_php3/scripts/configure.php,v retrieving revision 1.126 diff -u -r1.126 configure.php --- ports/www/mod_php3/scripts/configure.php 3 Jun 2004 15:49:13 -0000 1.126 +++ ports/www/mod_php3/scripts/configure.php 6 Feb 2005 18:04:40 -0000 @@ -95,15 +95,14 @@ MYSQL=3D1 ;; \"PostgreSQL\") - echo "POSTGRESQL_PORT?=3D databases/postgresql7" - echo "LIB_DEPENDS+=3D pq.3:\${PORTSDIR}/\${POSTGRESQL_PORT}" + echo "USE_PGSQL=3D yes" echo "CONFIGURE_ARGS+=3D--with-pgsql=3D\${PREFIX}" - if /usr/bin/ldd ${PREFIX}/bin/postgres | /usr/bin/grep -q "libssl"; then + if /usr/bin/ldd ${PREFIX}/bin/psql | /usr/bin/grep -q "libssl"; then LIBS=3D"-lcrypto -lssl" fi ;; \"SybaseDB\") - echo "LIB_DEPENDS+=3D sybdb.1:\${PORTSDIR}/databases/freetds" + echo "LIB_DEPENDS+=3D sybdb.4:\${PORTSDIR}/databases/freetds" echo "LIB_DEPENDS+=3D iconv.3:\${PORTSDIR}/converters/libiconv" echo "CONFIGURE_ARGS+=3D--with-sybase=3D\${PREFIX}" LIBS=3D"${LIBS} -L\${LOCALBASE}/lib -liconv" @@ -115,7 +114,7 @@ SYBASEDB=3D1 ;; \"SybaseCT\") - echo "LIB_DEPENDS+=3D ct.0:\${PORTSDIR}/databases/freetds" + echo "LIB_DEPENDS+=3D ct.2:\${PORTSDIR}/databases/freetds" echo "LIB_DEPENDS+=3D iconv.3:\${PORTSDIR}/converters/libiconv" echo "CONFIGURE_ARGS+=3D--with-sybase-ct=3D\${PREFIX}" LIBS=3D"${LIBS} -L\${LOCALBASE}/lib -liconv" @@ -135,28 +134,26 @@ echo "CONFIGURE_ARGS+=3D--with-dbase" ;; \"OpenLDAP\") - echo "LIB_DEPENDS+=3D ldap.1:\${PORTSDIR}/net/openldap12" - echo "LIB_DEPENDS+=3D lber.1:\${PORTSDIR}/net/openldap12" + echo "USE_OPENLDAP=3D yes" echo "CONFIGURE_ARGS+=3D--with-ldap=3D\${PREFIX}" if [ -f /usr/lib/libkrb.a -a -f /usr/lib/libdes.a -a ! -L /usr/lib/libd= es.a ]; then LIBS=3D"${LIBS} -lkrb -ldes -L\${PREFIX}/lib" fi ;; \"SNMP\") - echo "LIB_DEPENDS+=3D snmp.4:\${PORTSDIR}/net/net-snmp" + echo "LIB_DEPENDS+=3D netsnmp.7:\${PORTSDIR}/net-mgmt/net-snmp" echo "CONFIGURE_ARGS+=3D--with-snmp=3D\${PREFIX} --enable-ucd-snmp-hack" + echo "CPPFLAGS+=3D -I${PREFIX}/include/net-snmp/library/" ;; \"XML\") - echo "BUILD_DEPENDS+=3D \${PREFIX}/lib/libexpat.a:\${PORTSDIR}/textproc= /expat" - echo "BUILD_DEPENDS+=3D \${PREFIX}/include/xml/xmlparse.h:\${PORTSDIR}/= textproc/expat" - echo "BUILD_DEPENDS+=3D \${PREFIX}/include/xml/xmltok.h:\${PORTSDIR}/te= xtproc/expat" + echo "USE_APACHE=3D yes" echo "CONFIGURE_ARGS+=3D--with-xml=3D\${PREFIX}" ;; \"FTP\") echo "CONFIGURE_ARGS+=3D--with-ftp" ;; \"gettext\") - echo "LIB_DEPENDS+=3D intl.5:\${PORTSDIR}/devel/gettext" + echo "LIB_DEPENDS+=3D intl.6:\${PORTSDIR}/devel/gettext" echo "CONFIGURE_ARGS+=3D--with-gettext=3D\${PREFIX}" ;; \"YP\") --PmA2V3Z32TCmWXqI-- --nmemrqcdn5VTmUEE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD4DBQFCBl247Ri2jRYZRVMRAgltAJ9HIBijstIXSMotOcVyWABAbOi/pACWPYty 7s0nwcz6sGLVR2hBnspdnQ== =Tfud -----END PGP SIGNATURE----- --nmemrqcdn5VTmUEE--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050206181104.GB29361>