aboutsummaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2010-11-21 22:37:58 +0000
committerThierry Thomas <thierry@FreeBSD.org>2010-11-21 22:37:58 +0000
commitecd68964e8c19aaf75e503671cbd2a5135b9872c (patch)
treef5e4b5c64e8756ea16fedbb310d1ba4e06683985 /databases
parent2a53dfb520911909b575935ac77e7e23a7d1c7ae (diff)
downloadports-ecd68964e8c19aaf75e503671cbd2a5135b9872c.tar.gz
ports-ecd68964e8c19aaf75e503671cbd2a5135b9872c.zip
Notes
Diffstat (limited to 'databases')
-rw-r--r--databases/yasql/Makefile8
-rw-r--r--databases/yasql/distinfo1
-rw-r--r--databases/yasql/files/patch-yasql.in114
3 files changed, 120 insertions, 3 deletions
diff --git a/databases/yasql/Makefile b/databases/yasql/Makefile
index 528ad4d99cd9..2fee81455447 100644
--- a/databases/yasql/Makefile
+++ b/databases/yasql/Makefile
@@ -7,16 +7,19 @@
PORTNAME= yasql
PORTVERSION= 1.83
+PORTREVISION= 1
CATEGORIES= databases
MASTER_SITES= SF
-MAINTAINER= thierry@FreeBSD.org
+MAINTAINER= ports@FreeBSD.org
COMMENT= Yet Another SQL*Plus Replacement
BUILD_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/DBD/Oracle.pm:${PORTSDIR}/databases/p5-DBD-Oracle \
${SITE_PERL}/${PERL_ARCH}/Term/ReadLine/Gnu.pm:${PORTSDIR}/devel/p5-ReadLine-Gnu
RUN_DEPENDS= ${BUILD_DEPENDS}
+LICENSE= GPLv2
+
# Time::HiRes is used for high resolution benchmarking
.if !defined(WITHOUT_HIRES)
BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes
@@ -56,7 +59,8 @@ pre-everything::
@${ECHO_MSG}
pre-configure:
- @${PERL} -pi -e 's|/bin/more|/usr/bin/more|' ${WRKSRC}/yasql.conf
+ ${REINPLACE_CMD} 's,%%LOCALBASE%%,${LOCALBASE},g' ${WRKSRC}/yasql.in
+ ${PERL} -pi -e 's|/bin/more|/usr/bin/more|' ${WRKSRC}/yasql.conf
pre-install:
if [ -f ${PREFIX}/etc/yasql.conf ] ; then \
diff --git a/databases/yasql/distinfo b/databases/yasql/distinfo
index e514f2a08ae7..01ad81ccc234 100644
--- a/databases/yasql/distinfo
+++ b/databases/yasql/distinfo
@@ -1,3 +1,2 @@
-MD5 (yasql-1.83.tar.gz) = c580402d20df6a1a0efe72d65a40ff0d
SHA256 (yasql-1.83.tar.gz) = b16c6fd24957a425467945be734abe182e5836767f50633710cdb100ab2583f9
SIZE (yasql-1.83.tar.gz) = 111977
diff --git a/databases/yasql/files/patch-yasql.in b/databases/yasql/files/patch-yasql.in
new file mode 100644
index 000000000000..e44266f26b3c
--- /dev/null
+++ b/databases/yasql/files/patch-yasql.in
@@ -0,0 +1,114 @@
+--- yasql.in.orig 2005-05-09 18:01:47.000000000 +0200
++++ yasql.in 2010-11-18 15:10:32.000000000 +0100
+@@ -60,7 +60,7 @@
+
+ select((select(STDOUT), $| = 1)[0]); #unbuffer STDOUT
+
+-$sysconfdir = "/etc";
++$sysconfdir = "%%LOCALBASE%%/etc";
+ $sysconf = "$sysconfdir/yasql.conf";
+
+ # try to include Time::HiRes for fine grained benchmarking
+@@ -174,7 +174,7 @@
+ wrn("Connection lost (timeout: $conf{connection_timeout})");
+ quit(1);
+ } else {
+- err("Could not connect to database, timed out. (timeout: "
++ die("Could not connect to database, timed out. (timeout: "
+ ."$conf{connection_timeout})");
+ }
+ }
+@@ -769,7 +769,7 @@
+ }
+ }
+ unless($found) {
+- err("Could not find DBD::Oracle... please install. Available drivers: "
++ die("Could not find DBD::Oracle... please install. Available drivers: "
+ .join(", ", @drivers) . ".\n");
+ }
+ #print "drivers: [" . join("|", @drivers) . "]\n";
+@@ -921,7 +921,7 @@
+ $connect_string = '' if $connect_string eq 'external';
+ $dbhandle = db_connect($die_on_error,$ora_session_mode,undef,undef,$connect_string);
+ } elsif($die_on_error) {
+- err("Could not connect to database: $dberrstr [$dberr]");
++ die("Could not connect to database: $dberrstr [$dberr]");
+ } else {
+ wrn("Could not connect to database: $dberrstr [$dberr]");
+ return(0);
+@@ -1010,7 +1010,7 @@
+ sub check_oracle_home {
+ # This checks for the ORACLE_HOME environment variable and dies if it's
+ # not set
+- err("Please set your ORACLE_HOME environment variable!")
++ die("Please set your ORACLE_HOME environment variable!")
+ unless $ENV{ORACLE_HOME};
+ return(1);
+ }
+@@ -1416,7 +1416,7 @@
+ }
+
+ sub close_csv {
+- close(CSV) || err("Could not close CSV filehandle: $!");
++ close(CSV) || die("Could not close CSV filehandle: $!");
+ $csv_filehandle_open = 0;
+ $csv_max_lines = 0;
+ }
+@@ -2404,10 +2404,10 @@
+ if($op && $op eq '>' || $op eq '>>') {
+ ($op_text) = glob($op_text);
+ debugmsg(3, "Opening file '$op_text' for output redirection using [$op]");
+- open(FOUT, $op . $op_text) || do query_err('redirect',"Cannot open file '$op_text' for writing: $!", '');
++ open(FOUT, $op . $op_text) || query_err('redirect',"Cannot open file '$op_text' for writing: $!", '');
+ } elsif($op eq '|') {
+ ($op_text) = glob($op_text);
+- open(FOUT, $op . $op_text) || do query_err('pipe',"Cannot open pipe '$op_text': $!", '');
++ open(FOUT, $op . $op_text) || query_err('pipe',"Cannot open pipe '$op_text': $!", '');
+ } else {
+ open(FOUT, ">&STDOUT");
+ }
+@@ -2873,7 +2873,7 @@
+ my $newsql = $sql;
+ my $fromstuff;
+ my $wheregrouporder = $sql;
+- $wheregrouporder =~ s/.*(where|order|group).*/\1/;
++ $wheregrouporder =~ s/.*(where|order|group).*/$1/;
+ if ($wheregrouporder eq $sql) {
+ $wheregrouporder = "";
+ }
+@@ -2887,7 +2887,7 @@
+ my %column_prefix;
+ foreach my $table (@tlist) {
+ $table =~ s/^ *//;
+- $table =~ s/([^ ]+)\s+(.*)/\1/;
++ $table =~ s/([^ ]+)\s+(.*)/$1/;
+ $column_prefix{$table} = $2 ? $2 : $table;
+ $tablelist .= ($tablelist ? "," : "") . $table;
+ }
+@@ -3644,7 +3644,7 @@
+ Examples:
+ The following will run the query, then run it again with different settings:
+ user\@ORCL> select * from table;10
+- user\@ORCL> \G50
++ user\@ORCL> \\G50
+
+ Redirection:
+ You can add a shell like redirection operator after a query to pipe the output
+@@ -3657,7 +3657,7 @@
+
+ Examples:
+ user\@ORCL> select * from table; > table.dump
+- user\@ORCL> select * from table\S > table.csv
++ user\@ORCL> select * from table \\S > table.csv
+
+ Input:
+ You can use '<' to grab data from a CSV file. The file must be formatted
+@@ -4179,7 +4179,7 @@
+
+ =item NULL stops printing after table goes into overflow or something
+
+-=item extra space in \G... maybe others
++=item extra space in \\G... maybe others
+
+ =item bug: tag completion doesn't work with caps anymore
+