[26452] trunk/dports/www/php4/Portfile

source_changes at macosforge.org source_changes at macosforge.org
Sun Jun 24 03:10:29 PDT 2007


Revision: 26452
          http://trac.macosforge.org/projects/macports/changeset/26452
Author:   jwa at macports.org
Date:     2007-06-24 03:10:28 -0700 (Sun, 24 Jun 2007)

Log Message:
-----------
adding pear check closing #11142

Modified Paths:
--------------
    trunk/dports/www/php4/Portfile

Modified: trunk/dports/www/php4/Portfile
===================================================================
--- trunk/dports/www/php4/Portfile	2007-06-24 07:41:49 UTC (rev 26451)
+++ trunk/dports/www/php4/Portfile	2007-06-24 10:10:28 UTC (rev 26452)
@@ -9,250 +9,256 @@
 homepage        http://www.php.net/
 description     PHP: Hypertext Preprocessor
 long_description 	PHP is a widely-used general-purpose scripting \
-			language that is especially suited for Web development \
-			and can be embedded into HTML. 
+    language that is especially suited for Web development \
+    and can be embedded into HTML. 
 platforms	darwin freebsd
 
 master_sites 	${homepage}distributions/:release \
-                http://it.php.net/distributions/:release \
-                http://fi.php.net/distributions/:release \
-                http://de.php.net/distributions/:release \
-                http://gr.php.net/distributions/:release \
-                http://fr.php.net/distributions/:release \
-                http://es.php.net/distributions/:release \
-                http://se.php.net/distributions/:release \
-                http://downloads.php.net/ilia/:rc \
-                http://downloads.php.net/jani/:rc 
-                
+    http://it.php.net/distributions/:release \
+    http://fi.php.net/distributions/:release \
+    http://de.php.net/distributions/:release \
+    http://gr.php.net/distributions/:release \
+    http://fr.php.net/distributions/:release \
+    http://es.php.net/distributions/:release \
+    http://se.php.net/distributions/:release \
+    http://downloads.php.net/ilia/:rc \
+    http://downloads.php.net/jani/:rc 
+
 distfiles	php-${version}.tar.bz2:release
 worksrcdir	php-${version}
 use_bzip2	yes
 checksums	sha1 a6e2d6b5c5aa4e82a718563dc8dbb4b83fc91b78
 
 depends_lib	port:libiconv \
-		port:expat  \
-		port:gettext \
-		port:zlib \
-		port:openssl \
-		port:tiff \
-		port:libxml2 \
-		port:libtool
+    port:expat  \
+    port:gettext \
+    port:zlib \
+    port:openssl \
+    port:tiff \
+    port:libxml2 \
+    port:libtool
 
 configure.args	--mandir=${prefix}/share/man --infodir=${prefix}/share/info \
