[packages/libopensync] Rel 12; build fix

arekm arekm at pld-linux.org
Sat Aug 2 22:07:07 CEST 2025


commit c04fdb284f78a747e3468b6a3a30da1d449cd5ff
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sat Aug 2 22:07:02 2025 +0200

    Rel 12; build fix

 libopensync-python.patch | 90 ++++++++++++++++++++++++++++++++++++++++++++++++
 libopensync.spec         |  8 +++--
 notests.patch            | 14 ++++++++
 3 files changed, 109 insertions(+), 3 deletions(-)
---
diff --git a/libopensync.spec b/libopensync.spec
index 2b8a9f0..e39e30c 100644
--- a/libopensync.spec
+++ b/libopensync.spec
@@ -6,17 +6,18 @@ Summary:	Data synchronization framework
 Summary(pl.UTF-8):	Szkielet do synchronizacji danych
 Name:		libopensync
 Version:	0.39
-Release:	11
+Release:	12
 Epoch:		1
 License:	LGPL v2.1+
 Group:		Libraries
-Source0:	http://www.opensync.org/download/releases/0.39/%{name}-%{version}.tar.bz2
+Source0:	https://www.opensync.io/download/releases/0.39/%{name}-%{version}.tar.bz2
 # Source0-md5:	733211e82b61e2aa575d149dda17d475
 Patch0:		python-syntax.patch
 Patch1:		python-noarch-plugins.patch
 Patch2:		%{name}-glib.patch
 Patch3:		%{name}-python.patch
-URL:		http://www.opensync.org/
+Patch4:		notests.patch
+URL:		https://www.opensync.io/
 BuildRequires:	check
 BuildRequires:	cmake >= 2.8.2-2
 BuildRequires:	glib2-devel >= 1:2.12
@@ -94,6 +95,7 @@ Wiązania Pythona do biblioteki opensync.
 %patch -P1 -p1
 %patch -P2 -p1
 %patch -P3 -p1
