summaryrefslogtreecommitdiff
path: root/extra/avogadro
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-27 22:26:40 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-27 22:26:40 +0000
commit8784d3134c1d4b4c02d705259ae2ebd768c778fd (patch)
tree2d5e15ad1adac97b4a07a58b1618dda602cea3a0 /extra/avogadro
parent18d6577d511b9a1ac36eaae50060133a401e42a3 (diff)
Wed Apr 27 22:26:47 UTC 2011
Diffstat (limited to 'extra/avogadro')
-rw-r--r--extra/avogadro/fix-pycapsule.patch23
-rw-r--r--extra/avogadro/sip-4.11.patch34
2 files changed, 0 insertions, 57 deletions
diff --git a/extra/avogadro/fix-pycapsule.patch b/extra/avogadro/fix-pycapsule.patch
deleted file mode 100644
index de4e2ca75..000000000
--- a/extra/avogadro/fix-pycapsule.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- avogadro-1.0.1/libavogadro/src/python/sip.cpp 2010-05-02 17:31:22.000000000 +0100
-+++ avogadro-1.0.1-pycapsule/libavogadro/src/python/sip.cpp 2010-11-23 19:00:09.000000000 +0000
-@@ -62,12 +62,20 @@ bool init_sip_api()
- return false;
- }
-
-+#ifdef SIP_USE_PYCAPSULE
-+ if (!PyCapsule_IsValid(sip_capi_obj.ptr(), "sip._C_API")) {
-+#else
- if (!PyCObject_Check(sip_capi_obj.ptr())) {
-+#endif
- std::cout << "The _C_API object in the sip python module is invalid." << std::endl;
- return false;
- }
-
-+#ifdef SIP_USE_PYCAPSULE
-+ sip_API = reinterpret_cast<const sipAPIDef*>(PyCapsule_GetPointer(sip_capi_obj.ptr(), "sip._C_API"));
-+#else
- sip_API = reinterpret_cast<const sipAPIDef*>(PyCObject_AsVoidPtr(sip_capi_obj.ptr()));
-+#endif
-
- return true;
- }
diff --git a/extra/avogadro/sip-4.11.patch b/extra/avogadro/sip-4.11.patch
deleted file mode 100644
index 0cd1e5b94..000000000
--- a/extra/avogadro/sip-4.11.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-diff -ur avogadro-1.0.1/cmake/modules/PythonDeps.cmake avogadro-1.0.1-sip411/cmake/modules/PythonDeps.cmake
---- avogadro-1.0.1/cmake/modules/PythonDeps.cmake 2010-05-02 18:31:22.000000000 +0200
-+++ avogadro-1.0.1-sip411/cmake/modules/PythonDeps.cmake 2010-09-14 19:11:50.000000000 +0200
-@@ -59,10 +59,13 @@
- if (EXISTS ${PYTHON_INCLUDE_PATH}/sip.h)
- message(STATUS "Found sip.h header...")
- execute_process(COMMAND sip -V OUTPUT_VARIABLE SIP_VERSION)
-- if (${SIP_VERSION} VERSION_GREATER "4.8")
-+ if (NOT ${SIP_VERSION} VERSION_LESS "4.11")
-+ message(STATUS "using sip version 4.11 or above...")
-+ add_definitions( -DSIP_4_11 -DSIP_4_8 )
-+ elseif (NOT ${SIP_VERSION} VERSION_LESS "4.8")
- message(STATUS "using sip version 4.8 or above...")
- add_definitions( -DSIP_4_8 )
-- endif (${SIP_VERSION} VERSION_GREATER "4.8")
-+ endif (NOT ${SIP_VERSION} VERSION_LESS "4.11")
- else (EXISTS ${PYTHON_INCLUDE_PATH}/sip.h)
- message(STATUS "sip.h header NOT found - Python support disabled")
- # message(STATUS "debian/ubuntu: install the python-sip4-dev package.")
-diff -ur avogadro-1.0.1/libavogadro/src/python/sip.cpp avogadro-1.0.1-sip411/libavogadro/src/python/sip.cpp
---- avogadro-1.0.1/libavogadro/src/python/sip.cpp 2010-05-02 18:31:22.000000000 +0200
-+++ avogadro-1.0.1-sip411/libavogadro/src/python/sip.cpp 2010-09-14 19:13:31.000000000 +0200
-@@ -204,7 +204,11 @@
- sipWrapper *wrapper = reinterpret_cast<sipWrapper*>(obj_ptr);
- #endif
- // return the C++ pointer
-+#ifdef SIP_4_11
-+ return sip_API->api_get_address(wrapper);
-+#else
- return wrapper->u.cppPtr;
-+#endif
- }
-
- QClass_converters()