Signed-off-by: Petr Šabata <contyk@redhat.com>
f38
Petr Šabata 7 years ago
parent 9bda4a1fe0
commit c4bb7059f5

1
.gitignore vendored

@ -1,3 +1,4 @@
/zathura-pdf-mupdf-0.2.8.tar.gz
/zathura-pdf-mupdf-0.3.0.tar.gz
/zathura-pdf-mupdf-0.3.1.tar.gz
/zathura-pdf-mupdf-0.3.3.tar.xz

@ -1 +1 @@
SHA512 (zathura-pdf-mupdf-0.3.1.tar.gz) = 87b5b8a750a6911be37a0195b0f4bc3304350f9d29173091b3eeece40350b10cb98b009b2722a69ae1e617b4242292f3eba17fea97d5276e485069180f2bd67d
SHA512 (zathura-pdf-mupdf-0.3.3.tar.xz) = cac3ccf4f85c689d44095966fbee84efac76d7c72915a06a85da272663eb3f11b053baf06a24e79e2fc89a57d05fa2f3c1df199e9e1415a3bfa65f3309227faf

@ -0,0 +1,35 @@
From 130a5f784b2e27ff1eb959a36707cb3aff1a96d4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20=C5=A0abata?= <contyk@redhat.com>
Date: Tue, 10 Apr 2018 21:14:12 +0200
Subject: [PATCH] Link against jpeg
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This resolves a broken runtime dependency.
Signed-off-by: Petr Šabata <contyk@redhat.com>
---
meson.build | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 6e077cf..3834bba 100644
--- a/meson.build
+++ b/meson.build
@@ -20,8 +20,11 @@ girara = dependency('girara-gtk3')
glib = dependency('glib-2.0')
cairo = dependency('cairo')
mupdf = cc.find_library('mupdf')
+jpeg = dependency('libjpeg')
+openjpeg = dependency('libopenjp2')
+jbig2dec = cc.find_library('jbig2dec')
-build_dependencies = [zathura, girara, glib, cairo, mupdf]
+build_dependencies = [zathura, girara, glib, cairo, mupdf, jpeg, openjpeg, jbig2dec]
# defines
defines = [
--
2.17.0

@ -0,0 +1,33 @@
From 86e3c01cf1a113681873d4f550262c1aefa48df7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20=C5=A0abata?= <contyk@redhat.com>
Date: Tue, 10 Apr 2018 20:41:55 +0200
Subject: [PATCH] Drop the mupdfthird dependency
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
It's not provided in Fedora.
Signed-off-by: Petr Šabata <contyk@redhat.com>
---
meson.build | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index 3b0d7b7..6e077cf 100644
--- a/meson.build
+++ b/meson.build
@@ -20,9 +20,8 @@ girara = dependency('girara-gtk3')
glib = dependency('glib-2.0')
cairo = dependency('cairo')
mupdf = cc.find_library('mupdf')
-mupdfthird = cc.find_library('mupdfthird')
-build_dependencies = [zathura, girara, glib, cairo, mupdf, mupdfthird]
+build_dependencies = [zathura, girara, glib, cairo, mupdf]
# defines
defines = [
--
2.17.0

@ -1,73 +1,63 @@
Name: zathura-pdf-mupdf
Version: 0.3.1
Release: 4%{?dist}
Version: 0.3.3
Release: 1%{?dist}
Summary: PDF support for zathura via mupdf
License: zlib
URL: http://pwmt.org/projects/zathura/plugins/%{name}
Source0: http://pwmt.org/projects/zathura/plugins/download/%{name}-%{version}.tar.gz
Source0: http://pwmt.org/projects/zathura/plugins/download/%{name}-%{version}.tar.xz
Patch0: %{name}-0.3.3-mupdfthird.patch
Patch1: %{name}-0.3.3-jpeg.patch
BuildRequires: binutils
BuildRequires: coreutils
BuildRequires: cairo-devel
# Needed to validate the desktop file
BuildRequires: desktop-file-utils
BuildRequires: gcc
BuildRequires: make
BuildRequires: pkgconfig
BuildRequires: sed
BuildRequires: girara-devel
BuildRequires: glib2-devel
BuildRequires: jbig2dec-devel
# Needed to validate appdata
BuildRequires: libappstream-glib
BuildRequires: libjpeg-turbo-devel
BuildRequires: mujs-static
BuildRequires: mupdf-devel
BuildRequires: meson >= 0.43
BuildRequires: mupdf-static
BuildRequires: openjpeg2-devel
BuildRequires: pkgconfig(girara-gtk3)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(libcrypto)
BuildRequires: pkgconfig(zathura)
Requires: zathura
Requires(post): %{_sbindir}/update-alternatives
Requires(post): desktop-file-utils
Requires(postun): %{_sbindir}/update-alternatives
Requires(postun): desktop-file-utils
# Ensure zathura-pdf-poppler supports alternatives
Conflicts: zathura-pdf-poppler < 0.2.5-5
BuildRequires: zathura-devel >= 0.3.9
Requires: zathura >= 0.3.9
# Old plugins used alternatives
Conflicts: zathura-pdf-poppler < 0.2.9
%description
This plugin adds PDF support to zathura using the mupdf rendering engine.
%prep
%setup -q
# Don't rebuild during install phase
sed -i 's/^install:\s*all/install:/' Makefile
%patch0 -p1
%patch1 -p1
%build
CFLAGS='%{optflags}' make %{?_smp_mflags} LIBDIR=%{_libdir} MUPDF_LIB=-lmupdf debug
mv pdf-debug.so pdf.so
%meson
%meson_build
%install
make DESTDIR=%{buildroot} LIBDIR=%{_libdir} install
mv %{buildroot}/%{_libdir}/zathura/pdf.so \
%{buildroot}/%{_libdir}/zathura/pdf.so.mupdf
touch %{buildroot}/%{_libdir}/zathura/pdf.so
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
%post
%{_sbindir}/update-alternatives --install \
%{_libdir}/zathura/pdf.so %{name} %{_libdir}/zathura/pdf.so.mupdf 5
update-desktop-database &> /dev/null || :
%postun
if [ $1 -eq 0 ] ; then
%{_sbindir}/update-alternatives --remove \
%{name} %{_libdir}/zathura/pdf.so.mupdf
fi
update-desktop-database &> /dev/null || :
%meson_install
desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.metainfo.xml
# Clean the old alternatives link
%pre
[ -L %{_libdir}/zathura/pdf.so ] && rm -f %{_libdir}/zathura/pdf.so || :
%files
%license LICENSE
%doc AUTHORS
%ghost %{_libdir}/zathura/pdf.so
%{_libdir}/zathura/pdf.so.mupdf
%{_datadir}/applications/%{name}.desktop
%{_libdir}/zathura/libpdf-mupdf.so
%{_datadir}/applications/org.pwmt.zathura-pdf-mupdf.desktop
%{_datadir}/metainfo/org.pwmt.zathura-pdf-mupdf.metainfo.xml
%changelog
* Mon Apr 09 2018 Petr Šabata <contyk@redhat.com> - 0.3.3-1
- 0.3.3 bump
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

Loading…
Cancel
Save