- Fix build of the python bits with python 2.7
Submitted by: maintainer
This commit is contained in:
parent
aa48142f09
commit
940a2b4f40
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=270474
1 changed files with 300 additions and 0 deletions
300
archivers/rpm5/files/patch-configure
Normal file
300
archivers/rpm5/files/patch-configure
Normal file
|
@ -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
|
Loading…
Reference in a new issue