[98224] trunk/dports/php/pear-install-phar
pixilla at macports.org
pixilla at macports.org
Sat Sep 29 13:39:39 PDT 2012
Revision: 98224
http://trac.macports.org//changeset/98224
Author: pixilla at macports.org
Date: 2012-09-29 13:39:39 -0700 (Sat, 29 Sep 2012)
Log Message:
-----------
php/pear-install-phar:
- Improve discription for php*-pear subports.
- Add files to files dir rather than write them with TCL.
- Fix typo in installed pear.ini file.
Modified Paths:
--------------
trunk/dports/php/pear-install-phar/Portfile
Added Paths:
-----------
trunk/dports/php/pear-install-phar/files/
trunk/dports/php/pear-install-phar/files/pear-ini.php
trunk/dports/php/pear-install-phar/files/pear.ini
Modified: trunk/dports/php/pear-install-phar/Portfile
===================================================================
--- trunk/dports/php/pear-install-phar/Portfile 2012-09-29 20:16:28 UTC (rev 98223)
+++ trunk/dports/php/pear-install-phar/Portfile 2012-09-29 20:39:39 UTC (rev 98224)
@@ -5,40 +5,33 @@
name pear-install-phar
version 20110901
-revision 3
+revision 4
categories php www
license BSD PHP-3 LGPL-2.1+
platforms darwin
maintainers pixilla
homepage http://pear.php.net
master_sites http://pear.php.net
-livecheck.type moddate
-dist_subdir ${name}-${version}
-distfiles install-pear-nozlib.phar
-
-checksums rmd160 1eef5e3a68b5521e2d42e68d031fd79828709923 \
- sha256 06757ae34c93d4aad8a3abc63958106ca11bb1a9a5f85e7e013d70077e4aafa1
-
-set buildpath ${worksrcpath}/build
-set libpath /lib/php/pear
-
subport php5-pear {
- set dbpath /var/db/php5
- depends_lib port:php5
+ set php.port [lindex [split $subport -] 0]
+ set php.db /var/db/${php.port}
+ depends_lib port:${php.port}
}
subport php53-pear {
- set dbpath /var/db/php53
- depends_lib port:php53
+ set php.port [lindex [split $subport -] 0]
+ set php.db /var/db/${php.port}
+ depends_lib port:${php.port}
}
subport php54-pear {
- set dbpath /var/db/php54
- depends_lib port:php54
+ set php.port [lindex [split $subport -] 0]
+ set php.db /var/db/${php.port}
+ depends_lib port:${php.port}
}
use_configure no
@@ -48,6 +41,17 @@
description PEAR installer phar
long_description ${description}
+ livecheck.type moddate
+
+ dist_subdir ${name}-${version}
+ distfiles install-pear-nozlib.phar
+
+ checksums rmd160 1eef5e3a68b5521e2d42e68d031fd79828709923 \
+ sha256 06757ae34c93d4aad8a3abc63958106ca11bb1a9a5f85e7e013d70077e4aafa1
+
+ set buildpath ${worksrcpath}/build
+ set libpath /lib/php/pear
+
extract.mkdir yes
extract {
@@ -63,32 +67,38 @@
}
} else {
- description PEAR build and repository support for php
+ description Optional port that auto-prepends the PEAR repository for ${php.port}.
long_description ${description}
distfiles
- build {
+ worksrcdir ${php.port}-pear
+ extract.dir ${worksrcpath}
+ extract.mkdir yes
+ post-extract {
- xinstall -d ${buildpath}${dbpath}
- set fp [open ${buildpath}${dbpath}/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' ) ;"
- close $fp
-
- 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 ${subport}-pear."
- puts $fp "; To configure PHP, edit ${prefix}/etc/${subport}/php.ini."
- puts $fp "auto_prepend_file = '${prefix}${dbpath}/pear/pear-ini.php'"
- close $fp
+ copy ${filespath}/pear-ini.php ${worksrcpath}/pear-ini.php
+ copy ${filespath}/pear.ini ${worksrcpath}/pear.ini
}
+ post-patch {
+
+ reinplace "s, at PHP.PORT@,${php.port},g" \
+ ${worksrcpath}/pear.ini
+ reinplace "s, at PREFIX@,${prefix},g" \
+ ${worksrcpath}/pear-ini.php \
+ ${worksrcpath}/pear.ini
+ }
+
+ use_configure no
+ build {}
+
destroot {
- xinstall -d ${destroot}${prefix}${dbpath}/pear
- file copy ${buildpath}${dbpath}/pear-ini.php ${destroot}${prefix}${dbpath}/pear/pear-ini.php
- file copy ${buildpath}${dbpath}/pear.ini ${destroot}${prefix}${dbpath}/pear.ini
+ xinstall -d -m 0755 ${destroot}${prefix}/var/db/${php.port}/pear
+ xinstall -m 0644 ${worksrcpath}/pear-ini.php \
+ ${destroot}${prefix}/var/db/${php.port}/pear/pear-ini.php
+ xinstall -m 0644 ${worksrcpath}/pear.ini \
+ ${destroot}${prefix}/var/db/${php.port}/pear.ini
}
}
Added: trunk/dports/php/pear-install-phar/files/pear-ini.php
===================================================================
--- trunk/dports/php/pear-install-phar/files/pear-ini.php (rev 0)
+++ trunk/dports/php/pear-install-phar/files/pear-ini.php 2012-09-29 20:39:39 UTC (rev 98224)
@@ -0,0 +1,3 @@
+<?php
+# Automatically add the PEAR repository path to PHP's include_path.
+set_include_path ( get_include_path ( ) . PATH_SEPARATOR . '@PREFIX@/lib/php/pear' );
Added: trunk/dports/php/pear-install-phar/files/pear.ini
===================================================================
--- trunk/dports/php/pear-install-phar/files/pear.ini (rev 0)
+++ trunk/dports/php/pear-install-phar/files/pear.ini 2012-09-29 20:39:39 UTC (rev 98224)
@@ -0,0 +1,4 @@
+; Do not edit this file; it is automatically generated by MacPorts.
+; Any changes you make will be lost if you upgrade or uninstall @PHP.PORT at -pear.
+; To configure PHP, edit @PREFIX@/etc/@PHP.PORT@/php.ini.
+auto_prepend_file = '@PREFIX@/var/db/@PHP.PORT@/pear/pear-ini.php'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120929/b4d1a624/attachment.html>
More information about the macports-changes
mailing list