Ticket #2562: rpm41.patch

File rpm41.patch, 3.0 KB (added by n3npq@…, 20 years ago)

Patch tp build rpm41 against python-2.4

  • ./files/patch-configure.ac.1.diff

    old new  
     1--- ./configure.ac.jbj  Tue Jan 11 14:03:26 2005
     2+++ ./configure.ac      Tue Jan 11 14:04:19 2005
     3@@ -859,6 +859,18 @@
     4 WITH_PYTHON_VERSION=$withval
     5 if test $withval = auto ; then
     6 
     7+  AC_MSG_CHECKING(for python 2.4)
     8+  AC_TRY_RUN([
     9+#include <python2.4/Python.h>
     10+main() {
     11+  exit(strncmp("2.4", PY_VERSION, 3));
     12+} ],
     13+  withval=yes, withval=no, withval=yes)
     14+  AC_MSG_RESULT($withval)
     15+  if test $withval = yes ; then
     16+    WITH_PYTHON_VERSION="2.4"
     17+  else
     18+
     19   AC_MSG_CHECKING(for python 2.3)
     20   AC_TRY_RUN([
     21 #include <python2.3/Python.h>
     22@@ -894,6 +906,7 @@
     23     if test $withval = yes ; then
     24       WITH_PYTHON_VERSION="1.5"
     25     fi
     26+  fi
     27   fi
     28   fi
     29 fi
  • ./files/patch-rpmdebug-py.c.diff

    old new  
     1--- ./python/rpmdebug-py.c.jbj  Tue Jan 11 14:24:09 2005
     2+++ ./python/rpmdebug-py.c      Tue Jan 11 14:25:00 2005
     3@@ -37,7 +37,9 @@
     4     if (o->ob_type == &PyCode_Type)    return "Code";
     5     if (o->ob_type == &PyComplex_Type) return "Complex";
     6     if (o->ob_type == &PyDict_Type)    return "Dict";
     7+#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 4
     8     if (o->ob_type == &PyDictIter_Type)        return "DictIter";
     9+#endif
     10     if (o->ob_type == &PyFile_Type)    return "File";
     11     if (o->ob_type == &PyFloat_Type)   return "Float";
     12     if (o->ob_type == &PyFrame_Type)   return "Frame";
  • ./files/patch-rpmrc-py.c.diff

    old new  
     1--- ./python/rpmrc-py.c.jbj     Tue Jan 11 13:55:24 2005
     2+++ ./python/rpmrc-py.c Tue Jan 11 13:59:59 2005
     3@@ -213,6 +213,7 @@
     4     return PyDict_Type.tp_richcompare(v, w, op);
     5 }
     6 
     7+#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 4
     8 /**
     9  */
     10 static PyObject * rpmrc_iter(PyObject * s)
     11@@ -248,6 +249,10 @@
     12        return PyDictIter_Type.tp_methods[0].ml_meth(s, args);
     13     return NULL;
     14 }
     15+#else
     16+#define rpmrc_iter      0
     17+#define rpmrc_iternext  0
     18+#endif
     19 
     20 /** \ingroup python
     21  */
     22@@ -314,7 +319,7 @@
     23        NULL },
     24     { "delMacro",      (PyCFunction) rpmrc_DelMacro, METH_VARARGS,
     25        NULL },
     26-#if Py_TPFLAGS_HAVE_ITER       /* XXX backport to python-1.5.2 */
     27+#if Py_TPFLAGS_HAVE_ITER && PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 4
     28     { "next",          (PyCFunction) rpmrc_next,     METH_VARARGS,
     29        "next() -- get the next value, or raise StopIteration"},
     30 #endif
  • ./Portfile

    old new  
    5353                patch-Makefile-in.diff          patch-ltmain-sh.diff \
    5454                patch-rpmrc-in.diff             \
    5555                patch-autodeps-darwin-prov.diff patch-autodeps-darwin-req.diff \
    56                 patch-python-makefile-in.diff   patch-configure.ac.diff
     56                patch-python-makefile-in.diff   patch-configure.ac.diff \
     57                patch-configure.ac.1.diff       patch-rpmrc-py.c.diff \
     58                patch-rpmdebug-py.c.diff
    5759
    5860
    5961        post-patch {