libpqpp stable port information

Package: libpqpp
Version: 4.0
Revision: 1022
Description: Old PostgreSQL C++ interface
License: BSD
Maintainer: Benjamin Reed

Depends: %N-shlibs (= %v-%r)
BuildDepends: <<
postgresql82-dev,
system-openssl-dev
<<
Replaces: <<
postgresql73-dev,
postgresql73-ssl-dev,
postgresql73-unified-dev,
postgresql74-dev,
postgresql74-ssl-dev,
postgresql74-unified-dev,
postgresql80-dev,
postgresql80-ssl-dev,
postgresql80-unified-dev,
postgresql81-dev
<<
GCC: 4.0

Source: ftp://gborg.postgresql.org/pub/%n/stable/libpq++-%v.tar.gz
Source-MD5: da71cb79ef45cef55f4bc97a33a0857d
Patch: %n.patch

CompileScript: <<
#!/bin/sh -ev

export lt_cv_sys_max_cmd_len=65536
export CPPFLAGS="-I%p/lib/system-openssl/include -I%p/include/postgresql -I%p/include -DHAVE_OPTRESET -fno-common"
export LDFLAGS="-L%p/lib/system-openssl/lib -L%p/lib"

make POSTGRES_HOME="%p" CC="g++" CXX="g++" CPP="g++ -E"
<<

InstallScript: <<
#!/bin/sh -ev

