Skip to content

Commit

Permalink
* update to gdal 3.7.1
Browse files Browse the repository at this point in the history
* update to geos 3.12.0
* update to curl 8.1.2
* update to pdal 2.5.5
* update to poppler 23.07.0
  • Loading branch information
jef-n committed Jul 14, 2023
1 parent 6a87bbc commit 38d6309
Show file tree
Hide file tree
Showing 17 changed files with 370 additions and 299 deletions.
1 change: 1 addition & 0 deletions acceptable.lst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ c50ab31669698143abc7d61e9404b940 GDAL3
2d9031eee7d79f9896ec92779338684c libkml (google)
2dbe422d4db5022c9717746da7535405 GPL 2
2e9fb35867314fe31c6a4977ef7dd531 curl
db8448a1e43eb2125f7740fc397db1f6 curl
34da3db46fab7501992f9615d7e158cf libtiff
a3e32d664d6db1386b4689c8121531c3 libtiff
35e5f53336fec095a8a3f229568e151b pyopengl
Expand Down
32 changes: 23 additions & 9 deletions scripts/build-helpers
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ startlog() {
export RUNTIMEDEPENDS=$(runtimedepends $BUILDDEPENDS)
}

trap 'errlog $LINENO $?' ERR
trap "faillog" EXIT
}
declare -x startlog
Expand Down Expand Up @@ -83,14 +84,18 @@ endlog() {
}
declare -x endlog

