[97981] trunk/dports/science/xraylib
ciserlohn at macports.org
ciserlohn at macports.org
Fri Sep 21 01:27:09 PDT 2012
Revision: 97981
http://trac.macports.org//changeset/97981
Author: ciserlohn at macports.org
Date: 2012-09-21 01:27:09 -0700 (Fri, 21 Sep 2012)
Log Message:
-----------
xraylib: move from one python variant to separate variants per python version (maintainer update; fixes #36220, #36223)
Modified Paths:
--------------
trunk/dports/science/xraylib/Portfile
Added Paths:
-----------
trunk/dports/science/xraylib/files/
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 2012-09-21 08:15:46 UTC (rev 97980)
+++ trunk/dports/science/xraylib/Portfile 2012-09-21 08:27:09 UTC (rev 97981)
@@ -5,6 +5,7 @@
name xraylib
version 2.16.0
+revision 1
categories science
platforms darwin
maintainers me.com:Tom.Schoonjans
@@ -25,6 +26,13 @@
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
+
+patch.pre_args -p1
+
configure.args --disable-idl \
--disable-fortran2003 \
--disable-perl \
@@ -42,12 +50,34 @@
depends_build-append port:swig-perl
}
-variant python description {Python bindings} {
- configure.args-append --enable-python --enable-python-integration
+variant python26 description {Python2.6 bindings} conflicts python27 python31 python32 {
+ 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 {
+ 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 {
+ 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 {
+ 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 java description {Java bindings} {
configure.args-append --enable-java
configure.args-delete --disable-java
@@ -96,4 +126,7 @@
configure.fc ${prefix}/bin/gfortran-mp-4.7
}
-default_variants +python
+if {![variant_isset python26] && ![variant_isset python27] && ![variant_isset python31] && ![variant_isset python32]} {
+ default_variants +python27
+}
+
Added: trunk/dports/science/xraylib/files/patch-configure.diff
===================================================================
--- trunk/dports/science/xraylib/files/patch-configure.diff (rev 0)
+++ trunk/dports/science/xraylib/files/patch-configure.diff 2012-09-21 08:27:09 UTC (rev 97981)
@@ -0,0 +1,73 @@
+--- 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);
Added: 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 (rev 0)
+++ trunk/dports/science/xraylib/files/patch-m4-m4-ax_python_devel.m4.diff 2012-09-21 08:27:09 UTC (rev 97981)
@@ -0,0 +1,46 @@
+--- 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)
Added: trunk/dports/science/xraylib/files/patch-python-Makefile.am.diff
===================================================================
--- trunk/dports/science/xraylib/files/patch-python-Makefile.am.diff (rev 0)
+++ trunk/dports/science/xraylib/files/patch-python-Makefile.am.diff 2012-09-21 08:27:09 UTC (rev 97981)
@@ -0,0 +1,11 @@
+--- 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
+
+
+
Added: trunk/dports/science/xraylib/files/patch-python-Makefile.in.diff
===================================================================
--- trunk/dports/science/xraylib/files/patch-python-Makefile.in.diff (rev 0)
+++ trunk/dports/science/xraylib/files/patch-python-Makefile.in.diff 2012-09-21 08:27:09 UTC (rev 97981)
@@ -0,0 +1,11 @@
+--- 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120921/1a6e7f1c/attachment.html>
More information about the macports-changes
mailing list