mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-26 05:02:18 +00:00
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>
This commit is contained in:
parent
8dadff9be5
commit
98412cbc70
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=134831
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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/;
|
||||
|
||||
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}} . " -DPGLIBVERSION=$serverversion";
|
||||
+my $comp_opts = " -DPGLIBVERSION=$serverversion";
|
||||
|
||||
-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' },
|
||||
);
|
||||
|
||||
|
14
databases/p5-DBD-Pg-13/files/patch-dbdimp.c
Normal file
14
databases/p5-DBD-Pg-13/files/patch-dbdimp.c
Normal file
@ -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;
|
||||
|
78
databases/p5-DBD-Pg-13/files/patch-quote.c
Normal file
78
databases/p5-DBD-Pg-13/files/patch-quote.c
Normal file
@ -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;
|
Loading…
Reference in New Issue
Block a user