Compare commits

...

3 Commits
master ... f16

Author SHA1 Message Date
Rex Dieter a061632e36 rebuild (libwebp) 2013-01-23 14:18:10 -06:00
Volker Fröhlich 5cbbb50eb2 ADD FORGOTTEN SPEC FILE 2012-02-27 08:32:33 +01:00
Volker Fröhlich 5324912d9b REQUIRE RUBY API, USE LIBJPEG-TURBO
- Use libjpeg-turbo on Fedora
- Revert changed install path for Ruby bindings
- Follow the new Ruby packaging guidelines and require an ABI version
2012-02-27 08:30:18 +01:00
4 changed files with 72 additions and 24 deletions

28
gdal-1.7.3-ruby-1.9.patch Normal file
View File

@ -0,0 +1,28 @@
diff -Nur gdal-1.7.3-fedora/swig/ruby/RubyMakefile.mk gdal-1.7.3-fedora-ruby/swig/ruby/RubyMakefile.mk
--- gdal-1.7.3-fedora/swig/ruby/RubyMakefile.mk 2010-11-07 19:28:49.000000000 +0100
+++ gdal-1.7.3-fedora-ruby/swig/ruby/RubyMakefile.mk 2012-02-19 23:24:07.197452221 +0100
@@ -18,14 +18,22 @@
include $(GDAL_ROOT)/GDALmake.opt
RUBY_MODULES = gdal.so ogr.so gdalconst.so osr.so
-RUBY_INCLUDE_DIR := $(shell ruby -rrbconfig -e "puts Config::CONFIG['archdir']")
+RUBY_INCLUDE_DIR := $(shell ruby -rrbconfig -e "puts Config::CONFIG['rubyhdrdir'] || Config::CONFIG['archdir']")
+RUBY_ARCH_INCLUDE_DIR := $(shell ruby -rrbconfig -e "puts Config::CONFIG['rubyhdrdir'] + '/' + Config::CONFIG['arch'] unless Config::CONFIG['rubyhdrdir'].nil?")
RUBY_LIB_DIR := $(shell ruby -rrbconfig -e "puts Config::CONFIG['libdir']")
RUBY_SO_NAME := $(shell ruby -rrbconfig -e "puts Config::CONFIG['RUBY_SO_NAME']")
RUBY_EXTENSIONS_DIR := $(shell ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")
INSTALL_DIR := $(RUBY_EXTENSIONS_DIR)/gdal
+ifeq ($(RUBY_ARCH_INCLUDE_DIR),)
+# For Ruby < 1.9
RUBY_INCLUDE = -I$(RUBY_INCLUDE_DIR)
-LDFLAGS += -Xcompiler -shared -L$(RUBY_LIB_DIR)
+else
+# For Ruby 1.9
+RUBY_INCLUDE = -I$(RUBY_INCLUDE_DIR) -I$(RUBY_ARCH_INCLUDE_DIR)
+endif
+
+LDFLAGS += -shared -L$(RUBY_LIB_DIR)
RUBY_LIB := -l$(RUBY_SO_NAME)
build: $(RUBY_MODULES)

View File

@ -1,13 +0,0 @@
diff -up gdal-1.7.3-fedora/ltmain.sh.xcompiler gdal-1.7.3-fedora/ltmain.sh
diff -up gdal-1.7.3-fedora/swig/ruby/RubyMakefile.mk.xcompiler gdal-1.7.3-fedora/swig/ruby/RubyMakefile.mk
--- gdal-1.7.3-fedora/swig/ruby/RubyMakefile.mk.xcompiler 2011-03-15 23:55:58.000000000 +0100
+++ gdal-1.7.3-fedora/swig/ruby/RubyMakefile.mk 2011-03-15 23:56:11.000000000 +0100
@@ -25,7 +25,7 @@ RUBY_EXTENSIONS_DIR := $(shell ruby -rrb
INSTALL_DIR := $(RUBY_EXTENSIONS_DIR)/gdal
RUBY_INCLUDE = -I$(RUBY_INCLUDE_DIR)
-LDFLAGS += -Xcompiler -shared -L$(RUBY_LIB_DIR)
+LDFLAGS += -shared -L$(RUBY_LIB_DIR)
RUBY_LIB := -l$(RUBY_SO_NAME)
build: $(RUBY_MODULES)

View File

@ -3,7 +3,7 @@
Name: gdal
Version: 1.7.3
Release: 12%{?dist}
Release: 15%{?dist}
Summary: GIS file format library
Group: System Environment/Libraries
License: MIT
@ -17,7 +17,6 @@ Source2: gdal-1.7.3.pom
Patch1: %{name}-mysql.patch
Patch2: %{name}-bindir.patch
Patch3: %{name}-AIS.patch
Patch4: %{name}-%{version}-xcompiler.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=693952
# http://trac.osgeo.org/gdal/ticket/3694 -- Still present in 1.8 tarball
@ -28,10 +27,22 @@ Patch5: %{name}-1.8.0-mitab.patch
# Not necessary for 1.8 and later
Patch6: %{name}-1.7.3-png15.patch
# Ruby headers are stored in a different place in 1.9
# Don't use Xcompiler, as GCC doesn't like it anymore
Patch7: %{name}-1.7.3-ruby-1.9.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libtool pkgconfig
BuildRequires: python-devel numpy xerces-c-devel
BuildRequires: libpng-devel libungif-devel libjpeg-devel libtiff-devel
BuildRequires: libpng-devel libungif-devel
%if (0%{?fedora})
BuildRequires: libjpeg-turbo-devel
%else
BuildRequires: libjpeg-devel
%endif
BuildRequires: libtiff-devel
BuildRequires: doxygen tetex-latex ghostscript ruby-devel jpackage-utils
BuildRequires: jasper-devel cfitsio-devel libdap-devel librx-devel
BuildRequires: hdf-static hdf-devel
@ -59,7 +70,6 @@ BuildRequires: ant swig ruby java-devel-gcj
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif
#TODO: What if you have Ruby 1.9 as well?
%{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"]')}
# Avoid providing private Python and Perl extension libs
@ -111,6 +121,12 @@ Summary: Ruby modules for the GDAL file format library
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
%if (0%{?fedora} < 17 || 0%{?rhel})
Requires: ruby(abi) = 1.8
%else
Requires: ruby(abi) = 1.9
%endif
%description ruby
The GDAL Ruby modules provide support to handle multiple GIS file formats.
@ -152,13 +168,13 @@ rm -rf frmts/gtiff/libgeotiff \
%patch1 -p0 -b .mysql~
%patch2 -p1 -b .bindir~
%patch3 -p1 -b .AIS~
%patch4 -p1 -b .xcompiler~
%patch5 -p3 -b .mitab~
# Only F17 has libpng 1.5
%if ! (0%{?fedora} < 17 || 0%{?rhel})
%patch6 -p1 -b .png15~
%endif
%patch7 -p1 -b .ruby19~
# Unpack test cases
tar -xzf %{SOURCE1}
@ -218,17 +234,19 @@ sed -i 's|-lgeotiff -L$with_geotiff $LIBS|-lgeotiff $LIBS|g' configure
sed -i 's|-L\$with_geotiff\/lib -lgeotiff $LIBS|-lgeotiff $LIBS|g' configure
sed -i 's|-lmfhdf -ldf|-L$libdir/hdf -lmfhdf -ldf|g' configure
sed -i 's|-logdi31|-logdi|g' configure
# libproj is dlopened; upstream sources point to .so, which is usually not present
# http://trac.osgeo.org/gdal/ticket/3602
sed -i 's|libproj.so|libproj.so.0|g' ogr/ogrct.cpp
# Fix python path for ppc64
#TODO: Überprüfen ob es wirkt
#TODO: Ticket? Must be corrected for 64 bit architectures other than Intel; Query Python?
sed -i 's|test \"$ARCH\" = \"x86_64\"|test \"$libdir\" = \"$libdir"|g' configure
# Install Ruby bindings into the proper place
#TODO: Upstream, as this is useful and does no harm
#TODO: Ticket
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
sed -i -e 's|^INSTALL_DIR := $(RUBY_EXTENSIONS_DIR)/gdal|INSTALL_DIR = $(RUBY_EXTENSIONS_DIR)|' swig/ruby/RubyMakefile.mk
# Append paths for some libs
export CPPFLAGS="`pkg-config ogdi --cflags`"
@ -279,7 +297,7 @@ export CFLAGS=`echo %{optflags}|sed -e 's/\-Wp\,\-D_FORTIFY_SOURCE\=2 / -fPIC -D
--with-xerces-inc=%{_includedir} \
--with-jpeg12=no \
--enable-shared \
--with-gdal-ver=%{version}-fedora
--with-gdal-ver=%{version}
# fixup hardcoded wrong compile flags.
cp GDALmake.opt GDALmake.opt.orig
@ -596,7 +614,7 @@ rm -rf $RPM_BUILD_ROOT
%{perl_vendorarch}/*
%files ruby
%{ruby_sitearch}/*
%{ruby_sitearch}/%{name}
%files java
%doc swig/java/apps
@ -611,6 +629,21 @@ rm -rf $RPM_BUILD_ROOT
%doc docs
%changelog
* Wed Jan 23 2013 Rex Dieter <rdieter@fedoraproject.org> 1.7.3-15
- rebuild (libwebp)
* Thu Feb 19 2012 Volker Fröhlich <volker27@gmx.at> - 1.7.3-14
- Require Ruby abi
- Add patch for Ruby 1.9 include dir, back-ported from GDAL 1.9
- Change version string for gdal-config from <version>-fedora to
<version>
- Revert installation path for Ruby modules, as it proved wrong
- Use libjpeg-turbo
* Thu Feb 9 2012 Volker Fröhlich <volker27@gmx.at> - 1.7.3-13
- Rebuild for Ruby 1.9
http://lists.fedoraproject.org/pipermail/ruby-sig/2012-January/000805.html
* Tue Jan 10 2012 Volker Fröhlich <volker27@gmx.at> - 1.7.3-12
- Remove FC10 specific patch0
- Versioned MODULE_COMPAT_ Requires for Perl (BZ 768265)

View File

@ -1,2 +1,2 @@
c2bf1c67ff6db27e2238c6c3d5feac29 gdal-1.7.3-fedora.tar.gz
aeb6c9686a3c008e77ebf379724f6a61 gdal-1.7.3-fedora.tar.gz
0b12bd95c7fb78a6f33a922c24d1b40d gdalautotest-1.7.3.tar.gz