From nobody Tue Jan 28 17:06:23 2025 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YjBWz6hfkz5lmNl; Tue, 28 Jan 2025 17:06:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YjBWz2VRqz44WL; Tue, 28 Jan 2025 17:06:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738083983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H8ikFM3zLo/TotmAbFPbeJjYmRJDujRlUwlUtgqL8lg=; b=JsQ9f7I/K3O4LTid918fm7cQfyViTUcX9nfB5Cp2BflvfFhyjwxMQBDBvVbz6YpUADh2tw q7Oi/Y1TwiNb5jTfANNkKmSBKtqH9KQDPiDLunpnrgeNZAX4Zhezqah4OjHGmeiagMIjLY 3iU1J7N1+hWD+2xAkzEvauGjxViFH/LRq2FDISnBPVKm/Mm7o/5G4sV4QmOTQjFGDmxKqS YrAYuhf4tN4bB+h22mkhfD4Qxb3M0V774iD7wnuNBhduWbuWgInm6iN3S+bDLv5pGQOSBg UTd0hZJzxvi6QcwNgqZ7f6bOAaIOY2yIOf6PWKX6RwC2WsHsgxxokqSw3IK3rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738083983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H8ikFM3zLo/TotmAbFPbeJjYmRJDujRlUwlUtgqL8lg=; b=rFeNRdRQo7B8oFWJirnpJhWFQ8vQR8E1cdNn+Sohma+UpRzWaSxyPfL6Ak+yiIeWAjpaIc dWGQiaz8d9S4cC15x9eNVn4GWNs5cCPFTXDzu/Hvparc5xRloCyKqAtbswDwtQ2Wuv3y5t 84QsTDgi1BYoMZW37mBBOg/8XChHK1XLYTTo+xr4WftIOGvNkV+/hWkVuZDD6Ad0EWy91+ /j+zDpJygjocN3D/awsnFizpew7ob+M5zR4iaw5eXkEZSx37hk3qN6W0WywoJP+uB95gEA YT4tBdR7hZPOaBaShvmL0eqv5ZUKO/oqKiMjOV52e1FvaZ0pMdtPzl9Oj8/aWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738083983; a=rsa-sha256; cv=none; b=qIcNhQUgxi/B8WDvJ7fEMYCAZJRbGv4GImy0Z7WmjJKHzCtpGj3vvEniwSGbtUijl3/sIG 3Frl7COnE30QN6G4JeHRa94M1lXXsbtV3Cj/DLmN46C/UsuZYw0JxKBpFD8tA230D3tpmb gxFBuXcVFz3P4gNL25ZQ0wIaHsTG+YHJ5Hd6rDEHGDV/1h3iNEP9d6YHeHIP1fHQB3Pmcr VpNOOugLr+f44hoDEuQD2fvlIj2BrKefk4HOWqywGxyYY/YpbesH0dA8N20Furz5q0jiqQ fli6MbzpLnJRUnWEBWhiuXcnA85J58Uxbu/vXwSo4Ffu+xepmBMys7dKpvf+xQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YjBWz25fXz7wt; Tue, 28 Jan 2025 17:06:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50SH6NNN061989; Tue, 28 Jan 2025 17:06:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50SH6NPa061986; Tue, 28 Jan 2025 17:06:23 GMT (envelope-from git) Date: Tue, 28 Jan 2025 17:06:23 GMT Message-Id: <202501281706.50SH6NPa061986@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 8b14713874e9 - main - math/p5-PDL-Transform-Proj4: Add p5-PDL-Transform-Proj4 2.097 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8b14713874e99b2c6961235c50ec707fb9bfa98d Auto-Submitted: auto-generated The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=8b14713874e99b2c6961235c50ec707fb9bfa98d commit 8b14713874e99b2c6961235c50ec707fb9bfa98d Author: Po-Chuan Hsieh AuthorDate: 2025-01-28 17:04:34 +0000 Commit: Po-Chuan Hsieh CommitDate: 2025-01-28 17:04:34 +0000 math/p5-PDL-Transform-Proj4: Add p5-PDL-Transform-Proj4 2.097 PDL::Transform::Proj4 works like PDL::Transform::Cartography, but using the proj library in the background. The main object here is the PDL::Transform::Proj4 object, aliased to the t_proj() function. This object accepts all of the standard options described below, but mainly is there to be called with just the proj_params option defined. When options are used, they must be used with a '+' before them when placed in the proj_params string, but that is not required otherwise. See the SYNOPSIS above. Please note that unlike PROJ, all angles in these operations are in degrees. This is correctly (as of PDL 2.094) reflected in the PDL::Transform subclass objects. Other than t_proj(), all of the other transforms below have been autogenerated, and may not work properly. The main problem is determining the parameters a projection requires from the proj library itself. Due to the difficulties in doing this, there may be times when the proj docs specify a parameter for a projection that won't work using the anon-hash type specification. In that case, just throw that parameter in the proj_params string, and everything should work fine. --- math/Makefile | 1 + math/p5-PDL-Transform-Proj4/Makefile | 25 ++++++++ math/p5-PDL-Transform-Proj4/distinfo | 3 + math/p5-PDL-Transform-Proj4/files/patch-Alien-proj | 68 ++++++++++++++++++++++ math/p5-PDL-Transform-Proj4/pkg-descr | 25 ++++++++ math/p5-PDL-Transform-Proj4/pkg-plist | 3 + 6 files changed, 125 insertions(+) diff --git a/math/Makefile b/math/Makefile index 31b3e079d0df..8ac7a195ca5d 100644 --- a/math/Makefile +++ b/math/Makefile @@ -833,6 +833,7 @@ SUBDIR += p5-PDL-Minuit SUBDIR += p5-PDL-Opt-Simplex SUBDIR += p5-PDL-Perldl2 + SUBDIR += p5-PDL-Transform-Proj4 SUBDIR += p5-Parse-Range SUBDIR += p5-Roman SUBDIR += p5-Set-IntSpan diff --git a/math/p5-PDL-Transform-Proj4/Makefile b/math/p5-PDL-Transform-Proj4/Makefile new file mode 100644 index 000000000000..ebfbc97db08f --- /dev/null +++ b/math/p5-PDL-Transform-Proj4/Makefile @@ -0,0 +1,25 @@ +PORTNAME= PDL-Transform-Proj4 +PORTVERSION= 2.097 +CATEGORIES= math perl5 +MASTER_SITES= CPAN +PKGNAMEPREFIX= p5- + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= PDL::Transform interface to the Proj4 projection library +WWW= https://metacpan.org/dist/PDL-Transform-Proj4 + +LICENSE= ART10 GPLv1+ +LICENSE_COMB= dual + +BUILD_DEPENDS= p5-Capture-Tiny>=0:devel/p5-Capture-Tiny \ + ${RUN_DEPENDS} +LIB_DEPENDS= libproj.so:graphics/proj +RUN_DEPENDS= p5-PDL>=2.096:math/p5-PDL + +USES= localbase perl5 +USE_PERL5= configure + +post-install: + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/auto/PDL/Transform/Proj4/Proj4.so + +.include diff --git a/math/p5-PDL-Transform-Proj4/distinfo b/math/p5-PDL-Transform-Proj4/distinfo new file mode 100644 index 000000000000..74fd89f6753c --- /dev/null +++ b/math/p5-PDL-Transform-Proj4/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1736671161 +SHA256 (PDL-Transform-Proj4-2.097.tar.gz) = 9d429c69d9ba20bad7373b08631f491eabec4fbb6461424884fd4ceb794cbf2d +SIZE (PDL-Transform-Proj4-2.097.tar.gz) = 26981 diff --git a/math/p5-PDL-Transform-Proj4/files/patch-Alien-proj b/math/p5-PDL-Transform-Proj4/files/patch-Alien-proj new file mode 100644 index 000000000000..1085dc4a0910 --- /dev/null +++ b/math/p5-PDL-Transform-Proj4/files/patch-Alien-proj @@ -0,0 +1,68 @@ +--- lib/PDL/Transform/Proj4.pd.orig 2025-01-03 22:39:08 UTC ++++ lib/PDL/Transform/Proj4.pd +@@ -5,8 +5,8 @@ use warnings; + + use strict; + use warnings; ++use Capture::Tiny ':all'; + use File::Spec; +-use Alien::proj; + + our $VERSION = "2.097"; + pp_setversion($VERSION); +@@ -104,7 +104,7 @@ sub load_projection_information { + fixed Earth For CH1903 + ); + sub load_projection_information { +- my ($text, $stderr, $exit_code) = Alien::proj->run_utility ("proj", "-lP"); ++ my ($text, $stderr, $exit_code) = capture{system "proj", "-lP"}; + warn $stderr if $stderr; + die "proj -lP error $exit_code. See above for error text." if $exit_code; + my @chunks = $text =~ /(.+?)(?=(?:^\S|\z))/gms; +@@ -175,7 +175,6 @@ use PDL::Transform; + use warnings; + use PDL::LiteF; + use PDL::Transform; +-use Alien::proj; + + =head1 NAME + +--- Makefile.PL.orig 2025-01-03 22:41:17 UTC ++++ Makefile.PL +@@ -2,7 +2,6 @@ use PDL::Core::Dev; + use warnings; + use ExtUtils::MakeMaker; + use PDL::Core::Dev; +-use Alien::proj; + + my @pd_srcs; + undef &MY::init_PM; # suppress warning +@@ -22,7 +21,6 @@ WriteMakefile( + CONFIGURE_REQUIRES => { + 'ExtUtils::MakeMaker' => 0, + 'PDL' => '2.096', +- 'Alien::proj' => '1.29', # guarantee minimum PROJ 7.1 as need degree_output + }, + PREREQ_PM => { + 'PDL' => '2.096', +@@ -30,8 +28,7 @@ WriteMakefile( + TEST_REQUIRES => { + 'Test::More' => '0.88', + }, +- INC => Alien::proj->cflags, +- LIBS => [Alien::proj->libs], ++ LIBS => ['-lproj'], + clean => { FILES => join ' ', qw(MANIFEST.bak) }, + NO_MYMETA => 1, + ); +--- t/gis_proj.t.orig 2024-12-03 06:57:09 UTC ++++ t/gis_proj.t +@@ -9,8 +9,6 @@ use PDL::Transform::Proj4; + LC_RUN_PATH); + } + use PDL::Transform::Proj4; +-use Alien::proj; +-diag "Alien::proj version $Alien::proj::VERSION"; + + my @version = eval { PDL::Transform::Proj4::proj_version() }; + is $@, '', 'proj_version no die'; diff --git a/math/p5-PDL-Transform-Proj4/pkg-descr b/math/p5-PDL-Transform-Proj4/pkg-descr new file mode 100644 index 000000000000..80bd1748d4a3 --- /dev/null +++ b/math/p5-PDL-Transform-Proj4/pkg-descr @@ -0,0 +1,25 @@ +PDL::Transform::Proj4 works like PDL::Transform::Cartography, but using the proj +library in the background. + +The main object here is the PDL::Transform::Proj4 object, aliased to the +t_proj() function. + +This object accepts all of the standard options described below, but mainly is +there to be called with just the proj_params option defined. + +When options are used, they must be used with a '+' before them when placed in +the proj_params string, but that is not required otherwise. See the SYNOPSIS +above. + +Please note that unlike PROJ, all angles in these operations are in degrees. +This is correctly (as of PDL 2.094) reflected in the PDL::Transform subclass +objects. + +Other than t_proj(), all of the other transforms below have been autogenerated, +and may not work properly. The main problem is determining the parameters a +projection requires from the proj library itself. + +Due to the difficulties in doing this, there may be times when the proj docs +specify a parameter for a projection that won't work using the anon-hash type +specification. In that case, just throw that parameter in the proj_params +string, and everything should work fine. diff --git a/math/p5-PDL-Transform-Proj4/pkg-plist b/math/p5-PDL-Transform-Proj4/pkg-plist new file mode 100644 index 000000000000..d4da04a38501 --- /dev/null +++ b/math/p5-PDL-Transform-Proj4/pkg-plist @@ -0,0 +1,3 @@ +%%SITE_ARCH%%/PDL/Demos/Proj4_demo.pm +%%SITE_ARCH%%/PDL/Transform/Proj4.pm +%%SITE_ARCH%%/auto/PDL/Transform/Proj4/Proj4.so