faillog() {
log "FAILED: $? AT $LINENO:"

i=0
while caller $i; do
(( i++ )) || true
errlog() {
log "ERROR: error $2 on line $1"
set -x
local i=1
while caller $(( i++ )); do
:
done
}
declare -x errlog

faillog() {
log "FAILED: $?"
finishlog
return 1
}
Expand All @@ -117,8 +122,14 @@ fetchenv() {

local d=$(mktemp -d /tmp/fetchenv.XXXXXXXXXX)
cmd /c set >$d/srcenv || true
cmd /c call $(cygpath -w $batch) "$@" \>nul 2\>\&1 \& set >$d/dstenv || true
sleep 2
cmd /c call $(cygpath -w $batch) "$@" \>$(cygpath -w $d/log) 2\>\&1 \& set >$d/dstenv || true

! [ -f $d/log ] || cat $d/log

while [ -f $d/log ]; do
rm $d/log || sleep 2
done

cat <<EOF >$d/envdiff
/^+++/d;
/^[^+]/d;
Expand All @@ -138,7 +149,7 @@ EOF
diff -u $d/srcenv $d/dstenv | sed -f $d/envdiff >$d/diffenv
. $d/diffenv
PATH=$PATH:/bin:/usr/bin:$(cygpath --sysdir):$(cygpath --windir)
rm -fr $d || true
[ -n "$OSGEO4W_KEEP_ENV" ] || rm -fr $d || true
}
declare -x fetchenv

Expand Down Expand Up @@ -476,6 +487,9 @@ bash() { /bin/bash "$@"; }
cat() { /bin/cat "$@"; }
cp() { /bin/cp "$@"; }
rm() { /bin/rm "$@"; }
rmdir() { /bin/rmdir "$@"; }
mv() { /bin/mv "$@"; }
mktemp() { /bin/mktemp "$@"; }
mkdir() { /bin/mkdir "$@"; }
tar() { /bin/tar "$@"; }
ls() { /bin/ls "$@"; }
Expand Down
2 changes: 1 addition & 1 deletion src/curl/osgeo4w/package.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export P=curl
export V=7.75.0
export V=8.1.2
export B=next
export MAINTAINER=JuergenFischer
export BUILDDEPENDS="openssl-devel zlib-devel"
Expand Down
4 changes: 2 additions & 2 deletions src/gdal/osgeo4w/package.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export P=gdal
export V=3.7.0
export V=3.7.1
export B=next
export MAINTAINER=JuergenFischer
export BUILDDEPENDS="python3-core swig zlib-devel proj-devel libpng-devel curl-devel geos-devel libmysql-devel sqlite3-devel netcdf-devel libpq-devel expat-devel xerces-c-devel szip-devel hdf4-devel hdf5-devel hdf5-tools ogdi-devel libiconv-devel openjpeg-devel libspatialite-devel freexl-devel libkml-devel xz-devel zstd-devel msodbcsql-devel poppler-devel libwebp-devel oci-devel openfyba-devel freetype-devel python3-devel python3-numpy libjpeg-turbo-devel python3-setuptools opencl-devel libtiff-devel arrow-cpp-devel lz4-devel openssl-devel tiledb-devel lerc-devel kealib-devel odbc-cpp-wrapper-devel libjxl-devel"
Expand Down Expand Up @@ -180,7 +180,7 @@ export MRSID_SDK=$(cygpath -am gdaldeps/$MRSID_SDK)
-D LERC_LIBRARY=$(cygpath -am ../osgeo4w/lib/Lerc.lib) \
-D SWIG_EXECUTABLE=$(cygpath -am ../osgeo4w/bin/swig.bat) \
-D GDAL_EXTRA_LINK_LIBRARIES="$(cygpath -am ../osgeo4w/lib/freetype.lib);$(cygpath -am ../osgeo4w/lib/jpeg.lib);$(cygpath -am ../osgeo4w/lib/tiff.lib);$(cygpath -am ../osgeo4w/lib/uriparser.lib);$(cygpath -am ../osgeo4w/lib/minizip.lib)" \
../../$P-$V
../../$P-${V%rc*}

[ -n "$OSGEO4W_SKIP_CLEAN" ] || cmake --build . --target clean

Expand Down
66 changes: 0 additions & 66 deletions src/gdal/osgeo4w/patch
Original file line number Diff line number Diff line change
@@ -1,66 +0,0 @@
diff --git a/ogr/ogrsf_frmts/geojson/libjson/json_object.c b/ogr/ogrsf_frmts/geojson/libjson/json_object.c
index 28d5ae6f035..7a23c378cce 100644
--- a/ogr/ogrsf_frmts/geojson/libjson/json_object.c
+++ b/ogr/ogrsf_frmts/geojson/libjson/json_object.c
@@ -37,6 +37,8 @@
#include "snprintf_compat.h"
#include "strdup_compat.h"

+#include "cpl_string.h"
+
#if SIZEOF_LONG_LONG != SIZEOF_INT64_T
#error "The long long type isn't 64-bits"
#endif
@@ -1192,7 +1194,7 @@ double json_object_get_double(const struct json_object *jso)
case json_type_boolean: return JC_BOOL_C(jso)->c_boolean;
case json_type_string:
errno = 0;
- cdouble = strtod(get_string_component(jso), &errPtr);
+ cdouble = CPLStrtod(get_string_component(jso), &errPtr);

/* if conversion stopped at the first character, return 0.0 */
if (errPtr == get_string_component(jso))
diff --git a/ogr/ogrsf_frmts/geojson/libjson/json_tokener.c b/ogr/ogrsf_frmts/geojson/libjson/json_tokener.c
index 9316a4d4153..1d24104d416 100644
--- a/ogr/ogrsf_frmts/geojson/libjson/json_tokener.c
+++ b/ogr/ogrsf_frmts/geojson/libjson/json_tokener.c
@@ -44,6 +44,8 @@
#include <strings.h>
#endif /* HAVE_STRINGS_H */

+#include "cpl_string.h"
+
#define jt_hexdigit(x) (((x) <= '9') ? (x) - '0' : ((x)&7) + 9)

#if !HAVE_STRNCASECMP && defined(_MSC_VER)
@@ -1261,7 +1263,7 @@ size_t json_tokener_get_parse_end(struct json_tokener *tok)
static int json_tokener_parse_double(const char *buf, int len, double *retval)
{
char *end;
- *retval = strtod(buf, &end);
+ *retval = CPLStrtod(buf, &end);
if (buf + len == end)
return 0; // It worked
return 1;
diff --git a/ogr/ogrsf_frmts/geojson/libjson/json_util.c b/ogr/ogrsf_frmts/geojson/libjson/json_util.c
index ab16fe20abc..8e273e766b2 100644
--- a/ogr/ogrsf_frmts/geojson/libjson/json_util.c
+++ b/ogr/ogrsf_frmts/geojson/libjson/json_util.c
@@ -58,6 +58,8 @@
#include "json_util.h"
#include "printbuf.h"

+#include "cpl_string.h"
+
static int _json_object_to_fd(int fd, struct json_object *obj, int flags, const char *filename);

static char _last_err[256] = "";
@@ -227,7 +229,7 @@ int json_object_to_file(const char *filename, struct json_object *obj)
int json_parse_double(const char *buf, double *retval)
{
char *end;
- *retval = strtod(buf, &end);
+ *retval = CPLStrtod(buf, &end);
return end == buf ? 1 : 0;
}

2 changes: 1 addition & 1 deletion src/geos/osgeo4w/package.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export P=geos
export V=3.11.2
export V=3.12.0
export B=next
export MAINTAINER=JuergenFischer
export BUILDDEPENDS=none
Expand Down
2 changes: 1 addition & 1 deletion src/grass/osgeo4w/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export R=$OSGEO4W_REP/x86_64/release/$P
mkdir -p $R


msysarch=msys2-base-x86_64-20221028.tar.xz
msysarch=msys2-base-x86_64-20230526.tar.xz

[ -f $msysarch ] || wget http://repo.msys2.org/distrib/x86_64/$msysarch
if ! [ -d msys64 ]; then
Expand Down
28 changes: 14 additions & 14 deletions src/librttopo/osgeo4w/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,35 @@ source ../../../scripts/build-helpers
startlog

[ -f $P-$V.tar.gz ] || wget https://git.osgeo.org/gitea/rttopo/librttopo/archive/$P-$V.tar.gz
[ -f ../makefile.vc ] || tar -C .. -xzf $P-$V.tar.gz --xform "s,^$P,.,"
[ -f ../src/rttopo_config.h ] || wget -O ../src/rttopo_config.h https://git.osgeo.org/gitea/attachments/d6ae54b6-109d-480e-bd7c-020d2a543cd6
[ -f ../headers/librttopo_geom.h ] || wget -O ../headers/librttopo_geom.h https://git.osgeo.org/gitea/attachments/b4e500d5-6168-4022-91c5-b7de6346167e
[ -f ../$P/makefile.vc ] || tar -C .. -xzf $P-$V.tar.gz
[ -f ../$P/src/rttopo_config.h ] || wget -O ../$P/src/rttopo_config.h https://git.osgeo.org/gitea/attachments/d6ae54b6-109d-480e-bd7c-020d2a543cd6
[ -f ../$P/headers/librttopo_geom.h ] || wget -O ../$P/headers/librttopo_geom.h https://git.osgeo.org/gitea/attachments/b4e500d5-6168-4022-91c5-b7de6346167e

vs2019env

mkdir -p install

# Fixup makefile
if ! [ -f fixed ]; then
src=$(cd ..; ls -1 src/*.c | sed -e 's/\.c/.obj/g' | paste -d' ' -s | fold -s | sed -e 's/$/\\\\\\n\\t/' | paste -d' ' -s)
if ! [ -f ../$P/fixed ]; then
src=$(cd ../$P; ls -1 src/*.c | sed -e 's/\.c/.obj/g' | paste -d' ' -s | fold -s | sed -e 's/$/\\\\\\n\\t/' | paste -d' ' -s)
src=${src%\\}

sed -r -i \
-e 's/C:\\OSGeo4W/$(OSGEO4W_ROOT)/g' \
-e "/LIBOBJ\s*=/,/^$/ c LIBOBJ = $src" \
../makefile.vc
../$P/makefile.vc

sed -i -e '/INSTDIR=/d' ../nmake.opt
sed -i -e '/INSTDIR=/d' ../$P/nmake.opt

touch fixed
touch ../$P/fixed
fi

cd ..
cd ../$P

nmake /f makefile.vc OSGEO4W_ROOT=$(cygpath -aw osgeo4w/osgeo4w)
nmake /f makefile.vc OSGEO4W_ROOT=$(cygpath -aw osgeo4w/osgeo4w) INSTDIR=osgeo4w\\install install
nmake /f makefile.vc OSGEO4W_ROOT=$(cygpath -aw ../osgeo4w/osgeo4w)
nmake /f makefile.vc OSGEO4W_ROOT=$(cygpath -aw ../osgeo4w/osgeo4w) INSTDIR=..\\osgeo4w\\install install

cd osgeo4w
cd ../osgeo4w

export R=$OSGEO4W_REP/x86_64/release/$P
mkdir -p $R/$P-devel
Expand All @@ -63,8 +63,8 @@ EOF

tar -C install -cjf $R/$P-devel/$P-devel-$V-$B.tar.bz2 include lib

cp ../COPYING $R/$P-$V-$B.txt
cp ../COPYING $R/$P-devel/$P-devel-$P-$V-$B.txt
cp ../$P/COPYING $R/$P-$V-$B.txt
cp ../$P/COPYING $R/$P-devel/$P-devel-$P-$V-$B.txt

tar -C .. -cjf $R/$P-$V-$B-src.tar.bz2 osgeo4w/package.sh osgeo4w/makefile.o4w

Expand Down

0 comments on commit 38d6309

Please sign in to comment.