Skip to content

Commit

Permalink
Windows: Apply OSGeo4W patches for Postgres (backport) (#5005)
Browse files Browse the repository at this point in the history
Backport of #4996 to G84 branch
  • Loading branch information
neteler authored Jan 29, 2025
1 parent 39ad77d commit ec54064
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 5 additions & 1 deletion mswindows/osgeo4w/build_osgeo4w.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export C_INCLUDE_PATH=".:${OSGEO4W_ROOT_MSYS}/include:${SRC}/dist.${ARCH}/includ
export PYTHONHOME=${OSGEO4W_ROOT_MSYS}/apps/Python312
export ARCH=x86_64-w64-mingw32

mkdir -p mswindows/osgeo4w/lib
rm -f $OSGEO4W_ROOT_MSYS/lib/libpq.a
cp -uv $OSGEO4W_ROOT_MSYS/lib/libpq.lib mswindows/osgeo4w/lib/libpq.lib

./configure \
--host=${ARCH} \
--with-libs="${OSGEO4W_ROOT_MSYS}/lib ${OSGEO4W_ROOT_MSYS}/bin" \
Expand All @@ -46,7 +50,7 @@ export ARCH=x86_64-w64-mingw32
--with-proj-libs=${OSGEO4W_ROOT_MSYS}/lib \
--with-postgres \
--with-postgres-includes=${OSGEO4W_ROOT_MSYS}/include \
--with-postgres-libs=${OSGEO4W_ROOT_MSYS}/lib \
--with-postgres-libs=${SRC}/mswindows/osgeo4w/lib \
--with-gdal=${SRC}/mswindows/osgeo4w/gdal-config \
--with-geos=${SRC}/mswindows/osgeo4w/geos-config \
--with-sqlite \
Expand Down
5 changes: 3 additions & 2 deletions mswindows/osgeo4w/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ if ! [ -f mswindows/osgeo4w/configure-stamp ]; then
cp -uv $DLLS dist.x86_64-w64-mingw32/bin

mkdir -p mswindows/osgeo4w/lib
cp -uv $OSGEO4W_ROOT_MSYS/lib/libpq.lib mswindows/osgeo4w/lib/pq.lib
rm -f $OSGEO4W_ROOT_MSYS/lib/libpq.a
cp -uv $OSGEO4W_ROOT_MSYS/lib/libpq.lib mswindows/osgeo4w/lib/libpq.lib
cp -uv $OSGEO4W_ROOT_MSYS/lib/sqlite3_i.lib mswindows/osgeo4w/lib/sqlite3.lib

log configure
Expand All @@ -173,7 +174,7 @@ if ! [ -f mswindows/osgeo4w/configure-stamp ]; then
--with-proj-libs=$OSGEO4W_ROOT_MSYS/lib \
--with-postgres \
--with-postgres-includes=$OSGEO4W_ROOT_MSYS/include \
--with-postgres-libs=$PWD/mswindows/osgeo4w/lib \
--with-postgres-libs=${SRC}/mswindows/osgeo4w/lib \
--with-gdal=$PWD/mswindows/osgeo4w/gdal-config \
--with-geos=$PWD/mswindows/osgeo4w/geos-config \
--with-sqlite \
Expand Down

0 comments on commit ec54064

Please sign in to comment.