[packages/perl-Image-Imlib2] add support for imlib2 without imlib2-config
atler
atler at pld-linux.org
Tue Aug 23 01:06:11 CEST 2022
commit 3030675489958f01b64a88ce336edc46c2c11c62
Author: Jan Palus <atler at pld-linux.org>
Date: Tue Aug 23 01:05:25 2022 +0200
add support for imlib2 without imlib2-config
pc.patch | 36 ++++++++++++++++++++++++++++++++++++
perl-Image-Imlib2.spec | 3 +++
2 files changed, 39 insertions(+)
---
diff --git a/perl-Image-Imlib2.spec b/perl-Image-Imlib2.spec
index f61ff30..873a40e 100644
--- a/perl-Image-Imlib2.spec
+++ b/perl-Image-Imlib2.spec
@@ -14,10 +14,12 @@ License: GPL v1+ or Artistic
Group: Development/Languages/Perl
Source0: http://www.cpan.org/modules/by-module/Image/%{pdir}-%{pnam}-%{version}.tar.gz
# Source0-md5: 303b91fae2b863903e41a3cac34fa0d3
+Patch0: pc.patch
URL: http://search.cpan.org/dist/Image-Imlib2/
BuildRequires: imlib2-devel
BuildRequires: perl-Module-Build >= 0.20
BuildRequires: perl-devel >= 1:5.8.0
+BuildRequires: pkgconfig
BuildRequires: rpm-perlprov >= 4.1-13
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -37,6 +39,7 @@ graficznych i zapis ich w wielu formatach.
%prep
%setup -q -n %{pdir}-%{pnam}-%{version}
+%patch0 -p1
%build
%{__perl} Makefile.PL \
diff --git a/pc.patch b/pc.patch
new file mode 100644
index 0000000..112a930
--- /dev/null
+++ b/pc.patch
@@ -0,0 +1,36 @@
+--- Image-Imlib2-2.03/Build.PL.orig 2009-11-24 22:41:36.000000000 +0100
++++ Image-Imlib2-2.03/Build.PL 2022-08-23 01:02:34.292999847 +0200
+@@ -2,11 +2,14 @@
+ use strict;
+
+ # We need to find imlib2-config
+-my $CONFIG = "imlib2-config";
++my $CONFIG = "pkg-config imlib2";
++my $version = `$CONFIG --modversion`;
+
+-my $version = `$CONFIG --version`;
+ if (!$version) {
+- warn 'You must install the imlib2 library before you can install
++ $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
+ http://sourceforge.net/projects/enlightenment/
+
+@@ -14,11 +17,12 @@
+ still will not work, modify the $CONFIG variable inside Build.PL to
+ point to the imlib2-config program that provides.
+ ';
+- exit 0;
+-} else {
+- print "Found imlib2 $version";
++ exit 0;
++ }
+ }
+
++print "Found imlib2 $version";
++
+ my $libs = `$CONFIG --libs`;
+ my $cflags = "-DX_DISPLAY_MISSING " . `$CONFIG --cflags`;
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/perl-Image-Imlib2.git/commitdiff/3030675489958f01b64a88ce336edc46c2c11c62
More information about the pld-cvs-commit
mailing list