diff options
Diffstat (limited to 'libraries/libopensync')
5 files changed, 166 insertions, 38 deletions
diff --git a/libraries/libopensync/libopensync-0.22-fixup_python_libdir.diff b/libraries/libopensync/libopensync-0.22-fixup_python_libdir.diff deleted file mode 100644 index 5bc54bdc24..0000000000 --- a/libraries/libopensync/libopensync-0.22-fixup_python_libdir.diff +++ /dev/null @@ -1,30 +0,0 @@ -diff -Nur libopensync-0.22.orig/configure libopensync-0.22/configure ---- libopensync-0.22.orig/configure 2007-03-27 07:21:55.000000000 -0500 -+++ libopensync-0.22/configure 2009-08-15 01:17:55.905706460 -0500 -@@ -21813,7 +21813,7 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_PREFIX')" 2>/dev/null || -- echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` -+ echo "$PYTHON_PREFIX/@baselibdir@/python$PYTHON_VERSION/site-packages"` - fi - { echo "$as_me:$LINENO: result: $am_cv_python_pythondir" >&5 - echo "${ECHO_T}$am_cv_python_pythondir" >&6; } -@@ -21830,7 +21830,7 @@ - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null || -- echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"` -+ echo "${PYTHON_EXEC_PREFIX}/@baselibdir@/python${PYTHON_VERSION}/site-packages"` - fi - { echo "$as_me:$LINENO: result: $am_cv_python_pyexecdir" >&5 - echo "${ECHO_T}$am_cv_python_pyexecdir" >&6; } -@@ -22040,7 +22040,7 @@ - { echo "$as_me:$LINENO: checking for Python library path" >&5 - echo $ECHO_N "checking for Python library path... $ECHO_C" >&6; } - 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 -+ for i in "$python_path/@baselibdir@/python$PYTHON_VERSION/config/" "$python_path/@baselibdir@/python$PYTHON_VERSION/" "$python_path/@baselibdir@/python/config/" "$python_path/@baselibdir@/python/" "$python_path/" ; do - python_path=`find $i -type f -name libpython$PYTHON_VERSION.* -print | sed "1q"` - if test -n "$python_path" ; then - break diff --git a/libraries/libopensync/libopensync.SlackBuild b/libraries/libopensync/libopensync.SlackBuild index ba8df184d9..db086c77a2 100644 --- a/libraries/libopensync/libopensync.SlackBuild +++ b/libraries/libopensync/libopensync.SlackBuild @@ -24,7 +24,7 @@ PRGNAM=libopensync VERSION=0.22 -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -74,14 +74,14 @@ chmod -R u+w,go+r-w,a-s . # -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \ # -DCMAKE_INSTALL_PREFIX=/usr -if [ "$ARCH" = "x86_64" ]; then - sed "s%@baselibdir@%lib${LIBDIRSUFFIX}%g" \ - $CWD/libopensync-0.22-fixup_python_libdir.diff \ - | patch -p1 -fi +# Apply some patches from gentoo +for i in $CWD/patches/* ; do patch -p1 < $i ; done +sed -i "s%python_path/lib%python_path/lib${LIBDIRSUFFIX}%g" acinclude.m4 + +autoreconf -i -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ +CFLAGS="$SLKCFLAGS -Wno-error=unused-but-set-variable" \ +CXXFLAGS="$SLKCFLAGS -Wno-error=unused-but-set-variable" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ 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(); |