[packages/w3m] use pkgconfig to detect imlib2
atler
atler at pld-linux.org
Mon Sep 18 14:30:34 CEST 2023
commit 85bdb53f03596aa796aca157ad5c9fed136152df
Author: Jan Palus <atler at pld-linux.org>
Date: Mon Sep 18 13:06:17 2023 +0200
use pkgconfig to detect imlib2
imlib2-pc.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++
w3m.spec | 8 ++++----
2 files changed, 48 insertions(+), 4 deletions(-)
---
diff --git a/w3m.spec b/w3m.spec
index 338da70..fa13a36 100644
--- a/w3m.spec
+++ b/w3m.spec
@@ -26,6 +26,7 @@ Patch6: ac-gettext.patch
Patch7: openssl.patch
Patch8: %{name}-configure.patch
Patch9: %{name}-x11.patch
+Patch10: imlib2-pc.patch
URL: http://w3m.sourceforge.net/
BuildRequires: autoconf
BuildRequires: automake
@@ -33,7 +34,7 @@ BuildRequires: gc-devel
BuildRequires: gettext-tools
BuildRequires: gpm-devel
%if %{with image}
-BuildRequires: imlib2-devel >= 1.0.5
+BuildRequires: imlib2-devel >= 1.1.0
BuildRequires: xorg-lib-libX11-devel
%endif
BuildRequires: ncurses-devel >= 5.0
@@ -81,7 +82,7 @@ Summary: Image display support for w3m
Summary(pl.UTF-8): Wyświetlanie obrazków dla w3m
Group: Applications/Networking
Requires: %{name} = %{epoch}:%{version}-%{release}
-Requires: imlib2 >= 1.0.5
+Requires: imlib2 >= 1.1.0
%description imgdisplay
Install this package if you want to display images in w3m run on xterm
@@ -103,6 +104,7 @@ na linuksowym framebufferze.
%patch7 -p1
%patch8 -p1
%patch9 -p1
+%patch10 -p1
%{__sed} '/^AC_PROG_CXX$/d' -i configure.ac
@@ -126,8 +128,6 @@ cp -f /usr/share/automake/config.sub .
--with-browser=%{_bindir}/mozilla \
--with-termlib=ncurses
-%{__make}
-
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_mandir}/man1
diff --git a/imlib2-pc.patch b/imlib2-pc.patch
new file mode 100644
index 0000000..9d004cc
--- /dev/null
+++ b/imlib2-pc.patch
@@ -0,0 +1,44 @@
+--- w3m-0.5.3/acinclude.m4.orig 2023-09-18 12:51:59.602042032 +0200
++++ w3m-0.5.3/acinclude.m4 2023-09-18 12:54:02.848394757 +0200
+@@ -649,9 +649,7 @@
+ fi;;
+ imlib2)
+ with_imlib2="yes"
+- if test x"$IMLIB2_CONFIG" = x; then
+- IMLIB2_CONFIG=imlib2-config
+- fi;;
++ ;;
+ gdk-pixbuf)
+ with_gdkpixbuf="yes"
+ if test x"$GDKPIXBUF_CONFIG" = x; then
+@@ -693,7 +695,7 @@
+ fi
+ if test x"$with_imlib2" = xyes; then
+ AC_W3M_CHECK_VER([Imlib2],
+- [`$IMLIB2_CONFIG --version 2>/dev/null`],
++ [`$PKG_CONFIG --modversion imlib2 2>/dev/null`],
+ 1, 0, 5,
+ [have_imlib2="yes"],
+ [have_imlib2="no"])
+@@ -727,8 +729,8 @@
+ IMGOBJS="$IMGOBJS x11/x11_w3mimg.o"
+ IMGTARGETS="x11"
+ AC_DEFINE(USE_IMLIB2)
+- IMGX11CFLAGS="`${IMLIB2_CONFIG} --cflags`"
+- IMGX11LDFLAGS="`${IMLIB2_CONFIG} --libs`"
++ IMGX11CFLAGS="`${PKG_CONFIG} --cflags imlib2`"
++ IMGX11LDFLAGS="`${PKG_CONFIG} --libs imlib2`"
+ else
+ AC_MSG_WARN([unable to build w3mimgdisplay with X11 support])
+ fi
+@@ -757,8 +759,8 @@
+ IMGTARGETS="${IMGTARGETS} fb"
+ AC_DEFINE(USE_IMLIB2)
+ IMGOBJS="$IMGOBJS fb/fb_w3mimg.o fb/fb.o fb/fb_img.o"
+- IMGFBCFLAGS="`${IMLIB2_CONFIG} --cflags`"
+- IMGFBLDFLAGS="`${IMLIB2_CONFIG} --libs`"
++ IMGFBCFLAGS="`${PKG_CONFIG} --cflags imlib2`"
++ IMGFBLDFLAGS="`${PKG_CONFIG} --libs imlib2`"
+ else
+ AC_MSG_WARN([unable to build w3mimgdisplay with FB support])
+ fi
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/w3m.git/commitdiff/19227f52bb17d38cef6661c0b12cb64659d62c59
More information about the pld-cvs-commit
mailing list