[87311] trunk/dports/php/php5-pear/Portfile

pixilla at macports.org pixilla at macports.org
Wed Nov 16 14:58:24 PST 2011


Revision: 87311
          http://trac.macports.org/changeset/87311
Author:   pixilla at macports.org
Date:     2011-11-16 14:58:24 -0800 (Wed, 16 Nov 2011)
Log Message:
-----------
php/php5-pear:
- Do not install resident pear command.
- Install install-pear-nozlib.phar to be used by php5pear PortGroup ports
  to install their pear packages.

Modified Paths:
--------------
    trunk/dports/php/php5-pear/Portfile

Modified: trunk/dports/php/php5-pear/Portfile
===================================================================
--- trunk/dports/php/php5-pear/Portfile	2011-11-16 22:54:37 UTC (rev 87310)
+++ trunk/dports/php/php5-pear/Portfile	2011-11-16 22:58:24 UTC (rev 87311)
@@ -23,87 +23,37 @@
                     sha256  06757ae34c93d4aad8a3abc63958106ca11bb1a9a5f85e7e013d70077e4aafa1
 
 set buildpath       ${worksrcpath}/build
-set instpath        ${buildpath}/libexec/php
-set pearpath        ${prefix}/libexec/php
-set systemtmp       /private/tmp/pear
+set libpath         /lib/php/pear
+set dbpath          /var/db/php5
 
 extract.mkdir       yes
 extract {
-    file copy ${distpath}/install-pear-nozlib.phar ${worksrcpath}
+    xinstall -d ${buildpath}/${libpath}
+    file copy ${distpath}/install-pear-nozlib.phar ${buildpath}/${libpath}
 }
-configure {
-    system "cd ${worksrcpath} && \
-    PHP_PEAR_INSTALL_DIR=${instpath}/pear \
-    PHP_PEAR_BIN_DIR=${instpath}/bin \
-    PHP_PEAR_PHP_BIN=${prefix}/bin/php \
-    PHP_PEAR_CFG_DIR=${instpath}/pear/cfg \
-    PHP_PEAR_DOC_DIR=${instpath}/pear/docs \
-    PHP_PEAR_DATA_DIR=${instpath}/pear/data \
-    PHP_PEAR_WWW_DIR=${instpath}/pear/www \
-    PHP_PEAR_TEST_DIR=${instpath}/pear/tests \
-    PHP_PEAR_SYSCONF_DIR=${instpath}/etc \
-    ${prefix}/bin/php \
-    install-pear-nozlib.phar \
-    "
-}
+use_configure       no
 build {
-    xinstall -d ${buildpath}/lib/php/pear
-    xinstall -d ${buildpath}/var/db/php5
-
-    set pearcmd "PHP_PEAR_INSTALL_DIR=${instpath}/pear PHP_PEAR_SYSCONF_DIR=${instpath}/etc \
-    PHP_PEAR_BIN_DIR=${instpath}/bin ${instpath}/bin/pear -c ${instpath}/etc/pear.conf \
-    -C ${instpath}/etc/pear.conf"
-
-    system "${pearcmd} config-show"
-
-    system "${pearcmd} config-create ${pearpath} ${instpath}/etc/pear.conf"
-
-    system "${pearcmd} config-set php_dir ${pearpath}/pear"
-
-    system "${pearcmd} config-set bin_dir ${pearpath}/bin"
-
-    system "${pearcmd} config-set cache_dir ${systemtmp}/cache"
-
-    system "${pearcmd} config-set download_dir ${systemtmp}/download"
-
-    system "${pearcmd} config-set temp_dir ${systemtmp}/temp"
-
-    system "${pearcmd} config-set sig_keydir ${pearpath}/etc/pearkeys"
-
-    system "${pearcmd} config-set auto_discover 1"
-
-    system "${pearcmd} config-show"
-
-    xinstall -d ${buildpath}/lib/php/pear
-    set fp [open ${buildpath}/lib/php/pear/pear-ini.php w]
+    xinstall -d ${buildpath}/${libpath}
+    set fp [open ${buildpath}/${libpath}/pear-ini.php w]
     puts $fp "<?php"
     puts $fp "# Automatically add the PEAR repository path to PHP's include_path."
     puts $fp "set_include_path ( get_include_path (  ) . PATH_SEPARATOR . '${prefix}/lib/php/pear' ) ;"
     puts $fp "?>"
     close $fp
 
-    xinstall -d ${buildpath}/var/db/php5
-    set fp [open ${buildpath}/var/db/php5/pear.ini w]
+    xinstall -d ${buildpath}/${dbpath}
+    set fp [open ${buildpath}/${dbpath}/pear.ini w]
     puts $fp "; Do not edit this file; it is automatically generated by MacPorts."
     puts $fp "; Any changes you make will be lost if you upgrade or uninstall php5-pear."
     puts $fp "; To configure PHP, edit ${prefix}/etc/php5/php.ini."
     puts $fp "auto_prepend_file = '${prefix}/lib/php/pear/pear-ini.php'"
     close $fp
-
-    reinplace "s|${buildpath}|${prefix}|g" ${instpath}/bin/pear
-    reinplace "s|${buildpath}|${prefix}|g" ${instpath}/bin/peardev
-    reinplace "s|${buildpath}|${prefix}|g" ${instpath}/bin/pecl
-    reinplace "s|${buildpath}|${prefix}|g" ${instpath}/pear/pearcmd.php
-    reinplace "s|${buildpath}|${prefix}|g" ${instpath}/pear/peclcmd.php
 }
 
 destroot {
-    xinstall -d ${destroot}${prefix}/lib/php/pear
-    xinstall -d ${destroot}${prefix}/var/db/php5
-    file copy ${buildpath}/lib/php/pear/pear-ini.php ${destroot}${prefix}/lib/php/pear/pear-ini.php
-    file copy ${buildpath}/var/db/php5/pear.ini ${destroot}${prefix}/var/db/php5/pear.ini
-    file copy ${instpath} ${destroot}${prefix}/libexec
-#    system "rm -R ${destroot}${prefix}/libexec/php/pear/{.channels,.depdb,.depdblock,.filemap,.lock,.registry}"
-    system "chown -R :staff ${destroot}${prefix}/libexec/php/pear/\.*"
-    system "chmod -R g+w ${destroot}${prefix}/libexec/php/pear/\.*"
+    xinstall -d ${destroot}${prefix}/${libpath}
+    xinstall -d ${destroot}${prefix}/${dbpath}
+    file copy ${buildpath}/${libpath}/pear-ini.php ${destroot}${prefix}/${libpath}/pear-ini.php
+    file copy ${buildpath}/${dbpath}/pear.ini ${destroot}${prefix}/${dbpath}/pear.ini
+    file copy ${buildpath}/${libpath}/install-pear-nozlib.phar ${destroot}${prefix}/${libpath}
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111116/e1cdbd56/attachment-0001.html>


More information about the macports-changes mailing list