OBS User unknown 2007-04-05 22:31:16 +00:00 committed by Git OBS Bridge
parent 76b8f9c3c4
commit a3583282bd
10 changed files with 107 additions and 147 deletions

View File

@ -1,11 +0,0 @@
# datarootdir is a new variable in autoconf-2.60
--- Makefile.in
+++ Makefile.in
@@ -5,6 +5,7 @@
prefix = @prefix@
exec_prefix = @exec_prefix@
srcdir = @srcdir@
+datarootdir = @datarootdir@
##############################################################################
# Compiler and system configuration

View File

@ -1,20 +0,0 @@
--- Source/Modules/python.cxx
+++ Source/Modules/python.cxx
@@ -3187,7 +3187,7 @@ public:
Append(f->code,"}\n");
add_method(gname, wgname, 0);
Wrapper_print(f,f_wrappers);
- Delete(f);
+ DelWrapper(f);
int assignable = is_assignable(n);
if (assignable) {
Wrapper *f = NewWrapper();
@@ -3200,7 +3200,7 @@ public:
Append(f->code,"}\n");
Wrapper_print(f,f_wrappers);
add_method(sname, wsname, 0);
- Delete(f);
+ DelWrapper(f);
}
if (!modern) {
if (assignable) {

View File

@ -1,49 +0,0 @@
--- Lib/python/pyinit.swg
+++ Lib/python/pyinit.swg
@@ -226,11 +226,11 @@ SWIG_Python_FixMethods(PyMethodDef *meth
swig_type_info **types_initial) {
size_t i;
for (i = 0; methods[i].ml_name; ++i) {
- char *c = methods[i].ml_doc;
+ const char *c = methods[i].ml_doc;
if (c && (c = strstr(c, "swig_ptr: "))) {
int j;
swig_const_info *ci = 0;
- char *name = c + 10;
+ const char *name = c + 10;
for (j = 0; const_table[j].type; ++j) {
if (strncmp(const_table[j].name, name,
strlen(const_table[j].name)) == 0) {
--- Lib/python/pyrun.swg
+++ Lib/python/pyrun.swg
@@ -1075,7 +1075,7 @@ SWIG_Python_ConvertFunctionPtr(PyObject
void *vptr = 0;
/* here we get the method pointer for callbacks */
- char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
+ const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
if (desc) {
desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
--- Lib/python/pystrings.swg
+++ Lib/python/pystrings.swg
@@ -6,7 +6,7 @@ SWIGINTERN int
SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
{
if (PyString_Check(obj)) {
- char *cstr; int len;
+ char *cstr; Py_ssize_t len;
PyString_AsStringAndSize(obj, &cstr, &len);
if (cptr) {
if (alloc) {
--- Lib/python/pyhead.swg
+++ Lib/python/pyhead.swg
@@ -80,3 +80,8 @@ PyObject *PyBool_FromLong(long ok)
}
#endif
+/* Py_ssize_t for python < 2.5 */
+#if PY_VERSION_HEX < 0x02050000
+typedef int Py_ssize_t;
+#endif
+

View File

@ -1,49 +0,0 @@
--- Examples/test-suite/common.mk
+++ Examples/test-suite/common.mk
@@ -27,7 +27,7 @@
#######################################################################
# Variables
#######################################################################
-SWIG = $(top_builddir)preinst-swig
+SWIG = $(top_builddir)/preinst-swig
SWIG_LIB = $(top_srcdir)/Lib
TEST_SUITE = test-suite
EXAMPLES = Examples
@@ -35,7 +35,7 @@ CXXSRCS =
CSRCS =
TARGETPREFIX =
TARGETSUFFIX =
-SWIGOPT = -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$(LANGUAGE) -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)
+SWIGOPT = -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$(LANGUAGE) -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE) -DSWIG_NOEXTRA_QUALIFICATION
INCLUDES = -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$(LANGUAGE) -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)
LIBS = -L.
LIBPREFIX = lib
--- Makefile.in
+++ Makefile.in
@@ -63,7 +63,7 @@ chk-set-swiglib = SWIG_LIB=@ROOT_DIR@/L
chk-set-swig = SWIG=@ROOT_DIR@/$(TARGET)
chk-set-env = $(chk-set-swiglib) $(chk-set-swig)
-chk = $(MAKE) -k -s $(chk-set-env) $(ACTION)
+chk = $(MAKE) -k $(chk-set-env) $(ACTION)
check-aliveness:
test -x ./$(TARGET)
@@ -128,7 +128,7 @@ check-%-examples:
gifplot-library:
@echo $(ACTION)ing Examples/GIFPlot/Lib
- @cd Examples/GIFPlot/Lib && $(MAKE) -k -s $(ACTION)
+ @cd Examples/GIFPlot/Lib && $(MAKE) -k $(ACTION)
check-gifplot: \
check-tcl-gifplot \
@@ -195,7 +195,7 @@ check-%-test-suite:
echo warning: cannot $(ACTION) $* test-suite "(no dir $$dir)";\
else \
echo $(ACTION)ing $* test-suite; \
- (cd $$dir && $(MAKE) -k -s $(ACTION)) \
+ (cd $$dir && $(MAKE) -k $(ACTION)) \
|| passed=false; \
fi; \
test $$passed = true

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4cd482e1f5f85415b757c210d2ba4d2de936195798784beeb0a4b60416a77d63
size 3243566

View File

@ -0,0 +1,21 @@
--- Examples/test-suite/extend.i
+++ Examples/test-suite/extend.i
@@ -21,6 +21,7 @@ struct Base {
Base(int v = 0) : value(v) {}
int value;
virtual int method(int v) {
+ return v;
}
};
struct Derived : Base {
--- Examples/test-suite/template_array_numeric.i
+++ Examples/test-suite/template_array_numeric.i
@@ -8,7 +8,7 @@ class Arrayf
float a[Len];
public:
Arrayf() {}
- Arrayf(const float l[Len]) { };
+ Arrayf(const float l[Len]) { memcpy((void*)a, (void*)l, sizeof(a)); };
};
template <int Len>

3
swig-1.3.31.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5031d304f833a15fb89a74e1b4f285ff4c005e2d92d3b7a654c8c467dcccb4a4
size 3360337

29
swig-testsuite.patch Normal file
View File

@ -0,0 +1,29 @@
--- Makefile.in
+++ Makefile.in
@@ -66,7 +66,7 @@ chk-set-swiglib = SWIG_LIB=@ROOT_DIR@/L
chk-set-swig = SWIG=@ROOT_DIR@/$(TARGET)
chk-set-env = $(chk-set-swiglib) $(chk-set-swig)
-chk = $(MAKE) -k -s $(chk-set-env) $(ACTION)
+chk = $(MAKE) -k $(chk-set-env) $(ACTION)
check-aliveness:
test -x ./$(TARGET)
@@ -133,7 +133,7 @@ check-%-examples:
gifplot-library:
@echo $(ACTION)ing Examples/GIFPlot/Lib
- @cd Examples/GIFPlot/Lib && $(MAKE) -k -s $(ACTION)
+ @cd Examples/GIFPlot/Lib && $(MAKE) -k $(ACTION)
check-gifplot: \
check-tcl-gifplot \
@@ -201,7 +201,7 @@ check-%-test-suite:
echo warning: cannot $(ACTION) $* test-suite "(no dir $$dir)";\
else \
echo $(ACTION)ing $* test-suite; \
- (cd $$dir && $(MAKE) -k -s $(ACTION)) \
+ (cd $$dir && $(MAKE) -k $(ACTION)) \
|| passed=false; \
fi; \
test $$passed = true

View File

@ -1,3 +1,23 @@
-------------------------------------------------------------------
Wed Apr 4 16:23:51 CEST 2007 - mmarek@suse.cz
- install the precompiled examples to %%_libdir/swig
-------------------------------------------------------------------
Wed Jan 24 12:22:40 CET 2007 - mmarek@suse.cz
- temporarily disabled li_std_string run test under perl5 on ix86
and s390
- build examples and testsuite with -fno-strict-aliasing (packages
using swig & python should do the same for now)
- fixed testsuite-warnings.patch
-------------------------------------------------------------------
Fri Dec 15 10:19:15 CET 2006 - mmarek@suse.cz
- updated to 1.3.31, for changes see
http://swig.svn.sourceforge.net/viewvc/swig/trunk/CHANGES?r1=9073&r2=9585&diff_format=u
-------------------------------------------------------------------
Wed Nov 8 15:23:27 CET 2006 - mmarek@suse.cz

View File

@ -1,7 +1,7 @@
#
# spec file for package swig (Version 1.3.29)
# spec file for package swig (Version 1.3.31)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@ -17,13 +17,11 @@ License: BSD License and BSD-like
Group: Development/Languages/C and C++
Autoreqprov: on
Summary: Simplified Wrapper and Interface Generator
Version: 1.3.29
Release: 24
Source: %{name}-%{version}.tar.bz2
Patch1: %{name}-%{version}-testsuite.patch
Patch2: %{name}-%{version}-autoconf260.patch
Patch3: swig-1.3.29-python25.patch
Patch4: swig-1.3.29-python-module-crash.patch
Version: 1.3.31
Release: 2
Source: swig-%{version}.tar.bz2
Patch1: swig-testsuite.patch
Patch2: swig-1.3.31-testsuite-warnings.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@ -41,6 +39,7 @@ customization options, and more.
Authors:
--------
Dave Beazley <beazley@cs.utah.edu>
William S Fulton <wsf@fultondesigns.co.uk>
%package doc
Summary: SWIG Manual
@ -80,7 +79,7 @@ can do--some of its more advanced features include automatic
documentation generation, module and library management, extensive
customization options, and more.
This package contains SWIG examples, usefull both for testing and
This package contains SWIG examples, useful both for testing and
understandig SWIG usage.
@ -94,25 +93,33 @@ Authors:
chmod -x Doc/Manual/*
%patch1
%patch2
%patch3
%patch4
%build
ACLOCAL="aclocal -I Tools/config" autoreconf -fi
export CCSHARED="-fPIC $RPM_OPT_FLAGS"
export CCSHARED="-fPIC -fno-strict-aliasing $RPM_OPT_FLAGS"
export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS"
./configure \
--prefix=/usr \
--libdir=%{_libdir}
make %{?jobs:-j%jobs}
%ifarch %ix86 s390
# this test is known to fail on these architectures as of swig-1.3.31
mv Examples/test-suite/perl5/li_std_string_runme.pl \
Examples/test-suite/perl5/li_std_string_runme.pl.DISABLED
# reminder
test %version = 1.3.31
%endif
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} \
Examples $RPM_BUILD_ROOT%{_docdir}/%{name}/
$RPM_BUILD_ROOT%{_docdir}/%{name}/
install -d $RPM_BUILD_ROOT%{_libdir}/swig
cp -a Examples $RPM_BUILD_ROOT%_libdir/swig/
ln -s %_libdir/swig/Examples $RPM_BUILD_ROOT%_docdir/%name/
%clean
rm -rf $RPM_BUILD_ROOT
@ -132,8 +139,20 @@ rm -rf $RPM_BUILD_ROOT
%files examples
%defattr(-,root,root)
%{_docdir}/%{name}/Examples
%{_libdir}/swig
%changelog -n swig
%changelog
* Wed Apr 04 2007 - mmarek@suse.cz
- install the precompiled examples to %%_libdir/swig
* Wed Jan 24 2007 - mmarek@suse.cz
- temporarily disabled li_std_string run test under perl5 on ix86
and s390
- build examples and testsuite with -fno-strict-aliasing (packages
using swig & python should do the same for now)
- fixed testsuite-warnings.patch
* Fri Dec 15 2006 - mmarek@suse.cz
- updated to 1.3.31, for changes see
http://swig.svn.sourceforge.net/viewvc/swig/trunk/CHANGES?r1=9073&r2=9585&diff_format=u
* Wed Nov 08 2006 - mmarek@suse.cz
- fixed bug in the python module that caused aborts on some
architectures