# --- ROCK-COPYRIGHT-NOTE-BEGIN --- # # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # Please add additional copyright information _after_ the line containing # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/mnemoc/clip/postgresql.patch # ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # # --- ROCK-COPYRIGHT-NOTE-END --- --- ./cliplibs/clip-postgres/Makefile 2004-01-19 11:36:31.000000000 -0300 +++ ./cliplibs/clip-postgres/Makefile.in 2004-01-19 12:22:53.000000000 -0300 @@ -13,19 +13,20 @@ TARGET=libclip-postgres$(DLLSUFF) ATARGET=libclip-postgres.a RTARGET=libclip-postgres$(DLLREALSUFF) -PGINC = -I/usr/include/pgsql -I/usr/include/postgresql -I/usr/include/pgsql/server -I/usr/include -I/usr/local/include +PGINC = -I@PGINCDIR@ +PGLIB = -L@PGLIBDIR@ OBJS=pg_clip.o pg.o all: have_lib $(TARGET) $(ATARGET) have_lib: - test -f /usr/include/pgsql/libpq-fe.h -o -f /usr/include/postgresql/libpq-fe.h -o -f /usr/include/pgsql/server/libpq-fe.h -o -f /usr/include/libpq-fe.h -o -f /usr/local/include/libpq-fe.h + test -f @PGINCDIR@/libpq-fe.h $(TARGET): $(OBJS) - $(CLIPROOT)/bin/clip_makeslib $(TARGET) $(OBJS) -lpq -L/usr/local/lib -L/usr/local/pgsql/lib + $(CLIPROOT)/bin/clip_makeslib $(TARGET) $(OBJS) -lpq $(PGLIB) $(ATARGET): $(OBJS) - $(CLIPROOT)/bin/clip_makelib $(ATARGET) $(OBJS) -lpq -L/usr/local/lib/ -L/usr/local/pgsql/lib + $(CLIPROOT)/bin/clip_makelib $(ATARGET) $(OBJS) -lpq $(PGLIB) pg_clip.o: pg_clip.c $(CC) $(C_FLAGS) $(CLIPINCLUDE) $(PGINC) -c pg_clip.c --- /dev/null 1969-12-31 21:00:00.000000000 -0300 +++ ./cliplibs/clip-postgres/configure 2004-01-19 12:37:45.000000000 -0300 @@ -0,0 +1,29 @@ +#!/bin/sh + +if [ -z "$PGINCDIR" ]; then + for x in /usr/include/pgsql \ + /usr/include/pgsql/server \ + /usr/include/postgresql \ + /opt/postgresql/include + do + if [ -f "$x/libpq-fe.h" ]; then + PGINCDIR=$x + break + fi + done +fi +if [ -z "$PGLIBDIR" ]; then + for x in /usr/local/lib \ + /usr/local/pgsql/lib \ + /opt/postgresql/lib + do + if [ -f "$x/libpq.so" ]; then + PGLIBDIR=$x + break + fi + done +fi + +sed -e "s,@PGINCDIR@,${PGINCDIR:-/usr/include},g" \ + -e "s,@PGLIBDIR@,${PGLIBDIR:-/usr/lib},g" \ + Makefile.in > Makefile