Changeset 98224
- Timestamp:
- Sep 29, 2012, 8:39:39 PM (12 years ago)
- Location:
- trunk/dports/php/pear-install-phar
- Files:
-
- 3 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dports/php/pear-install-phar/Portfile
r97236 r98224 6 6 name pear-install-phar 7 7 version 20110901 8 revision 38 revision 4 9 9 categories php www 10 10 license BSD PHP-3 LGPL-2.1+ … … 13 13 homepage http://pear.php.net 14 14 master_sites http://pear.php.net 15 livecheck.type moddate16 17 dist_subdir ${name}-${version}18 distfiles install-pear-nozlib.phar19 20 checksums rmd160 1eef5e3a68b5521e2d42e68d031fd79828709923 \21 sha256 06757ae34c93d4aad8a3abc63958106ca11bb1a9a5f85e7e013d70077e4aafa122 23 set buildpath ${worksrcpath}/build24 set libpath /lib/php/pear25 15 26 16 subport php5-pear { 27 17 28 set dbpath /var/db/php5 29 depends_lib port:php5 18 set php.port [lindex [split $subport -] 0] 19 set php.db /var/db/${php.port} 20 depends_lib port:${php.port} 30 21 } 31 22 32 23 subport php53-pear { 33 24 34 set dbpath /var/db/php53 35 depends_lib port:php53 25 set php.port [lindex [split $subport -] 0] 26 set php.db /var/db/${php.port} 27 depends_lib port:${php.port} 36 28 } 37 29 38 30 subport php54-pear { 39 31 40 set dbpath /var/db/php54 41 depends_lib port:php54 32 set php.port [lindex [split $subport -] 0] 33 set php.db /var/db/${php.port} 34 depends_lib port:${php.port} 42 35 } 43 36 … … 48 41 description PEAR installer phar 49 42 long_description ${description} 43 44 livecheck.type moddate 45 46 dist_subdir ${name}-${version} 47 distfiles install-pear-nozlib.phar 48 49 checksums rmd160 1eef5e3a68b5521e2d42e68d031fd79828709923 \ 50 sha256 06757ae34c93d4aad8a3abc63958106ca11bb1a9a5f85e7e013d70077e4aafa1 51 52 set buildpath ${worksrcpath}/build 53 set libpath /lib/php/pear 50 54 51 55 extract.mkdir yes … … 64 68 } else { 65 69 66 description PEAR build and repository support for php70 description Optional port that auto-prepends the PEAR repository for ${php.port}. 67 71 long_description ${description} 68 72 69 73 distfiles 70 74 71 build { 75 worksrcdir ${php.port}-pear 76 extract.dir ${worksrcpath} 77 extract.mkdir yes 78 post-extract { 72 79 73 xinstall -d ${buildpath}${dbpath} 74 set fp [open ${buildpath}${dbpath}/pear-ini.php w] 75 puts $fp "<?php" 76 puts $fp "# Automatically add the PEAR repository path to PHP's include_path." 77 puts $fp "set_include_path ( get_include_path ( ) . PATH_SEPARATOR . '${prefix}/lib/php/pear' ) ;" 78 close $fp 79 80 set fp [open ${buildpath}${dbpath}/pear.ini w] 81 puts $fp "; Do not edit this file; it is automatically generated by MacPorts." 82 puts $fp "; Any changes you make will be lost if you upgrade or uninstall ${subport}-pear." 83 puts $fp "; To configure PHP, edit ${prefix}/etc/${subport}/php.ini." 84 puts $fp "auto_prepend_file = '${prefix}${dbpath}/pear/pear-ini.php'" 85 close $fp 80 copy ${filespath}/pear-ini.php ${worksrcpath}/pear-ini.php 81 copy ${filespath}/pear.ini ${worksrcpath}/pear.ini 86 82 } 83 84 post-patch { 85 86 reinplace "s,@PHP.PORT@,${php.port},g" \ 87 ${worksrcpath}/pear.ini 88 reinplace "s,@PREFIX@,${prefix},g" \ 89 ${worksrcpath}/pear-ini.php \ 90 ${worksrcpath}/pear.ini 91 } 92 93 use_configure no 94 build {} 87 95 88 96 destroot { 89 97 90 xinstall -d ${destroot}${prefix}${dbpath}/pear 91 file copy ${buildpath}${dbpath}/pear-ini.php ${destroot}${prefix}${dbpath}/pear/pear-ini.php 92 file copy ${buildpath}${dbpath}/pear.ini ${destroot}${prefix}${dbpath}/pear.ini 98 xinstall -d -m 0755 ${destroot}${prefix}/var/db/${php.port}/pear 99 xinstall -m 0644 ${worksrcpath}/pear-ini.php \ 100 ${destroot}${prefix}/var/db/${php.port}/pear/pear-ini.php 101 xinstall -m 0644 ${worksrcpath}/pear.ini \ 102 ${destroot}${prefix}/var/db/${php.port}/pear.ini 93 103 } 94 104 }
Note: See TracChangeset
for help on using the changeset viewer.