diff options
author | Justin Lecher <jlec@gentoo.org> | 2011-03-26 16:57:08 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2011-03-26 16:57:08 +0000 |
commit | e4ef4b53d4d8bdb3cbc6dd8df6452afcbe20d74c (patch) | |
tree | d4e8e112fc4e2bbcddeca63be8ff68ea54e08a28 /sci-chemistry/avogadro | |
parent | Looks like 2.13 might be terminally broken on alpha, removing keyword for now (diff) | |
download | historical-e4ef4b53d4d8bdb3cbc6dd8df6452afcbe20d74c.tar.gz historical-e4ef4b53d4d8bdb3cbc6dd8df6452afcbe20d74c.tar.bz2 historical-e4ef4b53d4d8bdb3cbc6dd8df6452afcbe20d74c.zip |
Backported sip patch from 1.0.2_rc1, #335644
Package-Manager: portage-2.2.0_alpha28/cvs/Linux x86_64
Diffstat (limited to 'sci-chemistry/avogadro')
-rw-r--r-- | sci-chemistry/avogadro/ChangeLog | 8 | ||||
-rw-r--r-- | sci-chemistry/avogadro/Manifest | 13 | ||||
-rw-r--r-- | sci-chemistry/avogadro/avogadro-1.0.1.ebuild | 8 | ||||
-rw-r--r-- | sci-chemistry/avogadro/files/avogadro-1.0.1-sip-backport.patch | 155 |
4 files changed, 173 insertions, 11 deletions
diff --git a/sci-chemistry/avogadro/ChangeLog b/sci-chemistry/avogadro/ChangeLog index ed5ec454685a..9efb85f6b272 100644 --- a/sci-chemistry/avogadro/ChangeLog +++ b/sci-chemistry/avogadro/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sci-chemistry/avogadro -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/avogadro/ChangeLog,v 1.33 2010/05/21 15:33:28 jlec Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/avogadro/ChangeLog,v 1.34 2011/03/26 16:57:08 jlec Exp $ + + 26 Mar 2011; Justin Lecher <jlec@gentoo.org> avogadro-1.0.1.ebuild, + +files/avogadro-1.0.1-sip-backport.patch: + Backported sip patch from 1.0.2_rc1, #335644 *avogadro-1.0.1 (21 May 2010) diff --git a/sci-chemistry/avogadro/Manifest b/sci-chemistry/avogadro/Manifest index eef04e3647d9..e0300dab1576 100644 --- a/sci-chemistry/avogadro/Manifest +++ b/sci-chemistry/avogadro/Manifest @@ -4,6 +4,7 @@ Hash: SHA1 AUX 1.0.1-gl2ps.patch 1511 RMD160 b9e0ae01bf514c1dc738fd0c5d51ae9c83efb861 SHA1 eafb59894ef10d16b20c43b2a89b33c635273a12 SHA256 0aae5556233c8e413739fdd890b5d8453d9a1e39dd3251a5a7a7705227a13e7b AUX avogadro-0.9.7-shader-include.patch 836 RMD160 5f3df7190a19904d36303df43648103929da835d SHA1 3ed8f1ed9aefedc7a98462588e4bd1955a5d2a67 SHA256 c99f463acb26f8b0b295762935a1ac07062e214b96a18c8d1c5e5595442ecf15 AUX avogadro-1.0.0-sip-4.10.patch 616 RMD160 269609b257ab06fd39a8d8c652c8c36e472e4886 SHA1 f7ea7f670ab27d7d9a6800e518d17caf0bc11897 SHA256 d17c125b081a68fc119d142721438ac1e67acd1b3136536fb32ece4940320de6 +AUX avogadro-1.0.1-sip-backport.patch 5070 RMD160 87bbc143642e405b908d910ffa5694016c2f7530 SHA1 606182a194f14298df110b6f1fdabb21434ac7d7 SHA256 badeb1f2fa4abb2364e1901fa321fa13d86d342dcfe48431d3a9228a7fd72e2c DIST avogadro-0.9.8.tar.bz2 4815425 RMD160 29d734137ee4e522ebc6d1b6998bd4f13ea6d046 SHA1 78de2419a93af9427a0d31fc0f022a47e924b490 SHA256 105f86f049741d3a72e0e19d364113295975ad853d047bba01795a4496a8f847 DIST avogadro-0.9.9.tar.bz2 4834645 RMD160 ed5a350377fd07bad5a1cee2343a8c350559c310 SHA1 37f53caa956b4f254ebb98a1df9183c98c6badb9 SHA256 a05efde188b11852098203550e276eaf9931ad001c4cdf1e04a747ed26529724 DIST avogadro-1.0.0.tar.bz2 4838702 RMD160 514225910de6b37e90fdd52b201b419c11413fc1 SHA1 9d7f2acfd15de5db68572a6221c67d5fc9e7b8e1 SHA256 a262da58c3aa183fca9a0bf3885709444cd35627b866f4a9d9a1b3bf7347d637 @@ -11,13 +12,13 @@ DIST avogadro-1.0.1.tar.bz2 4891506 RMD160 ebd38279ae6e0cea16b85ac33a346b1aabfb5 EBUILD avogadro-0.9.8.ebuild 1135 RMD160 9541ad405550ccef3b3ff9615a1c3b770a80d665 SHA1 3659980d4a3fb711606267c7bba9bd9d7fe0b3b0 SHA256 6afbb492cbb69b7c3cde33f0095153cff019b334bdc63e9810b4e82c492f91bf EBUILD avogadro-0.9.9.ebuild 1135 RMD160 51e57d5c7823e40b4d134ad94b570290fa388095 SHA1 1be7606e0cece6a28ab7bc95f5cc5523a45f05d3 SHA256 7d0e1aba1fbea9ef0a1638fe855958a800d3d024692f6c7670ca5ecf154d31de EBUILD avogadro-1.0.0.ebuild 1196 RMD160 f66bed6b2ffc1968f01011cd2ccb021512531827 SHA1 1fd33cbc75a216327f449f31438c7269556e1d63 SHA256 2dc5dbbe91b2472638e422e0f6ac43277038ca905747f142040403c5eead86c3 -EBUILD avogadro-1.0.1.ebuild 1216 RMD160 790821f1ad99a5e9e1176e2ee2a10ad5224200e0 SHA1 de2b2754ed65c4b396c8f2fca0c05c8d56e059b2 SHA256 9fb3919bf5d752a50ca81d0613a7612aa687ac33fcdc5e83c086a5c38dc2ce6b -MISC ChangeLog 5107 RMD160 5e5933e970734d55dbd58f0668b150c6e190073a SHA1 341f62d0abba03851974d5b83db9e39d674e4fcf SHA256 b17845a21ef68e3de43d8e6225966ebbdfa9b34d719458586e2b59446f514d4e +EBUILD avogadro-1.0.1.ebuild 1262 RMD160 4e4c5e08ae65ee2475f4ee5a0fb010dd3485a696 SHA1 8ac0f91afd2d471983295cfcf3fd2140a8ac343d SHA256 a9220e0f86aa05d0bc45bf427c5b14491b3ac7f780651f987ab63261964267ea +MISC ChangeLog 5269 RMD160 6415210e85f12f5f8f69210dcdba34884dfe8de0 SHA1 ccd3340b115b8385558fe2662cc4aa3af7cf2888 SHA256 16d14c50ef46e1f0b843d43052652c1e3cdef3066488d1859a1db2205c30c682 MISC metadata.xml 600 RMD160 d3559123f9438a9d0a49783ebb38027f91492e8d SHA1 f0dc9728b4196c6b09e8a0c4fdb02cd9f692cda4 SHA256 298cc4b9c2fc652f167bf9ae6e9faec1cfd1aa41a276295f4d1a6814912b58af -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.14 (GNU/Linux) +Version: GnuPG v2.0.17 (GNU/Linux) -iEYEARECAAYFAkv2p88ACgkQgAnW8HDreRZvDACgqieXPfq0plCnnnpVWaCRPo51 -AlQAn1LESQD5orxFyI4NKJGuXcM9zUDl -=qrer +iEYEARECAAYFAk2OGukACgkQgAnW8HDreRYvUgCfW3D7YtjH4ipQrWy6otZDDE4i +F5YAn0DpSfUpPG8Gbj42SmVR4L242ZwZ +=FSAc -----END PGP SIGNATURE----- diff --git a/sci-chemistry/avogadro/avogadro-1.0.1.ebuild b/sci-chemistry/avogadro/avogadro-1.0.1.ebuild index b69dccd14937..399914ed447a 100644 --- a/sci-chemistry/avogadro/avogadro-1.0.1.ebuild +++ b/sci-chemistry/avogadro/avogadro-1.0.1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/avogadro/avogadro-1.0.1.ebuild,v 1.1 2010/05/21 15:33:28 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/avogadro/avogadro-1.0.1.ebuild,v 1.2 2011/03/26 16:57:08 jlec Exp $ EAPI=2 @@ -37,7 +37,9 @@ pkg_setup() { } src_prepare() { - epatch "${FILESDIR}"/${PV}-gl2ps.patch + epatch \ + "${FILESDIR}"/${PV}-gl2ps.patch \ + "${FILESDIR}"/${P}-sip-backport.patch } src_configure() { diff --git a/sci-chemistry/avogadro/files/avogadro-1.0.1-sip-backport.patch b/sci-chemistry/avogadro/files/avogadro-1.0.1-sip-backport.patch new file mode 100644 index 000000000000..c10cdb5257ed --- /dev/null +++ b/sci-chemistry/avogadro/files/avogadro-1.0.1-sip-backport.patch @@ -0,0 +1,155 @@ + libavogadro/src/python/sip.cpp | 54 ++++++++++++++++++++++++++-------------- + 1 files changed, 35 insertions(+), 19 deletions(-) + +diff --git a/libavogadro/src/python/sip.cpp b/libavogadro/src/python/sip.cpp +index 7b265e9..b456443 100644 +--- a/libavogadro/src/python/sip.cpp ++++ b/libavogadro/src/python/sip.cpp +@@ -61,14 +61,23 @@ bool init_sip_api() + std::cout << "Could not find the _C_API entry in the sip python module dictionary." << std::endl; + 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; + } + +- sip_API = reinterpret_cast<const sipAPIDef*>(PyCObject_AsVoidPtr(sip_capi_obj.ptr())); +- ++#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; + } + +@@ -131,7 +140,7 @@ struct QClass_converters + { + static PyObject* convert(const T& object) + { +-#ifdef SIP_4_8 ++#if SIP_API_MAJOR_NR >=4 + const sipTypeDef *type = sip_API->api_find_type(MetaData<T>::className()); + #else + sipWrapperType *type = sip_API->api_find_class(MetaData<T>::className()); +@@ -139,7 +148,7 @@ struct QClass_converters + if (!type) + return incref(Py_None); + +-#ifdef SIP_4_8 ++#if SIP_API_MAJOR_NR >=4 + PyObject *sip_obj = sip_API->api_convert_from_type((void*)(&object), type, 0); + #else + PyObject *sip_obj = sip_API->api_convert_from_instance((void*)(&object), type, 0); +@@ -155,7 +164,7 @@ struct QClass_converters + if (!object) + return incref(Py_None); + +-#ifdef SIP_4_8 ++#if SIP_API_MAJOR_NR >=4 + const sipTypeDef *type = sip_API->api_find_type(MetaData<T>::className()); + #else + sipWrapperType *type = sip_API->api_find_class(MetaData<T>::className()); +@@ -163,7 +172,7 @@ struct QClass_converters + if (!type) + return incref(Py_None); + +-#ifdef SIP_4_8 ++#if SIP_API_MAJOR_NR >=4 + PyObject *sip_obj = sip_API->api_convert_from_type(object, type, 0); + #else + PyObject *sip_obj = sip_API->api_convert_from_instance(object, type, 0); +@@ -183,28 +192,36 @@ struct QClass_converters + + static void* QClass_from_PyQt(PyObject *obj_ptr) + { +-#ifdef SIP_4_8 +- if (!PyObject_TypeCheck(obj_ptr, sip_API->api_wrapper_type)) ++#if SIP_API_MAJOR_NR >=4 ++ if (!PyObject_TypeCheck(obj_ptr, sip_API->api_wrapper_type)) { + #else +- if (!sip_API->api_wrapper_check(obj_ptr)) ++ if (!sip_API->api_wrapper_check(obj_ptr)) { + #endif ++ std::cout << "Error - already set in QClass_from_PyQt.." << std::endl; + throw_error_already_set(); ++ } + + // transfer ownership from python to C++ +-#ifdef SIP_4_8 ++#if SIP_API_MAJOR_NR >=4 + sip_API->api_transfer_to(obj_ptr, 0); + #else + sip_API->api_transfer(obj_ptr, 1); + #endif +- ++ + // reinterpret to sipWrapper +-#ifdef SIP_4_8 ++#if SIP_API_MAJOR_NR >= 4 + sipSimpleWrapper *wrapper = reinterpret_cast<sipSimpleWrapper*>(obj_ptr); + #else + sipWrapper *wrapper = reinterpret_cast<sipWrapper*>(obj_ptr); + #endif +- // return the C++ pointer ++ ++#if (SIP_API_MAJOR_NR == 8 && SIP_API_MINOR_NR >= 1) || SIP_API_MAJOR_NR > 8 ++ return sip_API->api_get_address(wrapper); ++#elif SIP_API_MAJOR_NR == 8 ++ return wrapper->data; ++#else + return wrapper->u.cppPtr; ++#endif + } + + QClass_converters() +@@ -230,7 +247,7 @@ struct QList_QAction_to_python_list_PyQt + + static PyObject* convert(const QList<QAction*> &qList) + { +-#ifdef SIP_4_8 ++#if SIP_API_MAJOR_NR >=4 + const sipTypeDef *type = sip_API->api_find_type("QAction"); + #else + sipWrapperType *type = sip_API->api_find_class("QAction"); +@@ -241,7 +258,7 @@ struct QList_QAction_to_python_list_PyQt + boost::python::list pyList; + + foreach (QAction *action, qList) { +-#ifdef SIP_4_8 ++#if SIP_API_MAJOR_NR >=4 + PyObject *sip_obj = sip_API->api_convert_from_type(action, type, 0); + #else + PyObject *sip_obj = sip_API->api_convert_from_instance(action, type, 0); +@@ -369,7 +386,7 @@ PyObject* toPyQt(T *obj) + return incref(Py_None); + } + +-#ifdef SIP_4_8 ++#if SIP_API_MAJOR_NR >=4 + const sipTypeDef *type = sip_API->api_find_type(MetaData<T>::className()); + #else + sipWrapperType *type = sip_API->api_find_class(MetaData<T>::className()); +@@ -379,7 +396,7 @@ PyObject* toPyQt(T *obj) + return incref(Py_None); + } + +-#ifdef SIP_4_8 ++#if SIP_API_MAJOR_NR >=4 + PyObject *sip_obj = sip_API->api_convert_from_type(obj, type, 0); + #else + PyObject *sip_obj = sip_API->api_convert_from_instance(obj, type, 0); +@@ -437,4 +454,3 @@ void export_sip() + to_python_converter<QList<QAction*>, QList_QAction_to_python_list_PyQt>(); + QList_QAction_from_python_list_PyQt(); + } +- |