[packages/gdal] - rel 1; builds
arekm
arekm at pld-linux.org
Sun Nov 3 23:12:59 CET 2013
commit f4952e6ff16ff5df1dbdead3b11de7277f366438
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sun Nov 3 23:12:56 2013 +0100
- rel 1; builds
gdal-bug-5284.patch | 168 ++++++++++++++++++++++++++++++++++++++++++++++++++++
gdal.spec | 23 +++++--
2 files changed, 187 insertions(+), 4 deletions(-)
---
diff --git a/gdal.spec b/gdal.spec
index b08f7de..8689972 100644
--- a/gdal.spec
+++ b/gdal.spec
@@ -43,7 +43,7 @@ Summary: Geospatial Data Abstraction Library
Summary(pl.UTF-8): Biblioteka abstrakcji danych dotyczących powierzchni Ziemi
Name: gdal
Version: 1.10.1
-Release: 0.1
+Release: 1
License: BSD-like
Group: Libraries
Source0: http://download.osgeo.org/gdal/%{version}/%{name}-%{version}.tar.xz
@@ -53,6 +53,7 @@ Patch1: %{name}-python_install.patch
Patch2: %{name}-php.patch
Patch3: %{name}-fpic.patch
Patch4: %{name}-format-security.patch
+Patch5: gdal-bug-5284.patch
URL: http://www.gdal.org/
%{?with_opencl:BuildRequires: OpenCL-devel >= 1.0}
%{?with_armadillo:BuildRequires: armadillo-devel}
@@ -254,11 +255,14 @@ osr.
%prep
%setup -q
+%{__aclocal}
+%{__autoconf}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p3
# need to regenerate (old ones don't support perl 5.10)
%{__rm} swig/perl/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
@@ -274,6 +278,9 @@ sed -i 's|RUBY_EXTENSIONS_DIR :=.*|RUBY_EXTENSIONS_DIR := %{ruby_vendorarchdir}|
sed -i -e 's|^$(INSTALL_DIR):|$(DESTDIR)$(INSTALL_DIR):|' swig/ruby/RubyMakefile.mk
sed -i -e 's|^install: $(INSTALL_DIR)|install: $(DESTDIR)$(INSTALL_DIR)|' swig/ruby/RubyMakefile.mk
+# our man path
+sed -i -e 's#^mandir=.*##g' configure.in
+
%{__rm} -r man
%{__sed} -i -e 's,DODS_INC="-I.*,DODS_INC="$(pkg-config --cflags libdap)",' configure.in
@@ -362,9 +369,8 @@ EOF
%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Geo/OSR/.packlist
# some doxygen trash
-%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/{GDAL.dox,GDAL/Const.dox,OGR.dox,OSR.dox}
-%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Geo/check_dox.pl
-%{__rm} $RPM_BUILD_ROOT%{_bindir}/gdal_{fillnodata,sieve}.dox
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/gdalmove.dox
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/gdal_{edit,fillnodata,polygonize,proximity,sieve}.dox
%clean
rm -rf $RPM_BUILD_ROOT
@@ -381,8 +387,10 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/gcps2wld.py
%attr(755,root,root) %{_bindir}/gdal2tiles.py
%attr(755,root,root) %{_bindir}/gdal2xyz.py
+%attr(755,root,root) %{_bindir}/gdal_auth.py
%attr(755,root,root) %{_bindir}/gdal_contour
%attr(755,root,root) %{_bindir}/gdal_calc.py
+%attr(755,root,root) %{_bindir}/gdal_edit.py
%attr(755,root,root) %{_bindir}/gdal_fillnodata.py
%attr(755,root,root) %{_bindir}/gdal_grid
%attr(755,root,root) %{_bindir}/gdal_merge.py
@@ -402,6 +410,8 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/gdalinfo
%attr(755,root,root) %{_bindir}/gdallocationinfo
%attr(755,root,root) %{_bindir}/gdalmanage
+%attr(755,root,root) %{_bindir}/gdalmove.py
+%attr(755,root,root) %{_bindir}/gdalserver
%attr(755,root,root) %{_bindir}/gdalsrsinfo
%attr(755,root,root) %{_bindir}/gdaltindex
%attr(755,root,root) %{_bindir}/gdaltransform
@@ -419,9 +429,12 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/gdal
%{_mandir}/man1/gdal2tiles.1*
%{_mandir}/man1/gdal_contour.1*
+%{_mandir}/man1/gdal_edit.1*
%{_mandir}/man1/gdal_fillnodata.1*
%{_mandir}/man1/gdal_grid.1*
%{_mandir}/man1/gdal_merge.1*
+%{_mandir}/man1/gdal_polygonize.1*
+%{_mandir}/man1/gdal_proximity.1*
%{_mandir}/man1/gdal_rasterize.1*
%{_mandir}/man1/gdal_retile.1*
%{_mandir}/man1/gdal_sieve.1*
@@ -432,6 +445,8 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/gdaldem.1*
%{_mandir}/man1/gdalinfo.1*
%{_mandir}/man1/gdallocationinfo.1*
+%{_mandir}/man1/gdalmanage.1*
+%{_mandir}/man1/gdalmove.1*
%{_mandir}/man1/gdalsrsinfo.1*
%{_mandir}/man1/gdaltindex.1*
%{_mandir}/man1/gdaltransform.1*
diff --git a/gdal-bug-5284.patch b/gdal-bug-5284.patch
new file mode 100644
index 0000000..c01b55c
--- /dev/null
+++ b/gdal-bug-5284.patch
@@ -0,0 +1,168 @@
+Index: /trunk/gdal/configure
+===================================================================
+--- /trunk/gdal/configure (revision 26534)
++++ /trunk/gdal/configure (revision 26582)
+@@ -723,4 +723,5 @@
+ II_SYSTEM
+ HAVE_INGRES
++MYSQL_NEEDS_LOAD_DEFAULTS_DECLARATION
+ MYSQL_LIB
+ MYSQL_INC
+@@ -23308,4 +23309,32 @@
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
++
++ # Check if mysql headers declare load_defaults
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking load_defaults() in MySQL" >&5
++$as_echo_n "checking load_defaults() in MySQL... " >&6; }
++ rm -f testmysql.*
++ echo '#include "my_global.h"' > testmysql.cpp
++ echo '#include "my_sys.h"' >> testmysql.cpp
++ echo 'int main(int argc, char** argv) { load_defaults(0, 0, 0, 0); return 0; } ' >> testmysql.cpp
++ if test -z "`${CXX} ${CXXFLAGS} ${MYSQL_INC} ${MYSQL_LIB} testmysql.cpp -o testmysql 2>&1`" ; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, found in my_sys.h" >&5
++$as_echo "yes, found in my_sys.h" >&6; }
++ else
++ echo 'extern "C" void load_defaults(const char *conf_file, const char **groups, int *argc, char ***argv);' > testmysql.cpp
++ echo 'int main(int argc, char** argv) { load_defaults(0, 0, 0, 0); return 0; } ' >> testmysql.cpp
++ if test -z "`${CXX} ${CXXFLAGS} ${MYSQL_INC} ${MYSQL_LIB} testmysql.cpp -o testmysql 2>&1`" ; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, found in library but not in header" >&5
++$as_echo "yes, found in library but not in header" >&6; }
++ MYSQL_NEEDS_LOAD_DEFAULTS_DECLARATION=yes
++ else
++ HAVE_MYSQL=no
++ MYSQL_LIB=
++ MYSQL_INC=
++ as_fn_error $? "Cannot find load_defaults()" "$LINENO" 5
++ fi
++ fi
++ rm -f testmysql.*
++ rm -f testmysql
++
+ ;;
+ esac
+@@ -23317,4 +23346,6 @@
+
+ MYSQL_LIB=$MYSQL_LIB
++
++MYSQL_NEEDS_LOAD_DEFAULTS_DECLARATION=$MYSQL_NEEDS_LOAD_DEFAULTS_DECLARATION
+
+
+Index: /trunk/gdal/configure.in
+===================================================================
+--- /trunk/gdal/configure.in (revision 26534)
++++ /trunk/gdal/configure.in (revision 26582)
+@@ -2462,4 +2462,29 @@
+ MYSQL_INC="`$MYSQL_CONFIG --include`"
+ AC_MSG_RESULT([yes])
++
++ # Check if mysql headers declare load_defaults
++ AC_MSG_CHECKING([load_defaults() in MySQL])
++ rm -f testmysql.*
++ echo '#include "my_global.h"' > testmysql.cpp
++ echo '#include "my_sys.h"' >> testmysql.cpp
++ echo 'int main(int argc, char** argv) { load_defaults(0, 0, 0, 0); return 0; } ' >> testmysql.cpp
++ if test -z "`${CXX} ${CXXFLAGS} ${MYSQL_INC} ${MYSQL_LIB} testmysql.cpp -o testmysql 2>&1`" ; then
++ AC_MSG_RESULT([yes, found in my_sys.h])
++ else
++ echo 'extern "C" void load_defaults(const char *conf_file, const char **groups, int *argc, char ***argv);' > testmysql.cpp
++ echo 'int main(int argc, char** argv) { load_defaults(0, 0, 0, 0); return 0; } ' >> testmysql.cpp
++ if test -z "`${CXX} ${CXXFLAGS} ${MYSQL_INC} ${MYSQL_LIB} testmysql.cpp -o testmysql 2>&1`" ; then
++ AC_MSG_RESULT([yes, found in library but not in header])
++ MYSQL_NEEDS_LOAD_DEFAULTS_DECLARATION=yes
++ else
++ HAVE_MYSQL=no
++ MYSQL_LIB=
++ MYSQL_INC=
++ AC_MSG_ERROR([Cannot find load_defaults()])
++ fi
++ fi
++ rm -f testmysql.*
++ rm -f testmysql
++
+ ;;
+ esac
+@@ -2469,4 +2494,5 @@
+ AC_SUBST(MYSQL_INC,$MYSQL_INC)
+ AC_SUBST(MYSQL_LIB,$MYSQL_LIB)
++AC_SUBST(MYSQL_NEEDS_LOAD_DEFAULTS_DECLARATION,$MYSQL_NEEDS_LOAD_DEFAULTS_DECLARATION)
+
+ dnl ---------------------------------------------------------------------------
+Index: /trunk/gdal/ogr/ogrsf_frmts/mysql/GNUmakefile
+===================================================================
+--- /trunk/gdal/ogr/ogrsf_frmts/mysql/GNUmakefile (revision 15888)
++++ /trunk/gdal/ogr/ogrsf_frmts/mysql/GNUmakefile (revision 26582)
+@@ -8,4 +8,9 @@
+ CPPFLAGS := -I.. -I../.. $(GDAL_INCLUDE) $(MYSQL_INC) $(CPPFLAGS)
+
++ifeq ($(MYSQL_NEEDS_LOAD_DEFAULTS_DECLARATION),yes)
++CPPFLAGS += -DMYSQL_NEEDS_LOAD_DEFAULTS_DECLARATION
++endif
++
++
+ default: $(O_OBJ:.o=.$(OBJ_EXT))
+
+Index: /trunk/gdal/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp
+===================================================================
+--- /trunk/gdal/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp (revision 26506)
++++ /trunk/gdal/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp (revision 26582)
+@@ -37,4 +37,14 @@
+ #include "cpl_string.h"
+
++/* Recent versions of mysql no longer declare load_defaults() in my_sys.h */
++/* but they still have it in the lib. Very fragile... */
++#ifdef MYSQL_NEEDS_LOAD_DEFAULTS_DECLARATION
++extern "C" {
++int load_defaults(const char *conf_file, const char **groups,
++ int *argc, char ***argv);
++void free_defaults(char **argv);
++}
++#endif
++
+ CPL_CVSID("$Id$");
+ /************************************************************************/
+Index: /trunk/gdal/GDALmake.opt.in
+===================================================================
+--- /trunk/gdal/GDALmake.opt.in (revision 26296)
++++ /trunk/gdal/GDALmake.opt.in (revision 26582)
+@@ -127,4 +127,5 @@
+ MYSQL_LIB = @MYSQL_LIB@
+ MYSQL_INC = @MYSQL_INC@
++MYSQL_NEEDS_LOAD_DEFAULTS_DECLARATION = @MYSQL_NEEDS_LOAD_DEFAULTS_DECLARATION@
+ LIBS += $(MYSQL_LIB)
+
+Index: /trunk/gdal/configure
+===================================================================
+--- /trunk/gdal/configure (revision 26582)
++++ /trunk/gdal/configure (revision 26583)
+@@ -23317,5 +23317,5 @@
+ echo '#include "my_sys.h"' >> testmysql.cpp
+ echo 'int main(int argc, char** argv) { load_defaults(0, 0, 0, 0); return 0; } ' >> testmysql.cpp
+- if test -z "`${CXX} ${CXXFLAGS} ${MYSQL_INC} ${MYSQL_LIB} testmysql.cpp -o testmysql 2>&1`" ; then
++ if test -z "`${CXX} ${CXXFLAGS} ${MYSQL_INC} -o testmysql testmysql.cpp ${MYSQL_LIB} 2>&1`" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, found in my_sys.h" >&5
+ $as_echo "yes, found in my_sys.h" >&6; }
+@@ -23323,5 +23323,5 @@
+ echo 'extern "C" void load_defaults(const char *conf_file, const char **groups, int *argc, char ***argv);' > testmysql.cpp
+ echo 'int main(int argc, char** argv) { load_defaults(0, 0, 0, 0); return 0; } ' >> testmysql.cpp
+- if test -z "`${CXX} ${CXXFLAGS} ${MYSQL_INC} ${MYSQL_LIB} testmysql.cpp -o testmysql 2>&1`" ; then
++ if test -z "`${CXX} ${CXXFLAGS} ${MYSQL_INC} -o testmysql testmysql.cpp ${MYSQL_LIB} 2>&1`" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, found in library but not in header" >&5
+ $as_echo "yes, found in library but not in header" >&6; }
+Index: /trunk/gdal/configure.in
+===================================================================
+--- /trunk/gdal/configure.in (revision 26582)
++++ /trunk/gdal/configure.in (revision 26583)
+@@ -2469,10 +2469,10 @@
+ echo '#include "my_sys.h"' >> testmysql.cpp
+ echo 'int main(int argc, char** argv) { load_defaults(0, 0, 0, 0); return 0; } ' >> testmysql.cpp
+- if test -z "`${CXX} ${CXXFLAGS} ${MYSQL_INC} ${MYSQL_LIB} testmysql.cpp -o testmysql 2>&1`" ; then
++ if test -z "`${CXX} ${CXXFLAGS} ${MYSQL_INC} -o testmysql testmysql.cpp ${MYSQL_LIB} 2>&1`" ; then
+ AC_MSG_RESULT([yes, found in my_sys.h])
+ else
+ echo 'extern "C" void load_defaults(const char *conf_file, const char **groups, int *argc, char ***argv);' > testmysql.cpp
+ echo 'int main(int argc, char** argv) { load_defaults(0, 0, 0, 0); return 0; } ' >> testmysql.cpp
+- if test -z "`${CXX} ${CXXFLAGS} ${MYSQL_INC} ${MYSQL_LIB} testmysql.cpp -o testmysql 2>&1`" ; then
++ if test -z "`${CXX} ${CXXFLAGS} ${MYSQL_INC} -o testmysql testmysql.cpp ${MYSQL_LIB} 2>&1`" ; then
+ AC_MSG_RESULT([yes, found in library but not in header])
+ MYSQL_NEEDS_LOAD_DEFAULTS_DECLARATION=yes
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/gdal.git/commitdiff/f4952e6ff16ff5df1dbdead3b11de7277f366438
More information about the pld-cvs-commit
mailing list