Skip to content

Commit

Permalink
databases/p5-DBD-InterBase: Fix build with llvm15
Browse files Browse the repository at this point in the history
- Add LICENSE NONE
- Refresh patches

Approved by:	portmgr (blanket)
  • Loading branch information
5u623l20 committed Jun 9, 2023
1 parent 874770e commit 6ffab94
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 19 deletions.
10 changes: 9 additions & 1 deletion databases/p5-DBD-InterBase/Makefile
@@ -1,6 +1,6 @@
PORTNAME= DBD-InterBase
PORTVERSION= 0.48
PORTREVISION= 5
PORTREVISION= 6
CATEGORIES= databases perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
Expand All @@ -9,12 +9,20 @@ MAINTAINER= yuri@rivera.ru
COMMENT= DBI driver for InterBase/Firebird/Yaffil RDBMS server
WWW= https://metacpan.org/release/DBD-InterBase

LICENSE= NONE

BUILD_DEPENDS= ${RUN_DEPENDS}
RUN_DEPENDS= p5-DBI>=0:databases/p5-DBI

USES= perl5 firebird
USE_PERL5= patch configure

.include <bsd.port.options.mk>

.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400079 || ( ${OSVERSION} >= 1302505 && ${OSVERSION} < 1400000 ))
CFLAGS+= -Wno-error=int-conversion
.endif

post-patch:
@${PERL} -pi -e 's,%%IB_BASE%%,${LOCALBASE},g' \
${WRKSRC}/Makefile.PL
Expand Down
25 changes: 13 additions & 12 deletions databases/p5-DBD-InterBase/files/patch-Makefile.PL
@@ -1,6 +1,6 @@
--- Makefile.PL.orig Sat Nov 22 06:12:11 2003
+++ Makefile.PL Mon Dec 8 20:01:27 2003
@@ -28,7 +28,7 @@
--- Makefile.PL.orig 2008-01-08 05:28:47 UTC
+++ Makefile.PL
@@ -29,7 +29,7 @@ use Test::More 0.4;
use DBI::DBD; # DBD creation tools

my $ib_dir_prefix;
Expand All @@ -9,21 +9,21 @@
# init stuff
my $IB_Bin_path = '';
my $isql_name;
@@ -82,7 +82,12 @@
@@ -83,7 +83,12 @@ else
@ib_bin_dirs = (qw(/usr/interbase/bin /opt/interbase/bin /opt/firebird/bin /usr/bin /usr/local/bin));
@ib_inc_dirs = (qw(/usr/interbase/include /opt/interbase/include /opt/firebird/include /usr/include));
}
-
+=cut
+my $IB_BASE='%%IB_BASE%%';
+my $IB_BASE='/usr/local';
+my $IB_Bin_path = $IB_BASE.'/bin';
+my $isql_name = 'isql';
+my $ib_lib_dir = $IB_BASE.'/lib';
+my $ib_inc = $IB_BASE.'/include';
sub locate_dbi_arch_dir {
my $dbidir = dbd_dbi_dir();
my @try = map { "$_/auto/DBI" } @INC;
@@ -91,7 +96,7 @@
@@ -92,7 +97,7 @@ sub locate_dbi_arch_dir {
Carp::carp( "Multiple copies of Driver.xst found in: @xst") if @xst > 1;
return $xst[0];
}
Expand All @@ -32,7 +32,7 @@
################################################################################
# sub test_files - checks if at least one of the files in the list exists
# Paramters:
@@ -296,13 +301,13 @@
@@ -305,13 +310,13 @@ sub create_test_db

# prompt for InterBase bin directory
$IB_Bin_path = dir_choice("InterBase/Firebird bin directory", [@ib_bin_dirs], [qw(gfix gfix.exe)]);
Expand All @@ -48,17 +48,18 @@
# get InterBase version
my $IBVERSION;
my $GFIX_PATH = $IB_Bin_path . "/" . test_files($IB_Bin_path, [qw(gfix gfix.exe)]);
@@ -312,7 +317,7 @@
@@ -321,8 +326,8 @@ my $is_final = $IBVERSION =~ /\.6\d+$/ ? 1 : 0;

# prompt for IB include dir
my $ib_inc = dir_choice("InterBase/Firebird include directory", [@ib_inc_dirs], [qw(gds.h ibase.h)]);
-
+=cut

-
# we use a hash for the MakeMaker parameters
my %MakeParams = (
@@ -323,14 +328,14 @@
'CCFLAGS' => '',
'NAME' => 'DBD::InterBase',
@@ -332,14 +337,14 @@ my %MakeParams = (
'CCFLAGS' => '-Wall -fno-strict-aliasing',
'INC' => qq(-I"$ib_inc" -I"${\locate_dbi_arch_dir()}"),
'OBJECT' => "InterBase.o dbdimp.o",
- 'LIBS' => [''],
Expand All @@ -74,7 +75,7 @@
# the OS specific build environment setup
my $os = $Config::Config{'osname'};
if ($os eq 'MSWin32')
@@ -530,7 +535,7 @@
@@ -545,7 +550,7 @@ else

# create the test config file
make_test_conf();
Expand Down
12 changes: 6 additions & 6 deletions databases/p5-DBD-InterBase/files/patch-dbdimp.c
@@ -1,6 +1,6 @@
--- dbdimp.c.orig 2008-01-08 09:02:45.000000000 +0300
+++ dbdimp.c 2014-01-27 13:58:49.202445490 +0400
@@ -113,7 +113,7 @@
--- dbdimp.c.orig 2008-01-08 06:02:45 UTC
+++ dbdimp.c
@@ -113,7 +113,7 @@ void do_error(SV *h, int rc, char *what)

if (DBIc_TRACE_LEVEL(imp_xxh) >= 2)
PerlIO_printf(DBIc_LOGPIO(imp_xxh), "%s error %d recorded: %s\n",
Expand All @@ -9,7 +9,7 @@
}

#define CALC_AVAILABLE(buff) sizeof(buff) - strlen(buff) - 1
@@ -693,7 +693,7 @@
@@ -693,7 +693,7 @@ SV *dbd_db_FETCH_attrib(SV *dbh, imp_dbh_t *imp_dbh, S
return Nullsv;
else
{
Expand All @@ -18,7 +18,7 @@
return result;
else
return sv_2mortal(result);
@@ -1991,8 +1991,8 @@
@@ -1991,8 +1991,8 @@ int dbd_discon_all(SV *drh, imp_drh_t *imp_drh)
DBIh_EVENT2(drh, ERROR_event, DBIc_ERR(imp_drh), DBIc_ERRSTR(imp_drh));
return FALSE;
}
Expand All @@ -28,4 +28,4 @@
+ PL_perl_destruct_level = 0;
return FALSE;
}

0 comments on commit 6ffab94

Please sign in to comment.