[120853] trunk/dports/devel/swig

michaelld at macports.org michaelld at macports.org
Mon Jun 9 17:48:02 PDT 2014


Revision: 120853
          https://trac.macports.org/changeset/120853
Author:   michaelld at macports.org
Date:     2014-06-09 17:48:02 -0700 (Mon, 09 Jun 2014)
Log Message:
-----------
swig-php:
+ make swig-php5 replaced by swig-php;
+ add +pnp5X variants to select the correct PHP version;
+ add patch to allow configuration to correctly find php config executable;
+ these ports did not work before, so no need to rev-bump.

Modified Paths:
--------------
    trunk/dports/devel/swig/Portfile

Added Paths:
-----------
    trunk/dports/devel/swig/files/
    trunk/dports/devel/swig/files/patch-configure.diff

Modified: trunk/dports/devel/swig/Portfile
===================================================================
--- trunk/dports/devel/swig/Portfile	2014-06-09 23:34:12 UTC (rev 120852)
+++ trunk/dports/devel/swig/Portfile	2014-06-10 00:48:02 UTC (rev 120853)
@@ -58,7 +58,7 @@
     ocaml       {port:ocaml             ocaml}
     octave      {path:bin/octave:octave octave}
     perl        {path:bin/perl:perl5    perl5=${prefix}/bin/perl}
-    php         {port:php_select        php}
+    php         {port:php55             "php=${prefix}/bin/php55"}
     php5        {path:bin/php:php5      php}
     pike        {port:pike              pike}
     python      {port:python_select     python}
@@ -88,6 +88,57 @@
     }
 }
 
+subport swig-php5 {
+    replaced_by swig-php
+    pre-configure {
+        ui_error "This port has been replaced by 'swig-php'."
+        return -code error
+    }
+    distfiles
+}
+
+subport swig-php {
+
+    patchfiles-append patch-configure.diff
+
+    variant php52 conflicts php53 php54 php55 php56 description {build using PHP 5.2} {
+        depends_lib-delete port:php55
+        depends_lib-append port:php52
+        configure.args-delete --with-php=${prefix}/bin/php55
+        configure.args-append --with-php=${prefix}/bin/php52
+    }
+    variant php53 conflicts php52 php54 php55 php56 description {build using PHP 5.3} {
+        depends_lib-delete port:php55
+        depends_lib-append port:php53
+        configure.args-delete --with-php=${prefix}/bin/php55
+        configure.args-append --with-php=${prefix}/bin/php53
+    }
+    variant php54 conflicts php52 php53 php55 php56 description {build using PHP 5.4} {
+        depends_lib-delete port:php55
+        depends_lib-append port:php54
+        configure.args-delete --with-php=${prefix}/bin/php55
+        configure.args-append --with-php=${prefix}/bin/php54
+    }
+    variant php55 conflicts php52 php53 php54 php56 description {build using PHP 5.5} {}
+
+    variant php56 conflicts php52 php53 php54 php55 description {build using PHP 5.6} {
+        depends_lib-delete port:php55
+        depends_lib-append port:php56
+        configure.args-delete --with-php=${prefix}/bin/php55
+        configure.args-append --with-php=${prefix}/bin/php56
+    }
+
+    if {![variant_isset php52] && ![variant_isset php53] && ![variant_isset php54] &&
+        ![variant_isset php55] && ![variant_isset php56]} {
+        default_variants +php55
+    }
+    if {![variant_isset php52] && ![variant_isset php53] && ![variant_isset php54] &&
+        ![variant_isset php55] && ![variant_isset php56]} {
+        ui_error "\n\nA +php5X variant must be selected; the variant '-php55' cannot be used alone.\n"
+        return -code error "Invalid variant selection"
+    }
+}
+
 subport swig-gcj {
     variant gcc43 conflicts gcc44 gcc45 gcc47 gcc48 description {build using GCJ 4.3} {
         depends_lib-delete port:gcc47

Added: trunk/dports/devel/swig/files/patch-configure.diff
===================================================================
--- trunk/dports/devel/swig/files/patch-configure.diff	                        (rev 0)
+++ trunk/dports/devel/swig/files/patch-configure.diff	2014-06-10 00:48:02 UTC (rev 120853)
@@ -0,0 +1,13 @@
+--- configure.orig	2014-06-08 15:27:19.000000000 -0400
++++ configure	2014-06-08 15:27:45.000000000 -0400
+@@ -9612,8 +9612,8 @@
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PHP header files" >&5
+ $as_echo_n "checking for PHP header files... " >&6; }
+         case $PHP in
+-      *5)
+-	PHPCONFIG=`echo "$PHP"|sed 's/5$/-config5/'` ;;
++      *5*)
++	PHPCONFIG=`echo "$PHP"|sed 's/\(5.*\)$/-config\1/'` ;;
+       *)
+ 	PHPCONFIG=$PHP-config ;;
+     esac
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140609/6513184c/attachment.html>


More information about the macports-changes mailing list