[76760] trunk/dports/sysutils/rpm52

afb at macports.org afb at macports.org
Tue Mar 8 00:44:57 PST 2011


Revision: 76760
          http://trac.macports.org/changeset/76760
Author:   afb at macports.org
Date:     2011-03-08 00:44:56 -0800 (Tue, 08 Mar 2011)
Log Message:
-----------
RPM: add +python27 and +perl5_12 variants

Modified Paths:
--------------
    trunk/dports/sysutils/rpm52/Portfile

Added Paths:
-----------
    trunk/dports/sysutils/rpm52/files/patch-configure
    trunk/dports/sysutils/rpm52/files/patch-configure.ac

Modified: trunk/dports/sysutils/rpm52/Portfile
===================================================================
--- trunk/dports/sysutils/rpm52/Portfile	2011-03-08 06:02:57 UTC (rev 76759)
+++ trunk/dports/sysutils/rpm52/Portfile	2011-03-08 08:44:56 UTC (rev 76760)
@@ -4,7 +4,7 @@
 
 name			rpm52
 version			5.2.1
-revision		3
+revision		4
 platforms		darwin freebsd linux
 categories		sysutils archivers
 maintainers		mac.com:n3npq afb
@@ -37,7 +37,7 @@
                         bin:bzip2:bzip2 \
                         bin:unzip:unzip
 
-patchfiles		patch-macros.in
+patchfiles		patch-macros.in patch-configure.ac patch-configure
 
 build.type		gnu
 
@@ -114,6 +114,15 @@
 	configure.env-append	__PYTHON=${prefix}/bin/python2.6
 }
 
+variant python27 description { use python 2.7 instead of python 2.5 } {
+	depends_lib-delete	port:python25
+	depends_lib-append	port:python27
+	configure.args-delete	--with-python=2.5
+	configure.args-append	--with-python=2.7
+	configure.env-delete	__PYTHON=${prefix}/bin/python2.5
+	configure.env-append	__PYTHON=${prefix}/bin/python2.7
+}
+
 variant perl5_10 description { use perl 5.10 instead of perl 5.8 } {
 	depends_lib-delete	port:perl5.8
 	depends_lib-append	port:perl5.10
@@ -122,3 +131,12 @@
 	configure.env-delete	__PERL=${prefix}/bin/perl5.8
 	configure.env-append	__PERL=${prefix}/bin/perl5.10
 }
+
+variant perl5_12 description { use perl 5.12 instead of perl 5.8 } {
+	depends_lib-delete	port:perl5.8
+	depends_lib-append	port:perl5.12
+	configure.env-delete	PERL=${prefix}/bin/perl5.8
+	configure.env-append	PERL=${prefix}/bin/perl5.12
+	configure.env-delete	__PERL=${prefix}/bin/perl5.8
+	configure.env-append	__PERL=${prefix}/bin/perl5.12
+}

