summaryrefslogtreecommitdiff
path: root/libraries/libopensync/patches
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2012-09-09 09:19:58 +0200
committerRobby Workman <rworkman@slackbuilds.org>2012-09-09 19:59:27 -0500
commit159213485d76d551bad728720c998f90b397ac2a (patch)
treece394904e4e5c7c1caf9a105ca818df28042b133 /libraries/libopensync/patches
parent734a5adcfdab34232a282accd46616d76c28cb85 (diff)
downloadslackbuilds-159213485d76d551bad728720c998f90b397ac2a.tar.gz
libraries/libopensync: Patches refactoring.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'libraries/libopensync/patches')
-rw-r--r--libraries/libopensync/patches/libopensync-0.22-Makefile.patch82
-rw-r--r--libraries/libopensync/patches/libopensync-0.22-pythonpath.patch63
-rw-r--r--libraries/libopensync/patches/libopensync-0.22-swig-typeerror.patch13
3 files changed, 158 insertions, 0 deletions
diff --git a/libraries/libopensync/patches/libopensync-0.22-Makefile.patch b/libraries/libopensync/patches/libopensync-0.22-Makefile.patch
new file mode 100644
index 0000000000..579b792a49
--- /dev/null
+++ b/libraries/libopensync/patches/libopensync-0.22-Makefile.patch
@@ -0,0 +1,82 @@
+https://bugs.gentoo.org/355291
+
+--- a/opensync/Makefile.am
++++ b/opensync/Makefile.am
+@@ -77,5 +77,5 @@ CLEANFILES = \
+ *.bbg \
+ *.da
+
+-libopensync_la_LDFLAGS = @PACKAGE_LIBS@ @GCOV_LDFLAGS@
+-libopensync_la_LIBADD = @XML_LIBS@
++libopensync_la_LDFLAGS = @GCOV_LDFLAGS@
++libopensync_la_LIBADD = @PACKAGE_LIBS@ @XML_LIBS@
+--- a/osengine/Makefile.am
++++ b/osengine/Makefile.am
+@@ -43,5 +43,5 @@ CLEANFILES = \
+ *.bbg \
+ *.da
+
+-libosengine_la_LDFLAGS = $(PACKAGE_LIBS) -R $(libdir) @GCOV_LDFLAGS@
+-libosengine_la_LIBADD = $(top_builddir)/opensync/libopensync.la
++libosengine_la_LDFLAGS = @GCOV_LDFLAGS@
++libosengine_la_LIBADD = $(top_builddir)/opensync/libopensync.la $(PACKAGE_LIBS)
+--- a/osplugin/Makefile.am
++++ b/osplugin/Makefile.am
+@@ -9,8 +9,8 @@ libexec_PROGRAMS = osplugin
+ ospluginincludedir = @OPENSYNC_HEADERDIR@
+
+ osplugin_SOURCES = osplugin.c
+-osplugin_LDFLAGS = @PACKAGE_LIBS@ @XML_LIBS@ -R $(libdir) @GCOV_LDFLAGS@
+-osplugin_LDADD = $(top_builddir)/opensync/libopensync.la
++osplugin_LDFLAGS = @GCOV_LDFLAGS@
++osplugin_LDADD = $(top_builddir)/opensync/libopensync.la @PACKAGE_LIBS@ @XML_LIBS@
+
+ CLEANFILES = \
+ *.bb \
+--- a/tools/Makefile.am
++++ b/tools/Makefile.am
+@@ -9,24 +9,24 @@ bin_PROGRAMS = osyncdump osyncstress osyncplugin osynctest osyncbinary
+ endif
+
+ osyncdump_SOURCES = osyncdump.c
+-osyncdump_LDFLAGS = @PACKAGE_LIBS@ @XML_LIBS@ -R $(libdir) @GCOV_LDFLAGS@
+-osyncdump_LDADD = $(top_builddir)/opensync/libopensync.la
++osyncdump_LDFLAGS = @GCOV_LDFLAGS@
++osyncdump_LDADD = $(top_builddir)/opensync/libopensync.la @PACKAGE_LIBS@ @XML_LIBS@
+
+ osyncstress_SOURCES = osyncstress.c
+-osyncstress_LDFLAGS = @PACKAGE_LIBS@ -R $(libdir) @GCOV_LDFLAGS@
+-osyncstress_LDADD = $(top_builddir)/osengine/libosengine.la $(top_builddir)/opensync/libopensync.la
++osyncstress_LDFLAGS = @GCOV_LDFLAGS@
++osyncstress_LDADD = $(top_builddir)/osengine/libosengine.la $(top_builddir)/opensync/libopensync.la @PACKAGE_LIBS@
+
+ osyncplugin_SOURCES = osyncplugin.c
+-osyncplugin_LDFLAGS = @PACKAGE_LIBS@ -R $(libdir) @GCOV_LDFLAGS@
+-osyncplugin_LDADD = $(top_builddir)/opensync/libopensync.la
++osyncplugin_LDFLAGS = @GCOV_LDFLAGS@
++osyncplugin_LDADD = $(top_builddir)/opensync/libopensync.la @PACKAGE_LIBS@
+
+ osynctest_SOURCES = osynctest.c
+-osynctest_LDFLAGS = @PACKAGE_LIBS@ -R $(libdir) @GCOV_LDFLAGS@
+-osynctest_LDADD = $(top_builddir)/osengine/libosengine.la $(top_builddir)/opensync/libopensync.la
++osynctest_LDFLAGS = @GCOV_LDFLAGS@
++osynctest_LDADD = $(top_builddir)/osengine/libosengine.la $(top_builddir)/opensync/libopensync.la @PACKAGE_LIBS@
+
+ osyncbinary_SOURCES = osyncbinary.c
+-osyncbinary_LDFLAGS = @PACKAGE_LIBS@ -R $(libdir)
+-osyncbinary_LDADD = $(top_builddir)/opensync/libopensync.la
++osyncbinary_LDFLAGS =
++osyncbinary_LDADD = $(top_builddir)/opensync/libopensync.la @PACKAGE_LIBS@
+
+ CLEANFILES = \
+ *.bb \
+--- a/wrapper/Makefile.am
++++ b/wrapper/Makefile.am
+@@ -22,5 +22,5 @@ osbindings_LTLIBRARIES = _opensync.la
+ endif
+
+ nodist__opensync_la_SOURCES = opensync_wrap.c
+-_opensync_la_LDFLAGS = @PACKAGE_LIBS@ @XML_LIBS@ $(PYTHON_LDFLAGS) -R $(libdir) -module -avoid-version
+-_opensync_la_LIBADD = $(top_builddir)/opensync/libopensync.la
++_opensync_la_LDFLAGS = -module -avoid-version
++_opensync_la_LIBADD = $(top_builddir)/opensync/libopensync.la $(PYTHON_LDFLAGS) @PACKAGE_LIBS@ @XML_LIBS@
diff --git a/libraries/libopensync/patches/libopensync-0.22-pythonpath.patch b/libraries/libopensync/patches/libopensync-0.22-pythonpath.patch
new file mode 100644
index 0000000000..abfb68cbdb
--- /dev/null
+++ b/libraries/libopensync/patches/libopensync-0.22-pythonpath.patch
@@ -0,0 +1,63 @@
+diff --git a/acinclude.m4 b/acinclude.m4
+index 2bf9951..a3b617c 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -1008,9 +1008,9 @@ AC_DEFUN([AC_PROG_SWIG],[
+ if test -z "$available_patch" ; then
+ [available_patch=0]
+ fi
+- if test $available_major -ne $required_major \
+- -o $available_minor -ne $required_minor \
+- -o $available_patch -lt $required_patch ; then
++ if test $available_major -lt $required_major \
++ -a $available_minor -lt $required_minor \
++ -a $available_patch -lt $required_patch ; then
+ AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version. You should look at http://www.swig.org])
+ SWIG='echo "Error: SWIG version >= $1 is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false'
+ else
+@@ -1114,7 +1114,7 @@ AC_DEFUN([AC_PYTHON_DEVEL],[
+ AC_MSG_CHECKING([for Python include path])
+ python_path=`echo $PYTHON | sed "s,/bin.*$,,"`
+ for i in "$python_path/include/python$PYTHON_VERSION/" "$python_path/include/python/" "$python_path/" ; do
+- python_path=`find $i -type f -name Python.h -print | sed "1q"`
++ python_path=`find $i -type f -name Python.h -print 2>/dev/null | sed "1q"`
+ if test -n "$python_path" ; then
+ break
+ fi
+@@ -1129,8 +1129,8 @@ AC_DEFUN([AC_PYTHON_DEVEL],[
+ # Check for Python library path
+ AC_MSG_CHECKING([for Python library path])
+ python_path=`echo $PYTHON | sed "s,/bin.*$,,"`
+- for i in "$python_path/lib/python$PYTHON_VERSION/config/" "$python_path/lib/python$PYTHON_VERSION/" "$python_path/lib/python/config/" "$python_path/lib/python/" "$python_path/" ; do
+- python_path=`find $i -type f -name libpython$PYTHON_VERSION.* -print | sed "1q"`
++ for i in "$python_path/lib/python$PYTHON_VERSION/config/" "$python_path/lib/python$PYTHON_VERSION/" "$python_path/lib/python/config/" "$python_path/lib/python/" "$python_path/lib/" ; do
++ python_path=`find $i -type f -name libpython$PYTHON_VERSION.* -print 2>/dev/null | sed "1q"`
+ if test -n "$python_path" ; then
+ break
+ fi
+@@ -1142,16 +1142,21 @@ AC_DEFUN([AC_PYTHON_DEVEL],[
+ fi
+ AC_SUBST([PYTHON_LDFLAGS],["-L$python_path -lpython$PYTHON_VERSION"])
+ #
+- python_site=`echo $python_path | sed "s/config/site-packages/"`
+- AC_SUBST([PYTHON_SITE_PKG],[$python_site])
++ # site-packages directory
++ #
++ AC_MSG_CHECKING(python site-packages)
++ PYTHON_SITE_PKG=`$PYTHON -c "from distutils.sysconfig import get_python_lib; \
++ print get_python_lib()"`
++ AC_MSG_RESULT($PYTHON_SITE_PKG)
++ AC_SUBST(PYTHON_SITE_PKG)
+ #
+ # libraries which must be linked in when embedding
+ #
+ AC_MSG_CHECKING(python extra libraries)
+ PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
+ conf = distutils.sysconfig.get_config_var; \
+- print conf('LOCALMODLIBS')+' '+conf('LIBS')"
+- AC_MSG_RESULT($PYTHON_EXTRA_LIBS)`
++ print conf('LOCALMODLIBS')+' '+conf('LIBS')"`
++ AC_MSG_RESULT($PYTHON_EXTRA_LIBS)
+ AC_SUBST(PYTHON_EXTRA_LIBS)
+ ])
+ dnl as-ac-expand.m4 0.2.0
diff --git a/libraries/libopensync/patches/libopensync-0.22-swig-typeerror.patch b/libraries/libopensync/patches/libopensync-0.22-swig-typeerror.patch
new file mode 100644
index 0000000000..b1e42f3944
--- /dev/null
+++ b/libraries/libopensync/patches/libopensync-0.22-swig-typeerror.patch
@@ -0,0 +1,13 @@
+diff --git a/wrapper/opensync.i b/wrapper/opensync.i
+index 623c0f4..8131158 100644
+--- a/wrapper/opensync.i
++++ b/wrapper/opensync.i
+@@ -82,7 +82,7 @@ typedef struct {} OSyncHashTable;
+ %extend OSyncChange {
+ OSyncChange(PyObject *obj=NULL) {
+ OSyncChange *change = NULL;
+- if (obj)
++ if ((obj) && (obj != Py_None))
+ change = (OSyncChange *)PyCObject_AsVoidPtr(obj);
+ else
+ change = osync_change_new();