-		--includedir=${prefix}/include/php4 \
-		--libdir=${prefix}/lib/php4 \
-		--sysconfdir=${prefix}/etc/php4 \
-		--with-config-file-path=${prefix}/etc \
-		--with-pear=${prefix}/lib/php4 --program-suffix=4 \
-		--enable-mbstring --enable-dbx --enable-safe-mode --enable-dba \
-		--enable-calendar --enable-exif --enable-ftp --enable-wddx \
-		--enable-filepro --enable-bcmath --enable-trans-sid \
-		--enable-cli --with-xml --with-xmlrpc \
-		--without-mysql \
-		--with-iconv=${prefix} \
-		--with-zlib=${prefix} \
-		--with-gettext=${prefix} \
-		--with-expat-dir=${prefix} \
-		--with-dom=${prefix} \
-		--with-openssl=${prefix}
+    --includedir=${prefix}/include/php4 \
+    --libdir=${prefix}/lib/php4 \
+    --sysconfdir=${prefix}/etc/php4 \
+    --with-config-file-path=${prefix}/etc \
+    --with-pear=${prefix}/lib/php4 --program-suffix=4 \
+    --enable-mbstring --enable-dbx --enable-safe-mode --enable-dba \
+    --enable-calendar --enable-exif --enable-ftp --enable-wddx \
+    --enable-filepro --enable-bcmath --enable-trans-sid \
+    --enable-cli --with-xml --with-xmlrpc \
+    --without-mysql \
+    --with-iconv=${prefix} \
+    --with-zlib=${prefix} \
+    --with-gettext=${prefix} \
+    --with-expat-dir=${prefix} \
+    --with-dom=${prefix} \
+    --with-openssl=${prefix}
 configure.env
 
 platform darwin 6 {
-	depends_lib-append	port:dlcompat
-	configure.env-append	LDFLAGS=-L${prefix}/lib LIBS=-ldl \
-			CPPFLAGS="-I${prefix}/include -no-cpp-precomp -DBIND_8_COMPAT"
+    depends_lib-append	port:dlcompat
+    configure.env-append	LDFLAGS=-L${prefix}/lib LIBS=-ldl \
+	CPPFLAGS="-I${prefix}/include -no-cpp-precomp -DBIND_8_COMPAT"
 }
 
 platform darwin 7 {
-	configure.env-append	LDFLAGS="-L${prefix}/lib" LIBS=-ldl \
-			CPPFLAGS="-I${prefix}/include -no-cpp-precomp"
+    configure.env-append	LDFLAGS="-L${prefix}/lib" LIBS=-ldl \
+	CPPFLAGS="-I${prefix}/include -no-cpp-precomp"
 }
 
 platform darwin 8 {
-	configure.env-append	CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0
+    configure.env-append	CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0
 }
 
 platform freebsd {
-	configure.env.append	LDFLAGS=-L${prefix}/lib \
-					CPPFLAGS="-I${prefix}/include
+    configure.env.append	LDFLAGS=-L${prefix}/lib \
+	CPPFLAGS="-I${prefix}/include
 }
 
 variant macosx {
-	configure.args-append	--with-ldap=/usr --with-kerberos=/usr --with-iodbc=/usr
+    configure.args-append	--with-ldap=/usr --with-kerberos=/usr --with-iodbc=/usr
 }
 
 variant apache {
-	if { ! [variant_isset macosx] } {
-		depends_lib-append	path:${prefix}/sbin/apxs:apache
-		configure.args-append 	--with-apxs=${prefix}/sbin/apxs
-	} else {
-		configure.args-append	--with-apxs=/usr/sbin/apxs
-	}
+    if { ! [variant_isset macosx] } {
+	depends_lib-append	path:${prefix}/sbin/apxs:apache
+	configure.args-append 	--with-apxs=${prefix}/sbin/apxs
+    } else {
+	configure.args-append	--with-apxs=/usr/sbin/apxs
+    }
 }
 
 variant apache2 {
-	depends_lib-append	path:${prefix}/apache2/bin/apxs:apache2
-	configure.args-append 	--with-apxs2=${prefix}/apache2/bin/apxs
+    depends_lib-append	path:${prefix}/apache2/bin/apxs:apache2
+    configure.args-append 	--with-apxs2=${prefix}/apache2/bin/apxs
 }
 
 variant apache20 {
-	depends_lib-append	path:${prefix}/apache20/bin/apxs:apache2
-	configure.args-append 	--with-apxs2=${prefix}/apache20/bin/apxs
+    depends_lib-append	path:${prefix}/apache20/bin/apxs:apache2
+    configure.args-append 	--with-apxs2=${prefix}/apache20/bin/apxs
 }
 
 variant crypt {
-	depends_lib-append	port:mhash port:libmcrypt
-	configure.args-append	--with-mhash=${prefix} --with-mcrypt=${prefix}
+    depends_lib-append	port:mhash port:libmcrypt
+    configure.args-append	--with-mhash=${prefix} --with-mcrypt=${prefix}
 }	
 
 variant curl {
-	depends_lib-append	port:curl
-	configure.args-append	--with-curl=${prefix}
+    depends_lib-append	port:curl
+    configure.args-append	--with-curl=${prefix}
 }
 
 variant gd {
-	depends_lib-append	port:jpeg port:libpng port:freetype
-	
-	configure.args-append	--with-gd \
-				--with-jpeg-dir=${prefix} \
-				--with-png-dir=${prefix} \
-				--enable-gd-native-ttf \
-				--with-freetype-dir=${prefix}
+    depends_lib-append	port:jpeg port:libpng port:freetype
+    
+    configure.args-append	--with-gd \
+	--with-jpeg-dir=${prefix} \
+	--with-png-dir=${prefix} \
+	--enable-gd-native-ttf \
+	--with-freetype-dir=${prefix}
 }
 
 variant mysql3 {
-	depends_lib-append	port:mysql3
-	configure.args-append	--with-mysql=${prefix}
+    depends_lib-append	port:mysql3
+    configure.args-append	--with-mysql=${prefix}
 }
 
 variant mysql4 {
-	depends_lib-append	port:mysql4
-	configure.args-append	--with-mysql=${prefix}
+    depends_lib-append	port:mysql4
+    configure.args-append	--with-mysql=${prefix}
 }
 
 
 variant mysql5 {
-        depends_lib-append      port:mysql5
-        configure.args-delete   --without-mysql
-        configure.args-append   --with-mysql=${workpath}/mysql5
-        post-extract {
-                file mkdir "${workpath}/mysql5"
-                file link -symbolic "${workpath}/mysql5/lib" "${prefix}/lib/mysql5"
-                file link -symbolic "${workpath}/mysql5/include" "${prefix}/include/mysql5"
-        }
+    depends_lib-append      port:mysql5
+    configure.args-delete   --without-mysql
+    configure.args-append   --with-mysql=${workpath}/mysql5
+    post-extract {
+	file mkdir "${workpath}/mysql5"
+	file link -symbolic "${workpath}/mysql5/lib" "${prefix}/lib/mysql5"
+	file link -symbolic "${workpath}/mysql5/include" "${prefix}/include/mysql5"
+    }
 
-	post-destroot {
-		reinplace "s;${workpath}/mysql5/lib;${prefix}/lib/mysql5;" ${destroot}${prefix}/bin/php-config4
-	}
+    post-destroot {
+	reinplace "s;${workpath}/mysql5/lib;${prefix}/lib/mysql5;" ${destroot}${prefix}/bin/php-config4
+    }
 }
 
 variant postgresql8 {
-	pre-configure {
-		file mkdir ${workpath}/pgsql8
-		system "cd ${workpath}/pgsql8 && \
+    pre-configure {
+	file mkdir ${workpath}/pgsql8
+	system "cd ${workpath}/pgsql8 && \
 			ln -sf ${prefix}/include/postgresql82 include && \
 			ln -sf ${prefix}/lib/postgresql82 lib && \
 			ln -sf ${prefix}/lib/postgresql82/bin bin"
-	}
-	depends_lib-append	port:postgresql82
-	configure.args-append	--with-pgsql=${workpath}/pgsql8
+    }
+    depends_lib-append	port:postgresql82
+    configure.args-append	--with-pgsql=${workpath}/pgsql8
 }
 
 variant ldap {
-	depends_lib-append	port:openldap
-	configure.args-append --with-ldap=${prefix}
+    depends_lib-append	port:openldap
+    configure.args-append --with-ldap=${prefix}
 }
 
 variant imap {
-	depends_lib-append		port:cclient
-	configure.env-append	 CFLAGS=-I${prefix}/include/c-client
-	configure.args-append 	--with-imap=${prefix} --with-imap-ssl=/usr
+    depends_lib-append		port:cclient
+    configure.env-append	 CFLAGS=-I${prefix}/include/c-client
+    configure.args-append 	--with-imap=${prefix} --with-imap-ssl=/usr
 }
 
 variant xslt {
-	depends_lib-append	port:sablotron
-	configure.args-append	--enable-xslt --with-xslt-sablot=${prefix} --with-iconv-dir=${prefix}
+    depends_lib-append	port:sablotron
+    configure.args-append	--enable-xslt --with-xslt-sablot=${prefix} --with-iconv-dir=${prefix}
 }
