From abe382d8cd2e1fa6d80fb1c2bfdd966076325a7b Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 23 Aug 2014 14:09:12 +0000 Subject: [PATCH] gdal: added a building recipe for version 1.11.0 * delete old format recipe --- sci-libs/gdal/gdal-1.11.0.recipe | 142 +++++++++++++++++++++ sci-libs/gdal/gdal-1.7.2.recipe | 28 ---- sci-libs/gdal/patches/gdal-1.11.0.patchset | 141 ++++++++++++++++++++ 3 files changed, 283 insertions(+), 28 deletions(-) create mode 100644 sci-libs/gdal/gdal-1.11.0.recipe delete mode 100644 sci-libs/gdal/gdal-1.7.2.recipe create mode 100644 sci-libs/gdal/patches/gdal-1.11.0.patchset diff --git a/sci-libs/gdal/gdal-1.11.0.recipe b/sci-libs/gdal/gdal-1.11.0.recipe new file mode 100644 index 000000000..f0cadafd6 --- /dev/null +++ b/sci-libs/gdal/gdal-1.11.0.recipe @@ -0,0 +1,142 @@ +SUMMARY="GDAL - Geospatial Data Abstraction Library" +DESCRIPTION=" +GDAL is a translator library for raster and vector geospatial data formats \ +that is released under an X/MIT style OpenSource license by the Open \ +Source Geospatial Foundation. As a library, it presents a single raster \ +abstract data model and vector abstract data model to the calling application \ +for all supported formats. It also comes with a variety of useful \ +commandline utilies for data translation and processing." +HOMEPAGE="http://www.gdal.org" +COPYRIGHT=" + 2007-2014 Even Rouault + 2011 Alessandro Furieri + 1999, 2001, 2002-2003, 2005, 2008 Frank Warmerdam + 2013 Paul Ramsey + 2010 Chaitanya kumar CH + 2005 Radim Blazek + 2009 Leonardo de Paula Rosa Piga + 2006 Oleg Semykin + 2004, 2014 Pirmin Kalberer + 2007 Jens Oberender + 2006 Christopher Condit + 2010 Brian Case + 2000 Daniel Morissette + 2007 Mateusz Loskot + 2008 Shawn Gervais + 2008 Howard Butler + 2013 NextGIS + 2011 Ben Ahmed Daho Ali + 2002 Mark Phillips + 2009-2014 Martin Landa + 2013 ZJU Walkinfo Technology Corp., Ltd. + " +LICENSE="MIT" +SRC_URI="http://download.osgeo.org/gdal/$portVersion/gdal-$portVersion.tar.xz" +CHECKSUM_SHA256="b5186b5817e94743de1bceef66aeee1461687e14f73bf81034fcf0377eacbcc3" +REVISION="1" +ARCHITECTURES="x86 x86_64" +if [ $effectiveTargetArchitecture != x86_gcc2 ]; then + # x86_gcc2 is fine as primary target architecture as long as we're building + # for a different secondary architecture. + ARCHITECTURES="$ARCHITECTURES x86_gcc2" +fi +SECONDARY_ARCHITECTURES="x86" +if [ $targetArchitecture != x86_gcc2 ]; then + commandSuffix= + commandBinDir=$prefix/bin +fi +PATCHES="gdal-$portVersion.patchset" + +PROVIDES=" + gdal$secondaryArchSuffix = $portVersion compat >= 1.11 + lib:libgdal$secondaryArchSuffix = 1.18.0 compat >= 1.18 + cmd:gdal_contour + cmd:gdal_grid + cmd:gdal_rasterize + cmd:gdal_translate + cmd:gdaladdo + cmd:gdalbuildvrt + cmd:gdaldem + cmd:gdalenhance + cmd:gdalinfo + cmd:gdallocationinfo + cmd:gdalmanage + cmd:gdalserver + cmd:gdalsrsinfo + cmd:gdaltindex + cmd:gdaltransform + cmd:gdalwarp + cmd:nearblack + cmd:ogr2ogr + cmd:ogrinfo + cmd:ogrlineref + cmd:ogrtindex + cmd:testepsg + " +REQUIRES=" + haiku$secondaryArchSuffix >= $haikuVersion + lib:libexpat$secondaryArchSuffix + lib:libgeotiff$secondaryArchSuffix + lib:libgif$secondaryArchSuffix >= 7.0.0 + lib:libjpeg$secondaryArchSuffix + lib:libpng$secondaryArchSuffix + lib:libproj$secondaryArchSuffix + lib:libtiff$secondaryArchSuffix + lib:libz$secondaryArchSuffix + lib:libstdc++$secondaryArchSuffix + lib:libiconv$secondaryArchSuffix + " +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel >= $haikuVersion + devel:libexpat$secondaryArchSuffix + devel:libgeotiff$secondaryArchSuffix + devel:libgif$secondaryArchSuffix >= 7.0.0 + devel:libjpeg$secondaryArchSuffix + devel:libpng$secondaryArchSuffix + devel:libproj$secondaryArchSuffix + devel:libtiff$secondaryArchSuffix + devel:libz$secondaryArchSuffix + devel:libiconv$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:aclocal + cmd:autoconf + cmd:automake + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:libtoolize + cmd:make + cmd:pkg_config$secondaryArchSuffix + " + +BUILD() +{ + expatDir=$portPackageLinks/lib~libexpat + autoreconf -fi + runConfigure ./configure --with-expat=$expatDir + make $jobArgs +} + +INSTALL() +{ + make install + + prepareInstalledDevelLibs libgdal + fixPkgconfig + + # devel package + packageEntries devel \ + $binDir/gdal-config \ + $developDir +} + +# ----- devel package ------------------------------------------------------- + +PROVIDES_devel=" + gdal${secondaryArchSuffix}_devel = $portVersion compat >= 1.11 + cmd:gdal_config$secondaryArchSuffix + devel:libgdal$secondaryArchSuffix = 1.18.0 compat >= 1.18 + " +REQUIRES_devel=" + gdal$secondaryArchSuffix == $portVersion base + " diff --git a/sci-libs/gdal/gdal-1.7.2.recipe b/sci-libs/gdal/gdal-1.7.2.recipe deleted file mode 100644 index be839a25e..000000000 --- a/sci-libs/gdal/gdal-1.7.2.recipe +++ /dev/null @@ -1,28 +0,0 @@ -DESCRIPTION="GDAL - Geospatial Data Abstraction Library" -HOMEPAGE="www.gdal.org" -SRC_URI="http://download.osgeo.org/gdal/gdal-1.7.2.tar.gz" -CHECKSUM_MD5="05351f8cb61761ae579667e24a297fe6" -REVISION="1" -STATUS_HAIKU="stable" -MESSAGE="This port only builds with gcc4. Use 'setgcc gcc4' before building." -DEPEND="" -BUILD() -{ - cd gdal-1.7.2 - libtoolize --force --copy --install - ./autogen.sh - ./configure --prefix=`finddir B_COMMON_DIRECTORY` - make -} - -INSTALL() -{ - cd gdal-1.7.2 - make install -} - -LICENSE="MIT" -COPYRIGHT="1996 Hughes and Applied Research Corporation - 1997-2003 Utrecht University - 2002 Industrial Light & Magic - 2009 David F. Rogers" diff --git a/sci-libs/gdal/patches/gdal-1.11.0.patchset b/sci-libs/gdal/patches/gdal-1.11.0.patchset new file mode 100644 index 000000000..bab6f5f21 --- /dev/null +++ b/sci-libs/gdal/patches/gdal-1.11.0.patchset @@ -0,0 +1,141 @@ +From 23a40a62e1324e004098e2dfc163ce102b6bb41b Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Sat, 23 Aug 2014 09:50:06 +0000 +Subject: fix for giblib 5.1.0+ + + +diff --git a/frmts/gif/biggifdataset.cpp b/frmts/gif/biggifdataset.cpp +index f996508..3f43bdb 100644 +--- a/frmts/gif/biggifdataset.cpp ++++ b/frmts/gif/biggifdataset.cpp +@@ -339,7 +339,7 @@ CPLErr BIGGIFDataset::ReOpen() + /* If the file is already open, close it so we can restart. */ + /* -------------------------------------------------------------------- */ + if( hGifFile != NULL ) +- DGifCloseFile( hGifFile ); ++ DGifCloseFile( hGifFile, NULL ); + + /* -------------------------------------------------------------------- */ + /* If we are actually reopening, then we assume that access to */ +@@ -413,7 +413,7 @@ CPLErr BIGGIFDataset::ReOpen() + + if( RecordType != IMAGE_DESC_RECORD_TYPE ) + { +- DGifCloseFile( hGifFile ); ++ DGifCloseFile( hGifFile, NULL ); + hGifFile = NULL; + + CPLError( CE_Failure, CPLE_OpenFailed, +@@ -423,7 +423,7 @@ CPLErr BIGGIFDataset::ReOpen() + + if (DGifGetImageDesc(hGifFile) == GIF_ERROR) + { +- DGifCloseFile( hGifFile ); ++ DGifCloseFile( hGifFile, NULL ); + hGifFile = NULL; + + CPLError( CE_Failure, CPLE_OpenFailed, +diff --git a/frmts/gif/gifabstractdataset.cpp b/frmts/gif/gifabstractdataset.cpp +index 81c6ec3..ee2e192 100644 +--- a/frmts/gif/gifabstractdataset.cpp ++++ b/frmts/gif/gifabstractdataset.cpp +@@ -82,7 +82,7 @@ GIFAbstractDataset::~GIFAbstractDataset() + } + + if( hGifFile ) +- DGifCloseFile( hGifFile ); ++ DGifCloseFile( hGifFile, NULL ); + + if( fp != NULL ) + VSIFCloseL( fp ); +diff --git a/frmts/gif/gifdataset.cpp b/frmts/gif/gifdataset.cpp +index 62a8793..ba0e9c9 100644 +--- a/frmts/gif/gifdataset.cpp ++++ b/frmts/gif/gifdataset.cpp +@@ -386,13 +386,13 @@ GDALDataset *GIFDataset::Open( GDALOpenInfo * poOpenInfo ) + CPLDebug( "GIF", + "Due to limitations of the GDAL GIF driver we deliberately avoid\n" + "opening large GIF files (larger than 100 megapixels)."); +- DGifCloseFile( hGifFile ); ++ DGifCloseFile( hGifFile, NULL ); + VSIFCloseL( fp ); + return NULL; + } + } + +- DGifCloseFile( hGifFile ); ++ DGifCloseFile( hGifFile, NULL ); + + VSIFSeekL( fp, 0, SEEK_SET); + +@@ -417,7 +417,7 @@ GDALDataset *GIFDataset::Open( GDALOpenInfo * poOpenInfo ) + if( nGifErr != GIF_OK || hGifFile->SavedImages == NULL ) + { + VSIFCloseL( fp ); +- DGifCloseFile(hGifFile); ++ DGifCloseFile(hGifFile, NULL); + + if( nGifErr == D_GIF_ERR_DATA_TOO_BIG ) + { +@@ -649,7 +649,7 @@ GIFDataset::CreateCopy( const char * pszFilename, GDALDataset *poSrcDS, + { + GifFreeMapObject(psGifCT); + GDALPrintGifError(hGifFile, "Error writing gif file."); +- EGifCloseFile(hGifFile); ++ EGifCloseFile(hGifFile, NULL); + VSIFCloseL( fp ); + return NULL; + } +@@ -673,7 +673,7 @@ GIFDataset::CreateCopy( const char * pszFilename, GDALDataset *poSrcDS, + if (EGifPutImageDesc(hGifFile, 0, 0, nXSize, nYSize, bInterlace, NULL) == GIF_ERROR ) + { + GDALPrintGifError(hGifFile, "Error writing gif file."); +- EGifCloseFile(hGifFile); ++ EGifCloseFile(hGifFile, NULL); + VSIFCloseL( fp ); + return NULL; + } +@@ -756,7 +756,7 @@ GIFDataset::CreateCopy( const char * pszFilename, GDALDataset *poSrcDS, + /* -------------------------------------------------------------------- */ + /* cleanup */ + /* -------------------------------------------------------------------- */ +- if (EGifCloseFile(hGifFile) == GIF_ERROR) ++ if (EGifCloseFile(hGifFile, NULL) == GIF_ERROR) + { + CPLError( CE_Failure, CPLE_AppDefined, + "EGifCloseFile() failed.\n" ); +@@ -807,7 +807,7 @@ GIFDataset::CreateCopy( const char * pszFilename, GDALDataset *poSrcDS, + + error: + if (hGifFile) +- EGifCloseFile(hGifFile); ++ EGifCloseFile(hGifFile, NULL); + if (fp) + VSIFCloseL( fp ); + if (pabyScanline) +-- +1.8.3.4 + + +From bcdf3ce6740587ccc42a8cbe1741d79853566cec Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Sat, 23 Aug 2014 11:46:17 +0000 +Subject: link with network + + +diff --git a/apps/GNUmakefile b/apps/GNUmakefile +index 77a44ec..5c52554 100644 +--- a/apps/GNUmakefile ++++ b/apps/GNUmakefile +@@ -46,7 +46,7 @@ gdalinfo$(EXE): gdalinfo.$(OBJ_EXT) commonutils.$(OBJ_EXT) $(DEP_LIBS) + $(LD) $(LNK_FLAGS) $< commonutils.$(OBJ_EXT) $(XTRAOBJ) $(CONFIG_LIBS) -o $@ + + gdalserver$(EXE): gdalserver.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $(LNK_FLAGS) -lnetwork $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ + + gdal_translate$(EXE): gdal_translate.$(OBJ_EXT) commonutils.$(OBJ_EXT) $(DEP_LIBS) + $(LD) $(LNK_FLAGS) $< commonutils.$(OBJ_EXT) $(XTRAOBJ) $(CONFIG_LIBS) -o $@ +-- +1.8.3.4 +