summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorNorikatsu Shigemura <nork@FreeBSD.org>2005-05-08 06:35:44 +0000
committerNorikatsu Shigemura <nork@FreeBSD.org>2005-05-08 06:35:44 +0000
commit98412cbc7068c4bdd10dc9b1a66e7f0c9a1e1dc5 (patch)
treeaab77e07f10506f672c63b3a0871fd33e03707dd /databases
parent- Add SSE support that is auto-detected from MACHINE_CPU:Msse (diff)
Add p5-DBD-Pg-13 1.32, Provides access to PostgreSQL
databases through the DBI. This is a port to provide DBD:Pg driver on FreeBSD 4.x with Perl 5.00505. So if you use Perl 5.6 or lator, you should use databases/p5-DBD-Pg port. Requsted by: Jun Watahiki <j-watahiki at ensure.jp>
Notes
Notes: svn path=/head/; revision=134831
Diffstat (limited to 'databases')
-rw-r--r--databases/Makefile1
-rw-r--r--databases/p5-DBD-Pg-13/Makefile22
-rw-r--r--databases/p5-DBD-Pg-13/distinfo4
-rw-r--r--databases/p5-DBD-Pg-13/files/patch-Makefile.PL32
-rw-r--r--databases/p5-DBD-Pg-13/files/patch-dbdimp.c14
-rw-r--r--databases/p5-DBD-Pg-13/files/patch-quote.c78
6 files changed, 125 insertions, 26 deletions
diff --git a/databases/Makefile b/databases/Makefile
index 32728d2f4bf7..a9224eba374d 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -162,6 +162,7 @@
SUBDIR += p5-DBD-ODBC
SUBDIR += p5-DBD-Oracle
SUBDIR += p5-DBD-Pg
+ SUBDIR += p5-DBD-Pg-13
SUBDIR += p5-DBD-PgPP
SUBDIR += p5-DBD-PgSPI
SUBDIR += p5-DBD-RAM
diff --git a/databases/p5-DBD-Pg-13/Makefile b/databases/p5-DBD-Pg-13/Makefile
index e3e638b53e14..272704075b55 100644
--- a/databases/p5-DBD-Pg-13/Makefile
+++ b/databases/p5-DBD-Pg-13/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= DBD-Pg
-PORTVERSION= 1.41
+PORTVERSION= 1.32
CATEGORIES= databases perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= DBD
@@ -15,28 +15,22 @@ PKGNAMEPREFIX= p5-
MAINTAINER= perl@FreeBSD.org
COMMENT= Provides access to PostgreSQL databases through the DBI
-BUILD_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI
-RUN_DEPENDS= ${BUILD_DEPENDS}
-
USE_PGSQL= yes
PERL_CONFIGURE= yes
MAN3= DBD::Pg.3
-.if !defined(NOPORTDOCS)
-PORTDOCS= Changes README TODO
-
-post-install:
- @${MKDIR} ${DOCSDIR}
- @${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
- @${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}."
-.endif
-
.include <bsd.port.pre.mk>
.if ${PERL_LEVEL} < 500600
-IGNORE= Needs DBI 1.38 which needs perl 5.6, install lang/perl5.8 and try again
+BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI-137
+RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBI.pm:${PORTSDIR}/databases/p5-DBI-137
+post-patch:
+ @${PERL} -i -pe '$$_ = "" if /5.006001/' \
+ ${WRKSRC}/Pg.pm ${WRKSRC}/Makefile.PL
+.else
+IGNORE= You should use databases/p5-DBD-Pg.
.endif
PG_CONFIG= ${LOCALBASE}/bin/pg_config
diff --git a/databases/p5-DBD-Pg-13/distinfo b/databases/p5-DBD-Pg-13/distinfo
index 57367839e219..d2d4c830c2b6 100644
--- a/databases/p5-DBD-Pg-13/distinfo
+++ b/databases/p5-DBD-Pg-13/distinfo
@@ -1,2 +1,2 @@
-MD5 (DBD-Pg-1.41.tar.gz) = 3f58b53877954f5a07a08e64f6a67287
-SIZE (DBD-Pg-1.41.tar.gz) = 118975
+MD5 (DBD-Pg-1.32.tar.gz) = 9d6a936e6f755af677ceef59272a50ac
+SIZE (DBD-Pg-1.32.tar.gz) = 96233
diff --git a/databases/p5-DBD-Pg-13/files/patch-Makefile.PL b/databases/p5-DBD-Pg-13/files/patch-Makefile.PL
index 99aea72242fb..99fab94715ee 100644
--- a/databases/p5-DBD-Pg-13/files/patch-Makefile.PL
+++ b/databases/p5-DBD-Pg-13/files/patch-Makefile.PL
@@ -1,12 +1,24 @@
---- Makefile.PL.orig Tue Apr 5 03:50:36 2005
-+++ Makefile.PL Thu Apr 7 10:34:20 2005
-@@ -83,12 +83,12 @@
- }
- }
+--- Makefile.PL.orig Thu Feb 19 04:46:40 2004
++++ Makefile.PL Fri Oct 15 13:25:34 2004
+@@ -33,7 +32,7 @@
+ require App::Info::Handler::Prompt;
+ my $p = App::Info::Handler::Prompt->new;
+ my $pg = App::Info::RDBMS::PostgreSQL->new(on_unknown => $p);
+-my ($major_ver, $minor_ver, $patch) = map {$pg->$_} qw/major_version minor_version patch_version/;
++my ($major_ver, $minor_ver, $patch) = map {$pg->$_()} qw/major_version minor_version patch_version/;
--my $comp_opts = $Config{q{ccflags}} . " -DPGLIBVERSION=$serverversion";
-+my $comp_opts = " -DPGLIBVERSION=$serverversion";
+ if ((!$ENV{POSTGRES_INCLUDE} or !$ENV{POSTGRES_LIB}) and !$ENV{POSTGRES_HOME}) {
+ $POSTGRES_INCLUDE = $pg->inc_dir;
+@@ -66,7 +65,7 @@
+ $dbi_arch_dir = dbd_dbi_arch_dir();
+ }
+-my $comp_opts = $Config{q{ccflags}};
++my $comp_opts = '';
+ if ($major_ver == 7) {
+ if ($minor_ver >= 2) {
+ $comp_opts .= " -DHAVE_PQescapeString";
+@@ -86,7 +85,7 @@
my %opts = (
NAME => 'DBD::Pg',
VERSION_FROM => 'Pg.pm',
@@ -14,12 +26,12 @@
+ INC => "-I$POSTGRES_INCLUDE -I$dbi_arch_dir $comp_opts",
OBJECT => "Pg\$(OBJ_EXT) dbdimp\$(OBJ_EXT) quote\$(OBJ_EXT) types\$(OBJ_EXT)",
LIBS => ["-L$POSTGRES_LIB -lpq"],
- AUTHOR => 'http://gborg.postgresql.org/project/dbdpg/',
-@@ -96,7 +96,6 @@
+ AUTHOR => 'http://gborg.postgresql.org/project/dbdpg/projdisplay.php',
+@@ -94,7 +93,6 @@
PREREQ_PM => { 'Test::Simple' => '0.17', # Need Test::More.
'Test::Harness' => '2.03', # Need TODO tests.
},
- CCFLAGS => $comp_opts,
PERL_MALLOC_OK => 1,
- clean => { FILES => 'trace' },
);
+
diff --git a/databases/p5-DBD-Pg-13/files/patch-dbdimp.c b/databases/p5-DBD-Pg-13/files/patch-dbdimp.c
new file mode 100644
index 000000000000..5340bccafb01
--- /dev/null
+++ b/databases/p5-DBD-Pg-13/files/patch-dbdimp.c
@@ -0,0 +1,14 @@
+diff -ru dbdimp.c~ dbdimp.c
+--- dbdimp.c~ Sun Jan 2 20:01:43 2005
++++ dbdimp.c Sun Jan 2 20:06:16 2005
+@@ -986,7 +986,9 @@
+ int num_fields;
+ char *value;
+ char *p;
+- int i, pg_type, value_len, chopblanks, len;
++ int i, pg_type, chopblanks;
++ size_t value_len;
++ STRLEN len;
+ AV *av;
+ D_imp_dbh_from_sth;
+
diff --git a/databases/p5-DBD-Pg-13/files/patch-quote.c b/databases/p5-DBD-Pg-13/files/patch-quote.c
new file mode 100644
index 000000000000..9ce19c0a971c
--- /dev/null
+++ b/databases/p5-DBD-Pg-13/files/patch-quote.c
@@ -0,0 +1,78 @@
+diff -ru quote.c~ quote.c
+--- quote.c~ Sun Jan 2 20:01:43 2005
++++ quote.c Sun Jan 2 20:04:39 2005
+@@ -9,7 +9,7 @@
+ {
+ const char *source = from;
+ char *target = to;
+- unsigned int remaining = length;
++ unsigned size_t remaining = length;
+
+ while (remaining > 0)
+ {
+@@ -146,9 +146,9 @@
+ unsigned char *
+ PQunescapeBytea2(const unsigned char *strtext, size_t *retbuflen)
+ {
+- size_t strtextlen, buflen;
++ size_t strtextlen, buflen, i, j;
+ unsigned char *buffer, *tmpbuf;
+- int i, j, byte;
++ int byte;
+
+ if (strtext == NULL) {
+ return NULL;
+@@ -393,7 +393,7 @@
+ {
+ char *result;
+ char *dest;
+- int max_len = 0, i;
++ size_t max_len = 0, i;
+
+ /* We are going to retun a quote_bytea() for backwards compat but
+ we warn first */
+@@ -483,7 +483,7 @@
+ void
+ dequote_char(string, retlen)
+ char *string;
+- int *retlen;
++ size_t *retlen;
+ {
+ /* TODO: chop_blanks if requested */
+ *retlen = strlen(string);
+@@ -493,7 +493,7 @@
+ void
+ dequote_varchar (string, retlen)
+ char *string;
+- int *retlen;
++ size_t *retlen;
+ {
+ *retlen = strlen(string);
+ }
+@@ -503,7 +503,7 @@
+ void
+ dequote_bytea(string, retlen)
+ char *string;
+- int *retlen;
++ size_t *retlen;
+ {
+ char *s, *p;
+ int c1,c2,c3;
+@@ -542,7 +542,7 @@
+ void
+ dequote_sql_binary (string, retlen)
+ char *string;
+- int *retlen;
++ size_t *retlen;
+ {
+ /* We are going to retun a dequote_bytea(), JIC */
+ warn("Use of SQL_BINARY invalid in dequote()");
+@@ -556,7 +556,7 @@
+ void
+ dequote_bool (string, retlen)
+ char *string;
+- int *retlen;
++ size_t *retlen;
+ {
+ switch(*string){
+ case 'f': *string = '0'; break;