[109816] trunk/dports/science/lalsimulation

ram at macports.org ram at macports.org
Tue Aug 20 07:33:21 PDT 2013


Revision: 109816
          https://trac.macports.org/changeset/109816
Author:   ram at macports.org
Date:     2013-08-20 07:33:21 -0700 (Tue, 20 Aug 2013)
Log Message:
-----------
science/lalsimulation: upstream patch to fix swig bindings

Modified Paths:
--------------
    trunk/dports/science/lalsimulation/Portfile

Added Paths:
-----------
    trunk/dports/science/lalsimulation/files/
    trunk/dports/science/lalsimulation/files/patch-swig-bindings-fix.diff

Modified: trunk/dports/science/lalsimulation/Portfile
===================================================================
--- trunk/dports/science/lalsimulation/Portfile	2013-08-20 14:33:17 UTC (rev 109815)
+++ trunk/dports/science/lalsimulation/Portfile	2013-08-20 14:33:21 UTC (rev 109816)
@@ -5,6 +5,7 @@
 
 name          lalsimulation
 version       1.0.0
+revision      1
 categories    science
 platforms     darwin
 maintainers   ram
@@ -21,6 +22,11 @@
 checksums     rmd160 ac2080241a6043004d57b07efabd51c407290193 \
               sha256 f44040b3f14dad729f64fe637cf7364cae1b42586a81c32d1a1573ef05c931a7
 
+# upstream fix for swig bindings
+patchfiles    patch-swig-bindings-fix.diff
+patch.pre_args -p1
+use_autoreconf yes
+
 depends_build port:pkgconfig \
 
 depends_lib   port:python27 \