- 
+
 # If no apache/apache2/apache20 variant is set, we set it (waiting a
 # better default variant management).
 if { ![variant_isset apache] &&
      ![variant_isset apache2] &&
      ![variant_isset apache20] } {
-	if { ! [variant_isset macosx] } {
-		depends_lib-append	path:${prefix}/sbin/apxs:apache
-		configure.args-append 	--with-apxs=${prefix}/sbin/apxs
-	} else {
-		configure.args-append	--with-apxs=/usr/sbin/apxs
-	}
+    if { ! [variant_isset macosx] } {
+	depends_lib-append	path:${prefix}/sbin/apxs:apache
+	configure.args-append 	--with-apxs=${prefix}/sbin/apxs
+    } else {
+	configure.args-append	--with-apxs=/usr/sbin/apxs
+    }
 }
 
 destroot.args	INSTALL_ROOT=${destroot} PHP_PEAR_INSTALL_DIR=${prefix}/lib/php
 destroot.target	install-cli install-pear install-build install-headers install-programs
 
 post-destroot	{
-	#copy module
-	if { [variant_isset apache] } {
-		xinstall -m 755 -d ${destroot}${prefix}/libexec/apache \
-			${destroot}${prefix}/etc/apache/extras-conf
-		xinstall -m 755 ${worksrcpath}/libs/libphp4.so ${destroot}${prefix}/libexec/apache/
-		xinstall -m 755 -c ${filespath}/mod_php.conf ${destroot}$prefix/etc/apache/extras-conf/mod_php.conf.sample
-	}
+    #copy module
+    if { [variant_isset apache] } {
+	xinstall -m 755 -d ${destroot}${prefix}/libexec/apache \
+	    ${destroot}${prefix}/etc/apache/extras-conf
+	xinstall -m 755 ${worksrcpath}/libs/libphp4.so ${destroot}${prefix}/libexec/apache/
+	xinstall -m 755 -c ${filespath}/mod_php.conf ${destroot}$prefix/etc/apache/extras-conf/mod_php.conf.sample
+    }
 
-	if { [variant_isset apache2] } {
-		xinstall -m 755 -d ${destroot}${prefix}/apache2/modules \
-			${destroot}${prefix}/apache2/conf/extras-conf
-		xinstall -m 755 ${worksrcpath}/libs/libphp4.so ${destroot}${prefix}/apache2/modules/
-		xinstall -m 755 -c ${filespath}/mod_php.conf ${destroot}${prefix}/apache2/conf/extras-conf/mod_php.conf.sample
-	}
+    if { [variant_isset apache2] } {
+	xinstall -m 755 -d ${destroot}${prefix}/apache2/modules \
+	    ${destroot}${prefix}/apache2/conf/extras-conf
+	xinstall -m 755 ${worksrcpath}/libs/libphp4.so ${destroot}${prefix}/apache2/modules/
+	xinstall -m 755 -c ${filespath}/mod_php.conf ${destroot}${prefix}/apache2/conf/extras-conf/mod_php.conf.sample
+    }
 
-	if { [variant_isset apache20] } {
-		xinstall -m 755 -d ${destroot}${prefix}/apache20/modules \
-			${destroot}${prefix}/apache20/conf/extras-conf
-		xinstall -m 755 ${worksrcpath}/libs/libphp4.so ${destroot}${prefix}/apache20/modules/
-		xinstall -m 755 -c ${filespath}/mod_php.conf ${destroot}${prefix}/apache20/conf/extras-conf/mod_php.conf.sample
-	}
+    if { [variant_isset apache20] } {
+	xinstall -m 755 -d ${destroot}${prefix}/apache20/modules \
+	    ${destroot}${prefix}/apache20/conf/extras-conf
+	xinstall -m 755 ${worksrcpath}/libs/libphp4.so ${destroot}${prefix}/apache20/modules/
+	xinstall -m 755 -c ${filespath}/mod_php.conf ${destroot}${prefix}/apache20/conf/extras-conf/mod_php.conf.sample
+    }
 
-	file rename ${destroot}${prefix}/etc/php4/pear.conf ${destroot}${prefix}/etc/php4/pear.conf.sample
+    file rename ${destroot}${prefix}/etc/php4/pear.conf ${destroot}${prefix}/etc/php4/pear.conf.sample
 
-	#copy php.ini
-	xinstall -m 755 -d ${destroot}${prefix}/etc
-	xinstall -m 755 ${workpath}/${worksrcdir}/php.ini-dist ${destroot}${prefix}/etc/php.ini-dist
-	xinstall -m 755 ${workpath}/${worksrcdir}/php.ini-recommended ${destroot}${prefix}/etc/php.ini-recommended
+    #copy php.ini
+    xinstall -m 755 -d ${destroot}${prefix}/etc
+    xinstall -m 755 ${workpath}/${worksrcdir}/php.ini-dist ${destroot}${prefix}/etc/php.ini-dist
+    xinstall -m 755 ${workpath}/${worksrcdir}/php.ini-recommended ${destroot}${prefix}/etc/php.ini-recommended
 
-	# rename files
-	cd ${destroot}${prefix}
-	file rename bin/pear bin/pear4
-	reinplace "s|${prefix}/bin/php|${prefix}/bin/php4|g" bin/pear4
+    # rename files
+    cd ${destroot}${prefix}
+    file rename bin/pear bin/pear4
+    reinplace "s|${prefix}/bin/php|${prefix}/bin/php4|g" bin/pear4
 
-	# remove crap
-	system "cd ${destroot} && rm -r .channels .depdb .depdblock .filemap .lock"
+    #nuke pear-stuff in ${destroot}
+    system "cd ${destroot} && rm -rf .channels .depdb .depdblock .filemap .lock"
+    
+    system "if \[ -f ${prefix}/lib/php4/.depdblock \]; then rm -f ${destroot}${prefix}/lib/php4/.depdblock; fi"
+    system "if \[ -f ${prefix}/lib/php4/.depdb \]; then rm -f ${destroot}${prefix}/lib/php4/.depdb; fi"
+    system "if \[ -f ${prefix}/lib/php4/.filemap \]; then rm -f ${destroot}${prefix}/lib/php4/.filemap; fi"
+    system "if \[ -f ${prefix}/lib/php4/.lock \]; then rm -f ${destroot}${prefix}/lib/php4/.lock; fi"
+    system "if \[ -d ${prefix}/lib/php4/.channels \]; then rm -rf ${destroot}${prefix}/lib/php4/.channels; fi"
 }
 
 post-install {
-	ui_msg "\nIf this is your first install, you might want"
+    ui_msg "\nIf this is your first install, you might want"
+    
+    if { [variant_isset apache] } {
+	ui_msg " * enable php in apache :\n"
 	
-	if { [variant_isset apache] } {
-		ui_msg " * enable php in apache :\n"
-		
-		ui_msg "cd ${prefix}/libexec/apache"
-		ui_msg "${prefix}/apache/bin/apxs -a -e -n \"php4\" libphp4.so\n"
-		ui_msg "* copy  ${prefix}/etc/php.ini-dist to  ${prefix}/etc/php.ini"
-	}
+	ui_msg "cd ${prefix}/libexec/apache"
+	ui_msg "${prefix}/apache/bin/apxs -a -e -n \"php4\" libphp4.so\n"
+	ui_msg "* copy  ${prefix}/etc/php.ini-dist to  ${prefix}/etc/php.ini"
+    }
 
-	if { [variant_isset apache2] } {
-		ui_msg "cd ${prefix}/apache2/modules"
-		ui_msg "${prefix}/apache2/bin/apxs -a -e -n \"php4\" libphp4.so\n"
-		ui_msg "* copy  ${prefix}/etc/php.ini-dist to  ${prefix}/etc/php.ini"
-	}
+    if { [variant_isset apache2] } {
+	ui_msg "cd ${prefix}/apache2/modules"
+	ui_msg "${prefix}/apache2/bin/apxs -a -e -n \"php4\" libphp4.so\n"
+	ui_msg "* copy  ${prefix}/etc/php.ini-dist to  ${prefix}/etc/php.ini"
+    }
 
-	if { [variant_isset apache20] } {
-		ui_msg "cd ${prefix}/apache20/modules"
-		ui_msg "${prefix}/apache20/bin/apxs -a -e -n \"php4\" libphp4.so\n"
-		ui_msg "* copy  ${prefix}/etc/php.ini-dist to  ${prefix}/etc/php.ini"
-	}
+    if { [variant_isset apache20] } {
+	ui_msg "cd ${prefix}/apache20/modules"
+	ui_msg "${prefix}/apache20/bin/apxs -a -e -n \"php4\" libphp4.so\n"
+	ui_msg "* copy  ${prefix}/etc/php.ini-dist to  ${prefix}/etc/php.ini"
+    }
 
-	ui_msg "* copy  ${prefix}/etc/php4/pear.conf.sample to  ${prefix}/etc/php4/pear.conf" 
+    ui_msg "* copy  ${prefix}/etc/php4/pear.conf.sample to  ${prefix}/etc/php4/pear.conf" 
 }
 
 livecheck.check     regex

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070624/af6a27d8/attachment.html


More information about the macports-changes mailing list