+%patch -P4 -p1
 
 # broken, use fixed from cmake itself
 %{__rm} cmake/modules/*Python*.cmake
diff --git a/libopensync-python.patch b/libopensync-python.patch
index 56d9546..46673e8 100644
--- a/libopensync-python.patch
+++ b/libopensync-python.patch
@@ -18,3 +18,93 @@
  
  	def __str__(self):
  		return self.get_name() + ": " + self.get_msg()
+diff -urN libopensync-0.39.org/wrapper/opensync-context.i libopensync-0.39/wrapper/opensync-context.i
+--- libopensync-0.39.org/wrapper/opensync-context.i	2009-09-20 22:14:18.000000000 +0200
++++ libopensync-0.39/wrapper/opensync-context.i	2025-08-02 21:52:14.025183184 +0200
+@@ -2,7 +2,7 @@
+ %extend Context {
+ 	/* called by python-module plugin */
+ 	Context(PyObject *obj) {
+-		Context *context = PyCObject_AsVoidPtr(obj);
++		Context *context = PyCapsule_GetPointer(obj, NULL);
+ 		osync_context_ref(context);
+ 		return context;
+ 	}
+diff -urN libopensync-0.39.org/wrapper/opensync-data.i libopensync-0.39/wrapper/opensync-data.i
+--- libopensync-0.39.org/wrapper/opensync-data.i	2009-09-20 22:14:18.000000000 +0200
++++ libopensync-0.39/wrapper/opensync-data.i	2025-08-02 21:52:14.021849830 +0200
+@@ -124,7 +124,7 @@
+ %extend Change {
+ 	/* called by python-module plugin */
+ 	Change(PyObject *obj) {
+-		Change *change = PyCObject_AsVoidPtr(obj);
++		Change *change = PyCapsule_GetPointer(obj, NULL);
+ 		osync_change_ref(change);
+ 		return change;
+ 	}
+diff -urN libopensync-0.39.org/wrapper/opensync-engine.i libopensync-0.39/wrapper/opensync-engine.i
+--- libopensync-0.39.org/wrapper/opensync-engine.i	2009-09-20 22:14:18.000000000 +0200
++++ libopensync-0.39/wrapper/opensync-engine.i	2025-08-02 21:52:14.021849830 +0200
+@@ -182,7 +182,7 @@
+ 			PyObject *pyfunc = clientdata;
+ 			PyObject *errobj = SWIG_NewPointerObj(error, SWIGTYPE_p_Error, 0);
+ 			PyObject *args = Py_BuildValue("(iO)", event, errobj);
+-			PyObject *result = PyEval_CallObject(pyfunc, args);
++			PyObject *result = PyObject_CallObject(pyfunc, args);
+ 			Py_DECREF(args);
+ 			Py_XDECREF(result);
+ 
+diff -urN libopensync-0.39.org/wrapper/opensync-error.i libopensync-0.39/wrapper/opensync-error.i
+--- libopensync-0.39.org/wrapper/opensync-error.i	2009-09-20 22:14:18.000000000 +0200
++++ libopensync-0.39/wrapper/opensync-error.i	2025-08-02 21:52:14.025183184 +0200
+@@ -3,7 +3,7 @@
+ %extend Error {
+ 	/* called by python-module plugin */
+ 	Error(PyObject *obj) {
+-		Error *error = PyCObject_AsVoidPtr(obj);
++		Error *error = PyCapsule_GetPointer(obj, NULL);
+ 		osync_error_ref(&error);
+ 		return error;
+ 	}
+diff -urN libopensync-0.39.org/wrapper/opensync-merger.i libopensync-0.39/wrapper/opensync-merger.i
+--- libopensync-0.39.org/wrapper/opensync-merger.i	2009-09-20 22:14:18.000000000 +0200
++++ libopensync-0.39/wrapper/opensync-merger.i	2025-08-02 21:52:14.025183184 +0200
+@@ -118,7 +118,7 @@
+ 		if (raise_exception_on_error(err))
+ 			return NULL;
+ 
+-		PyObject *obj = PyString_FromStringAndSize(buf, size);
++		PyObject *obj = PyBytes_FromStringAndSize(buf, size);
+ 		free(buf);
+ 		return obj;
+ 	}
+diff -urN libopensync-0.39.org/wrapper/opensync-plugin.i libopensync-0.39/wrapper/opensync-plugin.i
+--- libopensync-0.39.org/wrapper/opensync-plugin.i	2009-09-20 22:14:18.000000000 +0200
++++ libopensync-0.39/wrapper/opensync-plugin.i	2025-08-02 21:52:14.021849830 +0200
+@@ -9,7 +9,7 @@
+ %extend Plugin {
+ 	/* called by python-module plugin */
+ 	Plugin(PyObject *obj) {
+-		Plugin *plugin = PyCObject_AsVoidPtr(obj);
++		Plugin *plugin = PyCapsule_GetPointer(obj, NULL);
+ 		osync_plugin_ref(plugin);
+ 		return plugin;
+ 	}
+@@ -149,7 +149,7 @@
+ %extend PluginInfo {
+ 	/* called by python-module plugin */
+ 	PluginInfo(PyObject *obj) {
+-		PluginInfo *info = PyCObject_AsVoidPtr(obj);
++		PluginInfo *info = PyCapsule_GetPointer(obj, NULL);
+ 		osync_plugin_info_ref(info);
+ 		return info;
+ 	}
+@@ -287,7 +287,7 @@
+ %extend PluginConfig {
+ 	/* called by python-module plugin */
+ 	PluginConfig(PyObject *obj) {
+-		PluginConfig *config = PyCObject_AsVoidPtr(obj);
++		PluginConfig *config = PyCapsule_GetPointer(obj, NULL);
+ 		osync_plugin_config_ref(config);
+ 		return config;
+ 	}
diff --git a/notests.patch b/notests.patch
new file mode 100644
index 0000000..4a3abff
--- /dev/null
+++ b/notests.patch
@@ -0,0 +1,14 @@
+--- libopensync-0.39/CMakeLists.txt~	2009-09-20 22:14:18.000000000 +0200
++++ libopensync-0.39/CMakeLists.txt	2025-08-02 22:05:45.866748424 +0200
+@@ -107,11 +107,6 @@ ELSE ( SWIG_FOUND )
+ 	SET( ENABLE_WRAPPER OFF )
+ ENDIF ( SWIG_FOUND )
+ 
+-IF ( OPENSYNC_UNITTESTS )
+-	INCLUDE( Testing )
+-	ADD_SUBDIRECTORY( tests )
+-ENDIF ( OPENSYNC_UNITTESTS )
+-
+ IF ( CMAKE_SYSTEM_NAME MATCHES SunOS )
+ 	SET( HAVE_SOLARIS 1 )
+ ENDIF (CMAKE_SYSTEM_NAME MATCHES SunOS )
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libopensync.git/commitdiff/c04fdb284f78a747e3468b6a3a30da1d449cd5ff



More information about the pld-cvs-commit mailing list