Attached is a quick patch that fixes making pg_config. When making the port on FreeBSD, it uses commas in the LDFLAGS section of the configure args and sed doesn't grok that so well. Patch just changes the delimiters. -sc
Now:
sed -e 's|@bindir@|/usr/local/bin|g' \
-e 's|@includedir@|/usr/local/include|g' \
-e 's|@includedir_server@|/usr/local/include/postgresql/server|g' \
-e 's|@libdir@|/usr/local/lib|g' \
-e 's|@pkglibdir@|/usr/local/lib/postgresql|g' \
-e "s|@configure@|'--enable-locale' '--enable-syslog' '--with-CXX'
'--docdir=/usr/local/share/doc' '--with-libdir=/usr/local/lib'
'--with-includes=/usr/local/include' '--with-openssl=/usr' '--with-krb5=/usr/local'
'--prefix=/usr/local' 'i386-portbld-freebsd4.7' 'CC=cc' 'CFLAGS=-O -pipe -g -O
-I/usr/local/include' 'LDFLAGS= -L/usr/local/lib -lgnugetopt -L/usr/local/lib
-Wl,-rpath -Wl,/usr/local/lib -lkrb5 -lk5crypto -lcom_err'
'build_alias=i386-portbld-freebsd4.7' 'host_alias=i386-portbld-freebsd4.7'
'target_alias=i386-portbld-freebsd4.7'|g" \
-e 's|@version@|7.3b1|g' \
pg_config.sh >pg_config
chmod a+x pg_config
Was:
sed -e 's,@bindir@,/usr/local/bin,g' \
-e 's,@includedir@,/usr/local/include,g' \
-e 's,@includedir_server@,/usr/local/include/postgresql/server,g' \
-e 's,@libdir@,/usr/local/lib,g' \
-e 's,@pkglibdir@,/usr/local/lib/postgresql,g' \
-e "s,@configure@,'--enable-locale' '--enable-syslog' '--with-CXX'
'--docdir=/usr/local/share/doc' '--with-libdir=/usr/local/lib'
'--with-includes=/usr/local/include' '--with-openssl=/usr' '--with-krb5=/usr/local'
'--prefix=/usr/local' 'i386-portbld-freebsd4.7' 'CC=cc' 'CFLAGS=-O -pipe -g -O
-I/usr/local/include' 'LDFLAGS= -L/usr/local/lib -lgnugetopt -L/usr/local/lib
-Wl,-rpath -Wl,/usr/local/lib -lkrb5 -lk5crypto -lcom_err'
'build_alias=i386-portbld-freebsd4.7' 'host_alias=i386-portbld-freebsd4.7'
'target_alias=i386-portbld-freebsd4.7',g" \
-e 's,@version@,7.3b1,g' \
pg_config.sh >pg_config
sed: 1: "s,@configure@,'--enable ...": bad flag in substitute command: '-'
gmake[4]: *** [pg_config] Error 1
gmake[4]: *** Deleting file `pg_config'
--
Sean Chittenden
Index: Makefile
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/bin/pg_config/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- Makefile 2002/03/29 17:32:55 1.4
+++ Makefile 2002/09/08 21:22:39
@@ -7,13 +7,13 @@
all: pg_config
pg_config: pg_config.sh $(top_builddir)/src/Makefile.global Makefile
- sed -e 's,@bindir@,$(bindir),g' \
- -e 's,@includedir@,$(includedir),g' \
- -e 's,@includedir_server@,$(includedir_server),g' \
- -e 's,@libdir@,$(libdir),g' \
- -e 's,@pkglibdir@,$(pkglibdir),g' \
- -e "s,@configure@,$(configure_args),g" \
- -e 's,@version@,$(VERSION),g' \
+ sed -e 's|@bindir@|$(bindir)|g' \
+ -e 's|@includedir@|$(includedir)|g' \
+ -e 's|@includedir_server@|$(includedir_server)|g' \
+ -e 's|@libdir@|$(libdir)|g' \
+ -e 's|@pkglibdir@|$(pkglibdir)|g' \
+ -e "s|@configure@|$(configure_args)|g" \
+ -e 's|@version@|$(VERSION)|g' \
$< >$@
chmod a+x $@
msg04795/pgp00000.pgp
Description: PGP signature
