[packages/fbida] - don't build fbpdf if cairo-gl is unavailable - rel 2

baggins baggins at pld-linux.org
Sun May 1 20:31:06 CEST 2016


commit bad71d2595455dc24254e75a7e31c52968e3b89d
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun May 1 20:30:42 2016 +0200

    - don't build fbpdf if cairo-gl is unavailable
    - rel 2

 fbida.spec        | 29 +++++++++++++++-----------
 no-cairo-gl.patch | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 78 insertions(+), 12 deletions(-)
---
diff --git a/fbida.spec b/fbida.spec
index f84811b..0f28f5e 100644
--- a/fbida.spec
+++ b/fbida.spec
@@ -2,16 +2,17 @@
 # - package thumbnail.cgi (in %{_libdir}/cgi-bin?)
 #
 # Conditional build:
-%bcond_without	curl	# without URL support
-%bcond_without	exif	# without EXIF tags support
-%bcond_without	gif	# without GIF images support
-%bcond_without	lirc	# without LIRC control support
-%bcond_without	motif	# don't build (Motif-based) ida
-%bcond_without	pcd	# without PCD images support
-%bcond_without	png	# without PNG images support
-%bcond_without	sane	# without SANE scanning support (in ida)
-%bcond_without	tiff	# without TIFF images support
-%bcond_without	webp	# without WebP images support
+%bcond_without	curl		# without URL support
+%bcond_without	exif		# without EXIF tags support
+%bcond_without	gif		# without GIF images support
+%bcond_without	lirc		# without LIRC control support
+%bcond_without	motif		# don't build (Motif-based) ida
+%bcond_without	pcd		# without PCD images support
+%bcond_without	png		# without PNG images support
+%bcond_without	sane		# without SANE scanning support (in ida)
+%bcond_without	tiff		# without TIFF images support
+%bcond_without	webp		# without WebP images support
+%bcond_with	cairo_gl	# with Cairo-GL support (fbpdf program)
 
 %if %{without motif}
 # SANE used only in ida
@@ -21,7 +22,7 @@ Summary:	fbida - a few applications for viewing and editing images
 Summary(pl.UTF-8):	fbida - kilka aplikacji do oglądania i edycji obrazków
 Name:		fbida
 Version:	2.12
-Release:	1
+Release:	2
 License:	GPL
 Group:		Applications/Graphics
 Source0:	https://www.kraxel.org/releases/fbida/%{name}-%{version}.tar.gz
@@ -29,6 +30,7 @@ Source0:	https://www.kraxel.org/releases/fbida/%{name}-%{version}.tar.gz
 Patch0:		%{name}-config-noforce.patch
 Patch1:		%{name}-desktop.patch
 Patch2:		format-security.patch
+Patch3:		no-cairo-gl.patch
 URL:		https://www.kraxel.org/blog/linux/fbida/
 BuildRequires:	ImageMagick-devel
 BuildRequires:	Mesa-libgbm-devel
@@ -52,7 +54,7 @@ BuildRequires:	libjpeg-devel
 %{?with_motif:BuildRequires:	motif-devel >= 2.0}
 BuildRequires:	perl-base
 BuildRequires:	pkgconfig
-BuildRequires:	pkgconfig(cairo-gl)
+%{?with_cairo_gl:BuildRequires:	pkgconfig(cairo-gl)}
 BuildRequires:	poppler-glib-devel
 %{?with_sane:BuildRequires:	sane-backends-devel}
 BuildRequires:	util-linux
@@ -143,6 +145,7 @@ Dostępne jest też trochę podstawowych funkcji edycyjnych.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 CFLAGS="%{rpmcflags}" \
@@ -192,9 +195,11 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/fbgs.1*
 %{_mandir}/man1/fbi.1*
 
+%if %{with cairo_gl}
 %files -n fbpdf
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/fbpdf
+%endif
 
 %if %{with motif}
 %files -n ida
diff --git a/no-cairo-gl.patch b/no-cairo-gl.patch
new file mode 100644
index 0000000..6edb6cb
--- /dev/null
+++ b/no-cairo-gl.patch
@@ -0,0 +1,61 @@
+diff -ur fbida-2.12/GNUmakefile fbida-2.12-cairo/GNUmakefile
+--- fbida-2.12/GNUmakefile	2016-05-01 20:29:28.027653192 +0200
++++ fbida-2.12-cairo/GNUmakefile	2016-05-01 20:27:24.416185030 +0200
+@@ -15,23 +15,8 @@
+ PKGS_IDA := libexif
+ PKGS_FBI := freetype2 fontconfig libdrm libexif
+ PKGS_FBPDF := libdrm poppler-glib gbm epoxy cairo-gl
+-HAVE_DEPS := $(shell $(PKG_CONFIG) $(PKGS_FBI) $(PKGS_FBPDF) && echo yes)
+-
+-ifeq ($(HAVE_LINUX_FB_H),yes)
+-ifneq ($(HAVE_DEPS),yes)
+-.PHONY: deps
+-deps:
+-	@echo "Build dependencies missing for fbi and/or fbpdf."
+-	@echo "  fbi   needs:  $(PKGS_FBI)"
+-	@echo "  fbpdf needs:  $(PKGS_FBPDF)"
+-	@echo "Please install.  You can try 'make yum' (needs sudo)."
+-	@false
+-
+-yum dnf:
+-	sudo $@ install $(patsubst %,"pkgconfig(%)",$(PKGS_FBI) $(PKGS_FBPDF))
+-
+-endif
+-endif
++HAVE_FBI_DEPS := $(shell $(PKG_CONFIG) $(PKGS_FBI) && echo yes)
++HAVE_FBPDF_DEPS := $(shell $(PKG_CONFIG) $(PKGS_FBPDF) && echo yes)
+ 
+ # default target
+ all: build
+@@ -39,7 +24,13 @@
+ # what to build
+ TARGETS := exiftran thumbnail.cgi
+ ifeq ($(HAVE_LINUX_FB_H),yes)
+-  TARGETS += fbi fbpdf kbdtest
++ifeq ($(HAVE_FBI_DEPS),yes)
++  TARGETS += fbi
++endif
++ifeq ($(HAVE_FBPDF_DEPS),yes)
++  TARGETS += fbpdf
++endif
++  TARGETS += kbdtest
+ endif
+ ifeq ($(HAVE_MOTIF),yes)
+   TARGETS += ida
+@@ -248,10 +239,14 @@
+ 	$(INSTALL_BINARY) exiftran $(bindir)
+ 	$(INSTALL_DATA) $(srcdir)/exiftran.man $(mandir)/man1/exiftran.1
+ ifeq ($(HAVE_LINUX_FB_H),yes)
++ifeq ($(HAVE_FBI_DEPS),yes)
+ 	$(INSTALL_BINARY) fbi $(bindir)
+-	$(INSTALL_SCRIPT) fbgs $(bindir)
+-	$(INSTALL_SCRIPT) fbpdf $(bindir)
+ 	$(INSTALL_DATA) $(srcdir)/fbi.man $(mandir)/man1/fbi.1
++endif
++ifeq ($(HAVE_FBPDF_DEPS),yes)
++	$(INSTALL_SCRIPT) fbpdf $(bindir)
++endif
++	$(INSTALL_SCRIPT) fbgs $(bindir)
+ 	$(INSTALL_DATA) $(srcdir)/fbgs.man $(mandir)/man1/fbgs.1
+ endif
+ ifeq ($(HAVE_MOTIF),yes)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/fbida.git/commitdiff/bad71d2595455dc24254e75a7e31c52968e3b89d



More information about the pld-cvs-commit mailing list