install -d -m 755 %i/include/postgresql %i/lib
make -j1 install POSTGRES_HOME="%p" DESTDIR="%d" CC="g++" CXX="g++" CPP="g++ -E"
install -d -m 755 %i/share/doc/%N
mv docs/*.html examples %i/share/doc/%N/
find %i/share/doc/%N -type d -name CVS -exec rm -rf {} \; || :
<<
DocFiles: CHANGES README
SplitOff: <<
Package: %N-shlibs
Description: Shared libraries for the PostgreSQL C++ interface
Depends: postgresql82-shlibs
Replaces: <<
postgresql73-shlibs,
postgresql73-ssl-shlibs,
postgresql73-unified-shlibs,
postgresql74-shlibs,
postgresql74-ssl-shlibs,
postgresql74-unified-shlibs,
postgresql80-shlibs,
postgresql80-ssl-shlibs,
postgresql80-unified-shlibs,
postgresql81-shlibs
<<
Files: lib/libpq++.*.dylib
Shlibs: %p/lib/libpq++.4.dylib 4.0.0 %n (>= 4.0-1)
<<

Homepage: http://gborg.postgresql.org/project/libpqpp/
DescDetail: <<
This is libpq++, the original C++ interface to PostgreSQL. It used
to be provided as part of PostgreSQL, but is now a separate project.
<<

libpqpp stable port .patch


--- libpq++-4.0/Makefile Tue Nov 26 23:46:08 2002
+++ libpq++-4.0-patched/Makefile Mon Dec 30 21:29:40 2002
@@ -11,33 +11,35 @@
SO_MAJOR_VERSION= 4
SO_MINOR_VERSION= 0

-POSTGRES_HOME=/usr/local/pgsql
-CXXOPTS= -DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT=""
+POSTGRES_HOME=@INSTPREFIX@
+CXXOPTS= -DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT="" -Wall -Wmissing-prototypes -Wmissing-declarations -fno-common -traditional-cpp

TARGET= libpq++
-CFLAGS= -O -Wall
+CFLAGS= -Os -Wall
LIBS=pq
OBJS= pgconnection.o pgdatabase.o pgtransdb.o pgcursordb.o pglobject.o
LIBPGXXHEADERS = pgconnection.h pgdatabase.h pgtransdb.h pgcursordb.h pglobject.h

-SHARED= -fpic -shared -Wl,-x,-soname,$(TARGET).so.$(SO_MAJOR_VERSION) -Wl,-rpath,$(POSTGRES_HOME)/lib
-soname=$(TARGET).so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+SHARED= -install_name $(POSTGRES_HOME)/lib/$(TARGET).$(SO_MAJOR_VERSION).dylib -compatibility_version $(SO_MAJOR_VERSION) -current_version $(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) -dynamiclib -multiply_defined suppress
+
+soname=$(TARGET).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION).dylib

all: $(soname)

$(soname) : $(OBJS)
- $(CXX) $(CXXFLAGS) $(OBJS) -L$(POSTGRES_HOME)/lib -l$(LIBS) $(SHARED) -o $(soname)
+ $(CXX) $(CXXFLAGS) $(OBJS) -L$(POSTGRES_HOME)/lib -l$(LIBS) $(SHARED) -o $(soname)

%.o : %.cc
- $(CXX) -c $(CXXFLAGS) $(CXXOPTS) -I$(POSTGRES_HOME)/include $<
+ $(CXX) -c $(CXXFLAGS) $(CXXOPTS) -I$(POSTGRES_HOME)/include/postgresql -I$(POSTGRES_HOME)/include $<

clean:
rm -f $(OBJS) $(soname)

install:
- install $(soname) $(POSTGRES_HOME)/lib
- rm -f $(POSTGRES_HOME)/lib/$(TARGET).so
- ln -s $(POSTGRES_HOME)/lib/$(soname) $(POSTGRES_HOME)/lib/$(TARGET).so
- install -c $(TARGET).h $(POSTGRES_HOME)/include
- -mkdir $(POSTGRES_HOME)/include/libpq++
- for i in $(LIBPGXXHEADERS); do install -c $$i $(POSTGRES_HOME)/include/libpq++ || exit 1; done
+ install $(soname) $(DESTDIR)$(POSTGRES_HOME)/lib
+ rm -f $(DESTDIR)$(POSTGRES_HOME)/lib/$(TARGET).dylib
+ ln -sf $(soname) $(DESTDIR)$(POSTGRES_HOME)/lib/$(TARGET).dylib
+ ln -sf $(soname) $(DESTDIR)$(POSTGRES_HOME)/lib/$(TARGET).$(SO_MAJOR_VERSION).dylib
+ install -c -m 644 $(TARGET).h $(DESTDIR)$(POSTGRES_HOME)/include/postgresql
+ install -d -m 755 $(DESTDIR)$(POSTGRES_HOME)/include/postgresql/libpq++
+ for i in $(LIBPGXXHEADERS); do install -c $$i $(DESTDIR)$(POSTGRES_HOME)/include/postgresql/libpq++ || exit 1; done

libpqpp _unstable_ port information

Package: libpqpp
Version: 4.0
Revision: 1022
Description: Old PostgreSQL C++ interface
License: BSD
Maintainer: Benjamin Reed

Depends: %N-shlibs (= %v-%r)
BuildDepends: <<
postgresql82-dev,
system-openssl-dev
<<
Replaces: <<
postgresql73-dev,
postgresql73-ssl-dev,
postgresql73-unified-dev,
postgresql74-dev,
postgresql74-ssl-dev,
postgresql74-unified-dev,
postgresql80-dev,
postgresql80-ssl-dev,
postgresql80-unified-dev,
postgresql81-dev
<<
GCC: 4.0

Source: ftp://gborg.postgresql.org/pub/%n/stable/libpq++-%v.tar.gz
Source-MD5: da71cb79ef45cef55f4bc97a33a0857d
Patch: %n.patch

CompileScript: <<
#!/bin/sh -ev

export lt_cv_sys_max_cmd_len=65536
export CPPFLAGS="-I%p/lib/system-openssl/include -I%p/include/postgresql -I%p/include -DHAVE_OPTRESET -fno-common"
export LDFLAGS="-L%p/lib/system-openssl/lib -L%p/lib"

make POSTGRES_HOME="%p" CC="g++" CXX="g++" CPP="g++ -E"
<<

InstallScript: <<
#!/bin/sh -ev

install -d -m 755 %i/include/postgresql %i/lib
make -j1 install POSTGRES_HOME="%p" DESTDIR="%d" CC="g++" CXX="g++" CPP="g++ -E"
install -d -m 755 %i/share/doc/%N
mv docs/*.html examples %i/share/doc/%N/
find %i/share/doc/%N -type d -name CVS -exec rm -rf {} \; || :
<<
DocFiles: CHANGES README
SplitOff: <<
Package: %N-shlibs
Description: Shared libraries for the PostgreSQL C++ interface
Depends: postgresql82-shlibs
Replaces: <<
postgresql73-shlibs,
postgresql73-ssl-shlibs,
postgresql73-unified-shlibs,
postgresql74-shlibs,
postgresql74-ssl-shlibs,
postgresql74-unified-shlibs,
postgresql80-shlibs,
postgresql80-ssl-shlibs,
postgresql80-unified-shlibs,
postgresql81-shlibs
<<
Files: lib/libpq++.*.dylib
Shlibs: %p/lib/libpq++.4.dylib 4.0.0 %n (>= 4.0-1)
<<

Homepage: http://gborg.postgresql.org/project/libpqpp/
DescDetail: <<
This is libpq++, the original C++ interface to PostgreSQL. It used
to be provided as part of PostgreSQL, but is now a separate project.
<<

libpqpp _unstable_ port .patch


--- libpq++-4.0/Makefile Tue Nov 26 23:46:08 2002
+++ libpq++-4.0-patched/Makefile Mon Dec 30 21:29:40 2002
@@ -11,33 +11,35 @@
SO_MAJOR_VERSION= 4
SO_MINOR_VERSION= 0

-POSTGRES_HOME=/usr/local/pgsql
-CXXOPTS= -DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT=""
+POSTGRES_HOME=@INSTPREFIX@
+CXXOPTS= -DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT="" -Wall -Wmissing-prototypes -Wmissing-declarations -fno-common -traditional-cpp

TARGET= libpq++
-CFLAGS= -O -Wall
+CFLAGS= -Os -Wall
LIBS=pq
OBJS= pgconnection.o pgdatabase.o pgtransdb.o pgcursordb.o pglobject.o
LIBPGXXHEADERS = pgconnection.h pgdatabase.h pgtransdb.h pgcursordb.h pglobject.h

-SHARED= -fpic -shared -Wl,-x,-soname,$(TARGET).so.$(SO_MAJOR_VERSION) -Wl,-rpath,$(POSTGRES_HOME)/lib
-soname=$(TARGET).so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+SHARED= -install_name $(POSTGRES_HOME)/lib/$(TARGET).$(SO_MAJOR_VERSION).dylib -compatibility_version $(SO_MAJOR_VERSION) -current_version $(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) -dynamiclib -multiply_defined suppress
+
+soname=$(TARGET).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION).dylib

all: $(soname)

$(soname) : $(OBJS)
- $(CXX) $(CXXFLAGS) $(OBJS) -L$(POSTGRES_HOME)/lib -l$(LIBS) $(SHARED) -o $(soname)
+ $(CXX) $(CXXFLAGS) $(OBJS) -L$(POSTGRES_HOME)/lib -l$(LIBS) $(SHARED) -o $(soname)

%.o : %.cc
- $(CXX) -c $(CXXFLAGS) $(CXXOPTS) -I$(POSTGRES_HOME)/include $<
+ $(CXX) -c $(CXXFLAGS) $(CXXOPTS) -I$(POSTGRES_HOME)/include/postgresql -I$(POSTGRES_HOME)/include $<

clean:
rm -f $(OBJS) $(soname)

install:
- install $(soname) $(POSTGRES_HOME)/lib
- rm -f $(POSTGRES_HOME)/lib/$(TARGET).so
- ln -s $(POSTGRES_HOME)/lib/$(soname) $(POSTGRES_HOME)/lib/$(TARGET).so
- install -c $(TARGET).h $(POSTGRES_HOME)/include
- -mkdir $(POSTGRES_HOME)/include/libpq++
- for i in $(LIBPGXXHEADERS); do install -c $$i $(POSTGRES_HOME)/include/libpq++ || exit 1; done
+ install $(soname) $(DESTDIR)$(POSTGRES_HOME)/lib
+ rm -f $(DESTDIR)$(POSTGRES_HOME)/lib/$(TARGET).dylib
+ ln -sf $(soname) $(DESTDIR)$(POSTGRES_HOME)/lib/$(TARGET).dylib
+ ln -sf $(soname) $(DESTDIR)$(POSTGRES_HOME)/lib/$(TARGET).$(SO_MAJOR_VERSION).dylib
+ install -c -m 644 $(TARGET).h $(DESTDIR)$(POSTGRES_HOME)/include/postgresql
+ install -d -m 755 $(DESTDIR)$(POSTGRES_HOME)/include/postgresql/libpq++
+ for i in $(LIBPGXXHEADERS); do install -c $$i $(DESTDIR)$(POSTGRES_HOME)/include/postgresql/libpq++ || exit 1; done