[107701] trunk/dports/php/phpsh

g5pw at macports.org g5pw at macports.org
Thu Jul 4 06:49:48 PDT 2013


Revision: 107701
          https://trac.macports.org/changeset/107701
Author:   g5pw at macports.org
Date:     2013-07-04 06:49:47 -0700 (Thu, 04 Jul 2013)
Log Message:
-----------
php/phpsh:
  use python portgroup
  fix checksum typo
  fix reinplace error on ML
  add variants for other php versions

Modified Paths:
--------------
    trunk/dports/php/phpsh/Portfile

Added Paths:
-----------
    trunk/dports/php/phpsh/files/
    trunk/dports/php/phpsh/files/src-__init__.py.diff

Modified: trunk/dports/php/phpsh/Portfile
===================================================================
--- trunk/dports/php/phpsh/Portfile	2013-07-04 13:15:54 UTC (rev 107700)
+++ trunk/dports/php/phpsh/Portfile	2013-07-04 13:49:47 UTC (rev 107701)
@@ -3,16 +3,19 @@
 
 PortSystem              1.0
 PortGroup               github 1.0
-PortGroup               python27 1.0
+PortGroup               python 1.0
 
 github.setup            facebook phpsh 1.3
-revision                1
+revision                2
 categories              php devel
 maintainers             nomaintainer
 supported_archs         noarch
 license                 BSD
 platforms               darwin freebsd
 
+python.default_version 27
+python.link_binaries_suffix
+
 homepage                http://www.phpsh.org
 description             PHP read-eval-print-loop
 long_description \
@@ -20,19 +23,35 @@
     completion, and quick access to documentation. It was developed at Facebook \
     and ironically, is written mostly in Python.
 checksums               rmd160  5188164d79f107d3494a240b33b5e05b1344b40a \
-                        sha256  2792485c541ad8420f912e01a6be85c07b9c352c087e3b4d54a5a61e53f51d0e 
+                        sha256  2792485c541ad8420f912e01a6be85c07b9c352c087e3b4d54a5a61e53f51d0e
 
-depends_lib             path:bin/php:php5 port:python27 \
-                        port:php5-posix port:php5-pcntl
+patchfiles              src-__init__.py.diff
 
-post-patch {
-    eval reinplace "s|/etc/phpsh|${prefix}/etc/phpsh|g" \
+pre-patch {
+    eval reinplace -locale C s|/etc/phpsh|${prefix}/etc/phpsh|g \
         ${worksrcpath}/setup.py ${worksrcpath}/rc.example.php \
         [glob ${worksrcpath}/src/*] [glob ${worksrcpath}/src/doc/*]
 }
-python.link_binaries_suffix
+
 post-destroot {
     set mandir ${destroot}${prefix}/share/man/man1
     xinstall -d ${mandir}
     move ${destroot}${python.prefix}/man/man1/phpsh.1 ${mandir}
 }
+
+set php_versions [ list 53 54 55 ]
+
+foreach php_version $php_versions {
+    variant php${php_version} description "Build ${name} with php${php_version}" {
+        
+        depends_lib-append      port:php${php_version}-posix \
+                                port:php${php_version}-pcntl
+
+    }
+    post-patch {
+        reinplace s|@@PHP_EXECUTABLE@@|${prefix}/bin/php${php_version}| src/__init__.py
+
+    }
+}
+
+default_variants +php55

Added: trunk/dports/php/phpsh/files/src-__init__.py.diff
===================================================================
--- trunk/dports/php/phpsh/files/src-__init__.py.diff	                        (rev 0)
+++ trunk/dports/php/phpsh/files/src-__init__.py.diff	2013-07-04 13:49:47 UTC (rev 107701)
@@ -0,0 +1,20 @@
+--- src/__init__.py	2010-10-21 21:14:29.000000000 +0200
++++ src/__init__.py	2013-07-04 15:33:20.000000000 +0200
+@@ -201,7 +201,7 @@
+         self.partial = ""
+ 
+     def check_syntax(self, line):
+-        p = Popen(["php", "-r", "return;" + line], stdout=PIPE, stderr=PIPE)
++        p = Popen(["@@PHP_EXECUTABLE@@", "-r", "return;" + line], stdout=PIPE, stderr=PIPE)
+         p.wait()
+         # "php -r" lint errors seem to only use stdout, but it might (idk)
+         # depend on configuration or change later, so just grab everything.
+@@ -398,7 +398,7 @@
+                 else:
+                     self.xdebug_path = xdebug
+ 
+-        self.comm_base = ["php"]
++        self.comm_base = ["@@PHP_EXECUTABLE@@"]
+ 
+         if self.with_xdebug:
+             xdebug_comm_base = self.comm_base[:]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130704/cfb1d0f4/attachment.html>


More information about the macports-changes mailing list