postgresql-perl stable port information

Info2: <<
Package: postgresql-perl-%type_pkg[perl]
Version: 8.2.21
Revision: 2
Architecture: (%type_pkg[perl] = 581) powerpc, (%type_pkg[perl] = 584) powerpc
Distribution: (%type_pkg[perl] = 581) 10.4, (%type_pkg[perl] = 584) 10.4, (%type_pkg[perl] = 586) 10.4, (%type_pkg[perl] = 586) 10.5, (%type_pkg[perl] = 5100) 10.5, (%type_pkg[perl] = 5100) 10.6
Description: PostgreSQL Perl tools
Type: perl(5.8.1 5.8.4 5.8.6 5.8.8 5.10.0)
License: BSD
Maintainer: Benjamin Reed

Depends: <<
postgresql82-shlibs (>= %v-1),
perl%type_pkg[perl]-core
<<
BuildDepends: <<
fink (>= 0.30.0-1),
fink-mirrors (>= 0.28.7.1-2),
postgresql82-dev (>= %v-1),
perl%type_pkg[perl]-core,
bison,
readline5,
system-openssl-dev
<<
Conflicts: <<
postgresql-perl-%type_pkg[perl],
postgresql-ssl-perl-%type_pkg[perl] (<< %v-%r)
<<
Replaces: <<
postgresql-perl-%type_pkg[perl],
postgresql-ssl-perl-%type_pkg[perl],
postgresql,
postgresql-ssl,
postgresql-perl,
postgresql-ssl-perl
<<

Source: mirror:postgresql:source/v%v/postgresql-%v.tar.bz2
Source-MD5: 6f61c428e6c4acf8619a5534d0c283ac
Source2: ftp://gborg.postgresql.org/pub/pgperl/stable/Pg-2.1.1.tar.gz
Source2-MD5: c11c0abd99b8e1f50ba5dbdb922c2e61
PatchScript: sed -e 's,@INSTPREFIX@,%p,g' -e 's,perl5.6.0,perl%type_raw[perl],g' < %{PatchFile} | patch -p1
PatchFile: postgresql82.patch
PatchFile-MD5: 964107a0f601e15937e79df17ffea814

UseMaxBuildJobs: true
ConfigureParams: --prefix=%p --with-docdir=%p/share/doc --mandir=%p/share/man --enable-multibyte --enable-recode --with-CXX --with-perl --without-python --with-openssl --with-libraries=%p/lib --with-includes=%p/include --without-tcl --without-java --enable-odbc --with-pam --with-rendezvous
CompileScript: <<
#!/bin/sh -ev

export lt_cv_sys_max_cmd_len=65536
export ac_cv_path_PERL=`which perl%type_raw[perl]`
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"
export LIBS="-L%p/lib -lpq"
./configure %c
perl -pi -e 's,-arch i386,,g; s,-arch ppc,,g' src/Makefile.global

# pl/perl
pushd src/pl/plperl
make shared_libperl=yes BE_DLLLIBS="-bundle_loader %p/bin/postgres"
popd

# Pg perl module
pushd ../Pg-2.1.1
POSTGRES_INCLUDE=%p/include/postgresql POSTGRES_LIB=%p/lib INC="-I%i/include/postgresql -I%i/include -I%p/include/postgresql -I%p/include" LIBS="-L%p/lib" perl%type_raw[perl] Makefile.PL PREFIX=%p INSTALLPRIVLIB=%p/lib/perl5/%type_raw[perl] INSTALLARCHLIB=%p/lib/perl5/%type_raw[perl]/darwin INSTALLSITELIB=%p/lib/perl5/%type_raw[perl] INSTALLSITEARCH=%p/lib/perl5/%type_raw[perl]/darwin INSTALLMAN1DIR=%p/share/man/man1 INSTALLMAN3DIR=%p/share/man/man3 INSTALLSITEMAN1DIR=%p/share/man/man1 INSTALLVENDORMAN1DIR=%p/share/man/man1 MAN1EXT=1 INSTALLMAN3DIR=%p/share/man/man3 INSTALLSITEMAN3DIR=%p/share/man/man3 INSTALLVENDORMAN3DIR=%p/share/man/man3 MAN3EXT=3
perl -pi -e 's,-arch i386,,g; s,-arch ppc,,g' *Makefile
make BE_DLLLIBS="-bundle_loader %p/bin/postgres"
popd
<<

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