Added: trunk/dports/sysutils/rpm52/files/patch-configure
===================================================================
--- trunk/dports/sysutils/rpm52/files/patch-configure	                        (rev 0)
+++ trunk/dports/sysutils/rpm52/files/patch-configure	2011-03-08 08:44:56 UTC (rev 76760)
@@ -0,0 +1,300 @@
+--- configure.orig	2010-05-01 18:57:15.000000000 +0200
++++ configure	2010-10-23 18:07:03.000000000 +0200
+@@ -36085,15 +36085,15 @@
+   withval=$with_python;
+     if test ".$withval" != .no; then
+         case "$withval" in
+-             2.x|2.3|2.4|2.5|2.6)
++             2.x|2.3|2.4|2.5|2.6|2.7)
+                   python_version=$withval
+                   ;;
+              yes)
+-                  python_version="2.6 2.5 2.4 2.3 2.x"
++                  python_version="2.7 2.6 2.5 2.4 2.3 2.x"
+                   ;;
+              *)
+-                  { $as_echo "$as_me:$LINENO: WARNING: --with-python only supports values \"2.x\", \"2.3\", \"2.4\", \"2.5\", or \"2.6\" ignoring..." >&5
+-$as_echo "$as_me: WARNING: --with-python only supports values \"2.x\", \"2.3\", \"2.4\", \"2.5\", or \"2.6\" ignoring..." >&2;}
++                  { $as_echo "$as_me:$LINENO: WARNING: --with-python only supports values \"2.x\", \"2.3\", \"2.4\", \"2.5\", \"2.6\", or \"2.7\" ignoring..." >&5
++$as_echo "$as_me: WARNING: --with-python only supports values \"2.x\", \"2.3\", \"2.4\", \"2.5\", \"2.6\", or \"2.7\" ignoring..." >&2;}
+                   python_version=""
+                   ;;
+         esac
+@@ -53679,6 +53679,64 @@
+ rm -f conftest.err conftest.$ac_ext
+ 
+                             __rcl_safe_LIBS="${LIBS}"
++                            LIBS="-lpython2.7 ${LIBS}"
++                            cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h.  */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h.  */
++
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char Py_Initialize ();
++int
++main ()
++{
++return Py_Initialize ();
++  ;
++  return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
++$as_echo "$ac_try_echo") >&5
++  (eval "$ac_link") 2>conftest.er1
++  ac_status=$?
++  grep -v '^ *+' conftest.er1 >conftest.err
++  rm -f conftest.er1
++  cat conftest.err >&5
++  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
++  (exit $ac_status); } && {
++	 test -z "$ac_c_werror_flag" ||
++	 test ! -s conftest.err
++       } && test -s conftest$ac_exeext && {
++	 test "$cross_compiling" = yes ||
++	 $as_test_x conftest$ac_exeext
++       }; then
++   __rcl_found_lib=yes
++else
++  $as_echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
++fi
++
++rm -rf conftest.dSYM
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
++      conftest$ac_exeext conftest.$ac_ext
++                            LIBS="${__rcl_safe_LIBS}"
++
++                            __rcl_safe_LIBS="${LIBS}"
+                             LIBS="-lpython2.6 ${LIBS}"
+                             cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+@@ -53838,6 +53896,64 @@
+ rm -f conftest.err conftest.$ac_ext
+ 
+                         __rcl_safe_LIBS="${LIBS}"
++                        LIBS="-lpython2.7 ${LIBS}"
++                        cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h.  */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h.  */
++
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char Py_Initialize ();
++int
++main ()
++{
++return Py_Initialize ();
++  ;
++  return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
++$as_echo "$ac_try_echo") >&5
++  (eval "$ac_link") 2>conftest.er1
++  ac_status=$?
++  grep -v '^ *+' conftest.er1 >conftest.err
++  rm -f conftest.er1
++  cat conftest.err >&5
++  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
++  (exit $ac_status); } && {
++	 test -z "$ac_c_werror_flag" ||
++	 test ! -s conftest.err
++       } && test -s conftest$ac_exeext && {
++	 test "$cross_compiling" = yes ||
++	 $as_test_x conftest$ac_exeext
++       }; then
++   __rcl_found_lib=yes
++else
++  $as_echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
++fi
++
++rm -rf conftest.dSYM
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
++      conftest$ac_exeext conftest.$ac_ext
++                        LIBS="${__rcl_safe_LIBS}"
++
++                        __rcl_safe_LIBS="${LIBS}"
+                         LIBS="-lpython2.6 ${LIBS}"
+                         cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+@@ -54240,6 +54356,40 @@
+                             __rcl_found=no
+                             for __rcl_dir in ${__rcl_location}/lib/pythonembed ${__rcl_location}/lib ${__rcl_location}; do
+ 
++                                    if  test -f "${__rcl_dir}/libpython2.7.la" && \
++                                        test -d "${__rcl_dir}/.libs"; then
++                                        if test ".${__rcl_dir}" != "./usr/lib"; then
++
++    if test ".$verbose" = .yes; then
++        $as_echo "-- extending LDFLAGS: -L${__rcl_dir}" >&6
++    fi
++
++
++    if test ".$verbose" = .yes; then
++        $as_echo "-- extending LDFLAGS: -L${__rcl_dir}/.libs" >&6
++    fi
++
++                                            LDFLAGS="${LDFLAGS} -L${__rcl_dir} -L${__rcl_dir}/.libs"
++                                        fi
++                                        __rcl_found=yes
++                                        break
++                                    fi
++                                    if  test -f "${__rcl_dir}/libpython2.7.a"  || \
++                                        test -f "${__rcl_dir}/libpython2.7.so" || \
++                                        test -f "${__rcl_dir}/libpython2.7.sl" || \
++                                        test -f "${__rcl_dir}/libpython2.7.dylib"; then
++                                        if test ".${__rcl_dir}" != "./usr/lib"; then
++
++    if test ".$verbose" = .yes; then
++        $as_echo "-- extending LDFLAGS: -L${__rcl_dir}" >&6
++    fi
++
++                                            LDFLAGS="${LDFLAGS} -L${__rcl_dir}"
++                                        fi
++                                        __rcl_found=yes
++                                        break
++                                    fi
++
+                                     if  test -f "${__rcl_dir}/libpython2.6.la" && \
+                                         test -d "${__rcl_dir}/.libs"; then
+                                         if test ".${__rcl_dir}" != "./usr/lib"; then
+@@ -54332,6 +54482,22 @@
+                         if test ".${__rcl_found}" = .yes; then
+                             __rcl_found=no
+ 
++                                for __rcl_file in _ `find ${__rcl_location} -name "libpython2.7.*" -type f -print 2>/dev/null | \
++                                    egrep '\.(a|so|sl|dylib)$'`; do
++                                    test .${__rcl_file} = ._ && continue
++                                    __rcl_dir=`echo ${__rcl_file} | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'`
++                                    if test ".${__rcl_dir}" != "./usr/lib"; then
++
++    if test ".$verbose" = .yes; then
++        $as_echo "-- extending LDFLAGS: -L${__rcl_dir}" >&6
++    fi
++
++                                        LDFLAGS="${LDFLAGS} -L${__rcl_dir}"
++                                    fi
++                                    __rcl_found=yes
++                                    break
++                                done
++
+                                 for __rcl_file in _ `find ${__rcl_location} -name "libpython2.6.*" -type f -print 2>/dev/null | \
+                                     egrep '\.(a|so|sl|dylib)$'`; do
+                                     test .${__rcl_file} = ._ && continue
+@@ -54538,6 +54704,83 @@
+                                 __rcl_found_lib=no
+ 
+ 
++{ $as_echo "$as_me:$LINENO: checking for Py_Initialize in -lpython2.7" >&5
++$as_echo_n "checking for Py_Initialize in -lpython2.7... " >&6; }
++if test "${ac_cv_lib_python2_7_Py_Initialize+set}" = set; then
++  $as_echo_n "(cached) " >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lpython2.7  $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h.  */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h.  */
++
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char Py_Initialize ();
++int
++main ()
++{
++return Py_Initialize ();
++  ;
++  return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++  *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
++$as_echo "$ac_try_echo") >&5
++  (eval "$ac_link") 2>conftest.er1
++  ac_status=$?
++  grep -v '^ *+' conftest.er1 >conftest.err
++  rm -f conftest.er1
++  cat conftest.err >&5
++  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
++  (exit $ac_status); } && {
++	 test -z "$ac_c_werror_flag" ||
++	 test ! -s conftest.err
++       } && test -s conftest$ac_exeext && {
++	 test "$cross_compiling" = yes ||
++	 $as_test_x conftest$ac_exeext
++       }; then
++  ac_cv_lib_python2_7_Py_Initialize=yes
++else
++  $as_echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++	ac_cv_lib_python2_7_Py_Initialize=no
++fi
++
++rm -rf conftest.dSYM
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
++      conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_python2_7_Py_Initialize" >&5
++$as_echo "$ac_cv_lib_python2_7_Py_Initialize" >&6; }
++if test "x$ac_cv_lib_python2_7_Py_Initialize" = x""yes; then
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBPYTHON2_7 1
++_ACEOF
++
++  LIBS="-lpython2.7 $LIBS"
++
++fi
++
++                                                            test ".${ac_cv_lib_python2_7_Py_Initialize}" = .yes && __rcl_found_lib=yes
++
++
+ { $as_echo "$as_me:$LINENO: checking for Py_Initialize in -lpython2.6" >&5
+ $as_echo_n "checking for Py_Initialize in -lpython2.6... " >&6; }
+ if test "${ac_cv_lib_python2_6_Py_Initialize+set}" = set; then

