diff --git a/PostGIS/build-osx.sh b/PostGIS/build-osx.sh index 6d31ec0e..86137664 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/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/.. 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 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 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 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