From patchwork Sun May 2 13:06:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dominik Michael Rauh X-Patchwork-Id: 1472777 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=posteo.de header.i=@posteo.de header.a=rsa-sha256 header.s=2017 header.b=hR8bUmUC; dkim-atps=neutral Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FY5wF1NSkz9sPf for ; Sun, 2 May 2021 23:06:35 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 424D88468C; Sun, 2 May 2021 13:06:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D8c-UxdlCmxs; Sun, 2 May 2021 13:06:31 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 7614F846CD; Sun, 2 May 2021 13:06:30 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id BA6E91BF3EC for ; Sun, 2 May 2021 13:06:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id A8CA741DF5 for ; Sun, 2 May 2021 13:06:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp4.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=posteo.de Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5FzxCFcqB10u for ; Sun, 2 May 2021 13:06:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) by smtp4.osuosl.org (Postfix) with ESMTPS id 2CA3B41D26 for ; Sun, 2 May 2021 13:06:28 +0000 (UTC) Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 74A812400FE for ; Sun, 2 May 2021 15:06:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1619960785; bh=tiUaTSrCHFKfrus4/2uVfv4FcnHsWKLHnMFlNenV1Vs=; h=From:To:Cc:Subject:Date:From; b=hR8bUmUC49qYZrOXtryiw+9IxSMg3uX2HgwSbUMqX/NXsQ+zRHigp/iNMHzD8iZwf tY4LLF7siMkeWvRjsR7i0sIQcBPA5MaH7zixZ1eMB+AgRuj2Ct5tSU04iYcRgc/CS9 d3ysbMc29qd+N97we7OhIL5ifc/ogO9Ii6un0ceEkivnVLHhGwl6iDwtZGGDISpb1d 8fP4/qwluuhc/G8z4KfEH/8sSGmSEUy781pXaHoWrfBMMSthnaGVh3GUF5IQCkHN5+ yM2zpnBZHoluETx8PmvE+jTyP0xrR5334iE7584dtsluAjCQUivrZj871pk8sCu4VR 6QSal909TwLYQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FY5w05rxzz6tmB; Sun, 2 May 2021 15:06:24 +0200 (CEST) From: Dominik Michael Rauh To: buildroot@buildroot.org Date: Sun, 2 May 2021 13:06:19 +0000 Message-Id: <20210502130619.683435-1-dmrauh@posteo.de> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] package/libgdal: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dominik Michael Rauh , Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "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 --- 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 +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 +--- + 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(-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(-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))