From fe1356637872930c2309371c77e86dbc98c9abed Mon Sep 17 00:00:00 2001 From: agarwal-kritika <62944221+agarwal-kritika@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:47:55 +0530 Subject: [PATCH 1/5] Update PostGIS build scripts for Mac OSX DBP-984, Kritika Agarwal, Reviewed by Sandeep Thakkar --- PostGIS/build-osx.sh | 49 ++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/PostGIS/build-osx.sh b/PostGIS/build-osx.sh index ae9b81c8..15d68490 100644 --- a/PostGIS/build-osx.sh +++ b/PostGIS/build-osx.sh @@ -25,8 +25,8 @@ _prep_PostGIS_osx() { mkdir -p postgis.osx || _die "Couldn't create the postgis.osx directory" chmod ugo+w postgis.osx || _die "Couldn't set the permissions on the source directory" - echo "Copying pgJDBC jar files.." - cp postgresql-$PG_VERSION_PGJDBC*.jar postgis.osx || _die "Failed to copy pgJDBC jar files." + #echo "Copying pgJDBC jar files.." + #cp postgresql-$PG_VERSION_PGJDBC*.jar postgis.osx || _die "Failed to copy pgJDBC jar files." # Grab a copy of the postgis source tree cp -R postgis-$PG_VERSION_POSTGIS/* postgis.osx || _die "Failed to copy the source code (PostGIS/source/postgis-$PG_VERSION_POSTGIS)" @@ -202,22 +202,22 @@ cat < $WD/PostGIS/build-postgis.sh # Configure the source tree echo "Configuring the PostGIS source" - PATH=$PATH:$IMAGEMAGICK_HOME_OSX/bin LD_LIBRARY_PATH=/opt/local/Current_v15/lib:$LD_LIBRARY_PATH; CXXFLAGS="$PG_ARCH_OSX_CXXFLAGS" CFLAGS="$PG_ARCH_OSX_CFLAGS" LDFLAGS="-L/opt/local/Current_v15/lib" MACOSX_DEPLOYMENT_TARGET=$MACOSX_MIN_VERSION PATH=/opt/local/Current_v15/bin:$PG_PERL_OSX/bin:$PATH ./configure --enable-debug --with-pgconfig=$PG_PGHOME_OSX/bin/pg_config --with-geosconfig=/opt/local/Current_v15/bin/geos-config --with-projdir=/opt/local/Current_v15 --with-xsldir=$PG_DOCBOOK_OSX --with-gdalconfig=/opt/local/Current_v15/bin/gdal-config --with-xml2config=/opt/local/Current_v15/bin/xml2-config --with-libiconv=/opt/local/Current_v15 --with-jsondir=/opt/local/Current_v15 --without-protobuf || _die "Failed to configure PostGIS" - + PATH=$IMAGEMAGICK_HOME_OSX/bin:/opt/local/bin:/opt/local/Current_v15/bin:$PG_PERL_OSX/bin:$PATH LD_LIBRARY_PATH=/opt/local/Current_v15/lib:$LD_LIBRARY_PATH; CXXFLAGS="$PG_ARCH_OSX_CXXFLAGS" CFLAGS="$PG_ARCH_OSX_CFLAGS" LDFLAGS="-L/opt/local/Current_v15/lib" MACOSX_DEPLOYMENT_TARGET=$MACOSX_MIN_VERSION PROJ_CFLAGS="-I/opt/local/Current_v15/include" PROJ_LIBS="-L/opt/local/Current_v15/lib -lproj" ./configure --disable-extension-upgrades-install --enable-debug --with-pgconfig=$PG_PGHOME_OSX/bin/pg_config --with-geosconfig=/opt/local/Current_v15/bin/geos-config --with-projdir=/opt/local/Current_v15 --with-xsldir=$PG_DOCBOOK_OSX --with-gdalconfig=/opt/local/Current_v15/bin/gdal-config --with-xml2config=/opt/local/Current_v15/bin/xml2-config --with-libiconv=/opt/local/Current_v15 --with-jsondir=/opt/local/Current_v15 --without-protobuf --with-pcredir=/opt/local/Current_v15 --with-address_standardizer || _die "Failed to configure PostGIS" + echo "Building PostGIS" + echo "workaround: Patching topology Makefile to comment out the problematic lines" + sed -i '' '/prefix = /,+2 s/^/#/' topology/Makefile LDFLAGS="-L/opt/local/Current_v15/lib" CFLAGS="$PG_ARCH_OSX_CFLAGS" MACOSX_DEPLOYMENT_TARGET=$MACOSX_MIN_VERSION make || _die "Failed to build PostGIS" - echo "Building comments" - make comments || _die "Failed to build comments" + #echo "Building comments" + #make comments || _die "Failed to build comments" echo "Installing PostGIS" - echo "workaround: Patching topology Makefile to comment out the problematic lines" - sed -i '' '/top_builddir/,+3 s/^/#/' topology/Makefile make install PGXSOVERRIDE=0 DESTDIR=$PG_PATH_OSX/PostGIS/staging/osx.build/PostGIS bindir=/bin pkglibdir=/lib/postgresql datadir=/share REGRESS=1 PGSQL_DOCDIR=$PG_PATH_OSX/PostGIS/staging/osx.build/PostGIS/doc PGSQL_MANDIR=$PG_PATH_OSX/PostGIS/staging/osx.build/PostGIS/man PGSQL_SHAREDIR=$PG_PATH_OSX/PostGIS/staging/osx.build/PostGIS/share/postgresql || _die "Failed to install PostGIS" - echo "Installing comments" - make comments-install PGXSOVERRIDE=0 DESTDIR=$PG_PATH_OSX/PostGIS/staging/osx.build/PostGIS bindir=/bin pkglibdir=/lib datadir=/share REGRESS=1 PGSQL_DOCDIR=$PG_PATH_OSX/PostGIS/staging/osx.build/PostGIS/doc PGSQL_MANDIR=$PG_PATH_OSX/PostGIS/staging/osx.build/PostGIS/man PGSQL_SHAREDIR=$PG_PATH_OSX/PostGIS/staging/osx.build/PostGIS/share/postgresql || _die "Failed to install PostGIS comments" + #echo "Installing comments" + #make comments-install PGXSOVERRIDE=0 DESTDIR=$PG_PATH_OSX/PostGIS/staging/osx.build/PostGIS bindir=/bin pkglibdir=/lib datadir=/share REGRESS=1 PGSQL_DOCDIR=$PG_PATH_OSX/PostGIS/staging/osx.build/PostGIS/doc PGSQL_MANDIR=$PG_PATH_OSX/PostGIS/staging/osx.build/PostGIS/man PGSQL_SHAREDIR=$PG_PATH_OSX/PostGIS/staging/osx.build/PostGIS/share/postgresql || _die "Failed to install PostGIS comments" echo "Building postgis-doc" - cd $PG_PATH_OSX/PostGIS/source/postgis.osx/doc/html/image_src; - make clean + #cd $PG_PATH_OSX/PostGIS/source/postgis.osx/doc/html/image_src; + #make clean LDFLAGS="-L/opt/local/Current_v15/lib" CFLAGS="$PG_ARCH_OSX_CFLAGS" MACOSX_DEPLOYMENT_TARGET=$MACOSX_MIN_VERSION make|| _die "Failed to build postgis-doc" cd $PG_PATH_OSX/PostGIS/source/postgis.osx/doc; LDFLAGS="-L/opt/local/Current_v15/lib" CFLAGS="$PG_ARCH_OSX_CFLAGS" MACOSX_DEPLOYMENT_TARGET=$MACOSX_MIN_VERSION make html || _die "Failed to build postgis-doc" @@ -227,7 +227,7 @@ cat < $WD/PostGIS/build-postgis.sh mkdir -p staging/osx.build/PostGIS/doc/postgis/ cp -pR source/postgis.osx/doc/html/images staging/osx.build/PostGIS/doc/postgis/ cp -pR source/postgis.osx/doc/html/postgis.html staging/osx.build/PostGIS/doc/postgis/ - cp -pR source/postgis.osx/java/jdbc/src/main/javadoc/overview.html staging/osx.build/PostGIS/doc/postgis/ + #cp -pR source/postgis.osx/java/jdbc/src/main/javadoc/overview.html staging/osx.build/PostGIS/doc/postgis/ cp -pR source/postgis.osx/doc/postgis-$PG_VERSION_POSTGIS.pdf staging/osx.build/PostGIS/doc/postgis/ mkdir -p staging/osx.build/PostGIS/man @@ -238,16 +238,16 @@ cat < $WD/PostGIS/build-postgis.sh cd $PG_PATH_OSX/PostGIS/source/postgis.osx/utils cp *.pl $PG_STAGING/PostGIS/utils || _die "Failed to copy the utilities " - echo "Building postgis-jdbc" - cd $PG_PATH_OSX/PostGIS/source/postgis.osx/java/jdbc - CLASSPATH=$PG_PATH_OSX/PostGIS/source/postgis.osx/postgresql-$PG_JAR_POSTGRESQL.jar:\$CLASSPATH JAVA_HOME=$PG_JAVA_HOME_OSX $PG_MAVEN_HOME_OSX/bin/mvn -U clean install || _die "Failed to build postgis-jdbc jar." + #echo "Building postgis-jdbc" + #cd $PG_PATH_OSX/PostGIS/source/postgis.osx/java/jdbc + #CLASSPATH=$PG_PATH_OSX/PostGIS/source/postgis.osx/postgresql-$PG_JAR_POSTGRESQL.jar:\$CLASSPATH JAVA_HOME=$PG_JAVA_HOME_OSX $PG_MAVEN_HOME_OSX/bin/mvn -U clean install || _die "Failed to build postgis-jdbc jar." - mkdir -p $PG_PATH_OSX/PostGIS/staging/osx.build/PostGIS/java/jdbc + #mkdir -p $PG_PATH_OSX/PostGIS/staging/osx.build/PostGIS/java/jdbc - echo "Copying postgis-jdbc" - cd $PG_PATH_OSX/PostGIS/source/postgis.osx/java - cp jdbc/target/postgis*.jar $PG_PATH_OSX/PostGIS/staging/osx.build/PostGIS/java/jdbc || _die "Failed to copy postgis jars into postgis-jdbc" - cp -R ejb2 ejb3 $PG_PATH_OSX/PostGIS/staging/osx.build/PostGIS/java/ || _die "Failed to copy ejb2, ejb3 into postgis-java" + #echo "Copying postgis-jdbc" + #cd $PG_PATH_OSX/PostGIS/source/postgis.osx/java + #cp jdbc/target/postgis*.jar $PG_PATH_OSX/PostGIS/staging/osx.build/PostGIS/java/jdbc || _die "Failed to copy postgis jars into postgis-jdbc" + #cp -R ejb2 ejb3 $PG_PATH_OSX/PostGIS/staging/osx.build/PostGIS/java/ || _die "Failed to copy ejb2, ejb3 into postgis-java" EOT-POSTGIS @@ -284,11 +284,16 @@ cat <> $WD/PostGIS/build-postgis.sh cp -pR /opt/local/Current_v15/lib/libproj*dylib staging/osx.build/PostGIS/lib || _die "Failed to copy dependent libraries" cp -pR /opt/local/Current_v15/lib/libgdal*dylib staging/osx.build/PostGIS/lib || _die "Failed to copy dependent libraries" cp -pR /opt/local/Current_v15/lib/libcurl*dylib staging/osx.build/PostGIS/lib || _die "Failed to copy dependent libraries" - cp -pR /opt/local/Current_v15/lib/libpcre.*dylib staging/osx.build/PostGIS/lib || _die "Failed to copy dependent libraries" + cp -pR /opt/local/Current_v15/lib/libpcre2*dylib staging/osx.build/PostGIS/lib || _die "Failed to copy dependent libraries" cp -pR /opt/local/Current_v15/lib/libjson-c.*dylib staging/osx.build/PostGIS/lib || _die "Failed to copy dependent (libjson-c) libraries" cp -pR /opt/local/Current_v15/lib/libtiff.*dylib staging/osx.build/PostGIS/lib || _die "Failed to copy dependent (libtiff) libraries" cp -pR /opt/local/Current_v15/lib/libjpeg.*dylib staging/osx.build/PostGIS/lib || _die "Failed to copy dependent (libjpeg) libraries" cp -pR /opt/local/Current_v15/lib/libpng*.*dylib staging/osx.build/PostGIS/lib || _die "Failed to copy dependent (libpng) libraries" + cp -pR /opt/local/Current_v15/lib/libexpat*.*dylib staging/osx.build/PostGIS/lib || _die "Failed to copy dependent (expat) libraries" + cp -pR /opt/local/Current_v15/lib/libsqlite*.*dylib staging/osx.build/PostGIS/lib || _die "Failed to copy dependent (sqlite) libraries" + cp -pR /opt/local/Current_v15/share/proj staging/osx.build/PostGIS/share/ || _die "Failed to copy share/proj" + cp -pR /opt/local/Current_v15/share/gdal staging/osx.build/PostGIS/share/ || _die "Failed to copy share/gdal" + _rewrite_so_refs $PG_PATH_OSX/PostGIS/staging/osx.build/PostGIS bin @loader_path/.. _rewrite_so_refs $PG_PATH_OSX/PostGIS/staging/osx.build/PostGIS lib @loader_path/.. From c6bee2eccd7ee656245754b7334e4771886700b2 Mon Sep 17 00:00:00 2001 From: agarwal-kritika <62944221+agarwal-kritika@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:51:08 +0530 Subject: [PATCH 2/5] Update build.sh --- PostGIS/build.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/PostGIS/build.sh b/PostGIS/build.sh index 2209e928..8930e3b0 100644 --- a/PostGIS/build.sh +++ b/PostGIS/build.sh @@ -35,9 +35,9 @@ _prep_PostGIS() { echo "Unpacking postgis source..." extract_file ../../tarballs/postgis-$PG_VERSION_POSTGIS - echo "Extracting the postgis-java source..." - extract_file ../../tarballs/postgis-java-$PG_VERSION_POSTGIS_JAVA - mv postgis-java-$PG_VERSION_POSTGIS_JAVA postgis-$PG_VERSION_POSTGIS/java/ + #echo "Extracting the postgis-java source..." + #extract_file ../../tarballs/postgis-java-$PG_VERSION_POSTGIS_JAVA + #mv postgis-java-$PG_VERSION_POSTGIS_JAVA postgis-$PG_VERSION_POSTGIS/java/ echo "Applying patches..." #cd postgis-$PG_VERSION_POSTGIS @@ -45,9 +45,9 @@ _prep_PostGIS() { cd $WD/PostGIS/source - echo "Extracting the postgresql jar file..." - extract_file ../../tarballs/pgJDBC-$PG_VERSION_PGJDBC - mv pgJDBC-$PG_VERSION_PGJDBC/*.jar . + #echo "Extracting the postgresql jar file..." + #extract_file ../../tarballs/pgJDBC-$PG_VERSION_PGJDBC + #mv pgJDBC-$PG_VERSION_PGJDBC/*.jar . # Per-platform prep cd $WD From 19f50b18cffe5207555e5cf907d99ead6abe30a1 Mon Sep 17 00:00:00 2001 From: agarwal-kritika <62944221+agarwal-kritika@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:51:56 +0530 Subject: [PATCH 3/5] Update installer.xml.in --- PostGIS/installer.xml.in | 3 --- 1 file changed, 3 deletions(-) diff --git a/PostGIS/installer.xml.in b/PostGIS/installer.xml.in index 6d731fb0..66f5ef1d 100644 --- a/PostGIS/installer.xml.in +++ b/PostGIS/installer.xml.in @@ -1089,9 +1089,6 @@ EOF staging/osx/PostGIS/utils - - staging/osx/PostGIS/java - staging/osx/PostGIS/man From d67fc6f605d5c2d81429d73f787e6a04ad0b46e1 Mon Sep 17 00:00:00 2001 From: agarwal-kritika <62944221+agarwal-kritika@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:52:27 +0530 Subject: [PATCH 4/5] Update PostGIS version to v3.4.3 in versions.sh --- versions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions.sh b/versions.sh index 15bca630..e44a7fd1 100755 --- a/versions.sh +++ b/versions.sh @@ -25,7 +25,7 @@ PG_MINOR_VERSION=10.1 # Other package versions PG_VERSION_PGJDBC=42.7.2 PG_VERSION_PSQLODBC=15.00.0000 -PG_VERSION_POSTGIS=3.3.1 +PG_VERSION_POSTGIS=3.4.3 PG_VERSION_POSTGIS_JAVA=2.1.7.2 PG_VERSION_NPGSQL=3.2.6 PG_VERSION_PGAGENT=4.2.2 From 68a5233279d4c3a857811fe3cf6c659daf6f9897 Mon Sep 17 00:00:00 2001 From: agarwal-kritika <62944221+agarwal-kritika@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:53:09 +0530 Subject: [PATCH 5/5] Update settings.sh.in --- settings.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.sh.in b/settings.sh.in index a9862d72..9c8ecb35 100755 --- a/settings.sh.in +++ b/settings.sh.in @@ -48,7 +48,7 @@ PG_PATH_OSX_NOTARY=/Users/buildfarm/pginstaller_15.notary PG_PATH_OSX_SIGNTOOL=/opt/local/bin/osxsigner PG_PGHOME_OSX=$PG_PATH_OSX/server/staging_cache/osx PG_MAVEN_HOME_OSX=/opt/local/Current/apache-maven-3.8.2 -PG_DOCBOOK_OSX=/usr/local/docbook-xsl-1.77.1 +PG_DOCBOOK_OSX=/usr/local/Cellar/docbook-xsl/1.79.2_1/docbook-xsl PG_CMAKE_OSX=/Applications/CMake.app/Contents/bin/cmake PG_PERL_OSX=/Library/edb/languagepack/v3/Perl-5.36 PG_PYTHON_OSX=/Library/edb/languagepack/v3/Python-3.10