summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-01-03 11:28:54 +0000
committerSam James <sam@gentoo.org>2024-01-03 11:29:07 +0000
commit4a5d0cd2749b91b901985cf711ce388dea3b573a (patch)
tree138c6a541d15dd7009e987f594dfae104fe22c31 /dev-perl/Image-Imlib2
parentapp-editors/neovim: add 0.9.5 (diff)
downloadgentoo-4a5d0cd2749b91b901985cf711ce388dea3b573a.tar.gz
gentoo-4a5d0cd2749b91b901985cf711ce388dea3b573a.tar.bz2
gentoo-4a5d0cd2749b91b901985cf711ce388dea3b573a.zip
dev-perl/Image-Imlib2: adapt to imlib2 dropping imlib2-config
Only docs would be installed as it wasn't propagating the failed configure test, so use a patch from the bug tracker but also fix that while at it. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-perl/Image-Imlib2')
-rw-r--r--dev-perl/Image-Imlib2/Image-Imlib2-2.30.0-r3.ebuild48
-rw-r--r--dev-perl/Image-Imlib2/files/Image-Imlib2-2.30.0-r2-imlib2-pkg-config.patch28
-rw-r--r--dev-perl/Image-Imlib2/files/Image-Imlib2-2.30.0-r2-respect-PKG_CONFIG-and-error.patch21
3 files changed, 97 insertions, 0 deletions
diff --git a/dev-perl/Image-Imlib2/Image-Imlib2-2.30.0-r3.ebuild b/dev-perl/Image-Imlib2/Image-Imlib2-2.30.0-r3.ebuild
new file mode 100644
index 000000000000..a644d896c898
--- /dev/null
+++ b/dev-perl/Image-Imlib2/Image-Imlib2-2.30.0-r3.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DIST_AUTHOR=LBROCARD
+DIST_VERSION=2.03
+DIST_TEST="do verbose"
+inherit perl-module toolchain-funcs
+
+DESCRIPTION="Interface to the Imlib2 image library"
+
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND=">=media-libs/imlib2-1"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ ${RDEPEND}
+ >=dev-perl/Module-Build-0.28
+ virtual/pkgconfig
+ test? (
+ >=media-libs/imlib2-1[jpeg,png]
+ )
+"
+
+PERL_RM_FILES=(
+ t/pod.t
+ t/pod_coverage.t
+
+ # not ok 12
+ # Failed test at t/simple.t line 68.
+ # got: '0'
+ # expected: '1'
+ t/simple.t
+)
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.30.0-r2-imlib2-pkg-config.patch
+ "${FILESDIR}"/${PN}-2.30.0-r2-respect-PKG_CONFIG-and-error.patch
+)
+
+src_configure() {
+ tc-export PKG_CONFIG
+ perl-module_src_configure
+}
diff --git a/dev-perl/Image-Imlib2/files/Image-Imlib2-2.30.0-r2-imlib2-pkg-config.patch b/dev-perl/Image-Imlib2/files/Image-Imlib2-2.30.0-r2-imlib2-pkg-config.patch
new file mode 100644
index 000000000000..ca1470a5ce25
--- /dev/null
+++ b/dev-perl/Image-Imlib2/files/Image-Imlib2-2.30.0-r2-imlib2-pkg-config.patch
@@ -0,0 +1,28 @@
+https://rt.cpan.org/Public/Bug/Display.html?id=149742
+
+From 319db4d47493f7ef3909efc1b3904c134c90af5e Mon Sep 17 00:00:00 2001
+From: Sergei Zhmylev <zhmylove@cpan.org>
+Date: Mon, 11 Sep 2023 21:29:17 +0300
+Subject: [PATCH] Make Build.PL compatible with Imlib2 v1.7.5+
+
+--- a/Build.PL
++++ b/Build.PL
+@@ -1,10 +1,14 @@
+ use Module::Build;
+ use strict;
+
+-# We need to find imlib2-config
+-my $CONFIG = "imlib2-config";
++my $CONFIG = "pkg-config imlib2";
+
+ my $version = `$CONFIG --version`;
++if (!$version) {
++ # Try deprecated imlib2-config
++ $CONFIG = "imlib2-config";
++ $version = `$CONFIG --version`;
++}
+ if (!$version) {
+ warn 'You must install the imlib2 library before you can install
+ Image::Imlib2. You can obtain imlib2 from
+--
+2.40.0
diff --git a/dev-perl/Image-Imlib2/files/Image-Imlib2-2.30.0-r2-respect-PKG_CONFIG-and-error.patch b/dev-perl/Image-Imlib2/files/Image-Imlib2-2.30.0-r2-respect-PKG_CONFIG-and-error.patch
new file mode 100644
index 000000000000..270919b068e6
--- /dev/null
+++ b/dev-perl/Image-Imlib2/files/Image-Imlib2-2.30.0-r2-respect-PKG_CONFIG-and-error.patch
@@ -0,0 +1,21 @@
+--- a/Build.PL
++++ b/Build.PL
+@@ -1,7 +1,8 @@
+ use Module::Build;
+ use strict;
+
+-my $CONFIG = "pkg-config imlib2";
++my $PKG_CONFIG = $ENV{PKG_CONFIG} || 'pkg-config';
++my $CONFIG = "${PKG_CONFIG} imlib2";
+
+ my $version = `$CONFIG --version`;
+ if (!$version) {
+@@ -18,7 +19,7 @@ Alternatively, if you have downloaded and installed imlib2 and this
+ still will not work, modify the $CONFIG variable inside Build.PL to
+ point to the imlib2-config program that provides.
+ ';
+- exit 0;
++ exit 1;
+ } else {
+ print "Found imlib2 $version";
+ }