diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-libs/gdal | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-libs/gdal')
-rw-r--r-- | sci-libs/gdal/Manifest | 3 | ||||
-rw-r--r-- | sci-libs/gdal/files/gdal-1.10.0-ruby-makefile.patch | 47 | ||||
-rw-r--r-- | sci-libs/gdal/files/gdal-1.11.1-poppler-0.31.0-support.patch | 119 | ||||
-rw-r--r-- | sci-libs/gdal/files/gdal-1.11.1-swig-3.0.3.patch | 161 | ||||
-rw-r--r-- | sci-libs/gdal/files/gdal-1.5.0-install_name.patch | 45 | ||||
-rw-r--r-- | sci-libs/gdal/files/gdal-1.5.0-soname.patch | 13 | ||||
-rw-r--r-- | sci-libs/gdal/files/gdal-1.8.1-zlib_header_fix.patch | 13 | ||||
-rw-r--r-- | sci-libs/gdal/files/gdal-1.9.1-ruby-makefile.patch | 43 | ||||
-rw-r--r-- | sci-libs/gdal/gdal-1.11.1-r3.ebuild | 349 | ||||
-rw-r--r-- | sci-libs/gdal/gdal-1.11.2.ebuild | 346 | ||||
-rw-r--r-- | sci-libs/gdal/gdal-2.0.0.ebuild | 343 | ||||
-rw-r--r-- | sci-libs/gdal/metadata.xml | 23 |
12 files changed, 1505 insertions, 0 deletions
diff --git a/sci-libs/gdal/Manifest b/sci-libs/gdal/Manifest new file mode 100644 index 00000000000..362db48635f --- /dev/null +++ b/sci-libs/gdal/Manifest @@ -0,0 +1,3 @@ +DIST gdal-1.11.1.tar.gz 10731242 SHA256 f46b5944a8cabc8516673f231f466131cdfd2cdc6677dbee5d96ec7fc58a3340 SHA512 17214ae17a5199d73477d17cf8680396aee8a28d4333cf55818bdd869548dc6a4d7535d7e05949696db31a7be4a511c5ca73199af3dda48d9a40d5640618e9c3 WHIRLPOOL 1f07ee4acccf58552ddef6b5a306b9dbe832014f6890d353f195ab0d47dfc4e81164b7c8b9cefc9915035d113d2f28818f05e89918728eadb0e80e43e7220b5b +DIST gdal-1.11.2.tar.gz 10746847 SHA256 66bc8192d24e314a66ed69285186d46e6999beb44fc97eeb9c76d82a117c0845 SHA512 f1f025de5a618cc2458b6d1f066647341ad4ded1cc2a08e4b78756d96d38715ddd8ba34b7c263369bde66cb20c7919195e13b60a1ecadee25ef80db79f3eb7da WHIRLPOOL 77274f6f9b9bb29fc21c6f274512bccebc7748420c31e3e626d26087194f69b9606354603b393b77903451b073d034f2508403193fdf738f5b099d7808771653 +DIST gdal-2.0.0.tar.gz 11582325 SHA256 53761563ff53c5bf27bff7c4d6cab8bb1634baccefda05348e0f3b7acaf4c9e6 SHA512 74ae9d01a69652c92a16bc91f71b4c8416697d5f7aa137d385f58b7dc63c165c26330464c98891ac66b09475de24fbbff61f506ad1c9ecf64ffe08f1429fbad5 WHIRLPOOL 7d4a27e94e41ea53050ae3b8f1f06720e13626885455897caf6659a88c87bf61c087102963182b580e56a8840e3b57b6fbb8adadde64fd4679d5c37c3aa682c7 diff --git a/sci-libs/gdal/files/gdal-1.10.0-ruby-makefile.patch b/sci-libs/gdal/files/gdal-1.10.0-ruby-makefile.patch new file mode 100644 index 00000000000..cc89200c526 --- /dev/null +++ b/sci-libs/gdal/files/gdal-1.10.0-ruby-makefile.patch @@ -0,0 +1,47 @@ +diff -Naurw gdal-1.10.0.orig/swig/ruby/RubyMakefile.mk gdal-1.10.0/swig/ruby/RubyMakefile.mk +--- gdal-1.10.0.orig/swig/ruby/RubyMakefile.mk 2013-04-24 18:55:26.000000000 +0000 ++++ gdal-1.10.0/swig/ruby/RubyMakefile.mk 2013-06-25 23:58:06.464518830 +0000 +@@ -37,13 +37,13 @@ + + ifeq ("$(shell uname -s)", "Darwin") + RUBY_MODULES=$(RUBY_MODULES_MAC) +-LDFLAGS += -Xcompiler -bundle -L$(RUBY_LIB_DIR) +-RUBY_LIB := -l$(RUBY_SO_NAME) + else + RUBY_MODULES=$(RUBY_MODULES_LIN) +-LDFLAGS += -Xcompiler -shared -L$(RUBY_LIB_DIR) +-RUBY_LIB := -l$(RUBY_SO_NAME) + endif ++LDFLAGS += -fPIC -DPIC -shared -L$(RUBY_LIB_DIR) ++CFLAGS += -fPIC -DPIC ++CXXFLAGS += -fPIC -DPIC ++RUBY_LIB := -l$(RUBY_SO_NAME) + + build: $(RUBY_MODULES) + +@@ -56,10 +56,10 @@ + veryclean: clean + rm -f *_wrap.cpp + +-$(INSTALL_DIR): ++$(DESTDIR)$(INSTALL_DIR): + mkdir -p $(DESTDIR)$(INSTALL_DIR) + +-install: $(INSTALL_DIR) ++install: $(DESTDIR)$(INSTALL_DIR) $(RUBY_MODULES) + for i in $(RUBY_MODULES) ; do $(INSTALL) $$i $(DESTDIR)$(INSTALL_DIR) ; done + + $(RUBY_MODULES_MAC): %.bundle: %_wrap.o +@@ -69,10 +69,10 @@ + $(LD) $(LDFLAGS) $(LIBS) $(GDAL_SLIB_LINK) $(RUBY_LIB) $< -o $@ + + %.o: %.cpp +- $(CXX) $(CFLAGS) $(GDAL_INCLUDE) $(RUBY_INCLUDE) -c $< ++ $(CXX) $(CXXFLAGS) $(GDAL_INCLUDE) $(RUBY_INCLUDE) -c $< + + %.o: %.cxx +- $(CXX) $(CFLAGS) $(GDAL_INCLUDE) $(RUBY_INCLUDE) -c $< ++ $(CXX) $(CXXFLAGS) $(GDAL_INCLUDE) $(RUBY_INCLUDE) -c $< + + %.o: %.c + $(CC) $(CFLAGS) $(GDAL_INCLUDE) $(RUBY_INCLUDE) -c $< diff --git a/sci-libs/gdal/files/gdal-1.11.1-poppler-0.31.0-support.patch b/sci-libs/gdal/files/gdal-1.11.1-poppler-0.31.0-support.patch new file mode 100644 index 00000000000..7700c246387 --- /dev/null +++ b/sci-libs/gdal/files/gdal-1.11.1-poppler-0.31.0-support.patch @@ -0,0 +1,119 @@ +diff -urpN gdal-1.11.1.orig/frmts/pdf/pdfdataset.cpp gdal-1.11.1/frmts/pdf/pdfdataset.cpp +--- gdal-1.11.1.orig/frmts/pdf/pdfdataset.cpp 2014-09-24 06:47:43.000000000 -0700 ++++ gdal-1.11.1/frmts/pdf/pdfdataset.cpp 2015-02-19 13:55:58.714589328 -0800 +@@ -108,12 +108,9 @@ class GDALPDFOutputDev : public SplashOu + + public: + GDALPDFOutputDev(SplashColorMode colorModeA, int bitmapRowPadA, +- GBool reverseVideoA, SplashColorPtr paperColorA, +- GBool bitmapTopDownA = gTrue, +- GBool allowAntialiasA = gTrue) : ++ GBool reverseVideoA, SplashColorPtr paperColorA) : + SplashOutputDev(colorModeA, bitmapRowPadA, +- reverseVideoA, paperColorA, +- bitmapTopDownA, allowAntialiasA), ++ reverseVideoA, paperColorA), + bEnableVector(TRUE), + bEnableText(TRUE), + bEnableBitmap(TRUE) {} +diff -urpN gdal-1.11.1.orig/frmts/pdf/pdfio.cpp gdal-1.11.1/frmts/pdf/pdfio.cpp +--- gdal-1.11.1.orig/frmts/pdf/pdfio.cpp 2014-09-24 06:47:43.000000000 -0700 ++++ gdal-1.11.1/frmts/pdf/pdfio.cpp 2015-02-19 13:55:58.715589318 -0800 +@@ -39,13 +39,25 @@ + + CPL_CVSID("$Id$"); + ++ ++#ifdef POPPLER_BASE_STREAM_HAS_TWO_ARGS ++/* Poppler 0.31.0 is the first one that needs to know the file size */ ++static vsi_l_offset VSIPDFFileStreamGetSize(VSILFILE* f) ++{ ++ VSIFSeekL(f, 0, SEEK_END); ++ vsi_l_offset nSize = VSIFTellL(f); ++ VSIFSeekL(f, 0, SEEK_SET); ++ return nSize; ++} ++#endif ++ + /************************************************************************/ + /* VSIPDFFileStream() */ + /************************************************************************/ + + VSIPDFFileStream::VSIPDFFileStream(VSILFILE* f, const char* pszFilename, Object *dictA): + #ifdef POPPLER_BASE_STREAM_HAS_TWO_ARGS +- BaseStream(dictA, 0) ++ BaseStream(dictA, (setPos_offset_type)VSIPDFFileStreamGetSize(f)) + #else + BaseStream(dictA) + #endif +@@ -195,7 +207,7 @@ int VSIPDFFileStream::FillBuffer() + /* getChar() */ + /************************************************************************/ + +-/* The unoptimized version performs a bit well since we must go through */ ++/* The unoptimized version performs a bit less since we must go through */ + /* the whole virtual I/O chain for each character reading. We save a few */ + /* percent with this extra internal caching */ + +@@ -326,4 +338,47 @@ void VSIPDFFileStream::moveStart(moveSta + nPosInBuffer = nBufferLength = -1; + } + ++/************************************************************************/ ++/* hasGetChars() */ ++/************************************************************************/ ++ ++GBool VSIPDFFileStream::hasGetChars() ++{ ++ return true; ++} ++ ++/************************************************************************/ ++/* getChars() */ ++/************************************************************************/ ++ ++int VSIPDFFileStream::getChars(int nChars, Guchar *buffer) ++{ ++ int nRead = 0; ++ while (nRead < nChars) ++ { ++ int nToRead = nChars - nRead; ++ if (nPosInBuffer == nBufferLength) ++ { ++ if (!bLimited && nToRead > BUFFER_SIZE) ++ { ++ int nJustRead = (int) VSIFReadL(buffer + nRead, 1, nToRead, f); ++ nPosInBuffer = nBufferLength = -1; ++ nCurrentPos += nJustRead; ++ nRead += nJustRead; ++ break; ++ } ++ else if (!FillBuffer() || nPosInBuffer >= nBufferLength) ++ break; ++ } ++ if( nToRead > nBufferLength - nPosInBuffer ) ++ nToRead = nBufferLength - nPosInBuffer; ++ ++ memcpy( buffer + nRead, abyBuffer + nPosInBuffer, nToRead ); ++ nPosInBuffer += nToRead; ++ nCurrentPos += nToRead; ++ nRead += nToRead; ++ } ++ return nRead; ++} ++ + #endif +diff -urpN gdal-1.11.1.orig/frmts/pdf/pdfio.h gdal-1.11.1/frmts/pdf/pdfio.h +--- gdal-1.11.1.orig/frmts/pdf/pdfio.h 2014-09-24 06:47:43.000000000 -0700 ++++ gdal-1.11.1/frmts/pdf/pdfio.h 2015-02-19 13:55:58.715589318 -0800 +@@ -93,6 +93,10 @@ class VSIPDFFileStream: public BaseStrea + virtual void close(); + + private: ++ /* Added in poppler 0.15.0 */ ++ virtual GBool hasGetChars(); ++ virtual int getChars(int nChars, Guchar *buffer); ++ + VSIPDFFileStream *poParent; + GooString *poFilename; + VSILFILE *f; diff --git a/sci-libs/gdal/files/gdal-1.11.1-swig-3.0.3.patch b/sci-libs/gdal/files/gdal-1.11.1-swig-3.0.3.patch new file mode 100644 index 00000000000..c6b8240b8eb --- /dev/null +++ b/sci-libs/gdal/files/gdal-1.11.1-swig-3.0.3.patch @@ -0,0 +1,161 @@ +svn diff -c 28298 https://svn.osgeo.org/gdal/branches/1.11 +r28298 | rouault | 2015-01-06 10:03:37 +0100 (Di, 06 Jan 2015) | 1 line +Python bindings: fix processing error of ogr_python.i with SWIG 3 (#5795) +http://trac.osgeo.org/gdal/ticket/5795#comment:3 +https://bugs.gentoo.org/534168 + +Index: gdal/swig/python/osgeo/ogr.py +=================================================================== +--- gdal/swig/python/osgeo/ogr.py (revision 28297) ++++ gdal/swig/python/osgeo/ogr.py (revision 28298) +@@ -2025,12 +2025,12 @@ + """Returns the number of features in the layer""" + return self.GetFeatureCount() + +- +- ++ # To avoid __len__ being called when testing boolean value ++ # which can have side effects (#4758) + def __nonzero__(self): + return True + +- ++ # For Python 3 compat + __bool__ = __nonzero__ + + def __getitem__(self, value): +@@ -2041,9 +2041,9 @@ + import sys + output = [] + if value.stop == sys.maxint: +- +- +- ++ #for an unending slice, sys.maxint is used ++ #We need to stop before that or GDAL will write an ++ ##error to stdout + stop = len(self) - 1 + else: + stop = value.stop +@@ -2944,8 +2944,8 @@ + def __copy__(self): + return self.Clone() + +- +- ++ # This makes it possible to fetch fields in the form "feature.area". ++ # This has some risk of name collisions. + def __getattr__(self, key): + """Returns the values of fields by the given name""" + if key == 'this': +@@ -2961,8 +2961,8 @@ + else: + return self.GetField(idx) + +- +- ++ # This makes it possible to set fields in the form "feature.area". ++ # This has some risk of name collisions. + def __setattr__(self, key, value): + """Set the values of fields by the given name""" + if key == 'this' or key == 'thisown': +@@ -2978,7 +2978,7 @@ + else: + self.__dict__[key] = value + +- ++ # This makes it possible to fetch fields in the form "feature['area']". + def __getitem__(self, key): + """Returns the values of fields by the given name / field_index""" + if isinstance(key, str): +@@ -2993,7 +2993,7 @@ + else: + return self.GetField(fld_index) + +- ++ # This makes it possible to set fields in the form "feature['area'] = 123". + def __setitem__(self, key, value): + """Returns the value of a field by field name / index""" + if isinstance(key, str): +@@ -3026,9 +3026,9 @@ + return self.GetFieldAsIntegerList(fld_index) + if fld_type == OFTRealList: + return self.GetFieldAsDoubleList(fld_index) +- +- +- ++ ## if fld_type == OFTDateTime or fld_type == OFTDate or fld_type == OFTTime: ++ # return self.GetFieldAsDate(fld_index) ++ # default to returning as a string. Should we add more types? + return self.GetFieldAsString(fld_index) + + def SetField2(self, fld_index, value): +Index: gdal/swig/include/python/ogr_python.i +=================================================================== +--- gdal/swig/include/python/ogr_python.i (revision 28297) ++++ gdal/swig/include/python/ogr_python.i (revision 28298) +@@ -111,7 +111,7 @@ + } + + %extend OGRLayerShadow { +- %pythoncode { ++ %pythoncode %{ + def Reference(self): + "For backwards compatibility only." + pass +@@ -183,12 +183,12 @@ + return output + schema = property(schema) + +- } ++ %} + + } + + %extend OGRFeatureShadow { +- %pythoncode { ++ %pythoncode %{ + def Reference(self): + pass + +@@ -383,12 +383,12 @@ + return output + + +-} ++%} + + } + + %extend OGRGeometryShadow { +-%pythoncode { ++%pythoncode %{ + def Destroy(self): + self.__swig_destroy__(self) + self.__del__() +@@ -416,8 +416,8 @@ + return subgeom + else: + raise StopIteration ++%} + } +-} + + + %extend OGRFieldDefnShadow { +@@ -449,13 +449,13 @@ + } + + %extend OGRFieldDefnShadow { +-%pythoncode { ++%pythoncode %{ + def Destroy(self): + "Once called, self has effectively been destroyed. Do not access. For backwards compatiblity only" + _ogr.delete_FieldDefn( self ) + self.thisown = 0 ++%} + } +-} + + %import typemaps_python.i + diff --git a/sci-libs/gdal/files/gdal-1.5.0-install_name.patch b/sci-libs/gdal/files/gdal-1.5.0-install_name.patch new file mode 100644 index 00000000000..e17575267d6 --- /dev/null +++ b/sci-libs/gdal/files/gdal-1.5.0-install_name.patch @@ -0,0 +1,45 @@ +--- GDALmake.opt.in.orig 2008-02-02 18:25:48.000000000 -0800 ++++ GDALmake.opt.in 2008-02-02 18:54:53.000000000 -0800 +@@ -97,6 +97,10 @@ + GDAL_SLIB = $(GDAL_ROOT)/libgdal.$(SO_EXT) + GDAL_SLIB_LINK = -L$(GDAL_ROOT) -lgdal + ++# for building without libtool ++GDAL_SLIB_SO_VER = $(GDAL_VERSION_MAJOR).$(LIBGDAL_CURRENT).$(LIBGDAL_REVISION) ++GDAL_SLIB_SONAME = -install_name $(INST_LIB)/libgdal.$(GDAL_VERSION_MAJOR).$(SO_EXT) ++ + # Mac OS X Framework definition + MACOSX_FRAMEWORK = @MACOSX_FRAMEWORK@ + +--- GNUmakefile.orig 2010-03-09 14:03:08 +0100 ++++ GNUmakefile 2010-03-09 14:05:29 +0100 +@@ -218,7 +218,7 @@ + + ifeq ($(HAVE_LD_SHARED),yes) + +-GDAL_SLIB_B = $(notdir $(GDAL_SLIB)) ++GDAL_SLIB_B = libgdal + + install-lib: + +@@ -226,14 +226,14 @@ + ifeq ($(MACOSX_FRAMEWORK),yes) + $(INSTALL_LIB) $(GDAL_SLIB) $(DESTDIR)$(INST_LIB)/GDAL + else +- rm -f $(DESTDIR)$(INST_LIB)/$(GDAL_SLIB_B) +- rm -f $(DESTDIR)$(INST_LIB)/$(GDAL_SLIB_B).$(GDAL_VERSION_MAJOR) +- rm -f $(DESTDIR)$(INST_LIB)/$(GDAL_SLIB_B).$(GDAL_VER) +- $(INSTALL_LIB) $(GDAL_SLIB) $(DESTDIR)$(INST_LIB)/$(GDAL_SLIB_B).$(GDAL_VER) ++ rm -f $(DESTDIR)$(INST_LIB)/$(GDAL_SLIB_B).dylib ++ rm -f $(DESTDIR)$(INST_LIB)/$(GDAL_SLIB_B).$(GDAL_VERSION_MAJOR).dylib ++ rm -f $(DESTDIR)$(INST_LIB)/$(GDAL_SLIB_B).$(GDAL_VER).dylib ++ $(INSTALL_LIB) $(GDAL_SLIB) $(DESTDIR)$(INST_LIB)/$(GDAL_SLIB_B).$(GDAL_VER).dylib + (cd $(DESTDIR)$(INST_LIB) ; \ +- ln -s $(GDAL_SLIB_B).$(GDAL_VER) $(GDAL_SLIB_B).$(GDAL_VERSION_MAJOR)) ++ ln -s $(GDAL_SLIB_B).$(GDAL_VER).dylib $(GDAL_SLIB_B).$(GDAL_VERSION_MAJOR).dylib) + (cd $(DESTDIR)$(INST_LIB) ; \ +- ln -s $(GDAL_SLIB_B).$(GDAL_VERSION_MAJOR) $(GDAL_SLIB_B)) ++ ln -s $(GDAL_SLIB_B).$(GDAL_VERSION_MAJOR).dylib $(GDAL_SLIB_B).dylib) + endif + + else diff --git a/sci-libs/gdal/files/gdal-1.5.0-soname.patch b/sci-libs/gdal/files/gdal-1.5.0-soname.patch new file mode 100644 index 00000000000..f784536316c --- /dev/null +++ b/sci-libs/gdal/files/gdal-1.5.0-soname.patch @@ -0,0 +1,13 @@ +--- GDALmake.opt.in.orig 2008-02-02 18:25:48.000000000 -0800 ++++ GDALmake.opt.in 2008-02-02 18:54:53.000000000 -0800 +@@ -97,6 +97,10 @@ + GDAL_SLIB = $(GDAL_ROOT)/libgdal.$(SO_EXT) + GDAL_SLIB_LINK = -L$(GDAL_ROOT) -lgdal + ++# for building without libtool ++GDAL_SLIB_SO_VER = $(GDAL_VERSION_MAJOR).$(LIBGDAL_CURRENT).$(LIBGDAL_REVISION) ++GDAL_SLIB_SONAME = -Wl,-soname,libgdal.$(SO_EXT).$(GDAL_VERSION_MAJOR) ++ + # Mac OS X Framework definition + MACOSX_FRAMEWORK = @MACOSX_FRAMEWORK@ + diff --git a/sci-libs/gdal/files/gdal-1.8.1-zlib_header_fix.patch b/sci-libs/gdal/files/gdal-1.8.1-zlib_header_fix.patch new file mode 100644 index 00000000000..04777c8cdbb --- /dev/null +++ b/sci-libs/gdal/files/gdal-1.8.1-zlib_header_fix.patch @@ -0,0 +1,13 @@ +--- port/cpl_minizip_ioapi.h.orig 2011-09-25 13:38:22.000000000 -0700 ++++ port/cpl_minizip_ioapi.h 2011-09-25 13:39:22.000000000 -0700 +@@ -41,6 +41,10 @@ + #endif + #endif + ++#ifndef OF ++#define OF(x) x ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif diff --git a/sci-libs/gdal/files/gdal-1.9.1-ruby-makefile.patch b/sci-libs/gdal/files/gdal-1.9.1-ruby-makefile.patch new file mode 100644 index 00000000000..b98f6840352 --- /dev/null +++ b/sci-libs/gdal/files/gdal-1.9.1-ruby-makefile.patch @@ -0,0 +1,43 @@ +diff -urN gdal-1.9.1.old//swig/ruby/RubyMakefile.mk gdal-1.9.1/swig/ruby/RubyMakefile.mk +--- gdal-1.9.1.old//swig/ruby/RubyMakefile.mk 2012-05-25 19:54:12.073974979 +0200 ++++ gdal-1.9.1/swig/ruby/RubyMakefile.mk 2012-05-25 19:56:56.014977833 +0200 +@@ -37,13 +37,13 @@ + + ifeq ("$(shell uname -s)", "Darwin") + RUBY_MODULES=$(RUBY_MODULES_MAC) +-LDFLAGS += -Xcompiler -bundle -L$(RUBY_LIB_DIR) +-RUBY_LIB := -l$(RUBY_SO_NAME) + else + RUBY_MODULES=$(RUBY_MODULES_LIN) +-LDFLAGS += -Xcompiler -shared -L$(RUBY_LIB_DIR) +-RUBY_LIB := -l$(RUBY_SO_NAME) + endif ++LDFLAGS += -fPIC -DPIC -shared -L$(RUBY_LIB_DIR) ++CFLAGS += -fPIC -DPIC ++CXXFLAGS += -fPIC -DPIC ++RUBY_LIB := -l$(RUBY_SO_NAME) + + build: $(RUBY_MODULES) + +@@ -59,7 +59,7 @@ + $(INSTALL_DIR): + mkdir -p $(DESTDIR)$(INSTALL_DIR) + +-install: $(INSTALL_DIR) ++install: $(INSTALL_DIR) $(RUBY_MODULES) + for i in $(RUBY_MODULES) ; do $(INSTALL) $$i $(DESTDIR)$(INSTALL_DIR) ; done + + $(RUBY_MODULES_MAC): %.bundle: %_wrap.o +@@ -69,10 +69,10 @@ + $(LD) $(LDFLAGS) $(LIBS) $(GDAL_SLIB_LINK) $(RUBY_LIB) $< -o $@ + + %.o: %.cpp +- $(CXX) $(CFLAGS) $(GDAL_INCLUDE) $(RUBY_INCLUDE) -c $< ++ $(CXX) $(CXXFLAGS) $(GDAL_INCLUDE) $(RUBY_INCLUDE) -c $< + + %.o: %.cxx +- $(CXX) $(CFLAGS) $(GDAL_INCLUDE) $(RUBY_INCLUDE) -c $< ++ $(CXX) $(CXXFLAGS) $(GDAL_INCLUDE) $(RUBY_INCLUDE) -c $< + + %.o: %.c + $(CC) $(CFLAGS) $(GDAL_INCLUDE) $(RUBY_INCLUDE) -c $< diff --git a/sci-libs/gdal/gdal-1.11.1-r3.ebuild b/sci-libs/gdal/gdal-1.11.1-r3.ebuild new file mode 100644 index 00000000000..f1a5d5ee29e --- /dev/null +++ b/sci-libs/gdal/gdal-1.11.1-r3.ebuild @@ -0,0 +1,349 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +WANT_AUTOCONF="2.5" + +GENTOO_DEPEND_ON_PERL="no" +PYTHON_COMPAT=( python2_7 python3_{3,4} ) +DISTUTILS_OPTIONAL=1 + +inherit autotools eutils libtool perl-module distutils-r1 python-r1 toolchain-funcs java-pkg-opt-2 + +DESCRIPTION="Translator library for raster geospatial data formats (includes OGR support)" +HOMEPAGE="http://www.gdal.org/" +SRC_URI="http://download.osgeo.org/${PN}/${PV}/${P}.tar.gz" + +SLOT="0" +LICENSE="MIT" +KEYWORDS="amd64 ~arm ppc ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" +IUSE="armadillo +aux_xml curl debug doc fits geos gif gml hdf5 java jpeg jpeg2k mdb mysql netcdf odbc ogdi opencl pdf perl png postgres python ruby spatialite sqlite threads xls" + +RDEPEND=" + dev-libs/expat + dev-libs/json-c + dev-libs/libpcre + dev-libs/libxml2 + media-libs/tiff:0= + sci-libs/libgeotiff + sys-libs/zlib[minizip(+)] + armadillo? ( sci-libs/armadillo[lapack] ) + curl? ( net-misc/curl ) + fits? ( sci-libs/cfitsio ) + geos? ( >=sci-libs/geos-2.2.1 ) + gif? ( media-libs/giflib ) + gml? ( >=dev-libs/xerces-c-3 ) + hdf5? ( >=sci-libs/hdf5-1.6.4[szip] ) + java? ( >=virtual/jre-1.6:* ) + jpeg? ( virtual/jpeg:0= ) + jpeg2k? ( media-libs/jasper ) + mysql? ( virtual/mysql ) + netcdf? ( sci-libs/netcdf ) + odbc? ( dev-db/unixODBC ) + ogdi? ( sci-libs/ogdi ) + opencl? ( virtual/opencl ) + pdf? ( >=app-text/poppler-0.24.3:= ) + perl? ( dev-lang/perl:= ) + png? ( media-libs/libpng:0= ) + postgres? ( >=dev-db/postgresql-8.4:= ) + python? ( + ${PYTHON_DEPS} + dev-python/setuptools[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + ) + ruby? ( dev-lang/ruby:1.9 ) + sqlite? ( dev-db/sqlite:3 ) + spatialite? ( dev-db/spatialite ) + xls? ( dev-libs/freexl ) +" + +SWIG_DEP=">=dev-lang/swig-2.0.2 <=dev-lang/swig-3.0.4" +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen ) + java? ( >=virtual/jdk-1.6 ) + perl? ( ${SWIG_DEP} ) + python? ( ${SWIG_DEP} ) + ruby? ( ${SWIG_DEP} )" + +AT_M4DIR="${S}/m4" +MAKEOPTS+=" -j1" + +REQUIRED_USE=" + spatialite? ( sqlite ) + mdb? ( java ) +" + +pkg_setup() { + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + java-pkg-opt-2_src_prepare + + # fix datadir and docdir placement + sed -i \ + -e "s:@datadir@:@datadir@/gdal:" \ + -e "s:@exec_prefix@/doc:@exec_prefix@/share/doc/${PF}/html:g" \ + "${S}"/GDALmake.opt.in || die + + # the second sed expression should fix bug 371075 + sed -i \ + -e "s:setup.py install:setup.py install --root=\$(DESTDIR):" \ + -e "s:--prefix=\$(DESTDIR):--prefix=:" \ + "${S}"/swig/python/GNUmakefile || die + + epatch "${FILESDIR}"/${PN}-1.10.0-ruby-makefile.patch + + # -soname is only accepted by GNU ld/ELF + [[ ${CHOST} == *-darwin* ]] \ + && epatch "${FILESDIR}"/${PN}-1.5.0-install_name.patch \ + || epatch "${FILESDIR}"/${PN}-1.5.0-soname.patch + + # Fix spatialite/sqlite include issue + sed -i \ + -e 's:spatialite/sqlite3.h:sqlite3.h:g' \ + ogr/ogrsf_frmts/sqlite/ogr_sqlite.h || die + + # Fix freexl configure check + sed -i \ + -e 's:FREEXL_LIBS=missing):FREEXL_LIBS=missing,-lm):g' \ + configure.in || die + + sed \ + -e "s: /usr/: \"${EPREFIX}\"/usr/:g" \ + -i configure.in || die + + sed \ + -e 's:^ar:$(AR):g' \ + -i ogr/ogrsf_frmts/sdts/install-libs.sh || die + + # Fix swig-3.0.3 problem (bug #534168) + epatch "${FILESDIR}"/${PN}-1.11.1-swig-3.0.3.patch + + # bug 540132 + epatch "${FILESDIR}"/${PN}-1.11.1-poppler-0.31.0-support.patch + + tc-export AR RANLIB + + eautoreconf + + prepare_python() { + mkdir -p "${BUILD_DIR}" || die + find "${S}" -type d -maxdepth 1 -exec ln -s {} "${BUILD_DIR}"/ \; ||die + find "${S}" -type f -maxdepth 1 -exec cp --target="${BUILD_DIR}"/ {} + ||die +# mkdir -p "${BUILD_DIR}"/swig/python || die +# mkdir -p "${BUILD_DIR}"/apps || die +# cp -dpR --target="${BUILD_DIR}"/swig/ \ +# "${S}"/swig/{python,SWIGmake.base,GNUmakefile} || die +# ln -s "${S}"/swig/include "${BUILD_DIR}"/swig/ || die +# ln -s "${S}"/apps/gdal-config "${BUILD_DIR}"/apps/ || die +# ln -s "${S}"/port "${BUILD_DIR}"/ || die + } + if use python; then + python_foreach_impl prepare_python + fi +} + +gdal_src_configure() { + local myopts="" + + if use ruby; then + RUBY_MOD_DIR="$(ruby19 -r rbconfig -e 'print RbConfig::CONFIG["sitearchdir"]')" + echo "Ruby module dir is: $RUBY_MOD_DIR" + fi + + if use java; then + myopts+=" + --with-java=$(java-config --jdk-home 2>/dev/null) + $(use_with mdb)" + else + myopts+=" --without-java --without-mdb" + use mdb && ewarn "mdb requires java use enabled. disabling" + fi + + if use sqlite; then + myopts+=" LIBS=-lsqlite3" + fi + + # pcidsk is internal, because there is no such library yet released + # also that thing is developed by the gdal people + # kakadu, mrsid jp2mrsid - another jpeg2k stuff, ignore + # bsb - legal issues + # oracle - disabled, i dont have and can't test + # ingres - same story as oracle oci + # podofo - we use poppler instead they are exclusive for each other + # tiff is a hard dep + ECONF_SOURCE="${S}" econf \ + --includedir="${EPREFIX}/usr/include/${PN}" \ + --disable-static \ + --enable-shared \ + --with-expat \ + --with-geotiff \ + --with-grib \ + --with-libtiff \ + --with-libz="${EPREFIX}/usr/" \ + --with-ogr \ + --without-bsb \ + --without-dods-root \ + --without-dwgdirect \ + --without-epsilon \ + --without-fme \ + --without-grass \ + --without-hdf4 \ + --without-idb \ + --without-ingres \ + --without-jp2mrsid \ + --without-kakadu \ + --without-libtool \ + --without-mrsid \ + --without-msg \ + --without-oci \ + --without-pcraster \ + --without-podofo \ + --without-sde \ + $(use_enable debug) \ + $(use_with armadillo) \ + $(use_with aux_xml pam) \ + $(use_with curl) \ + --without-ecw \ + $(use_with fits cfitsio) \ + $(use_with geos) \ + $(use_with gif) \ + $(use_with gml xerces) \ + $(use_with hdf5) \ + $(use_with jpeg pcidsk) \ + $(use_with jpeg) \ + $(use_with jpeg2k jasper) \ + $(use_with mysql mysql "${EPREFIX}"/usr/bin/mysql_config) \ + $(use_with netcdf) \ + $(use_with odbc) \ + $(use_with ogdi ogdi "${EPREFIX}"/usr) \ + $(use_with opencl) \ + $(use_with pdf poppler) \ + $(use_with perl) \ + $(use_with png) \ + $(use_with postgres pg) \ + $(use_with python) \ + $(use_with ruby) \ + $(use_with spatialite) \ + $(use_with sqlite sqlite3 "${EPREFIX}"/usr) \ + $(use_with threads) \ + $(use_with xls freexl) \ + ${myopts} + + # mysql-config puts this in (and boy is it a PITA to get it out) + if use mysql; then + sed -i \ + -e "s: -rdynamic : :" \ + GDALmake.opt || die "sed LIBS failed" + fi + + if [[ -n $use_python ]]; then + # updated for newer swig (must specify the path to input files) + sed -i \ + -e "s: gdal_array.i: ../include/gdal_array.i:" \ + -e "s:\$(DESTDIR)\$(prefix):\$(DESTDIR)\$(INST_PREFIX):g" \ + swig/python/GNUmakefile || die "sed python makefile failed" + sed -i \ + -e "s:library_dirs = :library_dirs = /usr/$(get_libdir):g" \ + swig/python/setup.cfg || die "sed python setup.cfg failed" +# -e "s:gdal_config=.*$:gdal_config=../../../apps/gdal-config:g" \ + fi +} + +src_configure() { + local use_python="" + + gdal_src_configure + + if use python; then + use_python="yes" + python_foreach_impl run_in_build_dir gdal_src_configure + fi +} + +src_compile() { + local i + for i in perl ruby; do + if use $i; then + rm "${S}"/swig/$i/*_wrap.cpp + emake -C "${S}"/swig/$i generate + fi + done + + default + + if use perl ; then + pushd "${S}"/swig/perl > /dev/null + perl-module_src_configure + perl-module_src_compile + popd > /dev/null + fi + + use doc && emake docs + + compile_python() { + rm -f swig/python/*_wrap.cpp + emake -C swig/python generate + emake -C swig/python build + } + if use python; then + python_foreach_impl run_in_build_dir compile_python + fi +} + +src_install() { + if use perl ; then + pushd "${S}"/swig/perl > /dev/null + perl-module_src_install + popd > /dev/null + sed -i \ + -e "s:BINDINGS = python ruby perl:BINDINGS = python ruby:g" \ + GDALmake.opt || die + fi + + default + + if use ruby ; then + # weird reinstall collision; needs manual intervention... + pushd "${S}"/swig/ruby > /dev/null + rm -rf "${D}"${RUBY_MOD_DIR}/gdal + exeinto ${RUBY_MOD_DIR}/gdal + doexe *.so || die "doins ruby modules failed" + popd > /dev/null + fi + + use perl && perl_delete_localpod + + dodoc Doxyfile HOWTO-RELEASE NEWS + + if use doc ; then + dohtml html/* + docinto ogr + dohtml ogr/html/* + fi + + install_python() { + emake -C swig/python DESTDIR="${D}" install + } + if use python; then + python_foreach_impl run_in_build_dir install_python + newdoc swig/python/README.txt README-python.txt + insinto /usr/share/${PN}/samples + doins swig/python/samples/* + python_replicate_script "${ED}"/usr/bin/*py + fi + + pushd man/man1 > /dev/null + for i in * ; do + newman ${i} ${i} + done + popd > /dev/null +} + +pkg_postinst() { + elog "Check available image and data formats after building with" + elog "gdalinfo and ogrinfo (using the --formats switch)." +} diff --git a/sci-libs/gdal/gdal-1.11.2.ebuild b/sci-libs/gdal/gdal-1.11.2.ebuild new file mode 100644 index 00000000000..02531a38d10 --- /dev/null +++ b/sci-libs/gdal/gdal-1.11.2.ebuild @@ -0,0 +1,346 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +WANT_AUTOCONF="2.5" + +GENTOO_DEPEND_ON_PERL="no" +PYTHON_COMPAT=( python2_7 python3_{3,4} ) +DISTUTILS_OPTIONAL=1 + +inherit autotools eutils libtool perl-module distutils-r1 python-r1 toolchain-funcs java-pkg-opt-2 + +DESCRIPTION="Translator library for raster geospatial data formats (includes OGR support)" +HOMEPAGE="http://www.gdal.org/" +SRC_URI="http://download.osgeo.org/${PN}/${PV}/${P}.tar.gz" + +SLOT="0" +LICENSE="MIT" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" +IUSE="armadillo +aux_xml curl debug doc fits geos gif gml hdf5 java jpeg jpeg2k mdb mysql netcdf odbc ogdi opencl pdf perl png postgres python ruby spatialite sqlite threads xls" + +RDEPEND=" + dev-libs/expat + dev-libs/json-c + dev-libs/libpcre + dev-libs/libxml2 + media-libs/tiff:0= + sci-libs/libgeotiff + sys-libs/zlib[minizip(+)] + armadillo? ( sci-libs/armadillo[lapack] ) + curl? ( net-misc/curl ) + fits? ( sci-libs/cfitsio ) + geos? ( >=sci-libs/geos-2.2.1 ) + gif? ( media-libs/giflib ) + gml? ( >=dev-libs/xerces-c-3 ) + hdf5? ( >=sci-libs/hdf5-1.6.4[szip] ) + java? ( >=virtual/jre-1.6:* ) + jpeg? ( virtual/jpeg:0= ) + jpeg2k? ( media-libs/jasper ) + mysql? ( virtual/mysql ) + netcdf? ( sci-libs/netcdf ) + odbc? ( dev-db/unixODBC ) + ogdi? ( sci-libs/ogdi ) + opencl? ( virtual/opencl ) + pdf? ( >=app-text/poppler-0.24.3:= ) + perl? ( dev-lang/perl:= ) + png? ( media-libs/libpng:0= ) + postgres? ( >=dev-db/postgresql-8.4:= ) + python? ( + ${PYTHON_DEPS} + dev-python/setuptools[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + ) + ruby? ( dev-lang/ruby:1.9 ) + sqlite? ( dev-db/sqlite:3 ) + spatialite? ( dev-db/spatialite ) + xls? ( dev-libs/freexl ) +" + +SWIG_DEP=">=dev-lang/swig-2.0.2 <=dev-lang/swig-3.0.4" +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen ) + java? ( >=virtual/jdk-1.6 ) + perl? ( ${SWIG_DEP} ) + python? ( ${SWIG_DEP} ) + ruby? ( ${SWIG_DEP} )" + +AT_M4DIR="${S}/m4" +MAKEOPTS+=" -j1" + +REQUIRED_USE=" + spatialite? ( sqlite ) + mdb? ( java ) +" + +pkg_setup() { + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + java-pkg-opt-2_src_prepare + + # fix datadir and docdir placement + sed -i \ + -e "s:@datadir@:@datadir@/gdal:" \ + -e "s:@exec_prefix@/doc:@exec_prefix@/share/doc/${PF}/html:g" \ + "${S}"/GDALmake.opt.in || die + + # the second sed expression should fix bug 371075 + sed -i \ + -e "s:setup.py install:setup.py install --root=\$(DESTDIR):" \ + -e "s:--prefix=\$(DESTDIR):--prefix=:" \ + "${S}"/swig/python/GNUmakefile || die + + epatch "${FILESDIR}"/${PN}-1.10.0-ruby-makefile.patch + + # -soname is only accepted by GNU ld/ELF + [[ ${CHOST} == *-darwin* ]] \ + && epatch "${FILESDIR}"/${PN}-1.5.0-install_name.patch \ + || epatch "${FILESDIR}"/${PN}-1.5.0-soname.patch + + # Fix spatialite/sqlite include issue + sed -i \ + -e 's:spatialite/sqlite3.h:sqlite3.h:g' \ + ogr/ogrsf_frmts/sqlite/ogr_sqlite.h || die + + # Fix freexl configure check + sed -i \ + -e 's:FREEXL_LIBS=missing):FREEXL_LIBS=missing,-lm):g' \ + configure.in || die + + sed \ + -e "s: /usr/: \"${EPREFIX}\"/usr/:g" \ + -i configure.in || die + + sed \ + -e 's:^ar:$(AR):g' \ + -i ogr/ogrsf_frmts/sdts/install-libs.sh || die + + # bug 540132 + epatch "${FILESDIR}"/${PN}-1.11.1-poppler-0.31.0-support.patch + + tc-export AR RANLIB + + eautoreconf + + prepare_python() { + mkdir -p "${BUILD_DIR}" || die + find "${S}" -type d -maxdepth 1 -exec ln -s {} "${BUILD_DIR}"/ \; ||die + find "${S}" -type f -maxdepth 1 -exec cp --target="${BUILD_DIR}"/ {} + ||die +# mkdir -p "${BUILD_DIR}"/swig/python || die +# mkdir -p "${BUILD_DIR}"/apps || die +# cp -dpR --target="${BUILD_DIR}"/swig/ \ +# "${S}"/swig/{python,SWIGmake.base,GNUmakefile} || die +# ln -s "${S}"/swig/include "${BUILD_DIR}"/swig/ || die +# ln -s "${S}"/apps/gdal-config "${BUILD_DIR}"/apps/ || die +# ln -s "${S}"/port "${BUILD_DIR}"/ || die + } + if use python; then + python_foreach_impl prepare_python + fi +} + +gdal_src_configure() { + local myopts="" + + if use ruby; then + RUBY_MOD_DIR="$(ruby19 -r rbconfig -e 'print RbConfig::CONFIG["sitearchdir"]')" + echo "Ruby module dir is: $RUBY_MOD_DIR" + fi + + if use java; then + myopts+=" + --with-java=$(java-config --jdk-home 2>/dev/null) + $(use_with mdb)" + else + myopts+=" --without-java --without-mdb" + use mdb && ewarn "mdb requires java use enabled. disabling" + fi + + if use sqlite; then + myopts+=" LIBS=-lsqlite3" + fi + + # pcidsk is internal, because there is no such library yet released + # also that thing is developed by the gdal people + # kakadu, mrsid jp2mrsid - another jpeg2k stuff, ignore + # bsb - legal issues + # oracle - disabled, i dont have and can't test + # ingres - same story as oracle oci + # podofo - we use poppler instead they are exclusive for each other + # tiff is a hard dep + ECONF_SOURCE="${S}" econf \ + --includedir="${EPREFIX}/usr/include/${PN}" \ + --disable-static \ + --enable-shared \ + --with-expat \ + --with-geotiff \ + --with-grib \ + --with-libtiff \ + --with-libz="${EPREFIX}/usr/" \ + --with-ogr \ + --without-bsb \ + --without-dods-root \ + --without-dwgdirect \ + --without-epsilon \ + --without-fme \ + --without-grass \ + --without-hdf4 \ + --without-idb \ + --without-ingres \ + --without-jp2mrsid \ + --without-kakadu \ + --without-libtool \ + --without-mrsid \ + --without-msg \ + --without-oci \ + --without-pcraster \ + --without-podofo \ + --without-sde \ + $(use_enable debug) \ + $(use_with armadillo) \ + $(use_with aux_xml pam) \ + $(use_with curl) \ + --without-ecw \ + $(use_with fits cfitsio) \ + $(use_with geos) \ + $(use_with gif) \ + $(use_with gml xerces) \ + $(use_with hdf5) \ + $(use_with jpeg pcidsk) \ + $(use_with jpeg) \ + $(use_with jpeg2k jasper) \ + $(use_with mysql mysql "${EPREFIX}"/usr/bin/mysql_config) \ + $(use_with netcdf) \ + $(use_with odbc) \ + $(use_with ogdi ogdi "${EPREFIX}"/usr) \ + $(use_with opencl) \ + $(use_with pdf poppler) \ + $(use_with perl) \ + $(use_with png) \ + $(use_with postgres pg) \ + $(use_with python) \ + $(use_with ruby) \ + $(use_with spatialite) \ + $(use_with sqlite sqlite3 "${EPREFIX}"/usr) \ + $(use_with threads) \ + $(use_with xls freexl) \ + ${myopts} + + # mysql-config puts this in (and boy is it a PITA to get it out) + if use mysql; then + sed -i \ + -e "s: -rdynamic : :" \ + GDALmake.opt || die "sed LIBS failed" + fi + + if [[ -n $use_python ]]; then + # updated for newer swig (must specify the path to input files) + sed -i \ + -e "s: gdal_array.i: ../include/gdal_array.i:" \ + -e "s:\$(DESTDIR)\$(prefix):\$(DESTDIR)\$(INST_PREFIX):g" \ + swig/python/GNUmakefile || die "sed python makefile failed" + sed -i \ + -e "s:library_dirs = :library_dirs = /usr/$(get_libdir):g" \ + swig/python/setup.cfg || die "sed python setup.cfg failed" +# -e "s:gdal_config=.*$:gdal_config=../../../apps/gdal-config:g" \ + fi +} + +src_configure() { + local use_python="" + + gdal_src_configure + + if use python; then + use_python="yes" + python_foreach_impl run_in_build_dir gdal_src_configure + fi +} + +src_compile() { + local i + for i in perl ruby; do + if use $i; then + rm "${S}"/swig/$i/*_wrap.cpp + emake -C "${S}"/swig/$i generate + fi + done + + default + + if use perl ; then + pushd "${S}"/swig/perl > /dev/null + perl-module_src_configure + perl-module_src_compile + popd > /dev/null + fi + + use doc && emake docs + + compile_python() { + rm -f swig/python/*_wrap.cpp + emake -C swig/python generate + emake -C swig/python build + } + if use python; then + python_foreach_impl run_in_build_dir compile_python + fi +} + +src_install() { + if use perl ; then + pushd "${S}"/swig/perl > /dev/null + perl-module_src_install + popd > /dev/null + sed -i \ + -e "s:BINDINGS = python ruby perl:BINDINGS = python ruby:g" \ + GDALmake.opt || die + fi + + default + + if use ruby ; then + # weird reinstall collision; needs manual intervention... + pushd "${S}"/swig/ruby > /dev/null + rm -rf "${D}"${RUBY_MOD_DIR}/gdal + exeinto ${RUBY_MOD_DIR}/gdal + doexe *.so || die "doins ruby modules failed" + popd > /dev/null + fi + + use perl && perl_delete_localpod + + dodoc Doxyfile HOWTO-RELEASE NEWS + + if use doc ; then + dohtml html/* + docinto ogr + dohtml ogr/html/* + fi + + install_python() { + emake -C swig/python DESTDIR="${D}" install + } + if use python; then + python_foreach_impl run_in_build_dir install_python + newdoc swig/python/README.txt README-python.txt + insinto /usr/share/${PN}/samples + doins swig/python/samples/* + python_replicate_script "${ED}"/usr/bin/*py + fi + + pushd man/man1 > /dev/null + for i in * ; do + newman ${i} ${i} + done + popd > /dev/null +} + +pkg_postinst() { + elog "Check available image and data formats after building with" + elog "gdalinfo and ogrinfo (using the --formats switch)." +} diff --git a/sci-libs/gdal/gdal-2.0.0.ebuild b/sci-libs/gdal/gdal-2.0.0.ebuild new file mode 100644 index 00000000000..f94de1354b4 --- /dev/null +++ b/sci-libs/gdal/gdal-2.0.0.ebuild @@ -0,0 +1,343 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +WANT_AUTOCONF="2.5" + +GENTOO_DEPEND_ON_PERL="no" +PYTHON_COMPAT=( python2_7 python3_{3,4} ) +DISTUTILS_OPTIONAL=1 + +inherit autotools eutils libtool perl-module distutils-r1 python-r1 toolchain-funcs java-pkg-opt-2 + +DESCRIPTION="Translator library for raster geospatial data formats (includes OGR support)" +HOMEPAGE="http://www.gdal.org/" +SRC_URI="http://download.osgeo.org/${PN}/${PV}/${P}.tar.gz" + +SLOT="0" +LICENSE="MIT" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" +IUSE="armadillo +aux_xml curl debug doc fits geos gif gml hdf5 java jpeg jpeg2k mdb mysql netcdf odbc ogdi opencl pdf perl png postgres python ruby spatialite sqlite threads xls" + +RDEPEND=" + dev-libs/expat + dev-libs/json-c + dev-libs/libpcre + dev-libs/libxml2 + media-libs/tiff:0= + sci-libs/libgeotiff + sys-libs/zlib[minizip(+)] + armadillo? ( sci-libs/armadillo[lapack] ) + curl? ( net-misc/curl ) + fits? ( sci-libs/cfitsio ) + geos? ( >=sci-libs/geos-2.2.1 ) + gif? ( media-libs/giflib ) + gml? ( >=dev-libs/xerces-c-3 ) + hdf5? ( >=sci-libs/hdf5-1.6.4[szip] ) + java? ( >=virtual/jre-1.6:* ) + jpeg? ( virtual/jpeg:0= ) + jpeg2k? ( media-libs/jasper ) + mysql? ( virtual/mysql ) + netcdf? ( sci-libs/netcdf ) + odbc? ( dev-db/unixODBC ) + ogdi? ( sci-libs/ogdi ) + opencl? ( virtual/opencl ) + pdf? ( >=app-text/poppler-0.24.3:= ) + perl? ( dev-lang/perl:= ) + png? ( media-libs/libpng:0= ) + postgres? ( >=dev-db/postgresql-8.4:= ) + python? ( + ${PYTHON_DEPS} + dev-python/setuptools[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + ) + ruby? ( dev-lang/ruby:1.9 ) + sqlite? ( dev-db/sqlite:3 ) + spatialite? ( dev-db/spatialite ) + xls? ( dev-libs/freexl ) +" + +SWIG_DEP=">=dev-lang/swig-2.0.2 <=dev-lang/swig-3.0.4" +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen ) + java? ( >=virtual/jdk-1.6 ) + perl? ( ${SWIG_DEP} ) + python? ( ${SWIG_DEP} ) + ruby? ( ${SWIG_DEP} )" + +AT_M4DIR="${S}/m4" +MAKEOPTS+=" -j1" + +REQUIRED_USE=" + spatialite? ( sqlite ) + mdb? ( java ) +" + +pkg_setup() { + java-pkg-opt-2_pkg_setup +} + +src_prepare() { + java-pkg-opt-2_src_prepare + + # fix datadir and docdir placement + sed -i \ + -e "s:@datadir@:@datadir@/gdal:" \ + -e "s:@exec_prefix@/doc:@exec_prefix@/share/doc/${PF}/html:g" \ + "${S}"/GDALmake.opt.in || die + + # the second sed expression should fix bug 371075 + sed -i \ + -e "s:setup.py install:setup.py install --root=\$(DESTDIR):" \ + -e "s:--prefix=\$(DESTDIR):--prefix=:" \ + "${S}"/swig/python/GNUmakefile || die + + epatch "${FILESDIR}"/${PN}-1.10.0-ruby-makefile.patch + + # -soname is only accepted by GNU ld/ELF + [[ ${CHOST} == *-darwin* ]] \ + && epatch "${FILESDIR}"/${PN}-1.5.0-install_name.patch \ + || epatch "${FILESDIR}"/${PN}-1.5.0-soname.patch + + # Fix spatialite/sqlite include issue + sed -i \ + -e 's:spatialite/sqlite3.h:sqlite3.h:g' \ + ogr/ogrsf_frmts/sqlite/ogr_sqlite.h || die + + # Fix freexl configure check + sed -i \ + -e 's:FREEXL_LIBS=missing):FREEXL_LIBS=missing,-lm):g' \ + configure.in || die + + sed \ + -e "s: /usr/: \"${EPREFIX}\"/usr/:g" \ + -i configure.in || die + + sed \ + -e 's:^ar:$(AR):g' \ + -i ogr/ogrsf_frmts/sdts/install-libs.sh || die + + tc-export AR RANLIB + + eautoreconf + + prepare_python() { + mkdir -p "${BUILD_DIR}" || die + find "${S}" -type d -maxdepth 1 -exec ln -s {} "${BUILD_DIR}"/ \; ||die + find "${S}" -type f -maxdepth 1 -exec cp --target="${BUILD_DIR}"/ {} + ||die +# mkdir -p "${BUILD_DIR}"/swig/python || die +# mkdir -p "${BUILD_DIR}"/apps || die +# cp -dpR --target="${BUILD_DIR}"/swig/ \ +# "${S}"/swig/{python,SWIGmake.base,GNUmakefile} || die +# ln -s "${S}"/swig/include "${BUILD_DIR}"/swig/ || die +# ln -s "${S}"/apps/gdal-config "${BUILD_DIR}"/apps/ || die +# ln -s "${S}"/port "${BUILD_DIR}"/ || die + } + if use python; then + python_foreach_impl prepare_python + fi +} + +gdal_src_configure() { + local myopts="" + + if use ruby; then + RUBY_MOD_DIR="$(ruby19 -r rbconfig -e 'print RbConfig::CONFIG["sitearchdir"]')" + echo "Ruby module dir is: $RUBY_MOD_DIR" + fi + + if use java; then + myopts+=" + --with-java=$(java-config --jdk-home 2>/dev/null) + $(use_with mdb)" + else + myopts+=" --without-java --without-mdb" + use mdb && ewarn "mdb requires java use enabled. disabling" + fi + + if use sqlite; then + myopts+=" LIBS=-lsqlite3" + fi + + # pcidsk is internal, because there is no such library yet released + # also that thing is developed by the gdal people + # kakadu, mrsid jp2mrsid - another jpeg2k stuff, ignore + # bsb - legal issues + # oracle - disabled, i dont have and can't test + # ingres - same story as oracle oci + # podofo - we use poppler instead they are exclusive for each other + # tiff is a hard dep + ECONF_SOURCE="${S}" econf \ + --includedir="${EPREFIX}/usr/include/${PN}" \ + --disable-static \ + --enable-shared \ + --with-expat \ + --with-geotiff \ + --with-grib \ + --with-libtiff \ + --with-libz="${EPREFIX}/usr/" \ + --with-ogr \ + --without-bsb \ + --without-dods-root \ + --without-dwgdirect \ + --without-epsilon \ + --without-fme \ + --without-grass \ + --without-hdf4 \ + --without-idb \ + --without-ingres \ + --without-jp2mrsid \ + --without-kakadu \ + --without-libtool \ + --without-mrsid \ + --without-msg \ + --without-oci \ + --without-pcraster \ + --without-podofo \ + --without-sde \ + $(use_enable debug) \ + $(use_with armadillo) \ + $(use_with aux_xml pam) \ + $(use_with curl) \ + --without-ecw \ + $(use_with fits cfitsio) \ + $(use_with geos) \ + $(use_with gif) \ + $(use_with gml xerces) \ + $(use_with hdf5) \ + $(use_with jpeg pcidsk) \ + $(use_with jpeg) \ + $(use_with jpeg2k jasper) \ + $(use_with mysql mysql "${EPREFIX}"/usr/bin/mysql_config) \ + $(use_with netcdf) \ + $(use_with odbc) \ + $(use_with ogdi ogdi "${EPREFIX}"/usr) \ + $(use_with opencl) \ + $(use_with pdf poppler) \ + $(use_with perl) \ + $(use_with png) \ + $(use_with postgres pg) \ + $(use_with python) \ + $(use_with ruby) \ + $(use_with spatialite) \ + $(use_with sqlite sqlite3 "${EPREFIX}"/usr) \ + $(use_with threads) \ + $(use_with xls freexl) \ + ${myopts} + + # mysql-config puts this in (and boy is it a PITA to get it out) + if use mysql; then + sed -i \ + -e "s: -rdynamic : :" \ + GDALmake.opt || die "sed LIBS failed" + fi + + if [[ -n $use_python ]]; then + # updated for newer swig (must specify the path to input files) + sed -i \ + -e "s: gdal_array.i: ../include/gdal_array.i:" \ + -e "s:\$(DESTDIR)\$(prefix):\$(DESTDIR)\$(INST_PREFIX):g" \ + swig/python/GNUmakefile || die "sed python makefile failed" + sed -i \ + -e "s:library_dirs = :library_dirs = /usr/$(get_libdir):g" \ + swig/python/setup.cfg || die "sed python setup.cfg failed" +# -e "s:gdal_config=.*$:gdal_config=../../../apps/gdal-config:g" \ + fi +} + +src_configure() { + local use_python="" + + gdal_src_configure + + if use python; then + use_python="yes" + python_foreach_impl run_in_build_dir gdal_src_configure + fi +} + +src_compile() { + local i + for i in perl ruby; do + if use $i; then + rm "${S}"/swig/$i/*_wrap.cpp + emake -C "${S}"/swig/$i generate + fi + done + + default + + if use perl ; then + pushd "${S}"/swig/perl > /dev/null + perl-module_src_configure + perl-module_src_compile + popd > /dev/null + fi + + use doc && emake docs + + compile_python() { + rm -f swig/python/*_wrap.cpp + emake -C swig/python generate + emake -C swig/python build + } + if use python; then + python_foreach_impl run_in_build_dir compile_python + fi +} + +src_install() { + if use perl ; then + pushd "${S}"/swig/perl > /dev/null + perl-module_src_install + popd > /dev/null + sed -i \ + -e "s:BINDINGS = python ruby perl:BINDINGS = python ruby:g" \ + GDALmake.opt || die + fi + + default + + if use ruby ; then + # weird reinstall collision; needs manual intervention... + pushd "${S}"/swig/ruby > /dev/null + rm -rf "${D}"${RUBY_MOD_DIR}/gdal + exeinto ${RUBY_MOD_DIR}/gdal + doexe *.so || die "doins ruby modules failed" + popd > /dev/null + fi + + use perl && perl_delete_localpod + + dodoc Doxyfile HOWTO-RELEASE NEWS + + if use doc ; then + dohtml html/* + docinto ogr + dohtml ogr/html/* + fi + + install_python() { + emake -C swig/python DESTDIR="${D}" install + } + if use python; then + python_foreach_impl run_in_build_dir install_python + newdoc swig/python/README.txt README-python.txt + insinto /usr/share/${PN}/samples + doins swig/python/samples/* + python_replicate_script "${ED}"/usr/bin/*py + fi + + pushd man/man1 > /dev/null + for i in * ; do + newman ${i} ${i} + done + popd > /dev/null +} + +pkg_postinst() { + elog "Check available image and data formats after building with" + elog "gdalinfo and ogrinfo (using the --formats switch)." +} diff --git a/sci-libs/gdal/metadata.xml b/sci-libs/gdal/metadata.xml new file mode 100644 index 00000000000..943ca939380 --- /dev/null +++ b/sci-libs/gdal/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>sci-geosciences</herd> + <longdescription> +GDAL is the Geospatial Data Abstraction Library, a set of tools for +converting between geospatial raster data formats (includes OGR for +vector data). +</longdescription> + <use> + <flag name="armadillo">Use <pkg>sci-libs/armadillo</pkg> for faster TPS transform computation</flag> + <flag name="aux_xml">Enable Portable Auxilliary Metadata generation</flag> + <flag name="fits">Enable support for NASA's <pkg>sci-libs/cfitsio</pkg> library</flag> + <flag name="geos">Add support for geometry engine (<pkg>sci-libs/geos</pkg>)</flag> + <flag name="gml">Enable support for <pkg>dev-libs/xerces-c</pkg> C++ API</flag> + <flag name="hdf5">Add support for the Hierarchical Data Format v5 (<pkg>sci-libs/hdf5</pkg>)</flag> + <flag name="mdb">Enable support for Microsoft Access database</flag> + <flag name="spatialite">Enable Spatial DBMS over sqlite <pkg>dev-db/spatialite</pkg></flag> + <flag name="opencl">Enable OpenCL support</flag> + <flag name="ogdi">Enable support for the open geographic datastore interface (<pkg>sci-libs/ogdi</pkg>)</flag> + <flag name="xls">Add the <pkg>dev-libs/freexl</pkg> library for xls import support</flag> + </use> +</pkgmetadata> |