postgresql: fix shell version of pg_config.sh

[skip ci]
This commit is contained in:
Đoàn Trần Công Danh 2020-04-09 22:01:41 +07:00 committed by Jürgen Buchmüller
parent e53cda0d82
commit 3e16ec9653
2 changed files with 31 additions and 27 deletions

View file

@ -1,6 +1,10 @@
#!/bin/sh #!/bin/sh
# Released to Public Domain by Doan Tran Cong Danh # Released to Public Domain by Doan Tran Cong Danh
print() {
printf '%s\n' "$@"
}
sysroot="$(cd "${0%/*}" && cd ../.. && pwd)" sysroot="$(cd "${0%/*}" && cd ../.. && pwd)"
BINDIR="$sysroot/usr/bin" BINDIR="$sysroot/usr/bin"
@ -29,9 +33,9 @@ LIBS="@LIBS@"
VERSION="PostgreSQL @VERSION@" VERSION="PostgreSQL @VERSION@"
if [ "$sysroot" != "/" ]; then if [ "$sysroot" != "/" ]; then
CPPFLAGS="$(echo "$CPPFLAGS" | sed "s,-I *\\(/usr/include\\),-I$sysroot\\1,g")" CPPFLAGS="$(print "$CPPFLAGS" | sed "s,-I *\\(/usr/include\\),-I$sysroot\\1,g")"
CFLAGS="$(echo "$CFLAGS" | sed "s,-I *\\(/usr/include\\),-I$sysroot\\1,g")" CFLAGS="$(print "$CFLAGS" | sed "s,-I *\\(/usr/include\\),-I$sysroot\\1,g")"
LDFLAGS="$(echo "$LDFLAGS" | sed "s,-L *\\(/usr/lib\\),-L$sysroot\\1,g")" LDFLAGS="$(print "$LDFLAGS" | sed "s,-L *\\(/usr/lib\\),-L$sysroot\\1,g")"
fi fi
usage() { usage() {
@ -112,28 +116,28 @@ done
for arg for arg
do do
case "$arg" in case "$arg" in
--bindir) echo "$BINDIR" ;; --bindir) print "$BINDIR" ;;
--docdir) echo "$DOCDIR" ;; --docdir) print "$DOCDIR" ;;
--htmldir) echo "$HTMLDIR" ;; --htmldir) print "$HTMLDIR" ;;
--includedir) echo "$INCLUDEDIR" ;; --includedir) print "$INCLUDEDIR" ;;
--pkgincludedir) echo "$PKGINCLUDEDIR" ;; --pkgincludedir) print "$PKGINCLUDEDIR" ;;
--includedir-server) echo "$INCLUDEDIR_SERVER" ;; --includedir-server) print "$INCLUDEDIR_SERVER" ;;
--libdir) echo "$LIBDIR" ;; --libdir) print "$LIBDIR" ;;
--pkglibdir) echo "$PKGLIBDIR" ;; --pkglibdir) print "$PKGLIBDIR" ;;
--localedir) echo "$LOCALEDIR" ;; --localedir) print "$LOCALEDIR" ;;
--mandir) echo "$MANDIR" ;; --mandir) print "$MANDIR" ;;
--sharedir) echo "$SHAREDIR" ;; --sharedir) print "$SHAREDIR" ;;
--sysconfdir) echo "$SYSCONFDIR" ;; --sysconfdir) print "$SYSCONFDIR" ;;
--pgxs) echo "$PGXS" ;; --pgxs) print "$PGXS" ;;
--configure) echo "$CONFIGURE" ;; --configure) print "$CONFIGURE" ;;
--cc) echo "$CC" ;; --cc) print "$CC" ;;
--cppflags) echo "$CPPFLAGS" ;; --cppflags) print "$CPPFLAGS" ;;
--cflags) echo "$CFLAGS" ;; --cflags) print "$CFLAGS" ;;
--cflags_sl) echo "$CFLAGS_SL" ;; --cflags_sl) print "$CFLAGS_SL" ;;
--ldflags) echo "$LDFLAGS" ;; --ldflags) print "$LDFLAGS" ;;
--ldflags_ex) echo "$LDFLAGS_EX" ;; --ldflags_ex) print "$LDFLAGS_EX" ;;
--ldflags_sl) echo "$LDFLAGS_SL" ;; --ldflags_sl) print "$LDFLAGS_SL" ;;
--libs) echo "$LIBS" ;; --libs) print "$LIBS" ;;
--version) echo "$VERSION" ;; --version) print "$VERSION" ;;
esac esac
done done

View file

@ -1,7 +1,7 @@
# Template file for 'postgresql' # Template file for 'postgresql'
pkgname=postgresql pkgname=postgresql
version=9.6.17 version=9.6.17
revision=2 revision=3
build_style=gnu-configure build_style=gnu-configure
make_build_target=world make_build_target=world
configure_args="--with-openssl --with-python configure_args="--with-openssl --with-python