Ticket #53197: 0001-py-sip-update-to-4.19-which-provides-SIP-API-12.0-th.patch
File 0001-py-sip-update-to-4.19-which-provides-SIP-API-12.0-th.patch, 5.8 KB (added by RJVB (René Bertin), 8 years ago) |
---|
-
python/py-sip/Portfile
From 60c75e32b69a155ec8de92b2e5f3266b218ae4fe Mon Sep 17 00:00:00 2001 From: Michael Dickens <michaelld@macports.org> Date: Fri, 30 Dec 2016 21:20:29 -0500 Subject: [PATCH 1/1] py*-sip: update to 4.19, which provides SIP API 12.0 & thus requires dependent ports to be rev-bumped. This new API changes internal struct variable names, and the transition isn't entirely complete even though there's a new release ... so add in a temporary patch to fix the major variable name change from 'type' to 'wt_td' in the generated SIP code. --- python/py-sip/Portfile | 10 ++++-- python/py-sip/files/patch-configure.py.diff | 2 +- python/py-sip/files/patch-sipgen_gencode.c.diff | 47 +++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 4 deletions(-) create mode 100644 python/py-sip/files/patch-sipgen_gencode.c.diff diff --git a/python/py-sip/Portfile b/python/py-sip/Portfile index 98ac9c9..48ea92e 100644
a b long_description \ 20 20 21 21 homepage http://www.riverbankcomputing.co.uk/software/sip/intro 22 22 23 version 4.1 8.123 version 4.19 24 24 25 25 # from siplib/sip.h.in: 26 26 # … … version 4.18.1 31 31 # removed or the order changed then the major number must be 32 32 # incremented and the minor number set to 0. 33 33 # 34 # SIP 4.19[.0] provides SIP API 12.0 34 35 # SIP 4.18.[0-1] provides SIP API 11.3 35 36 # SIP 4.17.0 provides SIP API 11.2 36 37 # SIP 4.16.[8-9] provides SIP API 11.2 … … if {${name} ne ${subport}} { 55 56 distname sip-${version} 56 57 } 57 58 58 checksums rmd160 adcbd5a87b375e1b357922b608db45862ccf37ea\59 sha256 9bce7a2dbf7f105bf68ad1bab58eebc0ce33087ec40396da756463f086ffa29059 checksums rmd160 260c814e0ed4aa5ea90a8ac1f9100e7b9452ae21 \ 60 sha256 014bf55f653e0d8bcc582705ef4fbd61e0859a36e959ab46d8fa060cdf0b5e27 60 61 61 62 patchfiles patch-siputils.py.diff \ 62 63 patch-specs_macx-g++.diff \ 63 64 patch-configure.py.diff 64 65 66 # temporary patch to fix struct variable name generation 67 patchfiles-append patch-sipgen_gencode.c.diff 68 65 69 use_configure yes 66 70 pre-configure { 67 71 # Ensure correct compilers are used -
python/py-sip/files/patch-configure.py.diff
diff --git a/python/py-sip/files/patch-configure.py.diff b/python/py-sip/files/patch-configure.py.diff index 572bb48..a108c47 100644
a b 1 1 --- configure.py.orig 2 2 +++ configure.py 3 @@ -92 1,7 +921,6 @@3 @@ -922,7 +922,6 @@ 4 4 raise 5 5 except: 6 6 sys.stderr.write( -
new file python/py-sip/files/patch-sipgen_gencode.c.diff
diff --git a/python/py-sip/files/patch-sipgen_gencode.c.diff b/python/py-sip/files/patch-sipgen_gencode.c.diff new file mode 100644 index 0000000..522548a
- + 1 --- sipgen/gencode.c.orig 2 +++ sipgen/gencode.c 3 @@ -716,7 +716,7 @@ 4 "#define sipSaveSlot sipAPI_%s->api_save_slot\n" 5 "#define sipClearAnySlotReference sipAPI_%s->api_clear_any_slot_reference\n" 6 "#define sipVisitSlot sipAPI_%s->api_visit_slot\n" 7 -"#define sipWrappedTypeName(wt) ((wt)->type->td_cname)\n" 8 +"#define sipWrappedTypeName(wt) ((wt)->wt_td->td_cname)\n" 9 "#define sipDeprecated sipAPI_%s->api_deprecated\n" 10 "#define sipGetReference sipAPI_%s->api_get_reference\n" 11 "#define sipKeepReference sipAPI_%s->api_keep_reference\n" 12 @@ -768,19 +768,19 @@ 13 "#define sipConvertToArray sipAPI_%s->api_convert_to_array\n" 14 "#define sipConvertToTypedArray sipAPI_%s->api_convert_to_typed_array\n" 15 "#define sipWrapper_Check(w) PyObject_TypeCheck((w), sipAPI_%s->api_wrapper_type)\n" 16 -"#define sipGetWrapper(p, wt) sipGetPyObject((p), (wt)->type)\n" 17 -"#define sipReleaseInstance(p, wt, s) sipReleaseType((p), (wt)->type, (s))\n" 18 +"#define sipGetWrapper(p, wt) sipGetPyObject((p), (wt)->wt_td)\n" 19 +"#define sipReleaseInstance(p, wt, s) sipReleaseType((p), (wt)->wt_td, (s))\n" 20 "#define sipReleaseMappedType sipReleaseType\n" 21 -"#define sipCanConvertToInstance(o, wt, f) sipCanConvertToType((o), (wt)->type, (f))\n" 22 +"#define sipCanConvertToInstance(o, wt, f) sipCanConvertToType((o), (wt)->wt_td, (f))\n" 23 "#define sipCanConvertToMappedType sipCanConvertToType\n" 24 -"#define sipConvertToInstance(o, wt, t, f, s, e) sipConvertToType((o), (wt)->type, (t), (f), (s), (e))\n" 25 +"#define sipConvertToInstance(o, wt, t, f, s, e) sipConvertToType((o), (wt)->wt_td, (t), (f), (s), (e))\n" 26 "#define sipConvertToMappedType sipConvertToType\n" 27 -"#define sipForceConvertToInstance(o, wt, t, f, s, e) sipForceConvertToType((o), (wt)->type, (t), (f), (s), (e))\n" 28 +"#define sipForceConvertToInstance(o, wt, t, f, s, e) sipForceConvertToType((o), (wt)->wt_td, (t), (f), (s), (e))\n" 29 "#define sipForceConvertToMappedType sipForceConvertToType\n" 30 -"#define sipConvertFromInstance(p, wt, t) sipConvertFromType((p), (wt)->type, (t))\n" 31 +"#define sipConvertFromInstance(p, wt, t) sipConvertFromType((p), (wt)->wt_td, (t))\n" 32 "#define sipConvertFromMappedType sipConvertFromType\n" 33 "#define sipConvertFromNamedEnum(v, pt) sipConvertFromEnum((v), ((sipEnumTypeObject *)(pt))->type)\n" 34 -"#define sipConvertFromNewInstance(p, wt, t) sipConvertFromNewType((p), (wt)->type, (t))\n" 35 +"#define sipConvertFromNewInstance(p, wt, t) sipConvertFromNewType((p), (wt)->wt_td, (t))\n" 36 ,mname 37 ,mname 38 ,mname 39 @@ -2885,7 +2885,7 @@ 40 if (needs_sipClass) 41 prcode(fp, 42 "\n" 43 -" return (sipClass ? sipClass->type : 0);\n" 44 +" return (sipClass ? sipClass->wt_td : 0);\n" 45 "}\n" 46 ); 47 else