Added: trunk/dports/science/lalsimulation/files/patch-swig-bindings-fix.diff
===================================================================
--- trunk/dports/science/lalsimulation/files/patch-swig-bindings-fix.diff	                        (rev 0)
+++ trunk/dports/science/lalsimulation/files/patch-swig-bindings-fix.diff	2013-08-20 14:33:21 UTC (rev 109816)
@@ -0,0 +1,192 @@
+From c8df7e705a905f906d031d11172c46e2cc77757f Mon Sep 17 00:00:00 2001
+From: Karl Wette <karl.wette at ligo.org>
+Date: Tue, 20 Aug 2013 11:10:32 +0200
+Subject: [PATCH 1/3] SWIG: fix include path
+
+* -I flags should all be in SWIG_CPPFLAGS, to share between SWIG and C compiler
+---
+ gnuscripts/lalsuite_swig.m4 | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/gnuscripts/lalsuite_swig.m4 b/gnuscripts/lalsuite_swig.m4
+index 7fe5f47..7fe3e9d 100644
+--- a/gnuscripts/lalsuite_swig.m4
++++ b/gnuscripts/lalsuite_swig.m4
+@@ -1,7 +1,7 @@
+ # SWIG configuration
+ # Author: Karl Wette, 2011, 2012
+ #
+-# serial 38
++# serial 39
+ 
+ # enable SWIG wrapping modules
+ AC_DEFUN([LALSUITE_ENABLE_SWIG],[
+@@ -143,15 +143,12 @@ AC_DEFUN([LALSUITE_USE_SWIG],[
+       SWIG_SWIGFLAGS="${SWIG_SWIGFLAGS} -MP"
+     ])
+ 
+-    # look here for interfaces and LAL headers
+-    SWIG_SWIGFLAGS="${SWIG_SWIGFLAGS} -I\$(abs_top_builddir)/include"
+-
+     # send language-specific SWIG output files to libtool directory
+     AC_SUBST(SWIG_OUTDIR,["\$(abs_builddir)/${objdir}"])
+     SWIG_SWIGFLAGS="${SWIG_SWIGFLAGS} -outdir \$(SWIG_OUTDIR)"
+ 
+     # flags for generating/compiling SWIG wrapping module sources
+-    AC_SUBST(SWIG_CPPFLAGS,[])
++    AC_SUBST(SWIG_CPPFLAGS,["-I\$(abs_top_builddir)/include"])
+     for flag in ${swig_save_CPPFLAGS}; do
+       AS_CASE([${flag}],
+         [-I*],[SWIG_CPPFLAGS="${SWIG_CPPFLAGS} ${flag} `echo ${flag} | ${SED} 's|/include$|/swig|'`"],
+-- 
+1.8.3.4
+
+From a855c2ec06e92773e5d16257bddc5412aa3f9ff0 Mon Sep 17 00:00:00 2001
+From: Karl Wette <karl.wette at ligo.org>
+Date: Tue, 20 Aug 2013 11:29:25 +0200
+Subject: [PATCH 2/3] SWIG: revised SWIG binary checking code
+
+- mostly cosmetic changes to which log messages get printed
+---
+ gnuscripts/lalsuite_swig.m4 | 36 +++++++++++++++++++-----------------
+ 1 file changed, 19 insertions(+), 17 deletions(-)
+
+diff --git a/gnuscripts/lalsuite_swig.m4 b/gnuscripts/lalsuite_swig.m4
+index 7fe3e9d..e9ac7ea 100644
+--- a/gnuscripts/lalsuite_swig.m4
++++ b/gnuscripts/lalsuite_swig.m4
+@@ -1,7 +1,7 @@
+ # SWIG configuration
+ # Author: Karl Wette, 2011, 2012
+ #
+-# serial 39
++# serial 40
+ 
+ # enable SWIG wrapping modules
+ AC_DEFUN([LALSUITE_ENABLE_SWIG],[
+@@ -63,19 +63,18 @@ AC_DEFUN([LALSUITE_ENABLE_SWIG_LANGUAGE],[
+   m4_popdef([lowercase])
+ ])
+ 
+-# check the version of ${SWIG}, and store it in ${SWIG_VERSION}
++# check the version of ${SWIG}, and store it in ${swig_version}
++# return swig_version=0.0 if ${SWIG} is not an executable
+ AC_DEFUN([_LALSUITE_CHECK_SWIG_VERSION],[
+-  AC_MSG_CHECKING([${SWIG} version])
+-  SWIG_VERSION=0.0
++  swig_version=0.0
+   swig_version_output=[`${SWIG} -version 2>/dev/null`]
+   AS_IF([test $? -eq 0],[
+     swig_version_regex=['s|^ *SWIG [Vv]ersion \([0-9.][0-9.]*\)|\1|p;d']
+-    SWIG_VERSION=[`echo "${swig_version_output}" | ${SED} "${swig_version_regex}"`]
+-    AS_IF([test "x${SWIG_VERSION}" = x],[
++    swig_version=[`echo "${swig_version_output}" | ${SED} "${swig_version_regex}"`]
++    AS_IF([test "x${swig_version}" = x],[
+       AC_MSG_ERROR([could not determine version of ${SWIG}])
+     ])
+   ])
+-  AC_MSG_RESULT([${SWIG_VERSION}])
+ ])
+ 
+ # configure SWIG wrapping modules
+@@ -110,27 +109,30 @@ AC_DEFUN([LALSUITE_USE_SWIG],[
+   AM_CONDITIONAL(SWIG_BUILD,[test "${swig_build_any}" = true])
+   AM_COND_IF(SWIG_BUILD,[
+ 
+-    # check for SWIG binary: use value of ${SWIG} first,
+-    # then check for common SWIG binary names
++    # check for SWIG binary with version >= ${swig_min_version}; use
++    ## value of ${SWIG} if set, otherwise check common SWIG binary names
+     AS_IF([test "x${SWIG}" != x],[
++      AC_MSG_CHECKING([${SWIG} version])
+       _LALSUITE_CHECK_SWIG_VERSION
+-      AS_VERSION_COMPARE([${SWIG_VERSION}],[${swig_min_version}],[
++      AS_VERSION_COMPARE([${swig_version}],[${swig_min_version}],[
+         AC_MSG_ERROR([require ${SWIG} version >= ${swig_min_version}])
+       ])
++      AC_MSG_RESULT([${swig_version}])
+     ],[
++      AC_MSG_CHECKING([for SWIG with version >= ${swig_min_version}])
+       for SWIG in swig swig2.0; do
+         _LALSUITE_CHECK_SWIG_VERSION
+-        AS_VERSION_COMPARE([${SWIG_VERSION}],[${swig_min_version}],[],[break],[break])
++        AS_VERSION_COMPARE([${swig_version}],[${swig_min_version}],[],[break],[break])
+         SWIG=
+       done
++      AS_IF([test "x${SWIG}" = x],[
++        AC_MSG_ERROR([could not find SWIG with version >= ${swig_min_version}])
++      ])
++      AC_MSG_RESULT([${SWIG} (version ${swig_version})])
+     ])
+ 
+-    # if a SWIG binary was found, get its full path and print its version, otherwise fail
+-    AS_IF([test "x${SWIG}" != x],[
+-      AC_PATH_PROG(SWIG,["${SWIG}"])
+-    ],[
+-      AC_MSG_ERROR([could not find SWIG with version >= ${swig_min_version}])
+-    ])
++    # get full path of SWIG binary
++    AC_PATH_PROG(SWIG,["${SWIG}"])
+ 
+     # symbol prefixes for this LAL library
+     AC_SUBST(SWIG_SYMBOL_PREFIXES,["$1"])
+-- 
+1.8.3.4
+
+From 3d5852184dce91962be1343a83c992f18d0e6f47 Mon Sep 17 00:00:00 2001
+From: Karl Wette <karl.wette at ligo.org>
+Date: Tue, 20 Aug 2013 12:23:12 +0200
+Subject: [PATCH 3/3] SWIG: fix include path, take 2
+
+- flag -I\$(abs_top_builddir)/include needs to be in both SWIG_SWIGFLAGS
+  and SWIG_CPPFLAGS, for interface preprocessing/generation and compilation
+- remove extraneous -I\$(top_builddir)/include from end of SWIG_CPPFLAGS
+---
+ gnuscripts/lalsuite_swig.m4 | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/gnuscripts/lalsuite_swig.m4 b/gnuscripts/lalsuite_swig.m4
+index e9ac7ea..b28e80d 100644
+--- a/gnuscripts/lalsuite_swig.m4
++++ b/gnuscripts/lalsuite_swig.m4
+@@ -1,7 +1,7 @@
+ # SWIG configuration
+ # Author: Karl Wette, 2011, 2012
+ #
+-# serial 40
++# serial 41
+ 
+ # enable SWIG wrapping modules
+ AC_DEFUN([LALSUITE_ENABLE_SWIG],[
+@@ -137,8 +137,8 @@ AC_DEFUN([LALSUITE_USE_SWIG],[
+     # symbol prefixes for this LAL library
+     AC_SUBST(SWIG_SYMBOL_PREFIXES,["$1"])
+ 
+-    # flags for generating SWIG wrapping module sources
+-    AC_SUBST(SWIG_SWIGFLAGS,["-Wextra -Werror"])
++    # flags for preprocessing/generating SWIG wrapping module sources
++    AC_SUBST(SWIG_SWIGFLAGS,["-Wextra -Werror -I\$(abs_top_builddir)/include"])
+ 
+     # add -MP option if SWIG is greater than version 2.0.9
+     AS_VERSION_COMPARE([${swig_version}],[2.0.9],[],[],[
+@@ -157,6 +157,7 @@ AC_DEFUN([LALSUITE_USE_SWIG],[
+         [*],[SWIG_CPPFLAGS="${SWIG_CPPFLAGS} ${flag}"]
+       )
+     done
++    SWIG_CPPFLAGS="${SWIG_CPPFLAGS} -I/usr/include"
+ 
+     # are we (not) in debugging mode?
+     AS_IF([test "x${enable_debug}" = xno],[
+@@ -170,9 +171,6 @@ AC_DEFUN([LALSUITE_USE_SWIG],[
+       SWIG_CPPFLAGS="${SWIG_CPPFLAGS} -DHAVE_LIBGSL"
+     ])
+ 
+-    # look here for interfaces and LAL headers (but not for preprocessing)
+-    SWIG_CPPFLAGS="${SWIG_CPPFLAGS} -I\$(top_builddir)/include -I/usr/include"
+-
+     # flags for compiling SWIG wrapping module sources
+     AC_SUBST(SWIG_CFLAGS,[])
+     for arg in ${swig_save_CFLAGS}; do
+-- 
+1.8.3.4
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130820/4390387b/attachment-0001.html>


More information about the macports-changes mailing list