git: c00f409a8c23 - main - graphics/p5-Geo-LibProj-FFI: Add p5-Geo-LibProj-FFI 1.00
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 28 Jan 2025 17:06:03 UTC
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=c00f409a8c23b60351ab7240caa46ad12bf0855b
commit c00f409a8c23b60351ab7240caa46ad12bf0855b
Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2025-01-28 17:02:40 +0000
Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2025-01-28 17:02:40 +0000
graphics/p5-Geo-LibProj-FFI: Add p5-Geo-LibProj-FFI 1.00
Geo::LibProj::FFI is a foreign function interface to the PROJ coordinate
transformation / projection library. Please see the PROJ library's C function
reference for further documentation. You should be able to use those C functions
as if they were Perl.
Geo::LibProj::FFI offers a large portion of the most commonly used PROJ
functions, but more could be added later. If you need a function that isn't yet
available in this module, please open a GitHub issue with a description of your
use case.
---
graphics/Makefile | 1 +
graphics/p5-Geo-LibProj-FFI/Makefile | 33 ++++++++++++++++
graphics/p5-Geo-LibProj-FFI/distinfo | 3 ++
graphics/p5-Geo-LibProj-FFI/files/patch-Alien-proj | 46 ++++++++++++++++++++++
graphics/p5-Geo-LibProj-FFI/pkg-descr | 9 +++++
graphics/p5-Geo-LibProj-FFI/pkg-plist | 2 +
6 files changed, 94 insertions(+)
diff --git a/graphics/Makefile b/graphics/Makefile
index 9129f166156f..75e2725c1ac3 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -714,6 +714,7 @@
SUBDIR += p5-Geo-GDAL-FFI
SUBDIR += p5-Geo-GML
SUBDIR += p5-Geo-Gpx
+ SUBDIR += p5-Geo-LibProj-FFI
SUBDIR += p5-Geometry-Primitive
SUBDIR += p5-Gimp
SUBDIR += p5-Google-Chart
diff --git a/graphics/p5-Geo-LibProj-FFI/Makefile b/graphics/p5-Geo-LibProj-FFI/Makefile
new file mode 100644
index 000000000000..a20a9988883c
--- /dev/null
+++ b/graphics/p5-Geo-LibProj-FFI/Makefile
@@ -0,0 +1,33 @@
+PORTNAME= Geo-LibProj-FFI
+PORTVERSION= 1.00
+CATEGORIES= graphics perl5
+MASTER_SITES= CPAN
+PKGNAMEPREFIX= p5-
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Foreign function interface to PROJ coordinate transformation software
+WWW= https://metacpan.org/dist/Geo-LibProj-FFI
+
+LICENSE= ART10 ART20 GPLv1+
+LICENSE_COMB= dual
+LICENSE_FILE_ART20= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${RUN_DEPENDS}
+LIB_DEPENDS= libproj.so:graphics/proj
+RUN_DEPENDS= p5-Convert-Binary-C>=0.04:converters/p5-Convert-Binary-C \
+ p5-Exporter-Easy>=0:devel/p5-Exporter-Easy \
+ p5-FFI-C>=0.08:devel/p5-FFI-C \
+ p5-FFI-Platypus>=1.50:devel/p5-FFI-Platypus
+TEST_DEPENDS= p5-Test-Exception>=0:devel/p5-Test-Exception \
+ p5-Test-Warnings>=0.010:devel/p5-Test-Warnings
+
+USES= perl5
+USE_PERL5= configure
+
+NO_ARCH= yes
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/lib/Geo/LibProj/FFI.pm
+ @${RM} ${WRKSRC}/t/00-version.t
+
+.include <bsd.port.mk>
diff --git a/graphics/p5-Geo-LibProj-FFI/distinfo b/graphics/p5-Geo-LibProj-FFI/distinfo
new file mode 100644
index 000000000000..7e2b55203a1a
--- /dev/null
+++ b/graphics/p5-Geo-LibProj-FFI/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1736671127
+SHA256 (Geo-LibProj-FFI-1.00.tar.gz) = 83c36bef2307ad641040ce5b3ab24649f8bb033b13c450eecbf5106b9b9f6994
+SIZE (Geo-LibProj-FFI-1.00.tar.gz) = 24370
diff --git a/graphics/p5-Geo-LibProj-FFI/files/patch-Alien-proj b/graphics/p5-Geo-LibProj-FFI/files/patch-Alien-proj
new file mode 100644
index 000000000000..67809b477288
--- /dev/null
+++ b/graphics/p5-Geo-LibProj-FFI/files/patch-Alien-proj
@@ -0,0 +1,46 @@
+--- lib/Geo/LibProj/FFI.pm.orig 2024-05-12 18:33:31 UTC
++++ lib/Geo/LibProj/FFI.pm
+@@ -5,7 +5,6 @@ package Geo::LibProj::FFI 1.00;
+ package Geo::LibProj::FFI 1.00;
+
+
+-use Alien::proj 1.07;
+ use FFI::Platypus 1.50;
+ use FFI::C 0.08;
+ use Convert::Binary::C 0.04;
+@@ -92,7 +91,7 @@ my $ffi = FFI::Platypus->new(
+ my $ffi = FFI::Platypus->new(
+ api => 2,
+ lang => 'C',
+- lib => [Alien::proj->dynamic_libs],
++ lib => ['%%LOCALBASE%%/lib/libproj.so'],
+ );
+ FFI::C->ffi($ffi);
+
+--- Makefile.PL.orig 2024-05-12 18:33:31 UTC
++++ Makefile.PL
+@@ -17,7 +17,6 @@ my %WriteMakefileArgs = (
+ "MIN_PERL_VERSION" => "5.014000",
+ "NAME" => "Geo::LibProj::FFI",
+ "PREREQ_PM" => {
+- "Alien::proj" => "1.07",
+ "Convert::Binary::C" => "0.04",
+ "Exporter::Easy" => 0,
+ "FFI::C" => "0.08",
+--- t/00-report-prereqs.dd.orig 2024-05-12 18:33:31 UTC
++++ t/00-report-prereqs.dd
+@@ -13,7 +13,6 @@ do { my $x = {
+ },
+ 'runtime' => {
+ 'requires' => {
+- 'Alien::proj' => '1.07',
+ 'Convert::Binary::C' => '0.04',
+ 'Exporter::Easy' => '0',
+ 'FFI::C' => '0.08',
+@@ -35,4 +34,4 @@ do { my $x = {
+ }
+ };
+ $x;
+- }
+\ No newline at end of file
++ }
diff --git a/graphics/p5-Geo-LibProj-FFI/pkg-descr b/graphics/p5-Geo-LibProj-FFI/pkg-descr
new file mode 100644
index 000000000000..3b354c0c9e77
--- /dev/null
+++ b/graphics/p5-Geo-LibProj-FFI/pkg-descr
@@ -0,0 +1,9 @@
+Geo::LibProj::FFI is a foreign function interface to the PROJ coordinate
+transformation / projection library. Please see the PROJ library's C function
+reference for further documentation. You should be able to use those C functions
+as if they were Perl.
+
+Geo::LibProj::FFI offers a large portion of the most commonly used PROJ
+functions, but more could be added later. If you need a function that isn't yet
+available in this module, please open a GitHub issue with a description of your
+use case.
diff --git a/graphics/p5-Geo-LibProj-FFI/pkg-plist b/graphics/p5-Geo-LibProj-FFI/pkg-plist
new file mode 100644
index 000000000000..7356978060c6
--- /dev/null
+++ b/graphics/p5-Geo-LibProj-FFI/pkg-plist
@@ -0,0 +1,2 @@
+%%SITE_PERL%%/Geo/LibProj/FFI.pm
+%%PERL5_MAN3%%/Geo::LibProj::FFI.3.gz