Added: trunk/dports/sysutils/rpm52/files/patch-configure.ac
===================================================================
--- trunk/dports/sysutils/rpm52/files/patch-configure.ac	                        (rev 0)
+++ trunk/dports/sysutils/rpm52/files/patch-configure.ac	2011-03-08 08:44:56 UTC (rev 76760)
@@ -0,0 +1,35 @@
+Index: configure.ac
+===================================================================
+RCS file: /v/rpm/cvs/rpm/configure.ac,v
+retrieving revision 2.372.2.13
+retrieving revision 2.372.2.16
+diff -u -r2.372.2.13 -r2.372.2.16
+--- configure.ac	4 May 2010 13:45:21 -0000	2.372.2.13
++++ configure.ac	23 Oct 2010 16:07:03 -0000	2.372.2.16
+@@ -994,14 +994,14 @@
+ AC_ARG_WITH(python, AS_HELP_STRING([--with-python], [build with RPM Python language bindings]), [
+     if test ".$withval" != .no; then
+         case "$withval" in
+-             2.x|2.3|2.4|2.5|2.6)
++             2.x|2.3|2.4|2.5|2.6|2.7)
+                   python_version=$withval
+                   ;;
+              yes)
+-                  python_version="2.6 2.5 2.4 2.3 2.x"
++                  python_version="2.7 2.6 2.5 2.4 2.3 2.x"
+                   ;;
+              *)
+-                  AC_MSG_WARN([--with-python only supports values "2.x", "2.3", "2.4", "2.5", or "2.6" ignoring...])
++                  AC_MSG_WARN([--with-python only supports values "2.x", "2.3", "2.4", "2.5", "2.6", or "2.7" ignoring...])
+                   python_version=""
+                   ;;
+         esac
+@@ -1289,7 +1294,7 @@
+ dnl # Python embedding
+ RPM_CHECK_LIB(
+     [Python embedding], [pythonembed],
+-    [python2.6 python2.5], [Py_Initialize], [Python.h],
++    [python2.7 python2.6 python2.5], [Py_Initialize], [Python.h],
+     [no,external:none], [],
+     [
+     ], [])
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110308/aefb8e88/attachment-0001.html>


More information about the macports-changes mailing list