From da26c11fc3a3c2bf26505fe86dd09b9ba39ec942 Mon Sep 17 00:00:00 2001 From: agarwal-kritika <62944221+agarwal-kritika@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:36:53 +0530 Subject: [PATCH 1/7] Update PostGIS build scripts for Mac OSX --- PostGIS/build-osx.sh | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/PostGIS/build-osx.sh b/PostGIS/build-osx.sh index 6d31ec0e..77dfbb3e 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,20 +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/lib:$LD_LIBRARY_PATH; CFLAGS="$PG_ARCH_OSX_CFLAGS" LDFLAGS="-L/opt/local/Current/lib" MACOSX_DEPLOYMENT_TARGET=$MACOSX_MIN_VERSION PATH=/opt/local/Current/bin:$PG_PERL_OSX/bin:$PATH ./configure --enable-debug --with-pgconfig=$PG_PGHOME_OSX/bin/pg_config --with-geosconfig=/opt/local/Current/bin/geos-config --with-projdir=/opt/local/Current --with-xsldir=$PG_DOCBOOK_OSX --with-gdalconfig=/opt/local/Current/bin/gdal-config --with-xml2config=/opt/local/Current/bin/xml2-config --with-libiconv=/opt/local/Current --with-jsondir=/opt/local/Current --without-protobuf || _die "Failed to configure PostGIS" + PATH=$IMAGEMAGICK_HOME_OSX/bin:/opt/local/bin:/opt/local/Current/bin:$PG_PERL_OSX/bin:$PATH LD_LIBRARY_PATH=/opt/local/Current/lib:$LD_LIBRARY_PATH; CXXFLAGS="$PG_ARCH_OSX_CXXFLAGS" CFLAGS="$PG_ARCH_OSX_CFLAGS" LDFLAGS="-L/opt/local/Current/lib" MACOSX_DEPLOYMENT_TARGET=$MACOSX_MIN_VERSION PROJ_CFLAGS="-I/opt/local/Current/include" PROJ_LIBS="-L/opt/local/Current/lib -lproj" ./configure --disable-extension-upgrades-install --enable-debug --with-pgconfig=$PG_PGHOME_OSX/bin/pg_config --with-geosconfig=/opt/local/Current/bin/geos-config --with-projdir=/opt/local/Current --with-xsldir=$PG_DOCBOOK_OSX --with-gdalconfig=/opt/local/Current/bin/gdal-config --with-xml2config=/opt/local/Current/bin/xml2-config --with-libiconv=/opt/local/Current --with-jsondir=/opt/local/Current --without-protobuf --with-pcredir=/opt/local/Current --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/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" 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/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/lib" CFLAGS="$PG_ARCH_OSX_CFLAGS" MACOSX_DEPLOYMENT_TARGET=$MACOSX_MIN_VERSION make html || _die "Failed to build postgis-doc" @@ -225,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 @@ -236,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 @@ -282,11 +284,15 @@ cat <> $WD/PostGIS/build-postgis.sh cp -pR /opt/local/Current/lib/libproj*dylib staging/osx.build/PostGIS/lib || _die "Failed to copy dependent libraries" cp -pR /opt/local/Current/lib/libgdal*dylib staging/osx.build/PostGIS/lib || _die "Failed to copy dependent libraries" cp -pR /opt/local/Current/lib/libcurl*dylib staging/osx.build/PostGIS/lib || _die "Failed to copy dependent libraries" - cp -pR /opt/local/Current/lib/libpcre.*dylib staging/osx.build/PostGIS/lib || _die "Failed to copy dependent libraries" + cp -pR /opt/local/Current/lib/libpcre2*dylib staging/osx.build/PostGIS/lib || _die "Failed to copy dependent libraries" cp -pR /opt/local/Current/lib/libjson-c.*dylib staging/osx.build/PostGIS/lib || _die "Failed to copy dependent (libjson-c) libraries" cp -pR /opt/local/Current/lib/libtiff.*dylib staging/osx.build/PostGIS/lib || _die "Failed to copy dependent (libtiff) libraries" cp -pR /opt/local/Current/lib/libjpeg.*dylib staging/osx.build/PostGIS/lib || _die "Failed to copy dependent (libjpeg) libraries" cp -pR /opt/local/Current/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 515872edcd7752c17f06261b0a3e41d4bf06aaec Mon Sep 17 00:00:00 2001 From: agarwal-kritika <62944221+agarwal-kritika@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:39:04 +0530 Subject: [PATCH 2/7] Update build.sh --- PostGIS/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PostGIS/build.sh b/PostGIS/build.sh index 2209e928..02a4002e 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 From 779d3e12735ad60a0bf9b4e87e337ec5c28917b4 Mon Sep 17 00:00:00 2001 From: agarwal-kritika <62944221+agarwal-kritika@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:39:50 +0530 Subject: [PATCH 3/7] Update build.sh --- PostGIS/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PostGIS/build.sh b/PostGIS/build.sh index 02a4002e..8930e3b0 100644 --- a/PostGIS/build.sh +++ b/PostGIS/build.sh @@ -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 a53a89efe3a45a8bdcace895a497d813bf794733 Mon Sep 17 00:00:00 2001 From: agarwal-kritika <62944221+agarwal-kritika@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:40:29 +0530 Subject: [PATCH 4/7] 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 ea0cbb9fe2c24e918b7655f0a848f12bd19a8dbf Mon Sep 17 00:00:00 2001 From: agarwal-kritika <62944221+agarwal-kritika@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:40:51 +0530 Subject: [PATCH 5/7] Update PostGIS version to v3.4.3 --- versions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions.sh b/versions.sh index cff5ebf0..71fdb271 100755 --- a/versions.sh +++ b/versions.sh @@ -19,7 +19,7 @@ PG_MAJOR_VERSION=14 PG_MINOR_VERSION=15.1 # Other package versions -PG_VERSION_POSTGIS=3.1.3 +PG_VERSION_POSTGIS=3.4.3 PG_VERSION_POSTGIS_JAVA=2.1.7.2 PG_VERSION_PGAGENT=4.2.2 PG_VERSION_SQLPROTECT=$PG_TARBALL_POSTGRESQL From 08ce17cd9681a0d3b377b6869563b7bf19ceeed7 Mon Sep 17 00:00:00 2001 From: agarwal-kritika <62944221+agarwal-kritika@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:53:38 +0530 Subject: [PATCH 6/7] Update settings.sh.in --- settings.sh.in | 1 + 1 file changed, 1 insertion(+) diff --git a/settings.sh.in b/settings.sh.in index 586d6ffd..3223affb 100755 --- a/settings.sh.in +++ b/settings.sh.in @@ -57,6 +57,7 @@ SB_STAGING_OSX=$PWD/server/staging/osx/stackbuilder CLT_STAGING_OSX=$PWD/server/staging/osx/commandlinetools PG_INSTALLER_DEFAULT_PATH=/Library/PostgreSQL/14 IMAGEMAGICK_HOME_OSX=/opt/local/Current/ImageMagick +PG_DOCBOOK_OSX=/usr/local/Cellar/docbook-xsl/1.79.2_1/docbook-xsl # CFLAGS/CPPFLAGS/CXXFLAGS settings for different platforms. The is most important for Mac # where we may need to use non-default SDKs if we're building on a platform newer than the From a33742ad602b1240d976bd7fae714a14e66a34a7 Mon Sep 17 00:00:00 2001 From: agarwal-kritika <62944221+agarwal-kritika@users.noreply.github.com> Date: Thu, 19 Dec 2024 11:24:16 +0530 Subject: [PATCH 7/7] Update build-osx.sh --- PostGIS/build-osx.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PostGIS/build-osx.sh b/PostGIS/build-osx.sh index 77dfbb3e..86137664 100644 --- a/PostGIS/build-osx.sh +++ b/PostGIS/build-osx.sh @@ -289,10 +289,10 @@ cat <> $WD/PostGIS/build-postgis.sh cp -pR /opt/local/Current/lib/libtiff.*dylib staging/osx.build/PostGIS/lib || _die "Failed to copy dependent (libtiff) libraries" cp -pR /opt/local/Current/lib/libjpeg.*dylib staging/osx.build/PostGIS/lib || _die "Failed to copy dependent (libjpeg) libraries" cp -pR /opt/local/Current/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" + cp -pR /opt/local/Current/lib/libexpat*.*dylib staging/osx.build/PostGIS/lib || _die "Failed to copy dependent (expat) libraries" + cp -pR /opt/local/Current/lib/libsqlite*.*dylib staging/osx.build/PostGIS/lib || _die "Failed to copy dependent (sqlite) libraries" + cp -pR /opt/local/Current/share/proj staging/osx.build/PostGIS/share/ || _die "Failed to copy share/proj" + cp -pR /opt/local/Current/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/..