Skip to content

Commit

Permalink
graphics/p5-Geo-GDAL-FFI: Update to 0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sunpoet committed Jul 31, 2023
1 parent 220d0d5 commit 759b2fb
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 33 deletions.
7 changes: 4 additions & 3 deletions graphics/p5-Geo-GDAL-FFI/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
PORTNAME= Geo-GDAL-FFI
PORTVERSION= 0.09
PORTREVISION= 3
PORTVERSION= 0.10
CATEGORIES= graphics perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
DISTNAME= Geo-GDAL-FFI-${PORTVERSION:C|0$||}

MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Foreign function interface to GDAL
Expand All @@ -17,6 +17,7 @@ LIB_DEPENDS= libgdal.so:graphics/gdal
RUN_DEPENDS= p5-FFI-Platypus>=0:devel/p5-FFI-Platypus \
p5-FFI-Platypus-Declare>=0:devel/p5-FFI-Platypus-Declare \
p5-PkgConfig>=0.23026:devel/p5-PkgConfig \
p5-Sort-Versions>=0:devel/p5-Sort-Versions \
PDL>=0:math/PDL
TEST_DEPENDS= p5-JSON>=0:converters/p5-JSON \
p5-Test-Exception>=0:devel/p5-Test-Exception
Expand All @@ -27,6 +28,6 @@ USE_PERL5= configure
NO_ARCH= yes

post-patch:
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/lib/Geo/GDAL/FFI.pm
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/Makefile.PL

.include <bsd.port.mk>
6 changes: 3 additions & 3 deletions graphics/p5-Geo-GDAL-FFI/distinfo
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
TIMESTAMP = 1622213914
SHA256 (Geo-GDAL-FFI-0.09.tar.gz) = f194a22ec4723028283ab8d328cf3bdacc5f5ba2f81cb92dd0131cc776c97885
SIZE (Geo-GDAL-FFI-0.09.tar.gz) = 48088
TIMESTAMP = 1689398811
SHA256 (Geo-GDAL-FFI-0.1.tar.gz) = b935ad61935d810b345b4dd7bb8239ad3418e30037a03b0a390f6902d80372f0
SIZE (Geo-GDAL-FFI-0.1.tar.gz) = 51675
36 changes: 19 additions & 17 deletions graphics/p5-Geo-GDAL-FFI/files/patch-Makefile.PL
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
--- Makefile.PL.orig 2021-03-16 05:32:47 UTC
--- Makefile.PL.orig 2023-07-10 15:20:31 UTC
+++ Makefile.PL
@@ -1,6 +1,4 @@
-use Alien::gdal;
use ExtUtils::MakeMaker;
-use Alien::Base::Wrapper qw( Alien::gdal !export );
use Config;

WriteMakefile(
@@ -9,15 +7,12 @@ WriteMakefile(
ABSTRACT_FROM => "lib/Geo/GDAL/FFI.pm",
@@ -13,7 +13,7 @@ BEGIN {
if ($gdal ne 'Alien::gdal' or $@) {
if ($gdal eq 'Alien::gdal') {
print "I can't find Alien::gdal.\n";
- $gdal = '/usr';
+ $gdal = '%%LOCALBASE%%';
}
print "Trying GDAL from '$gdal'.\n";
$have_alien = 0;
@@ -61,7 +61,6 @@ use Config;
VERSION_FROM => "lib/Geo/GDAL/FFI.pm",
LICENSE => "artistic_2",
- Alien::Base::Wrapper->mm_args,
CONFIGURE_REQUIRES => {
- 'Alien::gdal' => 0
- Alien::gdal => 0,
},
PREREQ_PM => {
'PkgConfig' => 0.23026,
'FFI::Platypus' => 0,
'FFI::Platypus::Declare' => 0,
- 'Alien::gdal' => 0,
'PDL' => 0
PkgConfig => 0.23026,
@@ -69,7 +68,6 @@ use Config;
FFI::Platypus::Declare => 0,
PDL => 0,
Sort::Versions => 0,
- Alien::gdal => 0,
},
TEST_REQUIRES => {
'Test::More' => 0,
19 changes: 9 additions & 10 deletions graphics/p5-Geo-GDAL-FFI/files/patch-lib-Geo-GDAL-FFI.pm
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
--- lib/Geo/GDAL/FFI.pm.orig 2021-03-16 05:39:02 UTC
--- lib/Geo/GDAL/FFI.pm.orig 2023-07-10 15:47:31 UTC
+++ lib/Geo/GDAL/FFI.pm
@@ -433,7 +433,7 @@ sub new {

my $ffi = FFI::Platypus->new;
$ffi->load_custom_type('::StringPointer' => 'string_pointer');
- $ffi->lib(Alien::gdal->dynamic_libs);
+ $ffi->lib(['%%LOCALBASE%%/lib/libgdal.so']);

$ffi->type('(pointer,size_t,size_t,opaque)->size_t' => 'VSIWriteFunction');
$ffi->type('(int,int,string)->void' => 'CPLErrorHandler');
@@ -1812,7 +1812,6 @@ BEGIN {
$gdal = Geo::GDAL::gdal->new();
};
if ($@) {
- require Alien::gdal;
no strict 'subs';
$gdal = Alien::gdal;
}
1 change: 1 addition & 0 deletions graphics/p5-Geo-GDAL-FFI/pkg-plist
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
%%SITE_PERL%%/Geo/GDAL/FFI/SpatialReference.pm
%%SITE_PERL%%/Geo/GDAL/FFI/VSI.pm
%%SITE_PERL%%/Geo/GDAL/FFI/VSI/File.pm
%%SITE_PERL%%/Geo/GDAL/gdal.pm
%%PERL5_MAN3%%/Geo::GDAL::FFI.3.gz
%%PERL5_MAN3%%/Geo::GDAL::FFI::Band.3.gz
%%PERL5_MAN3%%/Geo::GDAL::FFI::Dataset.3.gz
Expand Down

0 comments on commit 759b2fb

Please sign in to comment.