* [Buildroot] [PATCH 1/1] package/libgdal: new package @ 2021-05-02 13:06 Dominik Michael Rauh 2021-05-02 14:38 ` Peter Seiderer 2021-05-04 16:57 ` [Buildroot] [PATCH v2] " Dominik Michael Rauh 0 siblings, 2 replies; 13+ messages in thread From: Dominik Michael Rauh @ 2021-05-02 13:06 UTC (permalink / raw) To: buildroot GDAL is a translator library for raster and vector geospatial data formats. As a library, it presents a single raster abstract data model and single vector abstract data model to the calling application for all supported formats. It also comes with a variety of useful command line utilities for data translation and processing. https://gdal.org/ Signed-off-by: Dominik Michael Rauh <dmrauh@posteo.de> --- package/Config.in | 1 + ...1-port-cpl_recode_iconv.cpp-use-cast.patch | 38 +++++++++++++++++++ package/libgdal/Config.in | 22 +++++++++++ package/libgdal/libgdal.hash | 6 +++ package/libgdal/libgdal.mk | 26 +++++++++++++ 5 files changed, 93 insertions(+) create mode 100644 package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch create mode 100644 package/libgdal/Config.in create mode 100644 package/libgdal/libgdal.hash create mode 100644 package/libgdal/libgdal.mk diff --git a/package/Config.in b/package/Config.in index 6181aaac2c..56c55dffc5 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1915,6 +1915,7 @@ menu "Other" source "package/libevdev/Config.in" source "package/libevent/Config.in" source "package/libffi/Config.in" + source "package/libgdal/Config.in" source "package/libgee/Config.in" source "package/libgeos/Config.in" source "package/libglib2/Config.in" diff --git a/package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch b/package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch new file mode 100644 index 0000000000..fd168c769e --- /dev/null +++ b/package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch @@ -0,0 +1,38 @@ +From 8f59911ced01da6dba7784098e97eefeef96d3a5 Mon Sep 17 00:00:00 2001 +From: Dominik Michael Rauh <dmrauh@posteo.de> +Date: Sat, 1 May 2021 20:11:30 +0200 +Subject: [PATCH] port/cpl_recode_iconv.cpp: use cast + +Fixes error: invalid cast from type 'int' to type 'iconv_t' {aka 'long +int'}. + +Signed-off-by: Dominik Michael Rauh <dmrauh@posteo.de> +--- + port/cpl_recode_iconv.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/port/cpl_recode_iconv.cpp b/port/cpl_recode_iconv.cpp +index d341bb1..2346012 100644 +--- a/port/cpl_recode_iconv.cpp ++++ b/port/cpl_recode_iconv.cpp +@@ -87,7 +87,7 @@ char *CPLRecodeIconv( const char *pszSource, + + sConv = iconv_open( pszDstEncoding, pszSrcEncoding ); + +- if( sConv == reinterpret_cast<iconv_t>(-1) ) ++ if( sConv == (iconv_t)(-1) ) + { + CPLError( CE_Warning, CPLE_AppDefined, + "Recode from %s to %s failed with the error: \"%s\".", +@@ -234,7 +234,7 @@ char *CPLRecodeFromWCharIconv( const wchar_t *pwszSource, + + sConv = iconv_open( pszDstEncoding, pszSrcEncoding ); + +- if( sConv == reinterpret_cast<iconv_t>(-1) ) ++ if( sConv == (iconv_t)(-1) ) + { + CPLFree( pszIconvSrcBuf ); + CPLError( CE_Warning, CPLE_AppDefined, +-- +2.31.1 + diff --git a/package/libgdal/Config.in b/package/libgdal/Config.in new file mode 100644 index 0000000000..1d64bfb67f --- /dev/null +++ b/package/libgdal/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_LIBGDAL + bool "libgdal" + depends on BR2_INSTALL_LIBSTDCPP + # configure can't find proj, when linking statically + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11 + select BR2_PACKAGE_PROJ + help + GDAL is a translator library for raster and vector geospatial + data formats. As a library, it presents a single raster + abstract data model and single vector abstract data model to + the calling application for all supported formats. It also + comes with a variety of useful command line utilities for data + translation and processing. + + https://gdal.org/ + +comment "libgdal needs a toolchain w/ C++, dynamic library, gcc >= 4.7, proj" + depends on !BR2_INSTALL_LIBSTDCPP || \ + !BR2_STATIC_LIBS || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 || \ + !BR2_PACKAGE_PROJ diff --git a/package/libgdal/libgdal.hash b/package/libgdal/libgdal.hash new file mode 100644 index 0000000000..48aad360d7 --- /dev/null +++ b/package/libgdal/libgdal.hash @@ -0,0 +1,6 @@ +# md5 from: https://download.osgeo.org/gdal/3.2.2/gdal-3.2.2.tar.xz.md5, sha256 locally computed: +md5 c656be582f7beb528c66486cd1fca7a2 gdal-3.2.2.tar.xz +sha256 a7e1e414e5c405af48982bf4724a3da64a05770254f2ce8affb5f58a7604ca57 gdal-3.2.2.tar.xz + +# Hash for license file: +sha256 b82e6cca0b13f5db2f22ab667f22254fb1f4b135ea73d5bd6238ef89aff31f6c LICENSE.TXT diff --git a/package/libgdal/libgdal.mk b/package/libgdal/libgdal.mk new file mode 100644 index 0000000000..31bf73ec84 --- /dev/null +++ b/package/libgdal/libgdal.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# libgdal +# +################################################################################ + +LIBGDAL_VERSION = 3.2.2 +LIBGDAL_SITE = https://download.osgeo.org/gdal/$(LIBGDAL_VERSION) +LIBGDAL_SOURCE = gdal-$(LIBGDAL_VERSION).tar.xz +LIBGDAL_LICENSE = MIT +LIBGDAL_LICENSE_FILES = LICENSE.TXT +LIBGDAL_INSTALL_STAGING = YES +LIBGDAL_CONFIG_SCRIPTS = gdal-config +LIBGDAL_DEPENDENCIES = host-pkgconf proj + +ifeq ($(BR2_PACKAGE_POSTGRESQL),y) +LIBGDAL_DEPENDENCIES += postgresql +LIBGDAL_CONF_OPTS += --with-pg +endif + +ifeq ($(BR2_PACKAGE_LIBXML2),y) +LIBGDAL_DEPENDENCIES += libxml2 +LIBGDAL_CONF_OPTS += --with-xml2 +endif + +$(eval $(autotools-package)) -- 2.31.1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH 1/1] package/libgdal: new package 2021-05-02 13:06 [Buildroot] [PATCH 1/1] package/libgdal: new package Dominik Michael Rauh @ 2021-05-02 14:38 ` Peter Seiderer 2021-05-02 18:03 ` Peter Seiderer 2021-05-04 16:57 ` [Buildroot] [PATCH v2] " Dominik Michael Rauh 1 sibling, 1 reply; 13+ messages in thread From: Peter Seiderer @ 2021-05-02 14:38 UTC (permalink / raw) To: buildroot Hello Dominik, thanks for patch contribution, a quick/first review below: On Sun, 2 May 2021 13:06:19 +0000, Dominik Michael Rauh <dmrauh@posteo.de> wrote: > GDAL is a translator library for raster and vector geospatial data > formats. As a library, it presents a single raster abstract data model > and single vector abstract data model to the calling application for all > supported formats. It also comes with a variety of useful command line > utilities for data translation and processing. > > https://gdal.org/ > > Signed-off-by: Dominik Michael Rauh <dmrauh@posteo.de> > --- > package/Config.in | 1 + > ...1-port-cpl_recode_iconv.cpp-use-cast.patch | 38 +++++++++++++++++++ > package/libgdal/Config.in | 22 +++++++++++ > package/libgdal/libgdal.hash | 6 +++ > package/libgdal/libgdal.mk | 26 +++++++++++++ > 5 files changed, 93 insertions(+) > create mode 100644 package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch > create mode 100644 package/libgdal/Config.in > create mode 100644 package/libgdal/libgdal.hash > create mode 100644 package/libgdal/libgdal.mk > > diff --git a/package/Config.in b/package/Config.in > index 6181aaac2c..56c55dffc5 100644 > --- a/package/Config.in > +++ b/package/Config.in > @@ -1915,6 +1915,7 @@ menu "Other" > source "package/libevdev/Config.in" > source "package/libevent/Config.in" > source "package/libffi/Config.in" > + source "package/libgdal/Config.in" > source "package/libgee/Config.in" > source "package/libgeos/Config.in" > source "package/libglib2/Config.in" > diff --git a/package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch b/package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch > new file mode 100644 > index 0000000000..fd168c769e > --- /dev/null > +++ b/package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch > @@ -0,0 +1,38 @@ > +From 8f59911ced01da6dba7784098e97eefeef96d3a5 Mon Sep 17 00:00:00 2001 > +From: Dominik Michael Rauh <dmrauh@posteo.de> > +Date: Sat, 1 May 2021 20:11:30 +0200 > +Subject: [PATCH] port/cpl_recode_iconv.cpp: use cast > + > +Fixes error: invalid cast from type 'int' to type 'iconv_t' {aka 'long > +int'}. > + > +Signed-off-by: Dominik Michael Rauh <dmrauh@posteo.de> > +--- > + port/cpl_recode_iconv.cpp | 4 ++-- > + 1 file changed, 2 insertions(+), 2 deletions(-) > + > +diff --git a/port/cpl_recode_iconv.cpp b/port/cpl_recode_iconv.cpp > +index d341bb1..2346012 100644 > +--- a/port/cpl_recode_iconv.cpp > ++++ b/port/cpl_recode_iconv.cpp > +@@ -87,7 +87,7 @@ char *CPLRecodeIconv( const char *pszSource, > + > + sConv = iconv_open( pszDstEncoding, pszSrcEncoding ); > + > +- if( sConv == reinterpret_cast<iconv_t>(-1) ) > ++ if( sConv == (iconv_t)(-1) ) > + { > + CPLError( CE_Warning, CPLE_AppDefined, > + "Recode from %s to %s failed with the error: \"%s\".", > +@@ -234,7 +234,7 @@ char *CPLRecodeFromWCharIconv( const wchar_t *pwszSource, > + > + sConv = iconv_open( pszDstEncoding, pszSrcEncoding ); > + > +- if( sConv == reinterpret_cast<iconv_t>(-1) ) > ++ if( sConv == (iconv_t)(-1) ) > + { > + CPLFree( pszIconvSrcBuf ); > + CPLError( CE_Warning, CPLE_AppDefined, > +-- > +2.31.1 > + > diff --git a/package/libgdal/Config.in b/package/libgdal/Config.in > new file mode 100644 > index 0000000000..1d64bfb67f > --- /dev/null > +++ b/package/libgdal/Config.in > @@ -0,0 +1,22 @@ > +config BR2_PACKAGE_LIBGDAL > + bool "libgdal" > + depends on BR2_INSTALL_LIBSTDCPP > + # configure can't find proj, when linking statically > + depends on !BR2_STATIC_LIBS > + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11 > + select BR2_PACKAGE_PROJ The full proj dependencies are: config BR2_PACKAGE_PROJ bool "proj" depends on BR2_INSTALL_LIBSTDCPP depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11 depends on BR2_TOOLCHAIN_HAS_THREADS depends on BR2_USE_WCHAR select BR2_PACKAGE_SQLITE So BR2_TOOLCHAIN_HAS_THREADS and BR2_USE_WCHAR are missing here (and propagated dependencies should be marked by a comment like the following '... # proj')... > + help > + GDAL is a translator library for raster and vector geospatial > + data formats. As a library, it presents a single raster > + abstract data model and single vector abstract data model to > + the calling application for all supported formats. It also > + comes with a variety of useful command line utilities for data > + translation and processing. > + > + https://gdal.org/ > + > +comment "libgdal needs a toolchain w/ C++, dynamic library, gcc >= 4.7, proj" > + depends on !BR2_INSTALL_LIBSTDCPP || \ > + !BR2_STATIC_LIBS || \ > + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 || \ > + !BR2_PACKAGE_PROJ No need for proj/BR2_PACKAGE_PROJ here (as your are already selecting it above)... > diff --git a/package/libgdal/libgdal.hash b/package/libgdal/libgdal.hash > new file mode 100644 > index 0000000000..48aad360d7 > --- /dev/null > +++ b/package/libgdal/libgdal.hash > @@ -0,0 +1,6 @@ > +# md5 from: https://download.osgeo.org/gdal/3.2.2/gdal-3.2.2.tar.xz.md5, sha256 locally computed: > +md5 c656be582f7beb528c66486cd1fca7a2 gdal-3.2.2.tar.xz > +sha256 a7e1e414e5c405af48982bf4724a3da64a05770254f2ce8affb5f58a7604ca57 gdal-3.2.2.tar.xz > + > +# Hash for license file: > +sha256 b82e6cca0b13f5db2f22ab667f22254fb1f4b135ea73d5bd6238ef89aff31f6c LICENSE.TXT > diff --git a/package/libgdal/libgdal.mk b/package/libgdal/libgdal.mk > new file mode 100644 > index 0000000000..31bf73ec84 > --- /dev/null > +++ b/package/libgdal/libgdal.mk > @@ -0,0 +1,26 @@ > +################################################################################ > +# > +# libgdal > +# > +################################################################################ > + > +LIBGDAL_VERSION = 3.2.2 > +LIBGDAL_SITE = https://download.osgeo.org/gdal/$(LIBGDAL_VERSION) > +LIBGDAL_SOURCE = gdal-$(LIBGDAL_VERSION).tar.xz > +LIBGDAL_LICENSE = MIT > +LIBGDAL_LICENSE_FILES = LICENSE.TXT There are (many) more licenses referenced from LICENSE.TXT... > +LIBGDAL_INSTALL_STAGING = YES > +LIBGDAL_CONFIG_SCRIPTS = gdal-config > +LIBGDAL_DEPENDENCIES = host-pkgconf proj > + > +ifeq ($(BR2_PACKAGE_POSTGRESQL),y) > +LIBGDAL_DEPENDENCIES += postgresql > +LIBGDAL_CONF_OPTS += --with-pg > +endif Else case with explicit disable preferred here (in case the upstream default changes)... > + > +ifeq ($(BR2_PACKAGE_LIBXML2),y) > +LIBGDAL_DEPENDENCIES += libxml2 > +LIBGDAL_CONF_OPTS += --with-xml2 > +endif Else case with explicit disable preferred here (in case the upstream default changes)... Quick look at ./configure --help prevails a lot more configure options and/or (optional?) dependencies... Regards, Peter > + > +$(eval $(autotools-package)) ^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH 1/1] package/libgdal: new package 2021-05-02 14:38 ` Peter Seiderer @ 2021-05-02 18:03 ` Peter Seiderer 0 siblings, 0 replies; 13+ messages in thread From: Peter Seiderer @ 2021-05-02 18:03 UTC (permalink / raw) To: buildroot On Sun, 2 May 2021 16:38:29 +0200, Peter Seiderer <ps.report@gmx.net> wrote: > Hello Dominik, > > thanks for patch contribution, a quick/first review below: > > On Sun, 2 May 2021 13:06:19 +0000, Dominik Michael Rauh <dmrauh@posteo.de> wrote: > > > GDAL is a translator library for raster and vector geospatial data > > formats. As a library, it presents a single raster abstract data model > > and single vector abstract data model to the calling application for all > > supported formats. It also comes with a variety of useful command line > > utilities for data translation and processing. > > > > https://gdal.org/ > > > > Signed-off-by: Dominik Michael Rauh <dmrauh@posteo.de> > > --- > > package/Config.in | 1 + > > ...1-port-cpl_recode_iconv.cpp-use-cast.patch | 38 +++++++++++++++++++ > > package/libgdal/Config.in | 22 +++++++++++ > > package/libgdal/libgdal.hash | 6 +++ > > package/libgdal/libgdal.mk | 26 +++++++++++++ > > 5 files changed, 93 insertions(+) > > create mode 100644 package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch > > create mode 100644 package/libgdal/Config.in > > create mode 100644 package/libgdal/libgdal.hash > > create mode 100644 package/libgdal/libgdal.mk > > > > diff --git a/package/Config.in b/package/Config.in > > index 6181aaac2c..56c55dffc5 100644 > > --- a/package/Config.in > > +++ b/package/Config.in > > @@ -1915,6 +1915,7 @@ menu "Other" > > source "package/libevdev/Config.in" > > source "package/libevent/Config.in" > > source "package/libffi/Config.in" > > + source "package/libgdal/Config.in" > > source "package/libgee/Config.in" > > source "package/libgeos/Config.in" > > source "package/libglib2/Config.in" > > diff --git a/package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch b/package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch > > new file mode 100644 > > index 0000000000..fd168c769e > > --- /dev/null > > +++ b/package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch > > @@ -0,0 +1,38 @@ > > +From 8f59911ced01da6dba7784098e97eefeef96d3a5 Mon Sep 17 00:00:00 2001 > > +From: Dominik Michael Rauh <dmrauh@posteo.de> > > +Date: Sat, 1 May 2021 20:11:30 +0200 > > +Subject: [PATCH] port/cpl_recode_iconv.cpp: use cast > > + > > +Fixes error: invalid cast from type 'int' to type 'iconv_t' {aka 'long > > +int'}. > > + > > +Signed-off-by: Dominik Michael Rauh <dmrauh@posteo.de> > > +--- > > + port/cpl_recode_iconv.cpp | 4 ++-- > > + 1 file changed, 2 insertions(+), 2 deletions(-) > > + > > +diff --git a/port/cpl_recode_iconv.cpp b/port/cpl_recode_iconv.cpp > > +index d341bb1..2346012 100644 > > +--- a/port/cpl_recode_iconv.cpp > > ++++ b/port/cpl_recode_iconv.cpp > > +@@ -87,7 +87,7 @@ char *CPLRecodeIconv( const char *pszSource, > > + > > + sConv = iconv_open( pszDstEncoding, pszSrcEncoding ); > > + > > +- if( sConv == reinterpret_cast<iconv_t>(-1) ) > > ++ if( sConv == (iconv_t)(-1) ) > > + { > > + CPLError( CE_Warning, CPLE_AppDefined, > > + "Recode from %s to %s failed with the error: \"%s\".", > > +@@ -234,7 +234,7 @@ char *CPLRecodeFromWCharIconv( const wchar_t *pwszSource, > > + > > + sConv = iconv_open( pszDstEncoding, pszSrcEncoding ); > > + > > +- if( sConv == reinterpret_cast<iconv_t>(-1) ) > > ++ if( sConv == (iconv_t)(-1) ) > > + { > > + CPLFree( pszIconvSrcBuf ); > > + CPLError( CE_Warning, CPLE_AppDefined, > > +-- > > +2.31.1 > > + > > diff --git a/package/libgdal/Config.in b/package/libgdal/Config.in > > new file mode 100644 > > index 0000000000..1d64bfb67f > > --- /dev/null > > +++ b/package/libgdal/Config.in > > @@ -0,0 +1,22 @@ > > +config BR2_PACKAGE_LIBGDAL > > + bool "libgdal" > > + depends on BR2_INSTALL_LIBSTDCPP > > + # configure can't find proj, when linking statically > > + depends on !BR2_STATIC_LIBS > > + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11 > > + select BR2_PACKAGE_PROJ > > The full proj dependencies are: > > config BR2_PACKAGE_PROJ > bool "proj" > depends on BR2_INSTALL_LIBSTDCPP > depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11 > depends on BR2_TOOLCHAIN_HAS_THREADS > depends on BR2_USE_WCHAR > select BR2_PACKAGE_SQLITE > > So BR2_TOOLCHAIN_HAS_THREADS and BR2_USE_WCHAR are missing here (and propagated > dependencies should be marked by a comment like the following '... # proj')... > > > + help > > + GDAL is a translator library for raster and vector geospatial > > + data formats. As a library, it presents a single raster > > + abstract data model and single vector abstract data model to > > + the calling application for all supported formats. It also > > + comes with a variety of useful command line utilities for data > > + translation and processing. > > + > > + https://gdal.org/ > > + > > +comment "libgdal needs a toolchain w/ C++, dynamic library, gcc >= 4.7, proj" > > + depends on !BR2_INSTALL_LIBSTDCPP || \ > > + !BR2_STATIC_LIBS || \ > > + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 || \ > > + !BR2_PACKAGE_PROJ > > No need for proj/BR2_PACKAGE_PROJ here (as your are already selecting it above)... > > > diff --git a/package/libgdal/libgdal.hash b/package/libgdal/libgdal.hash > > new file mode 100644 > > index 0000000000..48aad360d7 > > --- /dev/null > > +++ b/package/libgdal/libgdal.hash > > @@ -0,0 +1,6 @@ > > +# md5 from: https://download.osgeo.org/gdal/3.2.2/gdal-3.2.2.tar.xz.md5, sha256 locally computed: > > +md5 c656be582f7beb528c66486cd1fca7a2 gdal-3.2.2.tar.xz > > +sha256 a7e1e414e5c405af48982bf4724a3da64a05770254f2ce8affb5f58a7604ca57 gdal-3.2.2.tar.xz > > + > > +# Hash for license file: > > +sha256 b82e6cca0b13f5db2f22ab667f22254fb1f4b135ea73d5bd6238ef89aff31f6c LICENSE.TXT > > diff --git a/package/libgdal/libgdal.mk b/package/libgdal/libgdal.mk > > new file mode 100644 > > index 0000000000..31bf73ec84 > > --- /dev/null > > +++ b/package/libgdal/libgdal.mk > > @@ -0,0 +1,26 @@ > > +################################################################################ > > +# > > +# libgdal > > +# > > +################################################################################ > > + > > +LIBGDAL_VERSION = 3.2.2 > > +LIBGDAL_SITE = https://download.osgeo.org/gdal/$(LIBGDAL_VERSION) > > +LIBGDAL_SOURCE = gdal-$(LIBGDAL_VERSION).tar.xz > > +LIBGDAL_LICENSE = MIT > > +LIBGDAL_LICENSE_FILES = LICENSE.TXT > > There are (many) more licenses referenced from LICENSE.TXT... > > > +LIBGDAL_INSTALL_STAGING = YES > > +LIBGDAL_CONFIG_SCRIPTS = gdal-config > > +LIBGDAL_DEPENDENCIES = host-pkgconf proj > > + > > +ifeq ($(BR2_PACKAGE_POSTGRESQL),y) > > +LIBGDAL_DEPENDENCIES += postgresql > > +LIBGDAL_CONF_OPTS += --with-pg > > +endif > > Else case with explicit disable preferred here (in case the > upstream default changes)... > > > + > > +ifeq ($(BR2_PACKAGE_LIBXML2),y) > > +LIBGDAL_DEPENDENCIES += libxml2 > > +LIBGDAL_CONF_OPTS += --with-xml2 > > +endif > > Else case with explicit disable preferred here (in case the > upstream default changes)... > > Quick look at ./configure --help prevails a lot more configure options > and/or (optional?) dependencies... A test with utils/test-pkg and the following config: BR2_PACKAGE_PROJ=y BR2_PACKAGE_LIBGDAL=y gives: andes-nds32 [ 1/45]: SKIPPED arm-aarch64 [ 2/45]: FAILED bootlin-aarch64-glibc [ 3/45]: FAILED bootlin-arcle-hs38-uclibc [ 4/45]: OK bootlin-armv5-uclibc [ 5/45]: OK bootlin-armv7-glibc [ 6/45]: OK bootlin-armv7m-uclibc [ 7/45]: SKIPPED bootlin-armv7-musl [ 8/45]: OK bootlin-m68k-5208-uclibc [ 9/45]: SKIPPED bootlin-m68k-68040-uclibc [10/45]: FAILED bootlin-microblazeel-uclibc [11/45]: OK bootlin-mipsel32r6-glibc [12/45]: OK bootlin-mipsel-uclibc [13/45]: OK bootlin-nios2-glibc [14/45]: FAILED .../bootlin-nios2-glibc/host/opt/ext-toolchain/bin/../lib/gcc/nios2-buildroot-linux-gnu/9.3.0/../../../../nios2-buildroot-linux-gnu/bin/ld: BFD (GNU Binutils) 2.33.1 assertion fail elf32-nios2.c:1887 bootlin-openrisc-uclibc [15/45]: FAILED swq_op_general.cpp:(.text+0x2500): relocation truncated to fit: R_OR1K_GOT16 against symbol `vtable for CPLSafeIntOverflow' defined in .data.rel.ro._ZTV18CPLSafeIntOverflow[_ZTV18CPLSafeIntOverflow] section in ./ogr/.libs/swq_op_general.o bootlin-powerpc64le-power8-glibc [16/45]: FAILED .../bootlin-powerpc64le-power8-glibc/host/opt/ext-toolchain/bin/../lib/gcc/powerpc64le-buildroot-linux-gnu/9.3.0/../../../../powerpc64le-buildroot-linux-gnu/bin/ld: .../bootlin-powerpc64le-power8-glibc/build/libgdal-3.2.2/.libs/libgdal.so: undefined reference to `png_init_filter_functions_vsx' bootlin-powerpc-e500mc-uclibc [17/45]: OK bootlin-riscv32-glibc [18/45]: OK bootlin-riscv64-glibc [19/45]: OK bootlin-riscv64-musl [20/45]: OK bootlin-sh4-uclibc [21/45]: OK bootlin-sparc64-glibc [22/45]: OK bootlin-sparc-uclibc [23/45]: OK bootlin-x86-64-glibc [24/45]: OK bootlin-x86-64-musl [25/45]: OK bootlin-x86-64-uclibc [26/45]: OK bootlin-xtensa-uclibc [27/45]: OK br-arm-basic [28/45]: SKIPPED br-arm-full-nothread [29/45]: SKIPPED br-arm-full-static [30/45]: SKIPPED br-i386-pentium4-full [31/45]: OK br-i386-pentium-mmx-musl [32/45]: OK br-mips64-n64-full [33/45]: OK br-mips64r6-el-hf-glibc [34/45]: OK br-powerpc-603e-basic-cpp [35/45]: SKIPPED br-powerpc64-power7-glibc [36/45]: FAILED .../br-powerpc64-power7-glibc/host/opt/ext-toolchain/bin/../lib/gcc/powerpc64-buildroot-linux-gnu/9.3.0/../../../../powerpc64-buildroot-linux-gnu/bin/ld: .../br-powerpc64-power7-glibc/build/libgdal-3.2.2/.libs/libgdal.so: undefined reference to `png_init_filter_functions_vsx' linaro-aarch64-be [37/45]: FAILED .../linaro-aarch64-be/build/libgdal-3.2.2/.libs/libgdal.so: undefined reference to `png_init_filter_functions_neon' linaro-aarch64 [38/45]: FAILED .../linaro-aarch64/build/libgdal-3.2.2/.libs/libgdal.so: undefined reference to `png_init_filter_functions_neon' linaro-arm [39/45]: OK sourcery-arm-armv4t [40/45]: OK sourcery-arm [41/45]: OK sourcery-arm-thumb2 [42/45]: OK sourcery-mips64 [43/45]: OK sourcery-mips [44/45]: OK sourcery-nios2 [45/45]: FAILED .../sourcery-nios2/host/opt/ext-toolchain/bin/../lib/gcc/nios2-linux-gnu/7.3.1/../../../../nios2-linux-gnu/bin/ld: BFD (Sourcery CodeBench Lite 2018.05-5) 2.28.51 assertion fail /scratch/sandra/nios2-linux-spring-release/obj/binutils-src-2018.05-5-nios2-linux-gnu-i686-pc-linux-gnu/bfd/elf32-nios2.c:1906 Regars, Peter > > Regards, > Peter > > > + > > +$(eval $(autotools-package)) > > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH v2] package/libgdal: new package 2021-05-02 13:06 [Buildroot] [PATCH 1/1] package/libgdal: new package Dominik Michael Rauh 2021-05-02 14:38 ` Peter Seiderer @ 2021-05-04 16:57 ` Dominik Michael Rauh 2021-05-28 15:29 ` [Buildroot] [PATCH v3] " Dominik Michael Rauh 1 sibling, 1 reply; 13+ messages in thread From: Dominik Michael Rauh @ 2021-05-04 16:57 UTC (permalink / raw) To: buildroot GDAL is a translator library for raster and vector geospatial data formats. As a library, it presents a single raster abstract data model and single vector abstract data model to the calling application for all supported formats. It also comes with a variety of useful command line utilities for data translation and processing. https://gdal.org/ Signed-off-by: Dominik Michael Rauh <dmrauh@posteo.de> --- Changes v1 -> v2 (after review by Peter Seiderer): - Disable NEON and VSX support when using libgdal's libpng - Disable compilation for toolchains with binutils bug 21464 or 27597 - Add the proper "depends" demanded by proj - Fix the comment in Config.in - Hopefully add the complete LIBGDAL_LICENSE information package/Config.in | 1 + ...1-port-cpl_recode_iconv.cpp-use-cast.patch | 38 +++++++++++++++ package/libgdal/Config.in | 27 +++++++++++ package/libgdal/libgdal.hash | 6 +++ package/libgdal/libgdal.mk | 48 +++++++++++++++++++ 5 files changed, 120 insertions(+) create mode 100644 package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch create mode 100644 package/libgdal/Config.in create mode 100644 package/libgdal/libgdal.hash create mode 100644 package/libgdal/libgdal.mk diff --git a/package/Config.in b/package/Config.in index 7ac10b9d42..0b82b833c6 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1914,6 +1914,7 @@ menu "Other" source "package/libevdev/Config.in" source "package/libevent/Config.in" source "package/libffi/Config.in" + source "package/libgdal/Config.in" source "package/libgee/Config.in" source "package/libgeos/Config.in" source "package/libglib2/Config.in" diff --git a/package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch b/package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch new file mode 100644 index 0000000000..9fa958524f --- /dev/null +++ b/package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch @@ -0,0 +1,38 @@ +From 0730ebc7a1e22a169bf3a1d873e130e079a68b3d Mon Sep 17 00:00:00 2001 +From: Dominik Michael Rauh <dmrauh@posteo.de> +Date: Sat, 1 May 2021 20:11:30 +0200 +Subject: [PATCH] port/cpl_recode_iconv.cpp: use cast + +Fixes error: invalid cast from type 'int' to type 'iconv_t' {aka 'long +int'} + +Signed-off-by: Dominik Michael Rauh <dmrauh@posteo.de> +--- + port/cpl_recode_iconv.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/port/cpl_recode_iconv.cpp b/port/cpl_recode_iconv.cpp +index d341bb1..2346012 100644 +--- a/port/cpl_recode_iconv.cpp ++++ b/port/cpl_recode_iconv.cpp +@@ -87,7 +87,7 @@ char *CPLRecodeIconv( const char *pszSource, + + sConv = iconv_open( pszDstEncoding, pszSrcEncoding ); + +- if( sConv == reinterpret_cast<iconv_t>(-1) ) ++ if( sConv == (iconv_t)(-1) ) + { + CPLError( CE_Warning, CPLE_AppDefined, + "Recode from %s to %s failed with the error: \"%s\".", +@@ -234,7 +234,7 @@ char *CPLRecodeFromWCharIconv( const wchar_t *pwszSource, + + sConv = iconv_open( pszDstEncoding, pszSrcEncoding ); + +- if( sConv == reinterpret_cast<iconv_t>(-1) ) ++ if( sConv == (iconv_t)(-1) ) + { + CPLFree( pszIconvSrcBuf ); + CPLError( CE_Warning, CPLE_AppDefined, +-- +2.31.1 + diff --git a/package/libgdal/Config.in b/package/libgdal/Config.in new file mode 100644 index 0000000000..a197d25aff --- /dev/null +++ b/package/libgdal/Config.in @@ -0,0 +1,27 @@ +config BR2_PACKAGE_LIBGDAL + bool "libgdal" + depends on BR2_INSTALL_LIBSTDCPP # proj + # configure can't find proj, when linking statically + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11, proj + depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464 + depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27597 + depends on BR2_TOOLCHAIN_HAS_THREADS # proj + depends on BR2_USE_WCHAR # proj + select BR2_PACKAGE_PROJ + help + GDAL is a translator library for raster and vector geospatial + data formats. As a library, it presents a single raster + abstract data model and single vector abstract data model to + the calling application for all supported formats. It also + comes with a variety of useful command line utilities for data + translation and processing. + + https://gdal.org/ + +comment "libgdal needs a toolchain w/ C++, dynamic library, gcc >= 4.7, not binutils bug 21464, 27597, threads, wchar" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 || \ + BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464 || \ + BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27597 || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_USE_WCHAR diff --git a/package/libgdal/libgdal.hash b/package/libgdal/libgdal.hash new file mode 100644 index 0000000000..48aad360d7 --- /dev/null +++ b/package/libgdal/libgdal.hash @@ -0,0 +1,6 @@ +# md5 from: https://download.osgeo.org/gdal/3.2.2/gdal-3.2.2.tar.xz.md5, sha256 locally computed: +md5 c656be582f7beb528c66486cd1fca7a2 gdal-3.2.2.tar.xz +sha256 a7e1e414e5c405af48982bf4724a3da64a05770254f2ce8affb5f58a7604ca57 gdal-3.2.2.tar.xz + +# Hash for license file: +sha256 b82e6cca0b13f5db2f22ab667f22254fb1f4b135ea73d5bd6238ef89aff31f6c LICENSE.TXT diff --git a/package/libgdal/libgdal.mk b/package/libgdal/libgdal.mk new file mode 100644 index 0000000000..e3d7b325c1 --- /dev/null +++ b/package/libgdal/libgdal.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# libgdal +# +################################################################################ + +LIBGDAL_VERSION = 3.2.2 +LIBGDAL_SITE = https://download.osgeo.org/gdal/$(LIBGDAL_VERSION) +LIBGDAL_SOURCE = gdal-$(LIBGDAL_VERSION).tar.xz +LIBGDAL_LICENSE = MIT (GDAL/OGR), BSD-3-Clause, BSD-Style, APACHE-2.0 +LIBGDAL_LICENSE_FILES = LICENSE.TXT +LIBGDAL_INSTALL_STAGING = YES +LIBGDAL_CONFIG_SCRIPTS = gdal-config +LIBGDAL_DEPENDENCIES = host-pkgconf proj + +# libgdal fails to detect NEON support on aarch64 or ARM platforms +# resp. VSX support on PowerPC based platforms. While linking an +# application with libgdal.so, we get an undefined reference to +# png_init_filter_functions_neon resp. png_init_filter_functions_vsx. +# Some files are missing in the libpng bundled with libgdal, in +# particular arm/arm_init.c and powerpc/powerpc_init.c, so disable NEON +# and VSX support completely when using libgdal's internal libpng. + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +LIBGDAL_DEPENDENCIES += libpng +LIBGDAL_CONF_OPTS += --with-png=$(STAGING_DIR)/usr +else +LIBGDAL_CONF_OPTS += --with-png=internal +LIBGDAL_CPPFLAGS += -DPNG_ARM_NEON_OPT=0 -DPNG_POWERPC_VSX_OPT=0 +endif + +ifeq ($(BR2_PACKAGE_POSTGRESQL),y) +LIBGDAL_DEPENDENCIES += postgresql +LIBGDAL_CONF_OPTS += --with-pg=yes +else +LIBGDAL_CONF_OPTS += --with-pg=no +endif + +ifeq ($(BR2_PACKAGE_LIBXML2),y) +LIBGDAL_DEPENDENCIES += libxml2 +LIBGDAL_CONF_OPTS += --with-xml2=yes +else +LIBGDAL_CONF_OPTS += --with-xml2=no +endif + +LIBGDAL_CONF_OPTS += CPPFLAGS="$(TARGET_CPPFLAGS) $(LIBGDAL_CPPFLAGS)" + +$(eval $(autotools-package)) -- 2.31.1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH v3] package/libgdal: new package 2021-05-04 16:57 ` [Buildroot] [PATCH v2] " Dominik Michael Rauh @ 2021-05-28 15:29 ` Dominik Michael Rauh 2021-07-25 19:37 ` Thomas Petazzoni 2021-08-02 9:24 ` [Buildroot] [PATCH v4] " Dominik Michael Rauh 0 siblings, 2 replies; 13+ messages in thread From: Dominik Michael Rauh @ 2021-05-28 15:29 UTC (permalink / raw) To: buildroot GDAL is a translator library for raster and vector geospatial data formats. As a library, it presents a single raster abstract data model and single vector abstract data model to the calling application for all supported formats. It also comes with a variety of useful command line utilities for data translation and processing. https://gdal.org/ Signed-off-by: Dominik Michael Rauh <dmrauh@posteo.de> --- Changes v2 -> v3: - Bump version from 3.2.2 to 3.3.0 Changes v1 -> v2 (after review by Peter Seiderer): - Disable NEON and VSX support when using libgdal's libpng - Disable compilation for toolchains with binutils bug 21464 or 27597 - Add the proper "depends" demanded by proj - Fix the comment in Config.in - Hopefully add the complete LIBGDAL_LICENSE information package/Config.in | 1 + ...1-port-cpl_recode_iconv.cpp-use-cast.patch | 38 +++++++++++++++ package/libgdal/Config.in | 27 +++++++++++ package/libgdal/libgdal.hash | 6 +++ package/libgdal/libgdal.mk | 48 +++++++++++++++++++ 5 files changed, 120 insertions(+) create mode 100644 package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch create mode 100644 package/libgdal/Config.in create mode 100644 package/libgdal/libgdal.hash create mode 100644 package/libgdal/libgdal.mk diff --git a/package/Config.in b/package/Config.in index 82b28d2835..c2262835cc 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1914,6 +1914,7 @@ menu "Other" source "package/libevdev/Config.in" source "package/libevent/Config.in" source "package/libffi/Config.in" + source "package/libgdal/Config.in" source "package/libgee/Config.in" source "package/libgeos/Config.in" source "package/libglib2/Config.in" diff --git a/package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch b/package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch new file mode 100644 index 0000000000..9fa958524f --- /dev/null +++ b/package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch @@ -0,0 +1,38 @@ +From 0730ebc7a1e22a169bf3a1d873e130e079a68b3d Mon Sep 17 00:00:00 2001 +From: Dominik Michael Rauh <dmrauh@posteo.de> +Date: Sat, 1 May 2021 20:11:30 +0200 +Subject: [PATCH] port/cpl_recode_iconv.cpp: use cast + +Fixes error: invalid cast from type 'int' to type 'iconv_t' {aka 'long +int'} + +Signed-off-by: Dominik Michael Rauh <dmrauh@posteo.de> +--- + port/cpl_recode_iconv.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/port/cpl_recode_iconv.cpp b/port/cpl_recode_iconv.cpp +index d341bb1..2346012 100644 +--- a/port/cpl_recode_iconv.cpp ++++ b/port/cpl_recode_iconv.cpp +@@ -87,7 +87,7 @@ char *CPLRecodeIconv( const char *pszSource, + + sConv = iconv_open( pszDstEncoding, pszSrcEncoding ); + +- if( sConv == reinterpret_cast<iconv_t>(-1) ) ++ if( sConv == (iconv_t)(-1) ) + { + CPLError( CE_Warning, CPLE_AppDefined, + "Recode from %s to %s failed with the error: \"%s\".", +@@ -234,7 +234,7 @@ char *CPLRecodeFromWCharIconv( const wchar_t *pwszSource, + + sConv = iconv_open( pszDstEncoding, pszSrcEncoding ); + +- if( sConv == reinterpret_cast<iconv_t>(-1) ) ++ if( sConv == (iconv_t)(-1) ) + { + CPLFree( pszIconvSrcBuf ); + CPLError( CE_Warning, CPLE_AppDefined, +-- +2.31.1 + diff --git a/package/libgdal/Config.in b/package/libgdal/Config.in new file mode 100644 index 0000000000..a197d25aff --- /dev/null +++ b/package/libgdal/Config.in @@ -0,0 +1,27 @@ +config BR2_PACKAGE_LIBGDAL + bool "libgdal" + depends on BR2_INSTALL_LIBSTDCPP # proj + # configure can't find proj, when linking statically + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11, proj + depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464 + depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27597 + depends on BR2_TOOLCHAIN_HAS_THREADS # proj + depends on BR2_USE_WCHAR # proj + select BR2_PACKAGE_PROJ + help + GDAL is a translator library for raster and vector geospatial + data formats. As a library, it presents a single raster + abstract data model and single vector abstract data model to + the calling application for all supported formats. It also + comes with a variety of useful command line utilities for data + translation and processing. + + https://gdal.org/ + +comment "libgdal needs a toolchain w/ C++, dynamic library, gcc >= 4.7, not binutils bug 21464, 27597, threads, wchar" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 || \ + BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464 || \ + BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27597 || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_USE_WCHAR diff --git a/package/libgdal/libgdal.hash b/package/libgdal/libgdal.hash new file mode 100644 index 0000000000..2dc6dc3766 --- /dev/null +++ b/package/libgdal/libgdal.hash @@ -0,0 +1,6 @@ +# md5 from: https://download.osgeo.org/gdal/3.3.0/gdal-3.3.0.tar.xz.md5, sha256 locally computed: +md5 000db27a7b3e146b9dcb3838aabde2ab gdal-3.3.0.tar.xz +sha256 190c8f4b56afc767f43836b2a5cd53cc52ee7fdc25eb78c6079c5a244e28efa7 gdal-3.3.0.tar.xz + +# Hash of license file: +sha256 b82e6cca0b13f5db2f22ab667f22254fb1f4b135ea73d5bd6238ef89aff31f6c LICENSE.TXT diff --git a/package/libgdal/libgdal.mk b/package/libgdal/libgdal.mk new file mode 100644 index 0000000000..b86b2154e4 --- /dev/null +++ b/package/libgdal/libgdal.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# libgdal +# +################################################################################ + +LIBGDAL_VERSION = 3.3.0 +LIBGDAL_SITE = https://download.osgeo.org/gdal/$(LIBGDAL_VERSION) +LIBGDAL_SOURCE = gdal-$(LIBGDAL_VERSION).tar.xz +LIBGDAL_LICENSE = MIT (GDAL/OGR), BSD-3-Clause, BSD-Style, APACHE-2.0 +LIBGDAL_LICENSE_FILES = LICENSE.TXT +LIBGDAL_INSTALL_STAGING = YES +LIBGDAL_CONFIG_SCRIPTS = gdal-config +LIBGDAL_DEPENDENCIES = host-pkgconf proj + +# libgdal fails to detect NEON support on aarch64 or ARM platforms +# resp. VSX support on PowerPC based platforms. While linking an +# application with libgdal.so, we get an undefined reference to +# png_init_filter_functions_neon resp. png_init_filter_functions_vsx. +# Some files are missing in the libpng bundled with libgdal, in +# particular arm/arm_init.c and powerpc/powerpc_init.c, so disable NEON +# and VSX support completely when using libgdal's internal libpng. + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +LIBGDAL_DEPENDENCIES += libpng +LIBGDAL_CONF_OPTS += --with-png=$(STAGING_DIR)/usr +else +LIBGDAL_CONF_OPTS += --with-png=internal +LIBGDAL_CPPFLAGS += -DPNG_ARM_NEON_OPT=0 -DPNG_POWERPC_VSX_OPT=0 +endif + +ifeq ($(BR2_PACKAGE_POSTGRESQL),y) +LIBGDAL_DEPENDENCIES += postgresql +LIBGDAL_CONF_OPTS += --with-pg=yes +else +LIBGDAL_CONF_OPTS += --with-pg=no +endif + +ifeq ($(BR2_PACKAGE_LIBXML2),y) +LIBGDAL_DEPENDENCIES += libxml2 +LIBGDAL_CONF_OPTS += --with-xml2=yes +else +LIBGDAL_CONF_OPTS += --with-xml2=no +endif + +LIBGDAL_CONF_OPTS += CPPFLAGS="$(TARGET_CPPFLAGS) $(LIBGDAL_CPPFLAGS)" + +$(eval $(autotools-package)) -- 2.31.1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH v3] package/libgdal: new package 2021-05-28 15:29 ` [Buildroot] [PATCH v3] " Dominik Michael Rauh @ 2021-07-25 19:37 ` Thomas Petazzoni 2021-08-02 9:24 ` [Buildroot] [PATCH v4] " Dominik Michael Rauh 1 sibling, 0 replies; 13+ messages in thread From: Thomas Petazzoni @ 2021-07-25 19:37 UTC (permalink / raw) To: Dominik Michael Rauh; +Cc: buildroot Hello Dominik, Thanks for your contribution, see below for some comments, actually just one main comment. On Fri, 28 May 2021 15:29:36 +0000 Dominik Michael Rauh <dmrauh@posteo.de> wrote: > +# libgdal fails to detect NEON support on aarch64 or ARM platforms > +# resp. VSX support on PowerPC based platforms. While linking an > +# application with libgdal.so, we get an undefined reference to > +# png_init_filter_functions_neon resp. png_init_filter_functions_vsx. > +# Some files are missing in the libpng bundled with libgdal, in > +# particular arm/arm_init.c and powerpc/powerpc_init.c, so disable NEON > +# and VSX support completely when using libgdal's internal libpng. > + > +ifeq ($(BR2_PACKAGE_LIBPNG),y) > +LIBGDAL_DEPENDENCIES += libpng > +LIBGDAL_CONF_OPTS += --with-png=$(STAGING_DIR)/usr > +else > +LIBGDAL_CONF_OPTS += --with-png=internal > +LIBGDAL_CPPFLAGS += -DPNG_ARM_NEON_OPT=0 -DPNG_POWERPC_VSX_OPT=0 > +endif If libgdal can use an external png, then we only want to use the external libpng, so libpng should be a mandatory dependency (I've tried building using --without-png, and it fails). However, you really need to look at the other configure options, and handle them, at least by explicitly disabling the features. It seems like there are a number of other libraries for which libgdal is by default using an internal copy, and where we will want to use the external library itself: DODS support: no ECW support: no Expat support: no EXR support: no FGDB support: no FreeXL support: no GEORASTER support: no GEOS support: no Google libkml support: no GRASS support: no GTA support: no HDF4 support: no HDF5 support: no HDFS support: no HEIF support: no INFORMIX DataBlade support:no Ingres support: no JP2Lura support: no JPEG 12 bit: yes JPEG-in-TIFF 12 bit: yes JPEG JasPer support: no JPEG-Lossless/CharLS: no Kakadu support: no Kea support: no LERC support: internal libdeflate support: no LIBGEOTIFF support: internal LIBGIF support: internal LIBJPEG support: internal LIBLZMA support: no LIBPNG support: no LIBTIFF support: internal (BigTIFF=yes) libxml2 support: no LIBZ support: internal MDB support: no MongoCXX v3 support: no MongoDB support: no MrSID/MG4 Lidar support: no MrSID support: no MSG support: no MySQL support: no NetCDF support: no OCI support: no ODBC support: no OGDI support: no OpenCL support: no OpenJPEG support: no PCIDSK support: internal PCRaster support: internal PCRE support: no PDFium support: no Podofo support: no Poppler support: no PostgreSQL support: no QHull support: internal Rasdaman support: no RasterLite2 support: no RDB support: no SFCGAL support: no SOSI support: no SpatiaLite support: no SQLite support: no Teigha (DWG and DGNv8): no TileDB support: no userfaultfd support: yes WebP support: no Xerces-C support: no ZSTD support: no Again, you don't need to support all those optional dependencies, but for the ones you don't handle in libgdal.mk, make sure to pass --without-<foo> so that libgdal doesn't pick it up "by chance". Could you improve your package submission according to these guidelines? Thanks a lot! Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list buildroot@busybox.net http://lists.busybox.net/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH v4] package/libgdal: new package 2021-05-28 15:29 ` [Buildroot] [PATCH v3] " Dominik Michael Rauh 2021-07-25 19:37 ` Thomas Petazzoni @ 2021-08-02 9:24 ` Dominik Michael Rauh 2021-08-03 20:09 ` Arnout Vandecappelle 2022-05-07 9:46 ` [Buildroot] [PATCH v5] package/gdal: " Dominik Michael Rauh 1 sibling, 2 replies; 13+ messages in thread From: Dominik Michael Rauh @ 2021-08-02 9:24 UTC (permalink / raw) To: buildroot; +Cc: Dominik Michael Rauh, Thomas Petazzoni GDAL is a translator library for raster and vector geospatial data formats. As a library, it presents a single raster abstract data model and single vector abstract data model to the calling application for all supported formats. It also comes with a variety of useful command line utilities for data translation and processing. https://gdal.org/ Signed-off-by: Dominik Michael Rauh <dmrauh@posteo.de> --- Changes v3 -> v4 (after review by Thomas Petazzoni): - Bump version from 3.3.0 to 3.3.1 - Configure libgdal to use external libraries where possible - Explicitely disable libraries not yet handled by Buildroot Changes v2 -> v3: - Bump version from 3.2.2 to 3.3.0 Changes v1 -> v2 (after review by Peter Seiderer): - Disable NEON and VSX support when using libgdal's libpng - Disable compilation for toolchains with binutils bug 21464 or 27597 - Add the proper "depends" demanded by proj - Fix the comment in Config.in - Hopefully add the complete LIBGDAL_LICENSE information package/Config.in | 1 + ...1-port-cpl_recode_iconv.cpp-use-cast.patch | 38 ++++++ package/libgdal/Config.in | 31 +++++ package/libgdal/libgdal.hash | 6 + package/libgdal/libgdal.mk | 121 ++++++++++++++++++ 5 files changed, 197 insertions(+) create mode 100644 package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch create mode 100644 package/libgdal/Config.in create mode 100644 package/libgdal/libgdal.hash create mode 100644 package/libgdal/libgdal.mk diff --git a/package/Config.in b/package/Config.in index 046c04e994..dbbdc35390 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1929,6 +1929,7 @@ menu "Other" source "package/libevdev/Config.in" source "package/libevent/Config.in" source "package/libffi/Config.in" + source "package/libgdal/Config.in" source "package/libgee/Config.in" source "package/libgeos/Config.in" source "package/libglib2/Config.in" diff --git a/package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch b/package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch new file mode 100644 index 0000000000..9fa958524f --- /dev/null +++ b/package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch @@ -0,0 +1,38 @@ +From 0730ebc7a1e22a169bf3a1d873e130e079a68b3d Mon Sep 17 00:00:00 2001 +From: Dominik Michael Rauh <dmrauh@posteo.de> +Date: Sat, 1 May 2021 20:11:30 +0200 +Subject: [PATCH] port/cpl_recode_iconv.cpp: use cast + +Fixes error: invalid cast from type 'int' to type 'iconv_t' {aka 'long +int'} + +Signed-off-by: Dominik Michael Rauh <dmrauh@posteo.de> +--- + port/cpl_recode_iconv.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/port/cpl_recode_iconv.cpp b/port/cpl_recode_iconv.cpp +index d341bb1..2346012 100644 +--- a/port/cpl_recode_iconv.cpp ++++ b/port/cpl_recode_iconv.cpp +@@ -87,7 +87,7 @@ char *CPLRecodeIconv( const char *pszSource, + + sConv = iconv_open( pszDstEncoding, pszSrcEncoding ); + +- if( sConv == reinterpret_cast<iconv_t>(-1) ) ++ if( sConv == (iconv_t)(-1) ) + { + CPLError( CE_Warning, CPLE_AppDefined, + "Recode from %s to %s failed with the error: \"%s\".", +@@ -234,7 +234,7 @@ char *CPLRecodeFromWCharIconv( const wchar_t *pwszSource, + + sConv = iconv_open( pszDstEncoding, pszSrcEncoding ); + +- if( sConv == reinterpret_cast<iconv_t>(-1) ) ++ if( sConv == (iconv_t)(-1) ) + { + CPLFree( pszIconvSrcBuf ); + CPLError( CE_Warning, CPLE_AppDefined, +-- +2.31.1 + diff --git a/package/libgdal/Config.in b/package/libgdal/Config.in new file mode 100644 index 0000000000..1f3861e944 --- /dev/null +++ b/package/libgdal/Config.in @@ -0,0 +1,31 @@ +config BR2_PACKAGE_LIBGDAL + bool "libgdal" + depends on BR2_INSTALL_LIBSTDCPP # proj, libjson + # configure can't find proj, when linking statically + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11, proj + depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464 + depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27597 + depends on BR2_TOOLCHAIN_HAS_THREADS # proj + depends on BR2_USE_WCHAR # proj + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBJSON + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_PROJ + select BR2_PACKAGE_ZLIB + help + GDAL is a translator library for raster and vector geospatial + data formats. As a library, it presents a single raster + abstract data model and single vector abstract data model to + the calling application for all supported formats. It also + comes with a variety of useful command line utilities for data + translation and processing. + + https://gdal.org/ + +comment "libgdal needs a toolchain w/ C++, dynamic library, gcc >= 4.7, not binutils bug 21464, 27597, threads, wchar" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 || \ + BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464 || \ + BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27597 || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_USE_WCHAR diff --git a/package/libgdal/libgdal.hash b/package/libgdal/libgdal.hash new file mode 100644 index 0000000000..ea770a38d2 --- /dev/null +++ b/package/libgdal/libgdal.hash @@ -0,0 +1,6 @@ +# md5 from: https://download.osgeo.org/gdal/3.3.1/gdal-3.3.1.tar.xz.md5, sha256 locally computed: +md5 7611300fece06853a1a88149e0cc8922 gdal-3.3.1.tar.xz +sha256 48ab00b77d49f08cf66c60ccce55abb6455c3079f545e60c90ee7ce857bccb70 gdal-3.3.1.tar.xz + +# Hash of license file: +sha256 b82e6cca0b13f5db2f22ab667f22254fb1f4b135ea73d5bd6238ef89aff31f6c LICENSE.TXT diff --git a/package/libgdal/libgdal.mk b/package/libgdal/libgdal.mk new file mode 100644 index 0000000000..337b8a7fb7 --- /dev/null +++ b/package/libgdal/libgdal.mk @@ -0,0 +1,121 @@ +################################################################################ +# +# libgdal +# +################################################################################ + +LIBGDAL_VERSION = 3.3.1 +LIBGDAL_SITE = https://download.osgeo.org/gdal/$(LIBGDAL_VERSION) +LIBGDAL_SOURCE = gdal-$(LIBGDAL_VERSION).tar.xz +LIBGDAL_LICENSE = MIT (GDAL/OGR), BSD-3-Clause, BSD-Style, APACHE-2.0 +LIBGDAL_LICENSE_FILES = LICENSE.TXT +LIBGDAL_INSTALL_STAGING = YES +LIBGDAL_CONFIG_SCRIPTS = gdal-config +# libgdal at its core only needs host-pkgconf, libgeotiff, proj and tiff but +# since by default mrf driver support is enabled, it also needs jpeg, libpng +# and zlib. By default there are also many other drivers enabled but it seems, +# in contrast to mrf driver support, that they can be implicitely disabled, by +# configuring libgdal without their respectively needed dependencies. +LIBGDAL_DEPENDENCIES = host-pkgconf jpeg libgeotiff libpng proj tiff zlib + +ifeq ($(BR2_PACKAGE_POSTGRESQL),y) +LIBGDAL_DEPENDENCIES += postgresql +LIBGDAL_CONF_OPTS += --with-pg +else +LIBGDAL_CONF_OPTS += --without-pg +endif + +ifeq ($(BR2_PACKAGE_LIBXML2),y) +LIBGDAL_DEPENDENCIES += libxml2 +LIBGDAL_CONF_OPTS += --with-xml2 +else +LIBGDAL_CONF_OPTS += --without-xml2 +endif + +LIBGDAL_CONF_OPTS += --with-cpp14 \ + --with-geotiff \ + --with-libjson-c \ + --with-libtiff \ + --with-libtool \ + --with-libz \ + --with-jpeg \ + --with-png \ + --with-proj + +# disable not yet handled packages and thus the associated libgdal drivers +LIBGDAL_CONF_OPTS += --without-armadillo \ + --without-cfitsio \ + --without-crypto \ + --without-cryptopp \ + --without-curl \ + --without-dds \ + --without-dods-root \ + --without-ecw \ + --without-expat \ + --without-exr \ + --without-fgdb \ + --without-fme \ + --without-freexl \ + --without-geos \ + --without-gnm \ + --without-libkml \ + --without-grass \ + --without-libgrass \ + --without-gta \ + --without-hdf4 \ + --without-hdf5 \ + --without-hdfs \ + --without-heif \ + --without-idb \ + --without-ingres \ + --without-java \ + --without-jp2lura \ + --without-jpeg12 \ + --without-jasper \ + --without-charls \ + --without-kakadu \ + --without-kea \ + --without-lerc \ + --without-gif \ + --without-liblzma \ + --without-libdeflate \ + --without-mdb \ + --without-mongocxx \ + --without-mongocxxv3 \ + --without-mrsid \ + --without-jp2mrsid \ + --without-macosx-framework \ + --without-mrsid_lidar \ + --without-msg \ + --without-mysql \ + --without-netcdf \ + --without-null \ + --without-oci \ + --without-odbc \ + --without-ogdi \ + --without-opencl \ + --without-openjpeg \ + --without-pam \ + --without-pcidsk \ + --without-pcraster \ + --without-pcre \ + --without-pdfium \ + --without-perl \ + --without-podofo \ + --without-poppler \ + --without-python \ + --without-qhull \ + --without-rasdaman \ + --without-rasterlite2 \ + --without-rdb \ + --without-sfcgal \ + --without-sosi \ + --without-spatialite \ + --without-sqlite3 \ + --without-teigha \ + --without-tiledb \ + --without-webp \ + --without-xerces \ + --without-zstd + +$(eval $(autotools-package)) -- 2.32.0 _______________________________________________ buildroot mailing list buildroot@busybox.net http://lists.busybox.net/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH v4] package/libgdal: new package 2021-08-02 9:24 ` [Buildroot] [PATCH v4] " Dominik Michael Rauh @ 2021-08-03 20:09 ` Arnout Vandecappelle 2021-08-03 20:19 ` Arnout Vandecappelle 2022-05-07 9:46 ` [Buildroot] [PATCH v5] package/gdal: " Dominik Michael Rauh 1 sibling, 1 reply; 13+ messages in thread From: Arnout Vandecappelle @ 2021-08-03 20:09 UTC (permalink / raw) To: Dominik Michael Rauh, buildroot; +Cc: Maxim Kochetkov, Thomas Petazzoni Hi Dominik, I still have a few comments. I could make the necessary changes myself, but I'm feeling lazy today :-). On 02/08/2021 11:24, Dominik Michael Rauh wrote: > GDAL is a translator library for raster and vector geospatial data > formats. As a library, it presents a single raster abstract data model > and single vector abstract data model to the calling application for all > supported formats. It also comes with a variety of useful command line > utilities for data translation and processing. > > https://gdal.org/ > > Signed-off-by: Dominik Michael Rauh <dmrauh@posteo.de> It's really nice that you add this package, because when I added postgis (contributed by Maxim) I didn't notice that it had on optional dependency on GDAL, which wasn't added yet... > --- > Changes v3 -> v4 (after review by Thomas Petazzoni): > - Bump version from 3.3.0 to 3.3.1 > - Configure libgdal to use external libraries where possible > - Explicitely disable libraries not yet handled by Buildroot > > Changes v2 -> v3: > - Bump version from 3.2.2 to 3.3.0 > > Changes v1 -> v2 (after review by Peter Seiderer): > - Disable NEON and VSX support when using libgdal's libpng > - Disable compilation for toolchains with binutils bug 21464 or 27597 > - Add the proper "depends" demanded by proj > - Fix the comment in Config.in > - Hopefully add the complete LIBGDAL_LICENSE information > > package/Config.in | 1 + > ...1-port-cpl_recode_iconv.cpp-use-cast.patch | 38 ++++++ > package/libgdal/Config.in | 31 +++++ > package/libgdal/libgdal.hash | 6 + > package/libgdal/libgdal.mk | 121 ++++++++++++++++++ > 5 files changed, 197 insertions(+) > create mode 100644 package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch > create mode 100644 package/libgdal/Config.in > create mode 100644 package/libgdal/libgdal.hash > create mode 100644 package/libgdal/libgdal.mk > > diff --git a/package/Config.in b/package/Config.in > index 046c04e994..dbbdc35390 100644 > --- a/package/Config.in > +++ b/package/Config.in > @@ -1929,6 +1929,7 @@ menu "Other" > source "package/libevdev/Config.in" > source "package/libevent/Config.in" > source "package/libffi/Config.in" > + source "package/libgdal/Config.in" > source "package/libgee/Config.in" > source "package/libgeos/Config.in" > source "package/libglib2/Config.in" > diff --git a/package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch b/package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch > new file mode 100644 > index 0000000000..9fa958524f > --- /dev/null > +++ b/package/libgdal/0001-port-cpl_recode_iconv.cpp-use-cast.patch > @@ -0,0 +1,38 @@ > +From 0730ebc7a1e22a169bf3a1d873e130e079a68b3d Mon Sep 17 00:00:00 2001 > +From: Dominik Michael Rauh <dmrauh@posteo.de> > +Date: Sat, 1 May 2021 20:11:30 +0200 > +Subject: [PATCH] port/cpl_recode_iconv.cpp: use cast > + > +Fixes error: invalid cast from type 'int' to type 'iconv_t' {aka 'long > +int'} > + > +Signed-off-by: Dominik Michael Rauh <dmrauh@posteo.de> Please add a line here with the upstream status. The intention is that you contribute the patch to the upstream project, so it can be removed again after updating to a future release. If for any reason the patch is not applicable to the upstream project, please indicate why not > +--- > + port/cpl_recode_iconv.cpp | 4 ++-- > + 1 file changed, 2 insertions(+), 2 deletions(-) > + > +diff --git a/port/cpl_recode_iconv.cpp b/port/cpl_recode_iconv.cpp > +index d341bb1..2346012 100644 > +--- a/port/cpl_recode_iconv.cpp > ++++ b/port/cpl_recode_iconv.cpp > +@@ -87,7 +87,7 @@ char *CPLRecodeIconv( const char *pszSource, > + > + sConv = iconv_open( pszDstEncoding, pszSrcEncoding ); > + > +- if( sConv == reinterpret_cast<iconv_t>(-1) ) > ++ if( sConv == (iconv_t)(-1) ) The proper C++ way is to use static_cast. An alternative is to use an explicit type initilisation. So either if( sConv == static_cast<iconv_t>(-1) ) or if( sConv == iconv_t(-1) ) > + { > + CPLError( CE_Warning, CPLE_AppDefined, > + "Recode from %s to %s failed with the error: \"%s\".", > +@@ -234,7 +234,7 @@ char *CPLRecodeFromWCharIconv( const wchar_t *pwszSource, > + > + sConv = iconv_open( pszDstEncoding, pszSrcEncoding ); > + > +- if( sConv == reinterpret_cast<iconv_t>(-1) ) > ++ if( sConv == (iconv_t)(-1) ) > + { > + CPLFree( pszIconvSrcBuf ); > + CPLError( CE_Warning, CPLE_AppDefined, > +-- > +2.31.1 > + > diff --git a/package/libgdal/Config.in b/package/libgdal/Config.in > new file mode 100644 > index 0000000000..1f3861e944 > --- /dev/null > +++ b/package/libgdal/Config.in > @@ -0,0 +1,31 @@ > +config BR2_PACKAGE_LIBGDAL > + bool "libgdal" > + depends on BR2_INSTALL_LIBSTDCPP # proj, libjson > + # configure can't find proj, when linking statically > + depends on !BR2_STATIC_LIBS > + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11, proj > + depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464 > + depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27597 Please explain in the commit message how you arrive here. So add: test-pkg shows that this package is affected by binutils bugs 21464 and 27597. > + depends on BR2_TOOLCHAIN_HAS_THREADS # proj > + depends on BR2_USE_WCHAR # proj > + select BR2_PACKAGE_JPEG > + select BR2_PACKAGE_LIBJSON > + select BR2_PACKAGE_LIBPNG > + select BR2_PACKAGE_PROJ > + select BR2_PACKAGE_ZLIB > + help > + GDAL is a translator library for raster and vector geospatial > + data formats. As a library, it presents a single raster > + abstract data model and single vector abstract data model to > + the calling application for all supported formats. It also > + comes with a variety of useful command line utilities for data > + translation and processing. > + > + https://gdal.org/ > + > +comment "libgdal needs a toolchain w/ C++, dynamic library, gcc >= 4.7, not binutils bug 21464, 27597, threads, wchar" > + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \ > + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 || \ > + BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464 || \ > + BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27597 || !BR2_TOOLCHAIN_HAS_THREADS || \ > + !BR2_USE_WCHAR > diff --git a/package/libgdal/libgdal.hash b/package/libgdal/libgdal.hash > new file mode 100644 > index 0000000000..ea770a38d2 > --- /dev/null > +++ b/package/libgdal/libgdal.hash > @@ -0,0 +1,6 @@ > +# md5 from: https://download.osgeo.org/gdal/3.3.1/gdal-3.3.1.tar.xz.md5, sha256 locally computed: > +md5 7611300fece06853a1a88149e0cc8922 gdal-3.3.1.tar.xz > +sha256 48ab00b77d49f08cf66c60ccce55abb6455c3079f545e60c90ee7ce857bccb70 gdal-3.3.1.tar.xz > + > +# Hash of license file: > +sha256 b82e6cca0b13f5db2f22ab667f22254fb1f4b135ea73d5bd6238ef89aff31f6c LICENSE.TXT > diff --git a/package/libgdal/libgdal.mk b/package/libgdal/libgdal.mk > new file mode 100644 > index 0000000000..337b8a7fb7 > --- /dev/null > +++ b/package/libgdal/libgdal.mk > @@ -0,0 +1,121 @@ > +################################################################################ > +# > +# libgdal > +# > +################################################################################ > + > +LIBGDAL_VERSION = 3.3.1 > +LIBGDAL_SITE = https://download.osgeo.org/gdal/$(LIBGDAL_VERSION) > +LIBGDAL_SOURCE = gdal-$(LIBGDAL_VERSION).tar.xz We generally try to follow the name of the upstream package - that's also easier for CPE and release-monitoring tracking. So it would be better to call this package gdal instead of libgdal. > +LIBGDAL_LICENSE = MIT (GDAL/OGR), BSD-3-Clause, BSD-Style, APACHE-2.0 Where does the BSD-Style come from? > +LIBGDAL_LICENSE_FILES = LICENSE.TXT PROVENANCE.txt gives a nice overview of the different, complicated licenses, so I think it's useful to add that as well. > +LIBGDAL_INSTALL_STAGING = YES > +LIBGDAL_CONFIG_SCRIPTS = gdal-config > +# libgdal at its core only needs host-pkgconf, libgeotiff, proj and tiff but > +# since by default mrf driver support is enabled, it also needs jpeg, libpng > +# and zlib. By default there are also many other drivers enabled but it seems, > +# in contrast to mrf driver support, that they can be implicitely disabled, by > +# configuring libgdal without their respectively needed dependencies. > +LIBGDAL_DEPENDENCIES = host-pkgconf jpeg libgeotiff libpng proj tiff zlib > + > +ifeq ($(BR2_PACKAGE_POSTGRESQL),y) > +LIBGDAL_DEPENDENCIES += postgresql > +LIBGDAL_CONF_OPTS += --with-pg > +else > +LIBGDAL_CONF_OPTS += --without-pg > +endif > + > +ifeq ($(BR2_PACKAGE_LIBXML2),y) > +LIBGDAL_DEPENDENCIES += libxml2 > +LIBGDAL_CONF_OPTS += --with-xml2 > +else > +LIBGDAL_CONF_OPTS += --without-xml2 > +endif > + > +LIBGDAL_CONF_OPTS += --with-cpp14 \ In Config.in, the comment is C++11 and the minimum GCC version is 4.7. Here, however, you claim that C++14 is supported, which means 4.9 or 5 (depending on exactly which features are used). Perhaps just remove the option and let the configure script figure it out? > + --with-geotiff \ Continuation lines should be indented with a single tab. You can make them align nicely by writing: LIBGDAL_CONF_OPTS += \ --with-cpp14 \ --with-geotiff \ Regards, Arnout > + --with-libjson-c \ > + --with-libtiff \ > + --with-libtool \ > + --with-libz \ > + --with-jpeg \ > + --with-png \ > + --with-proj > + > +# disable not yet handled packages and thus the associated libgdal drivers > +LIBGDAL_CONF_OPTS += --without-armadillo \ > + --without-cfitsio \ > + --without-crypto \ > + --without-cryptopp \ > + --without-curl \ > + --without-dds \ > + --without-dods-root \ > + --without-ecw \ > + --without-expat \ > + --without-exr \ > + --without-fgdb \ > + --without-fme \ > + --without-freexl \ > + --without-geos \ > + --without-gnm \ > + --without-libkml \ > + --without-grass \ > + --without-libgrass \ > + --without-gta \ > + --without-hdf4 \ > + --without-hdf5 \ > + --without-hdfs \ > + --without-heif \ > + --without-idb \ > + --without-ingres \ > + --without-java \ > + --without-jp2lura \ > + --without-jpeg12 \ > + --without-jasper \ > + --without-charls \ > + --without-kakadu \ > + --without-kea \ > + --without-lerc \ > + --without-gif \ > + --without-liblzma \ > + --without-libdeflate \ > + --without-mdb \ > + --without-mongocxx \ > + --without-mongocxxv3 \ > + --without-mrsid \ > + --without-jp2mrsid \ > + --without-macosx-framework \ > + --without-mrsid_lidar \ > + --without-msg \ > + --without-mysql \ > + --without-netcdf \ > + --without-null \ > + --without-oci \ > + --without-odbc \ > + --without-ogdi \ > + --without-opencl \ > + --without-openjpeg \ > + --without-pam \ > + --without-pcidsk \ > + --without-pcraster \ > + --without-pcre \ > + --without-pdfium \ > + --without-perl \ > + --without-podofo \ > + --without-poppler \ > + --without-python \ > + --without-qhull \ > + --without-rasdaman \ > + --without-rasterlite2 \ > + --without-rdb \ > + --without-sfcgal \ > + --without-sosi \ > + --without-spatialite \ > + --without-sqlite3 \ > + --without-teigha \ > + --without-tiledb \ > + --without-webp \ > + --without-xerces \ > + --without-zstd > + > +$(eval $(autotools-package)) > _______________________________________________ buildroot mailing list buildroot@busybox.net http://lists.busybox.net/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH v4] package/libgdal: new package 2021-08-03 20:09 ` Arnout Vandecappelle @ 2021-08-03 20:19 ` Arnout Vandecappelle 0 siblings, 0 replies; 13+ messages in thread From: Arnout Vandecappelle @ 2021-08-03 20:19 UTC (permalink / raw) To: Dominik Michael Rauh, buildroot; +Cc: Maxim Kochetkov, Thomas Petazzoni On 03/08/2021 22:09, Arnout Vandecappelle wrote: > Hi Dominik, > > I still have a few comments. I could make the necessary changes myself, but I'm > feeling lazy today :-). > > On 02/08/2021 11:24, Dominik Michael Rauh wrote: >> GDAL is a translator library for raster and vector geospatial data >> formats. As a library, it presents a single raster abstract data model >> and single vector abstract data model to the calling application for all >> supported formats. It also comes with a variety of useful command line >> utilities for data translation and processing. >> >> https://gdal.org/ >> >> Signed-off-by: Dominik Michael Rauh <dmrauh@posteo.de> > It's really nice that you add this package, because when I added postgis > (contributed by Maxim) I didn't notice that it had on optional dependency on > GDAL, which wasn't added yet... Turns out that postgis with gdal actually doesn't build: checking GDAL version... not found configure: error: gdal-config not found. Use --without-raster or try --with-gdalconfig=<path to gdal-config> We'll probably need to add --with-gdalconfig=$(STAGING_DIR)/usr/bin/gdal-config to postgis, and LIBGDAL_CONFIG_SCRIPTS = gdal-config Regards, Arnout _______________________________________________ buildroot mailing list buildroot@busybox.net http://lists.busybox.net/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH v5] package/gdal: new package 2021-08-02 9:24 ` [Buildroot] [PATCH v4] " Dominik Michael Rauh 2021-08-03 20:09 ` Arnout Vandecappelle @ 2022-05-07 9:46 ` Dominik Michael Rauh 2022-07-27 10:00 ` Romain Naour 2022-07-27 13:38 ` Thomas Petazzoni via buildroot 1 sibling, 2 replies; 13+ messages in thread From: Dominik Michael Rauh @ 2022-05-07 9:46 UTC (permalink / raw) To: buildroot; +Cc: Dominik Michael Rauh, Thomas Petazzoni GDAL is a translator library for raster and vector geospatial data formats. As a library, it presents a single raster abstract data model and single vector abstract data model to the calling application for all supported formats. It also comes with a variety of useful command line utilities for data translation and processing. https://gdal.org/ test-pkg shows that this package is affected by binutils bug 27597. Signed-off-by: Dominik Michael Rauh <dmrauh@posteo.de> --- Changes v4 -> v5 (after review by Arnout Vandecappelle): - Bump version from 3.3.1 to 3.4.3 - Rename libgdal to gdal (following upstream) - Add upstream status to patch - Remove binutils bug 21464 from Config.in - Rework license information - Rework configuration options Changes v3 -> v4 (after review by Thomas Petazzoni): - Bump version from 3.3.0 to 3.3.1 - Configure libgdal to use external libraries where possible - Explicitely disable libraries not yet handled by Buildroot Changes v2 -> v3: - Bump version from 3.2.2 to 3.3.0 Changes v1 -> v2 (after review by Peter Seiderer): - Disable NEON and VSX support when using libgdal's libpng - Disable compilation for toolchains with binutils bug 21464 or 27597 - Add the proper "depends" demanded by proj - Fix the comment in Config.in - Hopefully add the complete LIBGDAL_LICENSE information package/Config.in | 1 + ...ode_iconv.cpp-fix-invalid-cast-error.patch | 50 +++++++ package/gdal/Config.in | 30 +++++ package/gdal/gdal.hash | 7 + package/gdal/gdal.mk | 127 ++++++++++++++++++ package/postgis/postgis.mk | 4 +- 6 files changed, 217 insertions(+), 2 deletions(-) create mode 100644 package/gdal/0001-port-cpl_recode_iconv.cpp-fix-invalid-cast-error.patch create mode 100644 package/gdal/Config.in create mode 100644 package/gdal/gdal.hash create mode 100644 package/gdal/gdal.mk diff --git a/package/Config.in b/package/Config.in index 8892134133..ddf1936235 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1945,6 +1945,7 @@ menu "Other" source "package/flatbuffers/Config.in" source "package/flatcc/Config.in" source "package/gconf/Config.in" + source "package/gdal/Config.in" source "package/gflags/Config.in" source "package/gli/Config.in" source "package/glibmm/Config.in" diff --git a/package/gdal/0001-port-cpl_recode_iconv.cpp-fix-invalid-cast-error.patch b/package/gdal/0001-port-cpl_recode_iconv.cpp-fix-invalid-cast-error.patch new file mode 100644 index 0000000000..39593ab2ee --- /dev/null +++ b/package/gdal/0001-port-cpl_recode_iconv.cpp-fix-invalid-cast-error.patch @@ -0,0 +1,50 @@ +From c54ba241e4ed6dd43f3a63576f94169c4cafa798 Mon Sep 17 00:00:00 2001 +From: Dominik Michael Rauh <dmrauh@posteo.de> +Date: Fri, 6 May 2022 21:29:49 +0200 +Subject: [PATCH] port/cpl_recode_iconv.cpp: fix invalid cast error +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes: + +cpl_recode_iconv.cpp: In function ‘char* CPLRecodeIconv(const char*, const char*, const char*)’: +cpl_recode_iconv.cpp:90:18: error: invalid cast from type ‘int’ to type ‘iconv_t’ {aka ‘long int’} + 90 | if( sConv == reinterpret_cast<iconv_t>(-1) ) + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +cpl_recode_iconv.cpp: In function ‘char* CPLRecodeFromWCharIconv(const wchar_t*, const char*, const char*)’: +cpl_recode_iconv.cpp:239:18: error: invalid cast from type ‘int’ to type ‘iconv_t’ {aka ‘long int’} + 239 | if( sConv == reinterpret_cast<iconv_t>(-1) ) + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Signed-off-by: Dominik Michael Rauh <dmrauh@posteo.de> +[Upstream: https://github.com/OSGeo/gdal/pull/5684] +--- + port/cpl_recode_iconv.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/port/cpl_recode_iconv.cpp b/port/cpl_recode_iconv.cpp +index 33c2e06..d752b75 100644 +--- a/port/cpl_recode_iconv.cpp ++++ b/port/cpl_recode_iconv.cpp +@@ -87,7 +87,7 @@ char *CPLRecodeIconv( const char *pszSource, + + sConv = iconv_open( pszDstEncoding, pszSrcEncoding ); + +- if( sConv == reinterpret_cast<iconv_t>(-1) ) ++ if( sConv == (iconv_t)(-1) ) + { + CPLError( CE_Warning, CPLE_AppDefined, + "Recode from %s to %s failed with the error: \"%s\".", +@@ -236,7 +236,7 @@ char *CPLRecodeFromWCharIconv( const wchar_t *pwszSource, + + sConv = iconv_open( pszDstEncoding, pszSrcEncoding ); + +- if( sConv == reinterpret_cast<iconv_t>(-1) ) ++ if( sConv == (iconv_t)(-1) ) + { + CPLFree( pszIconvSrcBuf ); + CPLError( CE_Warning, CPLE_AppDefined, +-- +2.35.1 + diff --git a/package/gdal/Config.in b/package/gdal/Config.in new file mode 100644 index 0000000000..55a8c7fb83 --- /dev/null +++ b/package/gdal/Config.in @@ -0,0 +1,30 @@ +config BR2_PACKAGE_GDAL + bool "gdal" + depends on BR2_INSTALL_LIBSTDCPP # proj, libjson + # configure can't find proj, when linking statically + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11, proj + depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27597 + depends on BR2_TOOLCHAIN_HAS_THREADS # proj + depends on BR2_USE_WCHAR # proj + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBGEOTIFF + select BR2_PACKAGE_LIBJSON + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_PROJ + select BR2_PACKAGE_ZLIB + help + GDAL is a translator library for raster and vector geospatial + data formats. As a library, it presents a single raster + abstract data model and single vector abstract data model to + the calling application for all supported formats. It also + comes with a variety of useful command line utilities for data + translation and processing. + + https://gdal.org/ + +comment "gdal needs a toolchain w/ C++, dynamic library, gcc >= 4.7, not binutils bug 27597, threads, wchar" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 || \ + BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27597 || \ + !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR diff --git a/package/gdal/gdal.hash b/package/gdal/gdal.hash new file mode 100644 index 0000000000..e6f25f9c54 --- /dev/null +++ b/package/gdal/gdal.hash @@ -0,0 +1,7 @@ +# md5 from: https://download.osgeo.org/gdal/3.4.3/gdal-3.4.3.tar.xz.md5, sha256 locally computed: +md5 36576fa060bcde5be3bb18fd3ddfd151 gdal-3.4.3.tar.xz +sha256 02a27b35899e1c4c3bcb6007da900128ddd7e8ab7cd6ccfecf338a301eadad5a gdal-3.4.3.tar.xz + +# Hashes of license files: +sha256 b82e6cca0b13f5db2f22ab667f22254fb1f4b135ea73d5bd6238ef89aff31f6c LICENSE.TXT +sha256 8afa5b03af2e776c7e484768c01bbd4ceee89a3baf590e2092e4611ad4c78c7f PROVENANCE.TXT diff --git a/package/gdal/gdal.mk b/package/gdal/gdal.mk new file mode 100644 index 0000000000..346dc34dd2 --- /dev/null +++ b/package/gdal/gdal.mk @@ -0,0 +1,127 @@ +################################################################################ +# +# gdal +# +################################################################################ + +GDAL_VERSION = 3.4.3 +GDAL_SITE = https://download.osgeo.org/gdal/$(GDAL_VERSION) +GDAL_SOURCE = gdal-$(GDAL_VERSION).tar.xz +GDAL_LICENSE = MIT (GDAL/OGR), BSD-3-Clause, APACHE-2.0 +GDAL_LICENSE_FILES = LICENSE.TXT PROVENANCE.TXT +GDAL_INSTALL_STAGING = YES +GDAL_CONFIG_SCRIPTS = gdal-config +# gdal at its core only needs host-pkgconf, libgeotiff, proj and tiff but since +# by default mrf driver support is enabled, it also needs jpeg, libpng and +# zlib. By default there are also many other drivers enabled but it seems, in +# contrast to mrf driver support, that they can be implicitly disabled, by +# configuring gdal without their respectively needed dependencies. +GDAL_DEPENDENCIES = host-pkgconf jpeg libgeotiff libpng proj tiff zlib + +ifeq ($(BR2_PACKAGE_POSTGRESQL),y) +GDAL_DEPENDENCIES += postgresql +GDAL_CONF_OPTS += --with-pg +else +GDAL_CONF_OPTS += --without-pg +endif + +ifeq ($(BR2_PACKAGE_LIBXML2),y) +GDAL_DEPENDENCIES += libxml2 +GDAL_CONF_OPTS += --with-xml2 +else +GDAL_CONF_OPTS += --without-xml2 +endif + +GDAL_CONF_OPTS += \ + --with-geotiff \ + --with-libjson-c \ + --with-libtiff \ + --with-libtool \ + --with-libz \ + --with-jpeg \ + --with-png \ + --with-proj + +# disable not yet handled packages and thus their associated gdal drivers +GDAL_CONF_OPTS += \ + --without-armadillo \ + --without-blosc \ + --without-brunsli \ + --without-cfitsio \ + --without-crypto \ + --without-cryptopp \ + --without-curl \ + --without-dds \ + --without-dods-root \ + --without-ecw \ + --without-expat \ + --without-exr \ + --without-fgdb \ + --without-fme \ + --without-freexl \ + --without-geos \ + --without-gnm \ + --without-libkml \ + --without-lz4 \ + --without-grass \ + --without-libgrass \ + --without-gta \ + --without-hdf4 \ + --without-hdf5 \ + --without-hdfs \ + --without-heif \ + --without-idb \ + --without-ingres \ + --without-jp2lura \ + --without-jasper \ + --without-java \ + --without-jpeg12 \ + --without-jxl \ + --without-charls \ + --without-kakadu \ + --without-kea \ + --without-lerc \ + --without-gif \ + --without-liblzma \ + --without-libdeflate \ + --without-mdb \ + --without-mongocxx \ + --without-mongocxxv3 \ + --without-mrsid \ + --without-jp2mrsid \ + --without-macosx-framework \ + --without-mrsid_lidar \ + --without-msg \ + --without-mysql \ + --without-netcdf \ + --without-null \ + --without-oci \ + --without-odbc \ + --without-ogdi \ + --without-opencl \ + --without-openjpeg \ + --without-pam \ + --without-pcidsk \ + --without-pcraster \ + --without-pcre \ + --without-pcre2 \ + --without-pdfium \ + --without-perl \ + --without-podofo \ + --without-poppler \ + --without-python \ + --without-qhull \ + --without-rasdaman \ + --without-rasterlite2 \ + --without-rdb \ + --without-sfcgal \ + --without-sosi \ + --without-spatialite \ + --without-sqlite3 \ + --without-teigha \ + --without-tiledb \ + --without-webp \ + --without-xerces \ + --without-zstd + +$(eval $(autotools-package)) diff --git a/package/postgis/postgis.mk b/package/postgis/postgis.mk index b77071d03b..e26693410e 100644 --- a/package/postgis/postgis.mk +++ b/package/postgis/postgis.mk @@ -21,8 +21,8 @@ POSTGIS_CONF_OPTS += \ --with-geosconfig=$(STAGING_DIR)/usr/bin/geos-config \ --with-xml2config=$(STAGING_DIR)/usr/bin/xml2-config -ifeq ($(BR2_PACKAGE_LIBGDAL),y) -POSTGIS_DEPENDENCIES += libgdal +ifeq ($(BR2_PACKAGE_GDAL),y) +POSTGIS_DEPENDENCIES += gdal POSTGIS_CONF_OPTS += --with-raster else POSTGIS_CONF_OPTS += --without-raster -- 2.35.1 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH v5] package/gdal: new package 2022-05-07 9:46 ` [Buildroot] [PATCH v5] package/gdal: " Dominik Michael Rauh @ 2022-07-27 10:00 ` Romain Naour 2022-07-27 13:38 ` Thomas Petazzoni via buildroot 1 sibling, 0 replies; 13+ messages in thread From: Romain Naour @ 2022-07-27 10:00 UTC (permalink / raw) To: Dominik Michael Rauh, buildroot; +Cc: Thomas Petazzoni Hello Dominik Le 07/05/2022 à 11:46, Dominik Michael Rauh a écrit : > GDAL is a translator library for raster and vector geospatial data > formats. As a library, it presents a single raster abstract data model > and single vector abstract data model to the calling application for all > supported formats. It also comes with a variety of useful command line > utilities for data translation and processing. > > https://gdal.org/ > > test-pkg shows that this package is affected by binutils bug 27597. > > Signed-off-by: Dominik Michael Rauh <dmrauh@posteo.de> > --- > Changes v4 -> v5 (after review by Arnout Vandecappelle): > - Bump version from 3.3.1 to 3.4.3 > - Rename libgdal to gdal (following upstream) > - Add upstream status to patch > - Remove binutils bug 21464 from Config.in > - Rework license information > - Rework configuration options > > Changes v3 -> v4 (after review by Thomas Petazzoni): > - Bump version from 3.3.0 to 3.3.1 > - Configure libgdal to use external libraries where possible > - Explicitely disable libraries not yet handled by Buildroot > > Changes v2 -> v3: > - Bump version from 3.2.2 to 3.3.0 > > Changes v1 -> v2 (after review by Peter Seiderer): > - Disable NEON and VSX support when using libgdal's libpng > - Disable compilation for toolchains with binutils bug 21464 or 27597 > - Add the proper "depends" demanded by proj > - Fix the comment in Config.in > - Hopefully add the complete LIBGDAL_LICENSE information > > package/Config.in | 1 + > ...ode_iconv.cpp-fix-invalid-cast-error.patch | 50 +++++++ > package/gdal/Config.in | 30 +++++ > package/gdal/gdal.hash | 7 + > package/gdal/gdal.mk | 127 ++++++++++++++++++ > package/postgis/postgis.mk | 4 +- > 6 files changed, 217 insertions(+), 2 deletions(-) > create mode 100644 package/gdal/0001-port-cpl_recode_iconv.cpp-fix-invalid-cast-error.patch > create mode 100644 package/gdal/Config.in > create mode 100644 package/gdal/gdal.hash > create mode 100644 package/gdal/gdal.mk > > diff --git a/package/Config.in b/package/Config.in > index 8892134133..ddf1936235 100644 > --- a/package/Config.in > +++ b/package/Config.in > @@ -1945,6 +1945,7 @@ menu "Other" > source "package/flatbuffers/Config.in" > source "package/flatcc/Config.in" > source "package/gconf/Config.in" > + source "package/gdal/Config.in" > source "package/gflags/Config.in" > source "package/gli/Config.in" > source "package/glibmm/Config.in" > diff --git a/package/gdal/0001-port-cpl_recode_iconv.cpp-fix-invalid-cast-error.patch b/package/gdal/0001-port-cpl_recode_iconv.cpp-fix-invalid-cast-error.patch > new file mode 100644 > index 0000000000..39593ab2ee > --- /dev/null > +++ b/package/gdal/0001-port-cpl_recode_iconv.cpp-fix-invalid-cast-error.patch > @@ -0,0 +1,50 @@ > +From c54ba241e4ed6dd43f3a63576f94169c4cafa798 Mon Sep 17 00:00:00 2001 > +From: Dominik Michael Rauh <dmrauh@posteo.de> > +Date: Fri, 6 May 2022 21:29:49 +0200 > +Subject: [PATCH] port/cpl_recode_iconv.cpp: fix invalid cast error > +MIME-Version: 1.0 > +Content-Type: text/plain; charset=UTF-8 > +Content-Transfer-Encoding: 8bit > + > +Fixes: > + > +cpl_recode_iconv.cpp: In function ‘char* CPLRecodeIconv(const char*, const char*, const char*)’: > +cpl_recode_iconv.cpp:90:18: error: invalid cast from type ‘int’ to type ‘iconv_t’ {aka ‘long int’} > + 90 | if( sConv == reinterpret_cast<iconv_t>(-1) ) > + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > +cpl_recode_iconv.cpp: In function ‘char* CPLRecodeFromWCharIconv(const wchar_t*, const char*, const char*)’: > +cpl_recode_iconv.cpp:239:18: error: invalid cast from type ‘int’ to type ‘iconv_t’ {aka ‘long int’} > + 239 | if( sConv == reinterpret_cast<iconv_t>(-1) ) > + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > + > +Signed-off-by: Dominik Michael Rauh <dmrauh@posteo.de> > +[Upstream: https://github.com/OSGeo/gdal/pull/5684] Your patch has been merged upstream! > +--- > + port/cpl_recode_iconv.cpp | 4 ++-- > + 1 file changed, 2 insertions(+), 2 deletions(-) > + > +diff --git a/port/cpl_recode_iconv.cpp b/port/cpl_recode_iconv.cpp > +index 33c2e06..d752b75 100644 > +--- a/port/cpl_recode_iconv.cpp > ++++ b/port/cpl_recode_iconv.cpp > +@@ -87,7 +87,7 @@ char *CPLRecodeIconv( const char *pszSource, > + > + sConv = iconv_open( pszDstEncoding, pszSrcEncoding ); > + > +- if( sConv == reinterpret_cast<iconv_t>(-1) ) > ++ if( sConv == (iconv_t)(-1) ) > + { > + CPLError( CE_Warning, CPLE_AppDefined, > + "Recode from %s to %s failed with the error: \"%s\".", > +@@ -236,7 +236,7 @@ char *CPLRecodeFromWCharIconv( const wchar_t *pwszSource, > + > + sConv = iconv_open( pszDstEncoding, pszSrcEncoding ); > + > +- if( sConv == reinterpret_cast<iconv_t>(-1) ) > ++ if( sConv == (iconv_t)(-1) ) > + { > + CPLFree( pszIconvSrcBuf ); > + CPLError( CE_Warning, CPLE_AppDefined, > +-- > +2.35.1 > + > diff --git a/package/gdal/Config.in b/package/gdal/Config.in > new file mode 100644 > index 0000000000..55a8c7fb83 > --- /dev/null > +++ b/package/gdal/Config.in > @@ -0,0 +1,30 @@ > +config BR2_PACKAGE_GDAL > + bool "gdal" > + depends on BR2_INSTALL_LIBSTDCPP # proj, libjson > + # configure can't find proj, when linking statically > + depends on !BR2_STATIC_LIBS > + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11, proj > + depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27597 > + depends on BR2_TOOLCHAIN_HAS_THREADS # proj > + depends on BR2_USE_WCHAR # proj > + select BR2_PACKAGE_JPEG > + select BR2_PACKAGE_LIBGEOTIFF > + select BR2_PACKAGE_LIBJSON > + select BR2_PACKAGE_LIBPNG > + select BR2_PACKAGE_PROJ > + select BR2_PACKAGE_ZLIB > + help > + GDAL is a translator library for raster and vector geospatial > + data formats. As a library, it presents a single raster > + abstract data model and single vector abstract data model to > + the calling application for all supported formats. It also > + comes with a variety of useful command line utilities for data > + translation and processing. > + > + https://gdal.org/ > + > +comment "gdal needs a toolchain w/ C++, dynamic library, gcc >= 4.7, not binutils bug 27597, threads, wchar" > + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \ > + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 || \ > + BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27597 || \ > + !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR > diff --git a/package/gdal/gdal.hash b/package/gdal/gdal.hash > new file mode 100644 > index 0000000000..e6f25f9c54 > --- /dev/null > +++ b/package/gdal/gdal.hash > @@ -0,0 +1,7 @@ > +# md5 from: https://download.osgeo.org/gdal/3.4.3/gdal-3.4.3.tar.xz.md5, sha256 locally computed: > +md5 36576fa060bcde5be3bb18fd3ddfd151 gdal-3.4.3.tar.xz > +sha256 02a27b35899e1c4c3bcb6007da900128ddd7e8ab7cd6ccfecf338a301eadad5a gdal-3.4.3.tar.xz > + > +# Hashes of license files: > +sha256 b82e6cca0b13f5db2f22ab667f22254fb1f4b135ea73d5bd6238ef89aff31f6c LICENSE.TXT > +sha256 8afa5b03af2e776c7e484768c01bbd4ceee89a3baf590e2092e4611ad4c78c7f PROVENANCE.TXT Is PROVENANCE.TXT file really useful as license file ? it contains a list of contributors that will be likely be updated for each release. Here we want to check the license file hash to "detect" any license change. > diff --git a/package/gdal/gdal.mk b/package/gdal/gdal.mk > new file mode 100644 > index 0000000000..346dc34dd2 > --- /dev/null > +++ b/package/gdal/gdal.mk > @@ -0,0 +1,127 @@ > +################################################################################ > +# > +# gdal > +# > +################################################################################ > + > +GDAL_VERSION = 3.4.3 > +GDAL_SITE = https://download.osgeo.org/gdal/$(GDAL_VERSION) > +GDAL_SOURCE = gdal-$(GDAL_VERSION).tar.xz > +GDAL_LICENSE = MIT (GDAL/OGR), BSD-3-Clause, APACHE-2.0 The liscense is really complex to describe here, gdal contains a lot of code with different license. At least add a comment saying that gdal bundle several bundled libraries with different licenses. https://git.buildroot.net/buildroot/tree/package/supertux/supertux.mk?h=2022.05.1#n11 It seems Info-ZIP license is missing. > +GDAL_LICENSE_FILES = LICENSE.TXT PROVENANCE.TXT > +GDAL_INSTALL_STAGING = YES > +GDAL_CONFIG_SCRIPTS = gdal-config > +# gdal at its core only needs host-pkgconf, libgeotiff, proj and tiff but since > +# by default mrf driver support is enabled, it also needs jpeg, libpng and > +# zlib. By default there are also many other drivers enabled but it seems, in > +# contrast to mrf driver support, that they can be implicitly disabled, by > +# configuring gdal without their respectively needed dependencies. > +GDAL_DEPENDENCIES = host-pkgconf jpeg libgeotiff libpng proj tiff zlib > + > +ifeq ($(BR2_PACKAGE_POSTGRESQL),y) > +GDAL_DEPENDENCIES += postgresql > +GDAL_CONF_OPTS += --with-pg > +else > +GDAL_CONF_OPTS += --without-pg > +endif > + > +ifeq ($(BR2_PACKAGE_LIBXML2),y) > +GDAL_DEPENDENCIES += libxml2 > +GDAL_CONF_OPTS += --with-xml2 > +else > +GDAL_CONF_OPTS += --without-xml2 > +endif > + > +GDAL_CONF_OPTS += \ > + --with-geotiff \ > + --with-libjson-c \ > + --with-libtiff \ > + --with-libtool \ > + --with-libz \ > + --with-jpeg \ > + --with-png \ > + --with-proj > + > +# disable not yet handled packages and thus their associated gdal drivers > +GDAL_CONF_OPTS += \ > + --without-armadillo \ > + --without-blosc \ > + --without-brunsli \ > + --without-cfitsio \ > + --without-crypto \ > + --without-cryptopp \ > + --without-curl \ > + --without-dds \ > + --without-dods-root \ > + --without-ecw \ > + --without-expat \ > + --without-exr \ > + --without-fgdb \ > + --without-fme \ > + --without-freexl \ > + --without-geos \ > + --without-gnm \ > + --without-libkml \ > + --without-lz4 \ > + --without-grass \ > + --without-libgrass \ > + --without-gta \ > + --without-hdf4 \ > + --without-hdf5 \ > + --without-hdfs \ > + --without-heif \ > + --without-idb \ > + --without-ingres \ > + --without-jp2lura \ > + --without-jasper \ > + --without-java \ > + --without-jpeg12 \ > + --without-jxl \ > + --without-charls \ > + --without-kakadu \ > + --without-kea \ > + --without-lerc \ > + --without-gif \ > + --without-liblzma \ > + --without-libdeflate \ > + --without-mdb \ > + --without-mongocxx \ > + --without-mongocxxv3 \ > + --without-mrsid \ > + --without-jp2mrsid \ > + --without-macosx-framework \ > + --without-mrsid_lidar \ > + --without-msg \ > + --without-mysql \ > + --without-netcdf \ > + --without-null \ > + --without-oci \ > + --without-odbc \ > + --without-ogdi \ > + --without-opencl \ > + --without-openjpeg \ > + --without-pam \ > + --without-pcidsk \ > + --without-pcraster \ > + --without-pcre \ > + --without-pcre2 \ > + --without-pdfium \ > + --without-perl \ > + --without-podofo \ > + --without-poppler \ > + --without-python \ > + --without-qhull \ > + --without-rasdaman \ > + --without-rasterlite2 \ > + --without-rdb \ > + --without-sfcgal \ > + --without-sosi \ > + --without-spatialite \ > + --without-sqlite3 \ > + --without-teigha \ > + --without-tiledb \ > + --without-webp \ > + --without-xerces \ > + --without-zstd > + > +$(eval $(autotools-package)) > diff --git a/package/postgis/postgis.mk b/package/postgis/postgis.mk > index b77071d03b..e26693410e 100644 > --- a/package/postgis/postgis.mk > +++ b/package/postgis/postgis.mk > @@ -21,8 +21,8 @@ POSTGIS_CONF_OPTS += \ > --with-geosconfig=$(STAGING_DIR)/usr/bin/geos-config \ > --with-xml2config=$(STAGING_DIR)/usr/bin/xml2-config > > -ifeq ($(BR2_PACKAGE_LIBGDAL),y) > -POSTGIS_DEPENDENCIES += libgdal > +ifeq ($(BR2_PACKAGE_GDAL),y) > +POSTGIS_DEPENDENCIES += gdal > POSTGIS_CONF_OPTS += --with-raster > else > POSTGIS_CONF_OPTS += --without-raster Actually this part should be a separate commit. Best regards, Romain _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH v5] package/gdal: new package 2022-05-07 9:46 ` [Buildroot] [PATCH v5] package/gdal: " Dominik Michael Rauh 2022-07-27 10:00 ` Romain Naour @ 2022-07-27 13:38 ` Thomas Petazzoni via buildroot 2022-07-27 15:04 ` Dominik Rauh 1 sibling, 1 reply; 13+ messages in thread From: Thomas Petazzoni via buildroot @ 2022-07-27 13:38 UTC (permalink / raw) To: Dominik Michael Rauh; +Cc: buildroot Hello Dominik, On Sat, 7 May 2022 09:46:50 +0000 Dominik Michael Rauh <dmrauh@posteo.de> wrote: > GDAL is a translator library for raster and vector geospatial data > formats. As a library, it presents a single raster abstract data model > and single vector abstract data model to the calling application for all > supported formats. It also comes with a variety of useful command line > utilities for data translation and processing. > > https://gdal.org/ > > test-pkg shows that this package is affected by binutils bug 27597. > > Signed-off-by: Dominik Michael Rauh <dmrauh@posteo.de> Believe it or not, but we finally applied your patch! I had to do a few changes: - Addition of an entry to the DEVELOPERS file - Removal of PROVENANCE.TXT as a license file, and simplification of the license variable to just "MIT, many others" as the licensing situation of GDAL is very complicated. - Use GDAL_CONF_OPTS = (and not +=) to define all unconditional options, and do that before the conditional features. - Removal of the postgis change for gdal support, which I have moved to a separate commit. It also required an extra patch to PostGIS to build properly. - Bump to the latest version of gdal. You can see the final 3 commits at: https://gitlab.com/buildroot.org/buildroot/-/commit/d48af707737ece6242d58e83b98e5c601fa55acc https://gitlab.com/buildroot.org/buildroot/-/commit/1e64fa2956171cdc9d6e6c8896b4b589ce573513 https://gitlab.com/buildroot.org/buildroot/-/commit/b9a38a42ac817b963be2b4b51d218c5eabb1059d Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH v5] package/gdal: new package 2022-07-27 13:38 ` Thomas Petazzoni via buildroot @ 2022-07-27 15:04 ` Dominik Rauh 0 siblings, 0 replies; 13+ messages in thread From: Dominik Rauh @ 2022-07-27 15:04 UTC (permalink / raw) To: Thomas Petazzoni; +Cc: buildroot [-- Attachment #1: Type: text/html, Size: 2582 bytes --] [-- Attachment #2: Type: text/plain, Size: 150 bytes --] _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2022-07-27 15:04 UTC | newest] Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-05-02 13:06 [Buildroot] [PATCH 1/1] package/libgdal: new package Dominik Michael Rauh 2021-05-02 14:38 ` Peter Seiderer 2021-05-02 18:03 ` Peter Seiderer 2021-05-04 16:57 ` [Buildroot] [PATCH v2] " Dominik Michael Rauh 2021-05-28 15:29 ` [Buildroot] [PATCH v3] " Dominik Michael Rauh 2021-07-25 19:37 ` Thomas Petazzoni 2021-08-02 9:24 ` [Buildroot] [PATCH v4] " Dominik Michael Rauh 2021-08-03 20:09 ` Arnout Vandecappelle 2021-08-03 20:19 ` Arnout Vandecappelle 2022-05-07 9:46 ` [Buildroot] [PATCH v5] package/gdal: " Dominik Michael Rauh 2022-07-27 10:00 ` Romain Naour 2022-07-27 13:38 ` Thomas Petazzoni via buildroot 2022-07-27 15:04 ` Dominik Rauh
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.