Thu Dec 29 19:45:48 2022 UTC ()
gdal-lib: fix CONFIGURE_ARGS reference to non-existent directory

The configure script for gdal-lib specifies locations for various
required libraries via command line arguments.  For example, the
configure script defines compiler flags for the location of libz based
upon the --with-libz argument as follows:

EXTRA_INCLUDES="-I$with_libz -I$with_libz/include $EXTRA_INCLUDES"

Since the origin of the package, the location of libz has been
specified in Makefile.common as follows:

CONFIGURE_ARGS+=	--with-libz=${BUILDLINK_PREFIX.zlib}/include

In a typical pkgsrc installation, the configure script is run with the
argument --with-libz=/usr/pkg/include, which leads to the following
compiler flags:

	  -I/usr/pkg/include -I/usr/pkg/include/include

The latter directory of course generally never exists.  Although this
has apparently worked in the past, gcc12 exits with an error.

This patch removes the extra /include suffix from the libz location
specified in CONFIGURE_ARGS.  As a result, libz now matches the way
other libraries are specified, none of which include the /include
suffix and all of which are handled in the configure script in similar
ways.


(brook)
diff -r1.22 -r1.23 pkgsrc/geography/gdal-lib/Makefile.common

cvs diff -r1.22 -r1.23 pkgsrc/geography/gdal-lib/Makefile.common (expand / switch to unified diff)

--- pkgsrc/geography/gdal-lib/Makefile.common 2022/11/27 01:10:22 1.22
+++ pkgsrc/geography/gdal-lib/Makefile.common 2022/12/29 19:45:48 1.23
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile.common,v 1.22 2022/11/27 01:10:22 gdt Exp $ 1# $NetBSD: Makefile.common,v 1.23 2022/12/29 19:45:48 brook Exp $
2# 2#
3# used by geography/gdal-lib/Makefile 3# used by geography/gdal-lib/Makefile
4# used by geography/py-gdal/Makefile 4# used by geography/py-gdal/Makefile
5 5
6VERSION_BASE= 3.5.3 6VERSION_BASE= 3.5.3
7# Accomodate testing unreleased versions. 7# Accomodate testing unreleased versions.
8#VERSION_RC= rc1 8#VERSION_RC= rc1
9VERSION= ${VERSION_BASE}${VERSION_RC} 9VERSION= ${VERSION_BASE}${VERSION_RC}
10DISTNAME= gdal-${VERSION} 10DISTNAME= gdal-${VERSION}
11EXTRACT_SUFX= .tar.xz 11EXTRACT_SUFX= .tar.xz
12CATEGORIES= geography 12CATEGORIES= geography
13MASTER_SITES= https://download.osgeo.org/gdal/${VERSION_BASE}/ 13MASTER_SITES= https://download.osgeo.org/gdal/${VERSION_BASE}/
14 14
@@ -22,23 +22,23 @@ WRKSRC= ${WRKDIR}/gdal-${VERSION_BASE} @@ -22,23 +22,23 @@ WRKSRC= ${WRKDIR}/gdal-${VERSION_BASE}
22PATCHDIR= ${.CURDIR}/../../geography/gdal-lib/patches 22PATCHDIR= ${.CURDIR}/../../geography/gdal-lib/patches
23DISTINFO_FILE= ${.CURDIR}/../../geography/gdal-lib/distinfo 23DISTINFO_FILE= ${.CURDIR}/../../geography/gdal-lib/distinfo
24 24
25CHECK_PORTABILITY_SKIP+= mkbindist.sh 25CHECK_PORTABILITY_SKIP+= mkbindist.sh
26 26
27USE_TOOLS+= gmake pkg-config 27USE_TOOLS+= gmake pkg-config
28USE_LANGUAGES= c99 c++ 28USE_LANGUAGES= c99 c++
29USE_LIBTOOL= yes 29USE_LIBTOOL= yes
30USE_PKGLOCALEDIR= yes 30USE_PKGLOCALEDIR= yes
31GNU_CONFIGURE= yes 31GNU_CONFIGURE= yes
32CONFIGURE_ARGS+= --with-geos 32CONFIGURE_ARGS+= --with-geos
33CONFIGURE_ARGS+= --with-libjson-c=internal 33CONFIGURE_ARGS+= --with-libjson-c=internal
34CONFIGURE_ARGS+= --with-libtiff=${BUILDLINK_PREFIX.tiff} 34CONFIGURE_ARGS+= --with-libtiff=${BUILDLINK_PREFIX.tiff}
35CONFIGURE_ARGS+= --with-libz=${BUILDLINK_PREFIX.zlib}/include 35CONFIGURE_ARGS+= --with-libz=${BUILDLINK_PREFIX.zlib}
36CONFIGURE_ARGS+= --with-netcdf=${BUILDLINK_PREFIX.netcdf} 36CONFIGURE_ARGS+= --with-netcdf=${BUILDLINK_PREFIX.netcdf}
37CONFIGURE_ARGS+= --with-webp=${BUILDLINK_PREFIX.libwebp} 37CONFIGURE_ARGS+= --with-webp=${BUILDLINK_PREFIX.libwebp}
38CONFIGURE_ARGS+= --with-xerces 38CONFIGURE_ARGS+= --with-xerces
39CONFIGURE_ARGS+= --with-xerces-inc=${BUILDLINK_PREFIX.xerces-c}/include 39CONFIGURE_ARGS+= --with-xerces-inc=${BUILDLINK_PREFIX.xerces-c}/include
40CONFIGURE_ARGS+= --with-xerces-lib=-L${BUILDLINK_PREFIX.xerces-c}/lib\ -lxerces-c 40CONFIGURE_ARGS+= --with-xerces-lib=-L${BUILDLINK_PREFIX.xerces-c}/lib\ -lxerces-c
41 41
42# force OpenJPEG for JPEG 2000 support 42# force OpenJPEG for JPEG 2000 support
43CONFIGURE_ARGS+= --without-jasper 43CONFIGURE_ARGS+= --without-jasper
44CONFIGURE_ARGS+= --with-openjpeg 44CONFIGURE_ARGS+= --with-openjpeg