Accepting request 69970 from devel:tools:building
Remove duplicate BuildRequires: python-devel (forwarded request 69911 from namtrac) OBS-URL: https://build.opensuse.org/request/show/69970 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/swig?expand=0&rev=21
This commit is contained in:
parent
f0c827cae5
commit
ccfb7e4f48
@ -1,24 +0,0 @@
|
||||
---
|
||||
Lib/perl5/perlprimtypes.swg | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- Lib/perl5/perlprimtypes.swg.orig
|
||||
+++ Lib/perl5/perlprimtypes.swg
|
||||
@@ -111,7 +111,7 @@ SWIG_AsVal_dec(unsigned long)(SV *obj, u
|
||||
if (val) *val = SvUV(obj);
|
||||
return SWIG_OK;
|
||||
} else if (SvIOK(obj)) {
|
||||
- long v = SvIV(obj);
|
||||
+ long long v = SvIV(obj);
|
||||
if (v >= 0) {
|
||||
if (val) *val = v;
|
||||
return SWIG_OK;
|
||||
@@ -246,7 +246,7 @@ SWIG_AsVal_dec(unsigned long long)(SV *o
|
||||
if (val) *val = SvUV(obj);
|
||||
return SWIG_OK;
|
||||
} else if (SvIOK(obj)) {
|
||||
- long v = SvIV(obj);
|
||||
+ long long v = SvIV(obj);
|
||||
if (v >= 0) {
|
||||
if (val) *val = v;
|
||||
return SWIG_OK;
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:80b7dc8c05564b6053bc98c6b899e41ae894438d8da2971ad6c57b4765d390c5
|
||||
size 3947155
|
22
swig-2.0.3-disable-broken-tests.patch
Normal file
22
swig-2.0.3-disable-broken-tests.patch
Normal file
@ -0,0 +1,22 @@
|
||||
--- Examples/test-suite/python/Makefile.in 2010-07-22 18:59:08.000000000 +0200
|
||||
+++ Examples/test-suite/python/Makefile.in 2011-05-03 12:29:40.193936593 +0200
|
||||
@@ -53,9 +53,7 @@
|
||||
li_std_pair_extra \
|
||||
li_std_set \
|
||||
li_std_stream \
|
||||
- li_std_string_extra \
|
||||
li_std_wstream \
|
||||
- li_std_wstring \
|
||||
primitive_types \
|
||||
python_abstractbase \
|
||||
python_kwargs \
|
||||
--- Examples/test-suite/common.mk 2011-03-09 23:31:08.000000000 +0100
|
||||
+++ Examples/test-suite/common.mk 2011-05-03 12:31:23.644936552 +0200
|
||||
@@ -393,7 +393,6 @@
|
||||
template_virtual \
|
||||
template_whitespace \
|
||||
threads \
|
||||
- threads_exception \
|
||||
throw_exception \
|
||||
typedef_array_member \
|
||||
typedef_class \
|
67
swig-2.0.3-support-python32.patch
Normal file
67
swig-2.0.3-support-python32.patch
Normal file
@ -0,0 +1,67 @@
|
||||
diff -up swig-2.0.3/Lib/python/pycontainer.swg.rh666429 swig-2.0.3/Lib/python/pycontainer.swg
|
||||
--- swig-2.0.3/Lib/python/pycontainer.swg.rh666429 2010-10-19 08:31:31.000000000 +0200
|
||||
+++ swig-2.0.3/Lib/python/pycontainer.swg 2011-04-22 15:42:42.185982189 +0200
|
||||
@@ -630,6 +630,7 @@ namespace swig
|
||||
return x;
|
||||
}
|
||||
|
||||
+#if !NO_PYSLICE
|
||||
/* typemap for slice object support */
|
||||
%typemap(in) PySliceObject* {
|
||||
$1 = (PySliceObject *) $input;
|
||||
@@ -637,6 +638,7 @@ namespace swig
|
||||
%typemap(typecheck,precedence=SWIG_TYPECHECK_POINTER) PySliceObject* {
|
||||
$1 = PySlice_Check($input);
|
||||
}
|
||||
+#endif
|
||||
|
||||
Sequence* __getslice__(difference_type i, difference_type j) throw (std::out_of_range) {
|
||||
return swig::getslice(self, i, j);
|
||||
@@ -659,7 +661,11 @@ namespace swig
|
||||
/* Overloaded methods for Python 3 compatibility
|
||||
* (Also useful in Python 2.x)
|
||||
*/
|
||||
+#if NO_PYSLICE
|
||||
+ Sequence* __getitem__(PyObject *slice) throw (std::out_of_range) {
|
||||
+#else
|
||||
Sequence* __getitem__(PySliceObject *slice) throw (std::out_of_range) {
|
||||
+#endif
|
||||
Py_ssize_t i, j, step;
|
||||
if( !PySlice_Check(slice) ) {
|
||||
SWIG_Error(SWIG_TypeError, "Slice object expected.");
|
||||
@@ -668,8 +674,11 @@ namespace swig
|
||||
PySlice_GetIndices(slice, self->size(), &i, &j, &step);
|
||||
return swig::getslice(self, i, j);
|
||||
}
|
||||
-
|
||||
+#if NO_PYSLICE
|
||||
+ void __setitem__(PyObject *slice, const Sequence& v)
|
||||
+#else
|
||||
void __setitem__(PySliceObject *slice, const Sequence& v)
|
||||
+#endif
|
||||
throw (std::out_of_range, std::invalid_argument) {
|
||||
Py_ssize_t i, j, step;
|
||||
if( !PySlice_Check(slice) ) {
|
||||
@@ -680,7 +689,11 @@ namespace swig
|
||||
swig::setslice(self, i, j, v);
|
||||
}
|
||||
|
||||
+#if NO_PYSLICE
|
||||
+ void __delitem__(PyObject *slice)
|
||||
+#else
|
||||
void __delitem__(PySliceObject *slice)
|
||||
+#endif
|
||||
throw (std::out_of_range) {
|
||||
Py_ssize_t i, j, step;
|
||||
if( !PySlice_Check(slice) ) {
|
||||
diff -up swig-2.0.3/Source/Modules/python.cxx.rh666429 swig-2.0.3/Source/Modules/python.cxx
|
||||
--- swig-2.0.3/Source/Modules/python.cxx.rh666429 2011-03-14 08:22:08.000000000 +0100
|
||||
+++ swig-2.0.3/Source/Modules/python.cxx 2011-04-22 15:43:45.122661120 +0200
|
||||
@@ -438,6 +438,7 @@ public:
|
||||
if (py3) {
|
||||
/* force disable features that not compatible with Python 3.x */
|
||||
classic = 0;
|
||||
+ Preprocessor_define((DOH *) "NO_PYSLICE 1", 0);
|
||||
}
|
||||
|
||||
if (cppcast) {
|
92
swig-2.0.3-use-python-capsule-api.patch
Normal file
92
swig-2.0.3-use-python-capsule-api.patch
Normal file
@ -0,0 +1,92 @@
|
||||
diff -up swig-2.0.0/Lib/python/pyrun.swg.rh623854 swig-2.0.0/Lib/python/pyrun.swg
|
||||
--- swig-2.0.0/Lib/python/pyrun.swg.rh623854 2010-02-28 00:26:02.000000000 +0100
|
||||
+++ swig-2.0.0/Lib/python/pyrun.swg 2010-08-17 16:32:16.581604656 +0200
|
||||
@@ -45,8 +45,18 @@
|
||||
#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
|
||||
#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
|
||||
#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
|
||||
-#define SWIG_fail goto fail
|
||||
+#define SWIG_fail goto fail
|
||||
|
||||
+/*
|
||||
+ * Python 2.7 and newer and Python 3.1 and newer should use Capsules API instead of
|
||||
+ * CObjects API.
|
||||
+ */
|
||||
+#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
|
||||
+ (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0))
|
||||
+#define USE_CAPSULES
|
||||
+#define TYPE_POINTER_NAME \
|
||||
+ ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
|
||||
+#endif
|
||||
|
||||
/* Runtime API implementation */
|
||||
|
||||
@@ -1356,8 +1366,12 @@ SWIG_Python_GetModule(void) {
|
||||
#ifdef SWIG_LINK_RUNTIME
|
||||
type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
|
||||
#else
|
||||
+#ifdef USE_CAPSULES
|
||||
+ type_pointer = PyCapsule_Import(TYPE_POINTER_NAME, 0);
|
||||
+#else
|
||||
type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
|
||||
(char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
|
||||
+#endif
|
||||
if (PyErr_Occurred()) {
|
||||
PyErr_Clear();
|
||||
type_pointer = (void *)0;
|
||||
@@ -1402,9 +1416,14 @@ PyModule_AddObject(PyObject *m, char *na
|
||||
SWIGRUNTIME void
|
||||
SWIG_Python_DestroyModule(void *vptr)
|
||||
{
|
||||
+ size_t i;
|
||||
+#ifdef USE_CAPSULES
|
||||
+ swig_module_info *swig_module =
|
||||
+ (swig_module_info *) PyCapsule_GetPointer((PyObject *)vptr, TYPE_POINTER_NAME);
|
||||
+#else
|
||||
swig_module_info *swig_module = (swig_module_info *) vptr;
|
||||
+#endif
|
||||
swig_type_info **types = swig_module->types;
|
||||
- size_t i;
|
||||
for (i =0; i < swig_module->size; ++i) {
|
||||
swig_type_info *ty = types[i];
|
||||
if (ty->owndata) {
|
||||
@@ -1426,9 +1445,18 @@ SWIG_Python_SetModule(swig_module_info *
|
||||
PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
|
||||
swig_empty_runtime_method_table);
|
||||
#endif
|
||||
+#ifdef USE_CAPSULES
|
||||
+ PyObject *pointer = PyCapsule_New((void *)swig_module, TYPE_POINTER_NAME,
|
||||
+ (PyCapsule_Destructor)SWIG_Python_DestroyModule);
|
||||
+#else
|
||||
PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
|
||||
+#endif
|
||||
if (pointer && module) {
|
||||
+#ifdef USE_CAPSULES
|
||||
+ PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
|
||||
+#else
|
||||
PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
|
||||
+#endif
|
||||
} else {
|
||||
Py_XDECREF(pointer);
|
||||
}
|
||||
@@ -1449,12 +1477,20 @@ SWIG_Python_TypeQuery(const char *type)
|
||||
PyObject *obj = PyDict_GetItem(cache, key);
|
||||
swig_type_info *descriptor;
|
||||
if (obj) {
|
||||
+#ifdef USE_CAPSULES
|
||||
+ descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, type);
|
||||
+#else
|
||||
descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
|
||||
+#endif
|
||||
} else {
|
||||
swig_module_info *swig_module = SWIG_Python_GetModule();
|
||||
descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
|
||||
if (descriptor) {
|
||||
+#ifdef USE_CAPSULES
|
||||
+ obj = PyCapsule_New(descriptor, type, NULL);
|
||||
+#else
|
||||
obj = PyCObject_FromVoidPtr(descriptor, NULL);
|
||||
+#endif
|
||||
PyDict_SetItem(cache, key, obj);
|
||||
Py_DECREF(obj);
|
||||
}
|
3
swig-2.0.3.tar.bz2
Normal file
3
swig-2.0.3.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:71590424045ea0e3e0a08c6882c1522c9fde821aba63f7cf0780b8c1c8e76a6f
|
||||
size 4120117
|
@ -1,51 +0,0 @@
|
||||
------------------------------------------------------------------------
|
||||
r11841 | wsfulton | 2010-02-05 23:22:35 +0100 (Fr, 05. Feb 2010) | 1 Zeile
|
||||
|
||||
Fix #2894405 - assertion when using -xmlout.
|
||||
------------------------------------------------------------------------
|
||||
Index: Source/Modules/swigmain.cxx
|
||||
===================================================================
|
||||
--- Source/Modules/swigmain.cxx (Revision 11840)
|
||||
+++ Source/Modules/swigmain.cxx (Revision 11841)
|
||||
@@ -196,7 +196,8 @@
|
||||
dl = (fac) ();
|
||||
}
|
||||
}
|
||||
+
|
||||
int res = SWIG_main(argc, argv, dl);
|
||||
- delete dl;
|
||||
+
|
||||
return res;
|
||||
}
|
||||
Index: Source/Modules/main.cxx
|
||||
===================================================================
|
||||
--- Source/Modules/main.cxx (Revision 11840)
|
||||
+++ Source/Modules/main.cxx (Revision 11841)
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
// Global variables
|
||||
|
||||
-Language *lang; // Language method
|
||||
+static Language *lang = 0; // Language method
|
||||
int CPlusPlus = 0;
|
||||
int Extend = 0; // Extend flag
|
||||
int ForceExtern = 0; // Force extern mode
|
||||
@@ -1231,6 +1231,8 @@
|
||||
Swig_print_tree(Getattr(top, "module"));
|
||||
}
|
||||
if (dump_xml && top) {
|
||||
+ delete lang;
|
||||
+ lang = 0;
|
||||
Swig_print_xml(top, xmlout);
|
||||
}
|
||||
Delete(top);
|
||||
@@ -1265,6 +1267,9 @@
|
||||
if ((werror) && (Swig_warn_count())) {
|
||||
return Swig_warn_count();
|
||||
}
|
||||
+
|
||||
+ delete lang;
|
||||
+
|
||||
return Swig_error_count();
|
||||
}
|
||||
|
22
swig.changes
22
swig.changes
@ -1,3 +1,25 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon May 2 15:36:04 UTC 2011 - idoenmez@novell.com
|
||||
|
||||
- Update to swig 2.0.3
|
||||
* Much better nested class/struct support.
|
||||
* Much improved template partial specialization and explicit
|
||||
specialization handling.
|
||||
* Namespace support improved with the 'nspace' feature where
|
||||
namespaces can be automatically translated into Java packages or C# namespaces.
|
||||
* Improved typemap and symbol table debugging.
|
||||
* Numerous subtle typemap matching rule changes when using the
|
||||
default (SWIGTYPE) type. These now work much like C++ class template
|
||||
partial specialization matching.
|
||||
* Other small enhancements for typemaps.
|
||||
Typemap fragments are also now official and documented.
|
||||
* Warning and error display refinements.
|
||||
* Wrapping of shared_ptr is improved and documented now.
|
||||
* Numerous C++ unary scope operator (::) fixes.
|
||||
* Better support for boolean expressions.
|
||||
* Various bug fixes and improvements in the Allegrocl, C#, Java,
|
||||
Lua, Octave, PHP, Python, R, Ruby and XML modules.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 6 13:38:47 UTC 2010 - coolo@novell.com
|
||||
|
||||
|
105
swig.spec
105
swig.spec
@ -15,17 +15,20 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
|
||||
Name: swig
|
||||
BuildRequires: boost-devel gcc-c++ python-devel
|
||||
BuildRequires: perl python-devel
|
||||
BuildRequires: boost-devel
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: pcre-devel
|
||||
BuildRequires: perl
|
||||
BuildRequires: python-devel
|
||||
%if 0%{?rhel_version} > 0
|
||||
BuildRequires: -vim
|
||||
%endif
|
||||
%if 0%{?fedora} + 0%{?rhel_version} > 0
|
||||
BuildRequires: pkgconfig ruby-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: ruby-devel
|
||||
%if 0%{?rhel_version} == 0
|
||||
BuildRequires: perl-devel
|
||||
%endif
|
||||
@ -36,24 +39,28 @@ BuildRequires: fdupes
|
||||
%endif
|
||||
# SLE9
|
||||
%if 0%{?suse_version} < 920
|
||||
BuildRequires: pkgconfig ruby
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: ruby
|
||||
%else
|
||||
BuildRequires: pkg-config
|
||||
# SLE10 and up
|
||||
BuildRequires: ruby-devel
|
||||
BuildRequires: pkg-config
|
||||
%endif
|
||||
%endif
|
||||
Url: http://www.swig.org
|
||||
License: BSD3c
|
||||
Group: Development/Languages/C and C++
|
||||
AutoReqProv: on
|
||||
Summary: Simplified Wrapper and Interface Generator
|
||||
Version: 1.3.40
|
||||
Version: 2.0.3
|
||||
Release: 3
|
||||
License: GPLv3+ and BSD
|
||||
Summary: Simplified Wrapper and Interface Generator
|
||||
Url: http://www.swig.org
|
||||
Group: Development/Languages/C and C++
|
||||
Source: swig-%{version}.tar.bz2
|
||||
Patch1: swig-1.3.36-perl-long-long.patch
|
||||
Patch2: swig-fixassert.diff
|
||||
Patch3: adapt-perl512.diff
|
||||
Patch1: adapt-perl512.diff
|
||||
# PATCH-FIX-UPSTREAM swig-2.0.3-disable-broken-tests.patch idoenmez@suse.de -- Disable broken tests
|
||||
Patch2: swig-2.0.3-disable-broken-tests.patch
|
||||
# PATCH-FIX-UPSTREAM swig-2.0.3-use-python-capsule-api.patch idoenmez@suse.de -- Use Python capsule api
|
||||
Patch3: swig-2.0.3-use-python-capsule-api.patch
|
||||
# PATCH-FIX-UPSTREAM swig-2.0.3-support-python32.patch idoenmez@suse.de -- Support Python 3.2
|
||||
Patch4: swig-2.0.3-support-python32.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
@ -66,13 +73,6 @@ can do--some of its more advanced features include automatic
|
||||
documentation generation, module and library management, extensive
|
||||
customization options, and more.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Dave Beazley <beazley@cs.utah.edu>
|
||||
William S Fulton <wsf@fultondesigns.co.uk>
|
||||
|
||||
%package doc
|
||||
License: BSD3c
|
||||
Summary: SWIG Manual
|
||||
@ -94,12 +94,6 @@ customization options, and more.
|
||||
|
||||
This package contains the SWIG manual.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Dave Beazley <beazley@cs.utah.edu>
|
||||
|
||||
%package examples
|
||||
License: BSD3c
|
||||
Summary: SWIG example files
|
||||
@ -119,54 +113,45 @@ customization options, and more.
|
||||
This package contains SWIG examples, useful both for testing and
|
||||
understandig SWIG usage.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Dave Beazley <beazley@cs.utah.edu>
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1
|
||||
%patch1 -p1
|
||||
%patch2
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
%build
|
||||
v1=$(awk '/^# Generated by GNU Autoconf / { print $6; exit; }' configure)
|
||||
v2=$(autoconf -V | awk '/autoconf \(GNU Autoconf\)/ {print $4; exit}')
|
||||
old=$(perl -e "print ($v1 <= $v2);")
|
||||
if test "x$old" = "x1"; then
|
||||
./autogen.sh
|
||||
fi
|
||||
export CCSHARED="-fPIC -fno-strict-aliasing $RPM_OPT_FLAGS"
|
||||
export CFLAGS="$RPM_OPT_FLAGS"
|
||||
export CXXFLAGS="$RPM_OPT_FLAGS"
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--libdir=%{_libdir} \
|
||||
--disable-ccache
|
||||
make %{?jobs:-j%jobs}
|
||||
./autogen.sh
|
||||
%configure --disable-ccache
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%check
|
||||
# This test is buggy on x86-64
|
||||
rm -f Examples/test-suite/python/li_boost_shared_ptr_runme.py
|
||||
make check
|
||||
|
||||
%install
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
install -d $RPM_BUILD_ROOT%{_docdir}/%{name}
|
||||
cp -a FUTURE TODO NEW ANNOUNCE CHANGES* LICENSE README Doc/{Devel,Manual} \
|
||||
$RPM_BUILD_ROOT%{_docdir}/%{name}/
|
||||
install -d $RPM_BUILD_ROOT%{_libdir}/swig
|
||||
cp -a Examples $RPM_BUILD_ROOT%_libdir/swig/examples
|
||||
%make_install
|
||||
|
||||
install -d %{buildroot}%{_docdir}/%{name}
|
||||
cp -a TODO ANNOUNCE CHANGES* LICENSE README Doc/{Devel,Manual} \
|
||||
%{buildroot}%{_docdir}/%{name}/
|
||||
install -d %{buildroot}%{_libdir}/swig
|
||||
cp -a Examples %{buildroot}%{_libdir}/swig/examples
|
||||
|
||||
# rm files that are not needed for runnig or rebuilding the examples
|
||||
find $RPM_BUILD_ROOT%_libdir/swig \
|
||||
find %{buildroot}%{_libdir}/swig \
|
||||
-name '*.dsp' -o -name '*.vcproj' -o -name '*.sln' -o \
|
||||
-name '*.o' -o -name '*_wrap.c' | xargs rm
|
||||
|
||||
# fix perms
|
||||
chmod -x $RPM_BUILD_ROOT%_docdir/%name/Manual/*
|
||||
find $RPM_BUILD_ROOT%_libdir/swig -name '*.h' -perm +111 | \
|
||||
chmod -x %{buildroot}%_docdir/%{name}/Manual/*
|
||||
find %{buildroot}%{_libdir}/swig -name '*.h' -perm +111 | \
|
||||
xargs --no-run-if-empty chmod -x
|
||||
ln -s %_libdir/swig/examples $RPM_BUILD_ROOT%_docdir/%name/Examples
|
||||
ln -s %{_libdir}/swig/examples %{buildroot}%_docdir/%{name}/Examples
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%files
|
||||
%defattr(644,root,root,755)
|
||||
|
Loading…
Reference in New Issue
Block a user