# pl/perl
pushd src/pl/plperl
make -j1 install DESTDIR=%d INSTALLSITEMAN3DIR=%i/share/man/man3
popd

# Pg perl module
pushd ../Pg-2.1.1
make -j1 install PREFIX=%i INSTALLPRIVLIB=%i/lib/perl5/%type_raw[perl] INSTALLARCHLIB=%i/lib/perl5/%type_raw[perl]/darwin INSTALLSITELIB=%i/lib/perl5/%type_raw[perl] INSTALLSITEARCH=%i/lib/perl5/%type_raw[perl]/darwin INSTALLMAN1DIR=%i/share/man/man1 INSTALLMAN3DIR=%i/share/man/man3 INSTALLSITEMAN1DIR=%i/share/man/man1 INSTALLVENDORMAN1DIR=%i/share/man/man1 MAN1EXT=1 INSTALLMAN3DIR=%i/share/man/man3 INSTALLSITEMAN3DIR=%i/share/man/man3 INSTALLVENDORMAN3DIR=%i/share/man/man3 MAN3EXT=3
mkdir -p %i/share/podfiles
cat %i/lib/perl5/%type_raw[perl]/darwin/perllocal.pod | sed -e s,%i/lib/perl5/%type_raw[perl],%p/lib/perl5/%type_raw[perl],g > %i/share/podfiles/perllocal.%n.pod
rm -rf %i/lib/perl5/%type_raw[perl]/darwin/perllocal.pod
popd

mv %i/lib/postgresql-8.2/plperl.so %i/lib/postgresql-8.2/plperl-%type_pkg[perl].so
mv %i/share/man/man3/Pg.3 %i/share/man/man3/Pg-%type_pkg[perl].3
<<
NoPerlTests: true
DocFiles: COPYRIGHT HISTORY INSTALL src/pl/plperl/README
SplitOff: <<
Package: postgresql-ssl-perl-%type_pkg[perl]
Depends: postgresql-perl-%type_pkg[perl] (>= %v-%r)
DocFiles: COPYRIGHT HISTORY INSTALL src/pl/plperl/README
<<

PostInstScript: <<
update-alternatives --install %p/lib/postgresql-8.2/plperl.so postgresql-perl-plperl.so %p/lib/postgresql-8.2/plperl-%type_pkg[perl].so %type_pkg[perl]
update-alternatives --install %p/share/man/man3/Pg.3 postgresql-perl-Pg.3 %p/share/man/man3/Pg-%type_pkg[perl].3 %type_pkg[perl]
cat < *** WARNING ***

To be able to use this (plperl) in PostgreSQL, you will need to
start your database:

sudo %p/bin/pgsql.sh start

...and then run:

sudo -u postgres %p/bin/createlang plperl template1

...or, for the "untrusted" interpreter:

sudo -u postgres %p/bin/createlang plperlu template1

*** WARNING ***
END
<<
PreRmScript: <<
if [ "$1" != "upgrade" ]; then
update-alternatives --remove postgresql-perl-plperl.so %p/lib/postgresql-8.2/plperl-%type_pkg[perl].so
update-alternatives --remove postgresql-perl-Pg.3 %p/share/man/man3/Pg-%type_pkg[perl].3
if [ ! -f %p/lib/postgresql-8.2/plperl.so ]; then
sudo -u postgres %p/bin/droplang plperl template1 >/dev/null 2>&1 || :
fi
fi
<<

Homepage: http://www.postgresql.org/
DescDetail: <<
To be able to use this (plperl) in PostgreSQL, you will need to
start your database:

sudo %p/bin/pgsql.sh start

...and then run:

sudo -u postgres %p/bin/createlang plperl template1

...or, for the "untrusted" interpreter:

sudo -u postgres %p/bin/createlang plperlu template1
<<
<<