diff --git a/mapserver-6.2.2-swig305.patch b/mapserver-6.2.2-swig305.patch new file mode 100644 index 0000000..3974144 --- /dev/null +++ b/mapserver-6.2.2-swig305.patch @@ -0,0 +1,87 @@ +diff -up mapserver-6.2.2/mapscript/java/javamodule.i.orig mapserver-6.2.2/mapscript/java/javamodule.i +--- mapserver-6.2.2/mapscript/java/javamodule.i.orig 2015-02-27 10:45:48.511177981 +0100 ++++ mapserver-6.2.2/mapscript/java/javamodule.i 2015-02-27 10:47:28.167527155 +0100 +@@ -1,9 +1,11 @@ + + %include arrays_java.i + ++/* + # Uncomment this if you wish to hace enums wrapped in an interface compatible + # with that generated by swig 1.3.21 (tests wont compile, though) + #%include enumsimple.swg ++*/ + + /* Mapscript library loader */ + +diff -up mapserver-6.2.2/mapscript/python/pyextend.i.orig mapserver-6.2.2/mapscript/python/pyextend.i +--- mapserver-6.2.2/mapscript/python/pyextend.i.orig 2015-02-27 10:51:10.600538511 +0100 ++++ mapserver-6.2.2/mapscript/python/pyextend.i 2015-02-27 10:52:10.077343724 +0100 +@@ -16,7 +16,7 @@ + + /* fromstring: Factory for mapfile objects */ + +-%pythoncode { ++%pythoncode %{ + def fromstring(data, mappath=None): + """Creates map objects from mapfile strings. + +@@ -50,7 +50,7 @@ def fromstring(data, mappath=None): + return ob + else: + raise ValueError, "No map, layer, class, or style found. Can not load from provided string" +-} ++%} + + /* =========================================================================== + Python rectObj extensions +@@ -58,12 +58,12 @@ def fromstring(data, mappath=None): + + %extend pointObj { + +-%pythoncode { ++%pythoncode %{ + + def __str__(self): + return self.toString() + +-} ++%} + + } + +@@ -74,7 +74,7 @@ def fromstring(data, mappath=None): + + %extend rectObj { + +-%pythoncode { ++%pythoncode %{ + + def __str__(self): + return self.toString() +@@ -91,7 +91,7 @@ def fromstring(data, mappath=None): + raise TypeError, \ + '__contains__ does not yet handle %s' % (item_type) + +-} ++%} + + } + +@@ -131,7 +131,7 @@ def fromstring(data, mappath=None): + PyTuple_SetItem(output,1,PyInt_FromLong((long)self->height)); + return output; + } +-%pythoncode { ++%pythoncode %{ + + def get_height(self): + return self.getSize()[1] # <-- second member is the height +@@ -144,7 +144,7 @@ def fromstring(data, mappath=None): + width = property(get_width, set_width) + height = property(get_height, set_height) + +-} ++%} + + } + diff --git a/mapserver.spec b/mapserver.spec index e05118a..77c106b 100644 --- a/mapserver.spec +++ b/mapserver.spec @@ -24,6 +24,8 @@ Patch2: %{name}-%{version}-python-%{MS_REL}.patch Patch3: %{name}-6.2.1-gdver.patch # upstream patch for PHP 5.6 Patch4: %{name}-6.2.1-php56.patch +Patch5: %{name}-gcc5.patch +Patch6: %{name}-6.2.2-swig305.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -100,6 +102,8 @@ within the Java programming language. %endif %patch3 -p1 -b .gdver %patch4 -p1 -b .php56 +%patch5 -p0 -b .gcc5 +%patch6 -p1 -b .swig305 # fix spurious perm bits chmod -x mapscript/python/examples/*.py @@ -120,7 +124,7 @@ rm -rf mapscript/perl/mapscript_wrap.c %build -CFLAGS="${CFLAGS} -ldl" ; export CFLAGS +CFLAGS="${CFLAGS} -ldl -fPIC" ; export CFLAGS # fix a UTF-8 one iconv -f ISO-8859-1 -t UTF-8 < \ @@ -307,6 +311,8 @@ chmod 755 %{buildroot}%{perl_vendorarch}/auto/mapscript%{MS_REL}/mapscript%{MS_R %changelog * Wed Mar 11 2015 Devrim GÜNDÜZ - 6.2.2-2 - Rebuilt for Proj 4.9.1 +- Add patch for GCC5 build, also add -fPIC to CFLAGS +- Add a patch for swig 3.0.5 * Tue Dec 23 2014 Pavel Lisý - 6.2.2-1 - Update to latest 6.2 release