[pypoker-eval] * Sat Jul 31 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 137.0-4 - make a patch for pyth

Orcan Ogetbil oget at fedoraproject.org
Sat Jul 31 05:52:14 UTC 2010


commit b2f69dcc0a1590f6a56eecf09c8194207701440b
Author: Orcan Ogetbil <oget.fedora at gmail.com>
Date:   Sat Jul 31 01:52:12 2010 -0400

    * Sat Jul 31 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 137.0-4
    - make a patch for python-2.7 detection. remove the previous hack

 pypoker-eval-python27.patch |   52 +++++++++++++++++++++++++++++++++++++++++++
 pypoker-eval.spec           |   14 +++++++----
 2 files changed, 61 insertions(+), 5 deletions(-)
---
diff --git a/pypoker-eval-python27.patch b/pypoker-eval-python27.patch
new file mode 100644
index 0000000..f8e61f3
--- /dev/null
+++ b/pypoker-eval-python27.patch
@@ -0,0 +1,52 @@
+diff -rupN pypoker-eval-137.0.old/config/ccpython.m4 pypoker-eval-137.0/config/ccpython.m4
+--- pypoker-eval-137.0.old/config/ccpython.m4	2008-12-25 15:49:24.000000000 -0500
++++ pypoker-eval-137.0/config/ccpython.m4	2010-07-31 01:32:55.000000000 -0400
+@@ -110,7 +110,7 @@ AM_CONDITIONAL([PYTHON_]$2, [test "$have
+ 
+ AC_DEFUN([ALL_CC_PYTHON],
+ [ 
+-m4_define([_AM_PYTHON_INTERPRETER_LIST], [python2.6 python2.5 python2.4 python2.3])
++m4_define([_AM_PYTHON_INTERPRETER_LIST], [python2.7 python2.6 python2.5 python2.4 python2.3])
+ PYTHONS=''
+ found_one=''
+ _ONE_CC_PYTHON([=2.3], [2_3])
+@@ -124,6 +124,9 @@ if test -f "$PYTHON" ; then found_one=$P
+ unset PYTHON
+ _ONE_CC_PYTHON([=2.6], [2_6])
+ if test -f "$PYTHON" ; then found_one=$PYTHON ; PYTHONS="$PYTHON $PYTHONS" ; fi
++unset PYTHON
++_ONE_CC_PYTHON([=2.7], [2_7])
++if test -f "$PYTHON" ; then found_one=$PYTHON ; PYTHONS="$PYTHON $PYTHONS" ; fi
+ PYTHON=$found_one
+ if ! test "$found_one" ; then
+    AC_MSG_ERROR([No python development environments found])
+diff -rupN pypoker-eval-137.0.old/config/python.m4 pypoker-eval-137.0/config/python.m4
+--- pypoker-eval-137.0.old/config/python.m4	2008-12-02 14:04:51.000000000 -0500
++++ pypoker-eval-137.0/config/python.m4	2010-07-31 01:32:55.000000000 -0400
+@@ -42,7 +42,7 @@ AC_DEFUN([AM_PATH_PYTHON],
+   dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages
+   dnl in 1.5.
+   m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
+-                      [python python2 python2.5 python2.6 python2.4 python2.3 python2.2 dnl
++                      [python python2 python2.5 python2.7 python2.6 python2.4 python2.3 python2.2 dnl
+ python2.1 python2.0 python1.6 python1.5])
+ 
+   m4_if([$1],[],[
+diff -rupN pypoker-eval-137.0.old/Makefile.am pypoker-eval-137.0/Makefile.am
+--- pypoker-eval-137.0.old/Makefile.am	2008-12-02 14:04:51.000000000 -0500
++++ pypoker-eval-137.0/Makefile.am	2010-07-31 01:38:09.000000000 -0400
+@@ -32,6 +32,14 @@ pythondir = ${pyexecdir}
+ python_PYTHON = \
+ 	pokereval.py
+ 
++if PYTHON_2_7
++py2_7exec_LTLIBRARIES = _pokereval_2_7.la
++_pokereval_2_7_la_SOURCES = pypokereval.c
++_pokereval_2_7_la_LDFLAGS = -module -no-undefined -version-info 1:0:0
++_pokereval_2_7_la_LIBADD = ${PYTHON2_7_LIBS} ${POKER_EVAL_LIBS}
++_pokereval_2_7_la_CFLAGS = ${PYTHON2_7_CFLAGS} ${POKER_EVAL_CFLAGS} -DPYTHON_VERSION=\"2_7\" -D'VERSION_NAME(w)=w\#\#2_7'
++endif
++
+ if PYTHON_2_6
+ py2_6exec_LTLIBRARIES = _pokereval_2_6.la
+ _pokereval_2_6_la_SOURCES = pypokereval.c
diff --git a/pypoker-eval.spec b/pypoker-eval.spec
index 86b21f5..625a2ee 100644
--- a/pypoker-eval.spec
+++ b/pypoker-eval.spec
@@ -2,14 +2,16 @@
 
 Name:           pypoker-eval
 Version:        137.0
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Python interface to poker-eval
 
 Group:          Development/Libraries
 License:        GPLv2+
 URL:            http://pokersource.org/pypoker-eval
 Source0:        http://download.gna.org/pokersource/sources/%{name}-%{version}.tar.gz
-
+# Make it possible to build against python-2.7
+Patch0:         pypoker-eval-python27.patch
+BuildRequires:  autoconf automake libtool
 BuildRequires:  python-devel poker-eval-devel >= 124.0
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -30,9 +32,7 @@ pypoker-eval.
 
 %prep
 %setup -q
-
-# Hack up configure so that it looks for python 2.7
-sed -i -e"s|python2.6 python2.5|python2.7 python2.6 python2.5|" configure
+%patch0 -p1
 
 # make examples directory for devel %doc
 mkdir -p tmp/examples
@@ -40,6 +40,7 @@ cp test.py tmp/examples
 
 
 %build
+autoreconf -fi
 %configure --disable-static
 make %{?_smp_mflags}
 
@@ -78,6 +79,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Sat Jul 31 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 137.0-4
+- make a patch for python-2.7 detection. remove the previous hack
+
 * Mon Jul 26 2010 David Malcolm <dmalcolm at redhat.com> - 137.0-3
 - make configure look for python 2.7
 


More information about the scm-commits mailing list