[106665] trunk/dports/science/xraylib
ryandesign at macports.org
ryandesign at macports.org
Mon Jun 3 17:50:50 PDT 2013
Revision: 106665
https://trac.macports.org/changeset/106665
Author: ryandesign at macports.org
Date: 2013-06-03 17:50:50 -0700 (Mon, 03 Jun 2013)
Log Message:
-----------
xraylib: maintainer update: fix configure failure with latest python (#39263); add python33 and gcc48 variants; remove g95 variant; fix build with lua 5.2
Modified Paths:
--------------
trunk/dports/science/xraylib/Portfile
Added Paths:
-----------
trunk/dports/science/xraylib/files/configure.ac.diff
trunk/dports/science/xraylib/files/python_xrlsetup.py.in.diff
trunk/dports/science/xraylib/files/xraylib.i.diff
Removed Paths:
-------------
trunk/dports/science/xraylib/files/patch-configure.diff
trunk/dports/science/xraylib/files/patch-m4-m4-ax_python_devel.m4.diff
trunk/dports/science/xraylib/files/patch-python-Makefile.am.diff
trunk/dports/science/xraylib/files/patch-python-Makefile.in.diff
Modified: trunk/dports/science/xraylib/Portfile
===================================================================
--- trunk/dports/science/xraylib/Portfile 2013-06-03 21:24:15 UTC (rev 106664)
+++ trunk/dports/science/xraylib/Portfile 2013-06-04 00:50:50 UTC (rev 106665)
@@ -5,7 +5,7 @@
PortGroup github 1.0
github.setup tschoonj xraylib 2.16.0 xraylib-
-revision 1
+revision 2
categories science
platforms darwin
license BSD
@@ -27,10 +27,9 @@
checksums rmd160 3b9a0db5fe2ae285cd364478c9e8c3d76e855069 \
sha256 91ccbd25338c00027d58ee13239375926a0e106d9b883d1c927e846e035e276c
-patchfiles patch-configure.diff \
- patch-m4-m4-ax_python_devel.m4.diff \
- patch-python-Makefile.am.diff \
- patch-python-Makefile.in.diff
+patchfiles configure.ac.diff \
+ python_xrlsetup.py.in.diff \
+ xraylib.i.diff
patch.pre_args -p1
@@ -45,40 +44,49 @@
use_parallel_build no
configure.ccache no
+use_autoreconf yes
+
variant perl description {Perl bindings} {
configure.args-append --enable-perl
configure.args-delete --disable-perl
depends_build-append port:swig-perl
}
-variant python26 description {Python2.6 bindings} conflicts python27 python31 python32 {
+variant python26 description {Python2.6 bindings} conflicts python27 python31 python32 python33 {
configure.args-append --enable-python --enable-python-integration PYTHON=${prefix}/bin/python2.6
configure.args-delete --disable-python
depends_build-append port:swig-python
depends_lib-append port:python26
}
-variant python27 description {Python2.7 bindings} conflicts python26 python31 python32 {
+variant python27 description {Python2.7 bindings} conflicts python26 python31 python32 python33 {
configure.args-append --enable-python --enable-python-integration PYTHON=${prefix}/bin/python2.7
configure.args-delete --disable-python
depends_build-append port:swig-python
depends_lib-append port:python27
}
-variant python31 description {Python3.1 bindings} conflicts python27 python26 python32 {
+variant python31 description {Python3.1 bindings} conflicts python27 python26 python32 python33 {
configure.args-append --enable-python --enable-python-integration PYTHON=${prefix}/bin/python3.1
configure.args-delete --disable-python
depends_build-append port:swig-python
depends_lib-append port:python31
}
-variant python32 description {Python3.2 bindings} conflicts python27 python31 python26 {
+variant python32 description {Python3.2 bindings} conflicts python27 python31 python26 python33 {
configure.args-append --enable-python --enable-python-integration PYTHON=${prefix}/bin/python3.2
configure.args-delete --disable-python
depends_build-append port:swig-python
depends_lib-append port:python32
}
+variant python33 description {Python3.3 bindings} conflicts python27 python31 python26 python32 {
+ configure.args-append --enable-python --enable-python-integration PYTHON=${prefix}/bin/python3.3
+ configure.args-delete --disable-python
+ depends_build-append port:swig-python
+ depends_lib-append port:python33
+}
+
variant java description {Java bindings} {
configure.args-append --enable-java
configure.args-delete --disable-java
@@ -92,42 +100,42 @@
depends_lib-append port:lua
}
-variant gcc44 description {build with gfortran from gcc44} conflicts gcc45 g95 gcc46 gcc47 {
+variant gcc44 description {build with gfortran from gcc44} conflicts gcc45 gcc46 gcc47 gcc48 {
configure.args-append --enable-fortran2003
configure.args-delete --disable-fortran2003
depends_lib-append port:gcc44
configure.fc ${prefix}/bin/gfortran-mp-4.4
}
-variant gcc45 description {build with gfortran from gcc45} conflicts gcc44 g95 gcc46 gcc47 {
+variant gcc45 description {build with gfortran from gcc45} conflicts gcc44 gcc46 gcc47 gcc48 {
configure.args-append --enable-fortran2003
configure.args-delete --disable-fortran2003
depends_lib-append port:gcc45
configure.fc ${prefix}/bin/gfortran-mp-4.5
}
-variant g95 description {build with g95} conflicts gcc44 gcc45 gcc46 gcc47 {
+variant gcc46 description {build with gfortran from gcc46} conflicts gcc44 gcc45 gcc47 gcc48 {
configure.args-append --enable-fortran2003
configure.args-delete --disable-fortran2003
- depends_lib-append port:g95
- configure.fc ${prefix}/bin/g95
-}
-
-variant gcc46 description {build with gfortran from gcc46} conflicts gcc44 g95 gcc45 gcc47 {
- configure.args-append --enable-fortran2003
- configure.args-delete --disable-fortran2003
depends_lib-append port:gcc46
configure.fc ${prefix}/bin/gfortran-mp-4.6
}
-variant gcc47 description {build with gfortran from gcc47} conflicts gcc44 g95 gcc45 gcc46 {
+variant gcc47 description {build with gfortran from gcc47} conflicts gcc44 gcc45 gcc46 gcc48 {
configure.args-append --enable-fortran2003
configure.args-delete --disable-fortran2003
depends_lib-append port:gcc47
configure.fc ${prefix}/bin/gfortran-mp-4.7
}
-if {![variant_isset python26] && ![variant_isset python27] && ![variant_isset python31] && ![variant_isset python32]} {
+variant gcc48 description {build with gfortran from gcc48} conflicts gcc44 gcc45 gcc46 gcc47 {
+ configure.args-append --enable-fortran2003
+ configure.args-delete --disable-fortran2003
+ depends_lib-append port:gcc48
+ configure.fc ${prefix}/bin/gfortran-mp-4.8
+}
+
+if {![variant_isset python26] && ![variant_isset python27] && ![variant_isset python31] && ![variant_isset python32] && ![variant_isset python33]} {
default_variants +python27
}
Added: trunk/dports/science/xraylib/files/configure.ac.diff
===================================================================
--- trunk/dports/science/xraylib/files/configure.ac.diff (rev 0)
+++ trunk/dports/science/xraylib/files/configure.ac.diff 2013-06-04 00:50:50 UTC (rev 106665)
@@ -0,0 +1,42 @@
+--- xraylib-2.16.0-orig/configure.ac 2013-05-28 15:45:26.000000000 +0200
++++ xraylib-2.16.0/configure.ac 2013-05-28 17:35:17.000000000 +0200
+@@ -436,10 +436,13 @@
+ #verify the python installation
+ AM_PATH_PYTHON(,[PYTHON_FOUND=true],[PYTHON_FOUND=false])
+ if test "x$PYTHON_FOUND" = xtrue ; then
+- PYTHON_CPPFLAGS=
+- PYTHON_LDFLAGS=
+- AX_PYTHON_DEVEL
+- if test "x$PYTHON" = x ; then
++ AC_MSG_CHECKING([for Python include path])
++ PYTHON_CPPFLAGS="$CFLAGS `$PYTHON-config --cflags`"
++ AC_MSG_RESULT([$PYTHON_CPPFLAGS])
++ AC_MSG_CHECKING([for Python linker flags])
++ PYTHON_LDFLAGS="$LDFLAGS `$PYTHON-config --ldflags`"
++ AC_MSG_RESULT([$PYTHON_LDFLAGS])
++ if test "x$PYTHON_LDFLAGS" = x ; then
+ if test "x$enable_python" = xyes ; then
+ AC_MSG_ERROR([Incomplete python development package])
+ else
+@@ -448,6 +451,8 @@
+ VALID_PYTHON=no
+ else
+ VALID_PYTHON=yes
++ AC_SUBST(PYTHON_LDFLAGS)
++ AC_SUBST(PYTHON_CPPFLAGS)
+ fi
+
+ fi
+@@ -465,8 +470,10 @@
+ #echo "PYTHON_LIBS_FIXED: $PYTHON_LIBS_FIXED"
+
+ if test "x$enable_python_integration" = xyes ; then
+- pythondir=$PYTHON_SITE_PKG
+- pyexecdir=$PYTHON_SITE_PKG_EXEC
++ pythondir=`$PYTHON -c "import distutils.sysconfig; \
++ print (distutils.sysconfig.get_python_lib(0,0));"`
++ pyexecdir=`$PYTHON -c "import distutils.sysconfig; \
++ print (distutils.sysconfig.get_python_lib(1,0));"`
+ fi
+
+ AC_SUBST(PYTHON_INCLUDE_FIXED)
Deleted: trunk/dports/science/xraylib/files/patch-configure.diff
===================================================================
--- trunk/dports/science/xraylib/files/patch-configure.diff 2013-06-03 21:24:15 UTC (rev 106664)
+++ trunk/dports/science/xraylib/files/patch-configure.diff 2013-06-04 00:50:50 UTC (rev 106665)
@@ -1,73 +0,0 @@
---- xraylib-2.16.0-released/configure 2012-09-17 17:19:28.000000000 +0200
-+++ xraylib-2.16.0/configure 2012-09-19 17:27:05.000000000 +0200
-@@ -17732,20 +17732,23 @@
- # credits goes to momjian, I think. I'd like to put the right name
- # in the credits, if someone can point me in the right direction... ?
- #
-- if test -n "$ac_python_libdir" -a -n "$ac_python_library" \
-- -a x"$ac_python_library" != x"$ac_python_soname"
-- then
-+ #echo "ac_python_libdir: x$ac_python_libdirx"
-+ #echo "ac_python_library: x$ac_python_libraryx"
-+ #echo "ac_python_soname: x$ac_python_sonamex"
-+ #if test -n "$ac_python_libdir" -a -n "$ac_python_library" \
-+ # -a x"$ac_python_library" != x"$ac_python_soname"
-+ #then
- # use the official shared library
- ac_python_library=`echo "$ac_python_library" | sed "s/^lib//"`
-- PYTHON_LDFLAGS="-L$ac_python_libdir -l$ac_python_library"
-- else
-- # old way: use libpython from python_configdir
-- ac_python_libdir=`$PYTHON -c \
-- "from distutils.sysconfig import get_python_lib as f; \
-- import os; \
-- print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"`
- PYTHON_LDFLAGS="-L$ac_python_libdir -lpython$ac_python_version"
-- fi
-+ #else
-+ # # old way: use libpython from python_configdir
-+ # ac_python_libdir=`$PYTHON -c \
-+ # "from distutils.sysconfig import get_python_lib as f; \
-+ # import os; \
-+ # print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"`
-+ # PYTHON_LDFLAGS="-L$ac_python_libdir -lpython$ac_python_version"
-+ #fi
-
- if test -z "PYTHON_LDFLAGS"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
-@@ -17800,7 +17803,7 @@
- if test -z "$PYTHON_EXTRA_LIBS"; then
- PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
- conf = distutils.sysconfig.get_config_var; \
-- print (conf('LOCALMODLIBS') + ' ' + conf('LIBS'))"`
-+ print (conf('LOCALMODLIBS') + ' ' + conf('LDFLAGS') + ' ' + conf('LIBS'))"`
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LIBS" >&5
- $as_echo "$PYTHON_EXTRA_LIBS" >&6; }
-@@ -18080,7 +18083,7 @@
- JAVA_TEST=Test.java
- CLASS_TEST=Test.class
- cat << \EOF > $JAVA_TEST
--/* #line 18083 "configure" */
-+/* #line 18086 "configure" */
- public class Test {
- }
- EOF
-@@ -18267,7 +18270,7 @@
- if $UUDECODE Test.uue; then
- ac_cv_prog_uudecode_base64=yes
- else
-- echo "configure: 18270: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
-+ echo "configure: 18273: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
- echo "configure: failed file was:" >&5
- cat Test.uue >&5
- ac_cv_prog_uudecode_base64=no
-@@ -18298,7 +18301,7 @@
- CLASS_TEST=Test.class
- TEST=Test
- cat << \EOF > $JAVA_TEST
--/* [#]line 18301 "configure" */
-+/* [#]line 18304 "configure" */
- public class Test {
- public static void main (String args[]) {
- System.exit (0);
Deleted: trunk/dports/science/xraylib/files/patch-m4-m4-ax_python_devel.m4.diff
===================================================================
--- trunk/dports/science/xraylib/files/patch-m4-m4-ax_python_devel.m4.diff 2013-06-03 21:24:15 UTC (rev 106664)
+++ trunk/dports/science/xraylib/files/patch-m4-m4-ax_python_devel.m4.diff 2013-06-04 00:50:50 UTC (rev 106665)
@@ -1,46 +0,0 @@
---- xraylib-2.16.0-released/m4/m4-ax_python_devel.m4 2012-09-17 17:19:18.000000000 +0200
-+++ xraylib-2.16.0/m4/m4-ax_python_devel.m4 2012-09-19 17:26:55.000000000 +0200
-@@ -232,20 +232,23 @@
- # credits goes to momjian, I think. I'd like to put the right name
- # in the credits, if someone can point me in the right direction... ?
- #
-- if test -n "$ac_python_libdir" -a -n "$ac_python_library" \
-- -a x"$ac_python_library" != x"$ac_python_soname"
-- then
-+ #echo "ac_python_libdir: x$ac_python_libdirx"
-+ #echo "ac_python_library: x$ac_python_libraryx"
-+ #echo "ac_python_soname: x$ac_python_sonamex"
-+ #if test -n "$ac_python_libdir" -a -n "$ac_python_library" \
-+ # -a x"$ac_python_library" != x"$ac_python_soname"
-+ #then
- # use the official shared library
- ac_python_library=`echo "$ac_python_library" | sed "s/^lib//"`
-- PYTHON_LDFLAGS="-L$ac_python_libdir -l$ac_python_library"
-- else
-- # old way: use libpython from python_configdir
-- ac_python_libdir=`$PYTHON -c \
-- "from distutils.sysconfig import get_python_lib as f; \
-- import os; \
-- print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"`
- PYTHON_LDFLAGS="-L$ac_python_libdir -lpython$ac_python_version"
-- fi
-+ #else
-+ # # old way: use libpython from python_configdir
-+ # ac_python_libdir=`$PYTHON -c \
-+ # "from distutils.sysconfig import get_python_lib as f; \
-+ # import os; \
-+ # print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"`
-+ # PYTHON_LDFLAGS="-L$ac_python_libdir -lpython$ac_python_version"
-+ #fi
-
- if test -z "PYTHON_LDFLAGS"; then
- AC_MSG_WARN([
-@@ -290,7 +293,7 @@
- if test -z "$PYTHON_EXTRA_LIBS"; then
- PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
- conf = distutils.sysconfig.get_config_var; \
-- print (conf('LOCALMODLIBS') + ' ' + conf('LIBS'))"`
-+ print (conf('LOCALMODLIBS') + ' ' + conf('LDFLAGS') + ' ' + conf('LIBS'))"`
- fi
- AC_MSG_RESULT([$PYTHON_EXTRA_LIBS])
- AC_SUBST(PYTHON_EXTRA_LIBS)
Deleted: trunk/dports/science/xraylib/files/patch-python-Makefile.am.diff
===================================================================
--- trunk/dports/science/xraylib/files/patch-python-Makefile.am.diff 2013-06-03 21:24:15 UTC (rev 106664)
+++ trunk/dports/science/xraylib/files/patch-python-Makefile.am.diff 2013-06-04 00:50:50 UTC (rev 106665)
@@ -1,11 +0,0 @@
---- xraylib-2.16.0-released/python/Makefile.am 2012-09-11 16:12:36.000000000 +0200
-+++ xraylib-2.16.0/python/Makefile.am 2012-09-19 16:19:22.000000000 +0200
-@@ -27,7 +27,7 @@
-
- pythonxrl: ${top_srcdir}/src/xraylib.i
- $(SWIG) -I${top_srcdir}/include -includeall -o xraylib_wrap.c -python ${top_srcdir}/src/xraylib.i
-- CC="$(CC)" CPPFLAGS="-I${top_srcdir}/include" CFLAGS="$(ARCHFLAGS)" $(PYTHON) xrlsetup.py build_ext --inplace
-+ CC="$(CC)" CPPFLAGS="-I${top_srcdir}/include" LDFLAGS="$(PYTHON_LDFLAGS)" CFLAGS="$(ARCHFLAGS)" $(PYTHON) xrlsetup.py build_ext --inplace
-
-
-
Deleted: trunk/dports/science/xraylib/files/patch-python-Makefile.in.diff
===================================================================
--- trunk/dports/science/xraylib/files/patch-python-Makefile.in.diff 2013-06-03 21:24:15 UTC (rev 106664)
+++ trunk/dports/science/xraylib/files/patch-python-Makefile.in.diff 2013-06-04 00:50:50 UTC (rev 106665)
@@ -1,11 +0,0 @@
---- xraylib-2.16.0-released/python/Makefile.in 2012-09-17 17:19:29.000000000 +0200
-+++ xraylib-2.16.0/python/Makefile.in 2012-09-19 17:27:07.000000000 +0200
-@@ -484,7 +484,7 @@
-
- @ENABLE_PYTHON_TRUE at pythonxrl: ${top_srcdir}/src/xraylib.i
- @ENABLE_PYTHON_TRUE@ $(SWIG) -I${top_srcdir}/include -includeall -o xraylib_wrap.c -python ${top_srcdir}/src/xraylib.i
-- at ENABLE_PYTHON_TRUE@ CC="$(CC)" CPPFLAGS="-I${top_srcdir}/include" CFLAGS="$(ARCHFLAGS)" $(PYTHON) xrlsetup.py build_ext --inplace
-+ at ENABLE_PYTHON_TRUE@ CC="$(CC)" CPPFLAGS="-I${top_srcdir}/include" LDFLAGS="$(PYTHON_LDFLAGS)" CFLAGS="$(ARCHFLAGS)" $(PYTHON) xrlsetup.py build_ext --inplace
-
- #I like to use my own commands for the install: although xrlsetup.py can handle this, I want to do it myself. Libtool would also be a possibility as is detailed in the automake manual.
- #MKDIR_P's are necessary for distcheck
Added: trunk/dports/science/xraylib/files/python_xrlsetup.py.in.diff
===================================================================
--- trunk/dports/science/xraylib/files/python_xrlsetup.py.in.diff (rev 0)
+++ trunk/dports/science/xraylib/files/python_xrlsetup.py.in.diff 2013-06-04 00:50:50 UTC (rev 106665)
@@ -0,0 +1,10 @@
+--- xraylib-2.16.0-orig/python/xrlsetup.py.in 2013-05-28 15:45:26.000000000 +0200
++++ xraylib-2.16.0/python/xrlsetup.py.in 2013-05-28 16:28:08.000000000 +0200
+@@ -20,6 +20,6 @@
+ from distutils.core import setup, Extension
+
+
+-xraylib_module = Extension('_xraylib', sources=['xraylib_wrap.c'],libraries = ['xrl', @PYTHON_LIBS_FIXED@], include_dirs = [@PYTHON_INCLUDE_FIXED@], library_dirs=['@abs_top_builddir@/src/.libs'])
++xraylib_module = Extension('_xraylib', sources=['xraylib_wrap.c'],libraries = ['xrl'], library_dirs=['@abs_top_builddir@/src/.libs'])
+
+ setup (name = 'xraylib' ,version = '@PYTHON_XRL_VERSION@' , author = "Tom Schoonjans", description = """python bindings of xraylib""", ext_modules = [xraylib_module], py_modules = ["xraylib"])
Added: trunk/dports/science/xraylib/files/xraylib.i.diff
===================================================================
--- trunk/dports/science/xraylib/files/xraylib.i.diff (rev 0)
+++ trunk/dports/science/xraylib/files/xraylib.i.diff 2013-06-04 00:50:50 UTC (rev 106665)
@@ -0,0 +1,11 @@
+--- xraylib-2.16.0-orig/src/xraylib.i 2013-05-28 15:45:26.000000000 +0200
++++ xraylib-2.16.0/src/xraylib.i 2013-05-28 16:41:24.000000000 +0200
+@@ -351,7 +351,7 @@
+ lua_getfield(L, $input,"atom");
+ if (lua_istable(L,-1)) {
+ /* count number of elements */
+- size_t n_atom = lua_objlen(L, -1);
++ size_t n_atom = lua_rawlen(L, -1);
+ if (n_atom != cs->n_atom) {
+ SWIG_exception(SWIG_RuntimeError,"n_atom hash value differs from number of elements");
+ }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130603/9b72c198/attachment-0001.html>
More information about the macports-changes
mailing list