[packages/gdal] - updated to 2.0.1 - removed obsolete patches - ruby bindings disabled upstream (broken)
baggins
baggins at pld-linux.org
Sun Dec 6 17:13:55 CET 2015
commit 38239d5e653a2de30e1e8e4d5c1b3a782d70f666
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Dec 6 17:12:46 2015 +0100
- updated to 2.0.1
- removed obsolete patches
- ruby bindings disabled upstream (broken)
gdal-armadillo.patch | 3 +-
gdal-format-security.patch | 59 -----
gdal-fyba.patch | 3 +-
gdal-pluginsdir.patch | 17 --
gdal-python_install.patch | 2 +-
gdal-sse.patch | 551 ---------------------------------------------
gdal.spec | 19 +-
poppler-0.31.patch | 12 -
8 files changed, 11 insertions(+), 655 deletions(-)
---
diff --git a/gdal.spec b/gdal.spec
index 9b956ab..f1e1db9 100644
--- a/gdal.spec
+++ b/gdal.spec
@@ -37,7 +37,7 @@
%bcond_without xerces # Xerces support
%bcond_without java # Java and MDB support
%bcond_without php # PHP binding
-%bcond_without ruby # Ruby binding
+%bcond_with ruby # Ruby binding
%if %{with podofo}
%undefine with_poppler
@@ -48,26 +48,23 @@
Summary: Geospatial Data Abstraction Library
Summary(pl.UTF-8): Biblioteka abstrakcji danych dotyczących powierzchni Ziemi
Name: gdal
-Version: 1.11.2
-Release: 11
+Version: 2.0.1
+Release: 1
License: BSD-like
Group: Libraries
Source0: http://download.osgeo.org/gdal/%{version}/%{name}-%{version}.tar.xz
-# Source0-md5: 90221810dd9ca656ee23d434d4266ef6
+# Source0-md5: 27022cc4a3e0819ab02a69c2d0867437
Patch0: %{name}-perl.patch
Patch1: %{name}-python_install.patch
Patch2: %{name}-php.patch
Patch3: %{name}-fpic.patch
-Patch4: %{name}-format-security.patch
Patch5: %{name}-grass.patch
-Patch6: %{name}-sse.patch
Patch7: %{name}-link.patch
Patch8: %{name}-fyba.patch
Patch9: %{name}-dds.patch
Patch11: %{name}-armadillo.patch
Patch12: %{name}-rasdaman.patch
Patch13: %{name}-pluginsdir.patch
-Patch14: poppler-0.31.patch
URL: http://www.gdal.org/
%{?with_php:BuildRequires: %{php_name}-devel}
%{?with_opencl:BuildRequires: OpenCL-devel >= 1.0}
@@ -286,16 +283,13 @@ osr.
%patch1 -p1
%patch2 -p1
%patch3 -p1
-%patch4 -p1
%patch5 -p1
-%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
-%patch14 -p1
# need to regenerate (old ones don't support perl 5.10 or php 5.5)
%{__rm} swig/{perl,php}/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
@@ -369,6 +363,7 @@ jvm_arch=x32
%{?with_xerces:--with-xerces} \
--with-xerces-inc=/usr/include/xercesc \
--with-xerces-lib="-lxerces-c" \
+ --with-autoload=%{_libdir}/gdalplugins \
--without-libgrass
# --with-pcidsk=/usr (needs > 0.3)
# csharp builds, but has no configure option nor install target
@@ -395,7 +390,6 @@ rm -rf $RPM_BUILD_ROOT
rm -rf _html
cp -a html _html
-cp -a ogr/html _html/ogr
%if %{with php}
# missing in make install
@@ -483,7 +477,7 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/rgb2pct.py
%attr(755,root,root) %{_bindir}/testepsg
%attr(755,root,root) %{_libdir}/libgdal.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libgdal.so.1
+%attr(755,root,root) %ghost %{_libdir}/libgdal.so.20
%dir %{_libdir}/gdalplugins
%{_datadir}/gdal
%{_mandir}/man1/gdal2tiles.1*
@@ -552,6 +546,7 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{perl_vendorarch}/auto/Geo/OGR/OGR.so
%dir %{perl_vendorarch}/auto/Geo/OSR
%attr(755,root,root) %{perl_vendorarch}/auto/Geo/OSR/OSR.so
+%{_mandir}/man3/Geo::GDAL.3pm*
%if %{with php}
%files -n %{php_name}-gdal
diff --git a/gdal-armadillo.patch b/gdal-armadillo.patch
index 3a0a20d..6236e3a 100644
--- a/gdal-armadillo.patch
+++ b/gdal-armadillo.patch
@@ -6,8 +6,7 @@ Kill warnings in Armadillo detection code to make compiler output empty
rm -f testarmadillo
echo '#include <armadillo>' > testarmadillo.cpp
- echo 'int main(int argc, char** argv) { arma::mat matInput(2,2); const arma::mat& matInv = arma::inv(matInput); return 0; } ' >> testarmadillo.cpp
-- if test -z "`${CXX} ${CPPFLAGS} testarmadillo.cpp -o testarmadillo -larmadillo ${LIBS} 2>&1`" ; then
+ echo 'int main(int, char**) { arma::mat matInput(2,2); const arma::mat& matInv = arma::inv(matInput); (void)matInv; return 0; } ' >> testarmadillo.cpp
-+ if test -z "`${CXX} ${CPPFLAGS} testarmadillo.cpp -o testarmadillo -larmadillo 2>&1`" ; then
+ if test -z "`${CXX} ${CPPFLAGS} testarmadillo.cpp -o testarmadillo -larmadillo 2>&1`" ; then
HAVE_ARMADILLO=yes
LIBS="-larmadillo ${LIBS}"
diff --git a/gdal-format-security.patch b/gdal-format-security.patch
deleted file mode 100644
index 49c33e5..0000000
--- a/gdal-format-security.patch
+++ /dev/null
@@ -1,59 +0,0 @@
---- gdal-1.9.2/swig/include/ruby/typemaps_ruby.i.orig 2012-10-09 02:58:28.000000000 +0200
-+++ gdal-1.9.2/swig/include/ruby/typemaps_ruby.i 2013-01-06 15:12:18.221272187 +0100
-@@ -127,7 +127,7 @@
- {
- /* %typemap(out) OGRErr */
- if ($1 != 0) {
-- rb_raise(rb_eRuntimeError, OGRErrMessages(result));
-+ rb_raise(rb_eRuntimeError, "%s", OGRErrMessages(result));
- }
- }
-
---- gdal-1.11.2/ogr/ogrsf_frmts/sxf/ogrsxfdatasource.cpp.orig 2015-02-10 13:11:16.000000000 +0100
-+++ gdal-1.11.2/ogr/ogrsf_frmts/sxf/ogrsxfdatasource.cpp 2015-02-28 12:20:28.595919291 +0100
-@@ -458,7 +458,7 @@
- if (nEPSG == 0)
- {
- CPLError( CE_Warning, CPLE_NotSupported,
-- CPLString().Printf("SXF. Vertical coordinate system (SXF index %ld) not supported", iVCS) );
-+ "SXF. Vertical coordinate system (SXF index %ld) not supported", iVCS );
- return;
- }
-
-@@ -467,14 +467,14 @@
- if (eImportFromEPSGErr != OGRERR_NONE)
- {
- CPLError( CE_Warning, CPLE_None,
-- CPLString().Printf("SXF. Vertical coordinate system (SXF index %ld, EPSG %ld) import from EPSG error", iVCS, nEPSG) );
-+ "SXF. Vertical coordinate system (SXF index %ld, EPSG %ld) import from EPSG error", iVCS, nEPSG );
- return;
- }
-
- if (sr->IsVertical() != 1)
- {
- CPLError( CE_Warning, CPLE_None,
-- CPLString().Printf("SXF. Coordinate system (SXF index %ld, EPSG %ld) is not Vertical", iVCS, nEPSG) );
-+ "SXF. Coordinate system (SXF index %ld, EPSG %ld) is not Vertical", iVCS, nEPSG );
- return;
- }
-
-@@ -483,7 +483,7 @@
- if (eSetVertCSErr != OGRERR_NONE)
- {
- CPLError( CE_Warning, CPLE_None,
-- CPLString().Printf("SXF. Vertical coordinate system (SXF index %ld, EPSG %ld) set error", iVCS, nEPSG) );
-+ "SXF. Vertical coordinate system (SXF index %ld, EPSG %ld) set error", iVCS, nEPSG );
- return;
- }
- }
---- gdal-1.11.2/ogr/ogrsf_frmts/oci/ogrociwritablelayer.cpp.orig 2015-02-10 13:11:16.000000000 +0100
-+++ gdal-1.11.2/ogr/ogrsf_frmts/oci/ogrociwritablelayer.cpp 2015-02-28 13:46:28.845702734 +0100
-@@ -321,7 +321,7 @@
- + strlen(oField.GetNameRef())
- + strlen(szFieldType) );
-
-- snprintf( szFieldName, sizeof( szFieldName ), oField.GetNameRef());
-+ snprintf( szFieldName, sizeof( szFieldName ), "%s", oField.GetNameRef());
- szFieldName[sizeof( szFieldName )-1] = '\0';
- if ( strlen(oField.GetNameRef()) > sizeof ( szFieldName ) )
- {
diff --git a/gdal-fyba.patch b/gdal-fyba.patch
index 00be7c5..5822011 100644
--- a/gdal-fyba.patch
+++ b/gdal-fyba.patch
@@ -1,6 +1,6 @@
--- gdal-1.11.0/configure.in.orig 2014-05-12 21:49:57.910679098 +0200
+++ gdal-1.11.0/configure.in 2014-05-18 11:22:22.873992206 +0200
-@@ -1480,23 +1480,10 @@
+@@ -1480,23 +1480,11 @@
elif test "$with_sosi" = "yes" -o "$with_sosi" = "" ; then
@@ -22,6 +22,7 @@
- else
- AC_MSG_ERROR([not found.])
- fi
++ SOSI_INC="-I/usr/include/fyba"
+ SOSI_LIB="-lfyba -lfygm -lfyut"
+ ], [AC_MSG_ERROR([not found.])])
diff --git a/gdal-pluginsdir.patch b/gdal-pluginsdir.patch
index 93bbf6f..e2b0613 100644
--- a/gdal-pluginsdir.patch
+++ b/gdal-pluginsdir.patch
@@ -1,20 +1,3 @@
---- gdal-1.11.2/ogr/ogrsf_frmts/generic/ogrsfdriverregistrar.cpp.orig 2015-02-10 13:11:16.000000000 +0100
-+++ gdal-1.11.2/ogr/ogrsf_frmts/generic/ogrsfdriverregistrar.cpp 2015-03-01 21:09:07.960962291 +0100
-@@ -815,12 +815,12 @@
- }
- else
- {
--#ifdef GDAL_PREFIX
-+#if 1
- papszSearchPath = CSLAddString( papszSearchPath,
- #ifdef MACOSX_FRAMEWORK
- GDAL_PREFIX "/PlugIns");
- #else
-- GDAL_PREFIX "/lib/gdalplugins" );
-+ GDAL_LIBDIR "/gdalplugins" );
- #endif
- #else
- char szExecPath[1024];
--- gdal-1.11.2/gcore/gdaldrivermanager.cpp.orig 2015-02-10 13:12:08.000000000 +0100
+++ gdal-1.11.2/gcore/gdaldrivermanager.cpp 2015-03-01 21:11:24.537623226 +0100
@@ -686,12 +686,12 @@
diff --git a/gdal-python_install.patch b/gdal-python_install.patch
index 88eac18..91cc4e3 100644
--- a/gdal-python_install.patch
+++ b/gdal-python_install.patch
@@ -10,7 +10,7 @@
-else
- $(PYTHON) setup.py install --prefix=$(DESTDIR)$(prefix)
-endif
-+ $(PYTHON) setup.py install --root=$(DESTDIR)
++ $(PYTHON) setup.py install --root=$(DESTDIR) --prefix=$(prefix)
for f in $(SCRIPTS) ; do $(INSTALL) ./scripts/$$f $(DESTDIR)$(INST_BIN) ; done
diff --git a/gdal-sse.patch b/gdal-sse.patch
deleted file mode 100644
index f9f124b..0000000
--- a/gdal-sse.patch
+++ /dev/null
@@ -1,551 +0,0 @@
---- gdal-1.11.0/alg/gdalgrid_priv.h.orig 2014-04-16 22:04:48.000000000 +0200
-+++ gdal-1.11.0/alg/gdalgrid_priv.h 2014-05-11 20:50:49.579220569 +0200
-@@ -51,6 +51,21 @@
- const float *pafZ;
- } GDALGridExtraParameters;
-
-+#ifdef HAVE_SSE_AT_COMPILE_TIME
-+int CPLHaveRuntimeSSE();
-+
-+CPLErr
-+GDALGridInverseDistanceToAPower2NoSmoothingNoSearchSSE(
-+ const void *poOptions,
-+ GUInt32 nPoints,
-+ const double *unused_padfX,
-+ const double *unused_padfY,
-+ const double *unused_padfZ,
-+ double dfXPoint, double dfYPoint,
-+ double *pdfValue,
-+ void* hExtraParamsIn );
-+#endif
-+
- #ifdef HAVE_AVX_AT_COMPILE_TIME
- int CPLHaveRuntimeAVX();
-
---- gdal-1.11.0/alg/gdalgridsse.cpp.orig 1970-01-01 01:00:00.000000000 +0100
-+++ gdal-1.11.0/alg/gdalgridsse.cpp 2014-05-11 21:54:46.609140595 +0200
-@@ -0,0 +1,210 @@
-+#include "gdalgrid.h"
-+#include "gdalgrid_priv.h"
-+
-+#ifdef HAVE_SSE_AT_COMPILE_TIME
-+#include <xmmintrin.h>
-+
-+/************************************************************************/
-+/* CPLHaveRuntimeSSE() */
-+/************************************************************************/
-+
-+#define CPUID_SSE_EDX_BIT 25
-+
-+#if (defined(_M_X64) || defined(__x86_64))
-+
-+int CPLHaveRuntimeSSE()
-+{
-+ return TRUE;
-+}
-+
-+#elif defined(__GNUC__) && defined(__i386__)
-+
-+int CPLHaveRuntimeSSE()
-+{
-+ int cpuinfo[4] = {0,0,0,0};
-+ GCC_CPUID(1, cpuinfo[0], cpuinfo[1], cpuinfo[2], cpuinfo[3]);
-+ return (cpuinfo[3] & (1 << CPUID_SSE_EDX_BIT)) != 0;
-+}
-+
-+#elif defined(_MSC_VER) && defined(_M_IX86)
-+
-+#if _MSC_VER <= 1310
-+static void inline __cpuid(int cpuinfo[4], int level)
-+{
-+ __asm
-+ {
-+ push ebx
-+ push esi
-+
-+ mov esi,cpuinfo
-+ mov eax,level
-+ cpuid
-+ mov dword ptr [esi], eax
-+ mov dword ptr [esi+4],ebx
-+ mov dword ptr [esi+8],ecx
-+ mov dword ptr [esi+0Ch],edx
-+
-+ pop esi
-+ pop ebx
-+ }
-+}
-+#else
-+#include <intrin.h>
-+#endif
-+
-+int CPLHaveRuntimeSSE()
-+{
-+ int cpuinfo[4] = {0,0,0,0};
-+ __cpuid(cpuinfo, 1);
-+ return (cpuinfo[3] & (1 << CPUID_SSE_EDX_BIT)) != 0;
-+}
-+
-+#else
-+
-+int CPLHaveRuntimeSSE()
-+{
-+ return FALSE;
-+}
-+#endif
-+
-+/************************************************************************/
-+/* GDALGridInverseDistanceToAPower2NoSmoothingNoSearchSSE() */
-+/************************************************************************/
-+
-+CPLErr
-+GDALGridInverseDistanceToAPower2NoSmoothingNoSearchSSE(
-+ const void *poOptions,
-+ GUInt32 nPoints,
-+ CPL_UNUSED const double *unused_padfX,
-+ CPL_UNUSED const double *unused_padfY,
-+ CPL_UNUSED const double *unused_padfZ,
-+ double dfXPoint, double dfYPoint,
-+ double *pdfValue,
-+ void* hExtraParamsIn )
-+{
-+ size_t i = 0;
-+ GDALGridExtraParameters* psExtraParams = (GDALGridExtraParameters*) hExtraParamsIn;
-+ const float* pafX = psExtraParams->pafX;
-+ const float* pafY = psExtraParams->pafY;
-+ const float* pafZ = psExtraParams->pafZ;
-+
-+ const float fEpsilon = 0.0000000000001f;
-+ const float fXPoint = (float)dfXPoint;
-+ const float fYPoint = (float)dfYPoint;
-+ const __m128 xmm_small = _mm_load1_ps((float*)&fEpsilon);
-+ const __m128 xmm_x = _mm_load1_ps((float*)&fXPoint);
-+ const __m128 xmm_y = _mm_load1_ps((float*)&fYPoint);
-+ __m128 xmm_nominator = _mm_setzero_ps();
-+ __m128 xmm_denominator = _mm_setzero_ps();
-+ int mask = 0;
-+
-+#if defined(__x86_64) || defined(_M_X64)
-+ /* This would also work in 32bit mode, but there are only 8 XMM registers */
-+ /* whereas we have 16 for 64bit */
-+#define LOOP_SIZE 8
-+ size_t nPointsRound = (nPoints / LOOP_SIZE) * LOOP_SIZE;
-+ for ( i = 0; i < nPointsRound; i += LOOP_SIZE )
-+ {
-+ __m128 xmm_rx = _mm_sub_ps(_mm_load_ps(pafX + i), xmm_x); /* rx = pafX[i] - fXPoint */
-+ __m128 xmm_rx_4 = _mm_sub_ps(_mm_load_ps(pafX + i + 4), xmm_x);
-+ __m128 xmm_ry = _mm_sub_ps(_mm_load_ps(pafY + i), xmm_y); /* ry = pafY[i] - fYPoint */
-+ __m128 xmm_ry_4 = _mm_sub_ps(_mm_load_ps(pafY + i + 4), xmm_y);
-+ __m128 xmm_r2 = _mm_add_ps(_mm_mul_ps(xmm_rx, xmm_rx), /* r2 = rx * rx + ry * ry */
-+ _mm_mul_ps(xmm_ry, xmm_ry));
-+ __m128 xmm_r2_4 = _mm_add_ps(_mm_mul_ps(xmm_rx_4, xmm_rx_4),
-+ _mm_mul_ps(xmm_ry_4, xmm_ry_4));
-+ __m128 xmm_invr2 = _mm_rcp_ps(xmm_r2); /* invr2 = 1.0f / r2 */
-+ __m128 xmm_invr2_4 = _mm_rcp_ps(xmm_r2_4);
-+ xmm_nominator = _mm_add_ps(xmm_nominator, /* nominator += invr2 * pafZ[i] */
-+ _mm_mul_ps(xmm_invr2, _mm_load_ps(pafZ + i)));
-+ xmm_nominator = _mm_add_ps(xmm_nominator,
-+ _mm_mul_ps(xmm_invr2_4, _mm_load_ps(pafZ + i + 4)));
-+ xmm_denominator = _mm_add_ps(xmm_denominator, xmm_invr2); /* denominator += invr2 */
-+ xmm_denominator = _mm_add_ps(xmm_denominator, xmm_invr2_4);
-+ mask = _mm_movemask_ps(_mm_cmplt_ps(xmm_r2, xmm_small)) | /* if( r2 < fEpsilon) */
-+ (_mm_movemask_ps(_mm_cmplt_ps(xmm_r2_4, xmm_small)) << 4);
-+ if( mask )
-+ break;
-+ }
-+#else
-+#define LOOP_SIZE 4
-+ size_t nPointsRound = (nPoints / LOOP_SIZE) * LOOP_SIZE;
-+ for ( i = 0; i < nPointsRound; i += LOOP_SIZE )
-+ {
-+ __m128 xmm_rx = _mm_sub_ps(_mm_load_ps((float*)pafX + i), xmm_x); /* rx = pafX[i] - fXPoint */
-+ __m128 xmm_ry = _mm_sub_ps(_mm_load_ps((float*)pafY + i), xmm_y); /* ry = pafY[i] - fYPoint */
-+ __m128 xmm_r2 = _mm_add_ps(_mm_mul_ps(xmm_rx, xmm_rx), /* r2 = rx * rx + ry * ry */
-+ _mm_mul_ps(xmm_ry, xmm_ry));
-+ __m128 xmm_invr2 = _mm_rcp_ps(xmm_r2); /* invr2 = 1.0f / r2 */
-+ xmm_nominator = _mm_add_ps(xmm_nominator, /* nominator += invr2 * pafZ[i] */
-+ _mm_mul_ps(xmm_invr2, _mm_load_ps((float*)pafZ + i)));
-+ xmm_denominator = _mm_add_ps(xmm_denominator, xmm_invr2); /* denominator += invr2 */
-+ mask = _mm_movemask_ps(_mm_cmplt_ps(xmm_r2, xmm_small)); /* if( r2 < fEpsilon) */
-+ if( mask )
-+ break;
-+ }
-+#endif
-+
-+ /* Find which i triggered r2 < fEpsilon */
-+ if( mask )
-+ {
-+ for(int j = 0; j < LOOP_SIZE; j++ )
-+ {
-+ if( mask & (1 << j) )
-+ {
-+ (*pdfValue) = (pafZ)[i + j];
-+ return CE_None;
-+ }
-+ }
-+ }
-+
-+ /* Get back nominator and denominator values for XMM registers */
-+ float afNominator[4], afDenominator[4];
-+ _mm_storeu_ps(afNominator, xmm_nominator);
-+ _mm_storeu_ps(afDenominator, xmm_denominator);
-+
-+ float fNominator = afNominator[0] + afNominator[1] +
-+ afNominator[2] + afNominator[3];
-+ float fDenominator = afDenominator[0] + afDenominator[1] +
-+ afDenominator[2] + afDenominator[3];
-+
-+ /* Do the few remaining loop iterations */
-+ for ( ; i < nPoints; i++ )
-+ {
-+ const float fRX = pafX[i] - fXPoint;
-+ const float fRY = pafY[i] - fYPoint;
-+ const float fR2 =
-+ fRX * fRX + fRY * fRY;
-+
-+ // If the test point is close to the grid node, use the point
-+ // value directly as a node value to avoid singularity.
-+ if ( fR2 < 0.0000000000001 )
-+ {
-+ break;
-+ }
-+ else
-+ {
-+ const float fInvR2 = 1.0f / fR2;
-+ fNominator += fInvR2 * pafZ[i];
-+ fDenominator += fInvR2;
-+ }
-+ }
-+
-+ if( i != nPoints )
-+ {
-+ (*pdfValue) = pafZ[i];
-+ }
-+ else
-+ if ( fDenominator == 0.0 )
-+ {
-+ (*pdfValue) =
-+ ((GDALGridInverseDistanceToAPowerOptions*)poOptions)->dfNoDataValue;
-+ }
-+ else
-+ (*pdfValue) = fNominator / fDenominator;
-+
-+ return CE_None;
-+}
-+
-+
-+#endif
---- gdal-1.11.0/alg/gdalgrid.cpp.orig 2014-04-16 22:04:48.000000000 +0200
-+++ gdal-1.11.0/alg/gdalgrid.cpp 2014-05-11 21:27:49.735840961 +0200
-@@ -36,10 +36,6 @@
- #include "cpl_multiproc.h"
- #include "gdalgrid_priv.h"
-
--#ifdef HAVE_SSE_AT_COMPILE_TIME
--#include <xmmintrin.h>
--#endif
--
- CPL_CVSID("$Id: gdalgrid.cpp 27729 2014-09-24 00:40:16Z goatbar $");
-
- #define TO_RADIANS (3.14159265358979323846 / 180.0)
-@@ -53,74 +49,6 @@
- #endif /* DBL_MAX */
-
- /************************************************************************/
--/* CPLHaveRuntimeSSE() */
--/************************************************************************/
--
--#ifdef HAVE_SSE_AT_COMPILE_TIME
--
--#define CPUID_SSE_EDX_BIT 25
--
--#if (defined(_M_X64) || defined(__x86_64))
--
--static int CPLHaveRuntimeSSE()
--{
-- return TRUE;
--}
--
--#elif defined(__GNUC__) && defined(__i386__)
--
--static int CPLHaveRuntimeSSE()
--{
-- int cpuinfo[4] = {0,0,0,0};
-- GCC_CPUID(1, cpuinfo[0], cpuinfo[1], cpuinfo[2], cpuinfo[3]);
-- return (cpuinfo[3] & (1 << CPUID_SSE_EDX_BIT)) != 0;
--}
--
--#elif defined(_MSC_VER) && defined(_M_IX86)
--
--#if _MSC_VER <= 1310
--static void inline __cpuid(int cpuinfo[4], int level)
--{
-- __asm
-- {
-- push ebx
-- push esi
--
-- mov esi,cpuinfo
-- mov eax,level
-- cpuid
-- mov dword ptr [esi], eax
-- mov dword ptr [esi+4],ebx
-- mov dword ptr [esi+8],ecx
-- mov dword ptr [esi+0Ch],edx
--
-- pop esi
-- pop ebx
-- }
--}
--#else
--#include <intrin.h>
--#endif
--
--static int CPLHaveRuntimeSSE()
--{
-- int cpuinfo[4] = {0,0,0,0};
-- __cpuid(cpuinfo, 1);
-- return (cpuinfo[3] & (1 << CPUID_SSE_EDX_BIT)) != 0;
--}
--
--#else
--
--static int CPLHaveRuntimeSSE()
--{
-- return FALSE;
--}
--
--#endif
--
--#endif // HAVE_SSE_AT_COMPILE_TIME
--
--/************************************************************************/
- /* GDALGridGetPointBounds() */
- /************************************************************************/
-
-@@ -394,148 +322,6 @@
- }
-
- /************************************************************************/
--/* GDALGridInverseDistanceToAPower2NoSmoothingNoSearchSSE() */
--/************************************************************************/
--
--#ifdef HAVE_SSE_AT_COMPILE_TIME
--
--static CPLErr
--GDALGridInverseDistanceToAPower2NoSmoothingNoSearchSSE(
-- const void *poOptions,
-- GUInt32 nPoints,
-- CPL_UNUSED const double *unused_padfX,
-- CPL_UNUSED const double *unused_padfY,
-- CPL_UNUSED const double *unused_padfZ,
-- double dfXPoint, double dfYPoint,
-- double *pdfValue,
-- void* hExtraParamsIn )
--{
-- size_t i = 0;
-- GDALGridExtraParameters* psExtraParams = (GDALGridExtraParameters*) hExtraParamsIn;
-- const float* pafX = psExtraParams->pafX;
-- const float* pafY = psExtraParams->pafY;
-- const float* pafZ = psExtraParams->pafZ;
--
-- const float fEpsilon = 0.0000000000001f;
-- const float fXPoint = (float)dfXPoint;
-- const float fYPoint = (float)dfYPoint;
-- const __m128 xmm_small = _mm_load1_ps((float*)&fEpsilon);
-- const __m128 xmm_x = _mm_load1_ps((float*)&fXPoint);
-- const __m128 xmm_y = _mm_load1_ps((float*)&fYPoint);
-- __m128 xmm_nominator = _mm_setzero_ps();
-- __m128 xmm_denominator = _mm_setzero_ps();
-- int mask = 0;
--
--#if defined(__x86_64) || defined(_M_X64)
-- /* This would also work in 32bit mode, but there are only 8 XMM registers */
-- /* whereas we have 16 for 64bit */
--#define LOOP_SIZE 8
-- size_t nPointsRound = (nPoints / LOOP_SIZE) * LOOP_SIZE;
-- for ( i = 0; i < nPointsRound; i += LOOP_SIZE )
-- {
-- __m128 xmm_rx = _mm_sub_ps(_mm_load_ps(pafX + i), xmm_x); /* rx = pafX[i] - fXPoint */
-- __m128 xmm_rx_4 = _mm_sub_ps(_mm_load_ps(pafX + i + 4), xmm_x);
-- __m128 xmm_ry = _mm_sub_ps(_mm_load_ps(pafY + i), xmm_y); /* ry = pafY[i] - fYPoint */
-- __m128 xmm_ry_4 = _mm_sub_ps(_mm_load_ps(pafY + i + 4), xmm_y);
-- __m128 xmm_r2 = _mm_add_ps(_mm_mul_ps(xmm_rx, xmm_rx), /* r2 = rx * rx + ry * ry */
-- _mm_mul_ps(xmm_ry, xmm_ry));
-- __m128 xmm_r2_4 = _mm_add_ps(_mm_mul_ps(xmm_rx_4, xmm_rx_4),
-- _mm_mul_ps(xmm_ry_4, xmm_ry_4));
-- __m128 xmm_invr2 = _mm_rcp_ps(xmm_r2); /* invr2 = 1.0f / r2 */
-- __m128 xmm_invr2_4 = _mm_rcp_ps(xmm_r2_4);
-- xmm_nominator = _mm_add_ps(xmm_nominator, /* nominator += invr2 * pafZ[i] */
-- _mm_mul_ps(xmm_invr2, _mm_load_ps(pafZ + i)));
-- xmm_nominator = _mm_add_ps(xmm_nominator,
-- _mm_mul_ps(xmm_invr2_4, _mm_load_ps(pafZ + i + 4)));
-- xmm_denominator = _mm_add_ps(xmm_denominator, xmm_invr2); /* denominator += invr2 */
-- xmm_denominator = _mm_add_ps(xmm_denominator, xmm_invr2_4);
-- mask = _mm_movemask_ps(_mm_cmplt_ps(xmm_r2, xmm_small)) | /* if( r2 < fEpsilon) */
-- (_mm_movemask_ps(_mm_cmplt_ps(xmm_r2_4, xmm_small)) << 4);
-- if( mask )
-- break;
-- }
--#else
--#define LOOP_SIZE 4
-- size_t nPointsRound = (nPoints / LOOP_SIZE) * LOOP_SIZE;
-- for ( i = 0; i < nPointsRound; i += LOOP_SIZE )
-- {
-- __m128 xmm_rx = _mm_sub_ps(_mm_load_ps((float*)pafX + i), xmm_x); /* rx = pafX[i] - fXPoint */
-- __m128 xmm_ry = _mm_sub_ps(_mm_load_ps((float*)pafY + i), xmm_y); /* ry = pafY[i] - fYPoint */
-- __m128 xmm_r2 = _mm_add_ps(_mm_mul_ps(xmm_rx, xmm_rx), /* r2 = rx * rx + ry * ry */
-- _mm_mul_ps(xmm_ry, xmm_ry));
-- __m128 xmm_invr2 = _mm_rcp_ps(xmm_r2); /* invr2 = 1.0f / r2 */
-- xmm_nominator = _mm_add_ps(xmm_nominator, /* nominator += invr2 * pafZ[i] */
-- _mm_mul_ps(xmm_invr2, _mm_load_ps((float*)pafZ + i)));
-- xmm_denominator = _mm_add_ps(xmm_denominator, xmm_invr2); /* denominator += invr2 */
-- mask = _mm_movemask_ps(_mm_cmplt_ps(xmm_r2, xmm_small)); /* if( r2 < fEpsilon) */
-- if( mask )
-- break;
-- }
--#endif
--
-- /* Find which i triggered r2 < fEpsilon */
-- if( mask )
-- {
-- for(int j = 0; j < LOOP_SIZE; j++ )
-- {
-- if( mask & (1 << j) )
-- {
-- (*pdfValue) = (pafZ)[i + j];
-- return CE_None;
-- }
-- }
-- }
--
-- /* Get back nominator and denominator values for XMM registers */
-- float afNominator[4], afDenominator[4];
-- _mm_storeu_ps(afNominator, xmm_nominator);
-- _mm_storeu_ps(afDenominator, xmm_denominator);
--
-- float fNominator = afNominator[0] + afNominator[1] +
-- afNominator[2] + afNominator[3];
-- float fDenominator = afDenominator[0] + afDenominator[1] +
-- afDenominator[2] + afDenominator[3];
--
-- /* Do the few remaining loop iterations */
-- for ( ; i < nPoints; i++ )
-- {
-- const float fRX = pafX[i] - fXPoint;
-- const float fRY = pafY[i] - fYPoint;
-- const float fR2 =
-- fRX * fRX + fRY * fRY;
--
-- // If the test point is close to the grid node, use the point
-- // value directly as a node value to avoid singularity.
-- if ( fR2 < 0.0000000000001 )
-- {
-- break;
-- }
-- else
-- {
-- const float fInvR2 = 1.0f / fR2;
-- fNominator += fInvR2 * pafZ[i];
-- fDenominator += fInvR2;
-- }
-- }
--
-- if( i != nPoints )
-- {
-- (*pdfValue) = pafZ[i];
-- }
-- else
-- if ( fDenominator == 0.0 )
-- {
-- (*pdfValue) =
-- ((GDALGridInverseDistanceToAPowerOptions*)poOptions)->dfNoDataValue;
-- }
-- else
-- (*pdfValue) = fNominator / fDenominator;
--
-- return CE_None;
--}
--#endif // HAVE_SSE_AT_COMPILE_TIME
--
--/************************************************************************/
- /* GDALGridMovingAverage() */
- /************************************************************************/
-
---- gdal-1.11.0/alg/GNUmakefile.orig 2014-04-16 22:04:48.000000000 +0200
-+++ gdal-1.11.0/alg/GNUmakefile 2014-05-11 21:56:55.699137906 +0200
-@@ -16,6 +16,10 @@
- CPPFLAGS := -DHAVE_AVX_AT_COMPILE_TIME $(CPPFLAGS)
- endif
-
-+ifeq ($(HAVE_SSE_AT_COMPILE_TIME),yes)
-+CPPFLAGS := -DHAVE_SSE_AT_COMPILE_TIME $(CPPFLAGS)
-+endif
-+
- ifeq ($(HAVE_GEOS),yes)
- CPPFLAGS := -DHAVE_GEOS=1 $(GEOS_CFLAGS) $(CPPFLAGS)
- endif
-@@ -26,11 +30,14 @@
-
- CPPFLAGS := $(GDAL_INCLUDE) $(CPPFLAGS) $(OPENCL_FLAGS)
-
--default: $(OBJ:.o=.$(OBJ_EXT)) gdalgridavx.$(OBJ_EXT)
-+default: $(OBJ:.o=.$(OBJ_EXT)) gdalgridavx.$(OBJ_EXT) gdalgridsse.$(OBJ_EXT)
-
- gdalgridavx.$(OBJ_EXT): gdalgridavx.cpp
- $(CXX) $(CXXFLAGS) $(AVXFLAGS) $(CPPFLAGS) -c -o $@ $<
-
-+gdalgridsse.$(OBJ_EXT): gdalgridsse.cpp
-+ $(CXX) $(CXXFLAGS) $(SSEFLAGS) $(CPPFLAGS) -c -o $@ $<
-+
- clean:
- $(RM) *.o $(O_OBJ)
-
---- gdal-1.11.0/configure.in.orig 2014-05-11 20:11:46.272602746 +0200
-+++ gdal-1.11.0/configure.in 2014-05-11 22:00:20.125800312 +0200
-@@ -240,12 +240,12 @@
- echo '#endif' >> detectsse.cpp
- if test -z "`${CXX} ${CXXFLAGS} -o detectsse detectsse.cpp 2>&1`" ; then
- AC_MSG_RESULT([yes])
-- SSEFLAGS="-DHAVE_SSE_AT_COMPILE_TIME"
-+ SSEFLAGS=""
- HAVE_SSE_AT_COMPILE_TIME=yes
- else
- if test -z "`${CXX} ${CXXFLAGS} -msse -o detectsse detectsse.cpp 2>&1`" ; then
- AC_MSG_RESULT([yes])
-- SSEFLAGS="-msse -DHAVE_SSE_AT_COMPILE_TIME"
-+ SSEFLAGS="-msse"
- HAVE_SSE_AT_COMPILE_TIME=yes
- else
- AC_MSG_RESULT([no])
-@@ -279,16 +279,14 @@
- esac
- fi
-
-- if test "$HAVE_SSE_AT_COMPILE_TIME" = "yes"; then
-- CFLAGS="$CFLAGS $SSEFLAGS"
-- CXXFLAGS="$CXXFLAGS $SSEFLAGS"
-- fi
--
- rm -f detectsse*
- else
- AC_MSG_RESULT([no])
- fi
-
-+AC_SUBST(SSEFLAGS,$SSEFLAGS)
-+AC_SUBST(HAVE_SSE_AT_COMPILE_TIME,$HAVE_SSE_AT_COMPILE_TIME)
-+
- dnl ---------------------------------------------------------------------------
- dnl Check AVX availability
- dnl ---------------------------------------------------------------------------
---- gdal-1.11.0/GDALmake.opt.in.orig 2014-05-12 19:27:07.164191074 +0200
-+++ gdal-1.11.0/GDALmake.opt.in 2014-05-12 20:39:04.850767745 +0200
-@@ -37,6 +37,8 @@
- $(PCIDSK_LIB) $(RASDAMAN_LIB) $(CHARLS_LIB) $(SOSI_LIB) \
- $(OPENCL_LIB) $(JVM_LIB) $(LIBICONV) $(FGDB_LIB) $(LIBXML2_LIB)
-
-+SSEFLAGS = @SSEFLAGS@
-+HAVE_SSE_AT_COMPILE_TIME = @HAVE_SSE_AT_COMPILE_TIME@
- AVXFLAGS = @AVXFLAGS@
- HAVE_AVX_AT_COMPILE_TIME = @HAVE_AVX_AT_COMPILE_TIME@
-
diff --git a/poppler-0.31.patch b/poppler-0.31.patch
deleted file mode 100644
index fff2346..0000000
--- a/poppler-0.31.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Nur gdal-1.11.2/frmts/pdf/pdfdataset.cpp gdal-1.11.2a/frmts/pdf/pdfdataset.cpp
---- gdal-1.11.2/frmts/pdf/pdfdataset.cpp 2015-02-10 13:11:19.000000000 +0100
-+++ gdal-1.11.2a/frmts/pdf/pdfdataset.cpp 2015-03-02 18:38:25.170155277 +0100
-@@ -113,7 +113,7 @@
- GBool allowAntialiasA = gTrue) :
- SplashOutputDev(colorModeA, bitmapRowPadA,
- reverseVideoA, paperColorA,
-- bitmapTopDownA, allowAntialiasA),
-+ bitmapTopDownA),
- bEnableVector(TRUE),
- bEnableText(TRUE),
- bEnableBitmap(TRUE) {}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/gdal.git/commitdiff/38239d5e653a2de30e1e8e4d5c1b3a782d70f666
More information about the pld-cvs-commit
mailing list