[packages/mupdf] - new - openjpeg to use system openjpeg 2 instead of 1.x (code is already ported to openjpeg 2, in

qboosh qboosh at pld-linux.org
Fri Nov 1 22:29:54 CET 2013


commit 69d32f06ce3d52697c3f0757ed41225d9be0115f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Nov 1 22:29:52 2013 +0100

    - new
    - openjpeg to use system openjpeg 2 instead of 1.x
      (code is already ported to openjpeg 2, included in thirdparty dir)
    - curl patch to use system curl
    - v8 patch to use system v8

 mupdf-curl.patch     |  21 +++++++++
 mupdf-openjpeg.patch |  13 ++++++
 mupdf-v8.patch       |  13 ++++++
 mupdf.spec           | 122 +++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 169 insertions(+)
---
diff --git a/mupdf.spec b/mupdf.spec
new file mode 100644
index 0000000..5af5057
--- /dev/null
+++ b/mupdf.spec
@@ -0,0 +1,122 @@
+# TODO: build shared library
+Summary:	MuPDF - lightweight PDF, XPS and CBZ viewer and parser/rendering library
+Summary(pl.UTF-8):	MuPDF - lekka przeglądarka oraz biblioteka renderująca PDF, XPS, CBZ
+Name:		mupdf
+Version:	1.3
+Release:	0.1
+License:	AGPL v3
+Group:		Libraries
+#Source0Download: http://code.google.com/p/mupdf/downloads/list?q=source
+Source0:	http://mupdf.googlecode.com/files/%{name}-%{version}-source.tar.gz
+# Source0-md5:	fe53c2a56ebd7759f5f965bc4ff66359
+Patch0:		%{name}-openjpeg.patch
+Patch1:		%{name}-curl.patch
+Patch2:		%{name}-v8.patch
+URL:		http://www.mupdf.com/
+BuildRequires:	curl-devel
+BuildRequires:	freetype-devel >= 2
+BuildRequires:	jbig2dec-devel
+BuildRequires:	libjpeg-devel
+BuildRequires:	openjpeg2-devel >= 2
+BuildRequires:	openssl-devel
+BuildRequires:	pkgconfig
+BuildRequires:	v8-devel
+BuildRequires:	xorg-lib-libX11-devel
+BuildRequires:	xorg-lib-libXext-devel
+BuildRequires:	zlib-devel
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+MuPDF is a lightweight PDF, XPS and CBZ viewer and parser/rendering
+library.
+
+%description -l pl.UTF-8
+MuPDF to lekka przeglądarka oraz biblioteka analizująca/renderująca
+pliki PDF, XPS i CBZ.
+
+%package devel
+Summary:	Header files for MuPDF library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki MuPDF
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description devel
+Header files for MuPDF library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki MuPDF.
+
+%package static
+Summary:	Static MuPDF library
+Summary(pl.UTF-8):	Statyczna biblioteka MuPDF
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static MuPDF library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka MuPDF.
+
+%prep
+%setup -q -n %{name}-%{version}-source
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+%{__rm} -r thirdparty/{curl,freetype,jbig2dec,jpeg,openjpeg,zlib}
+
+%build
+CFLAGS="%{rpmcflags} %{rpmcppflags}" \
+%{__make} \
+	CC="%{__cc}" \
+	V8_PRESENT=yes \
+	build=release
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT \
+	V8_PRESENT=yes \
+	build=release \
+	prefix=%{_prefix} \
+	libdir=%{_libdir}
+
+# packaged as %doc
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mupdf
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+#%post	-p /sbin/ldconfig
+#%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc CHANGES CONTRIBUTORS README
+%attr(755,root,root) %{_bindir}/mudraw
+%attr(755,root,root) %{_bindir}/mujstest-v8
+%attr(755,root,root) %{_bindir}/mupdf-x11
+%attr(755,root,root) %{_bindir}/mupdf-x11-curl
+%attr(755,root,root) %{_bindir}/mupdf-x11-v8
+%attr(755,root,root) %{_bindir}/mutool
+%{_mandir}/man1/mudraw.1*
+%{_mandir}/man1/mupdf.1*
+%{_mandir}/man1/mutool.1*
+
+%files devel
+%defattr(644,root,root,755)
+%doc docs/{naming,overview,progressive,refcount,thirdparty}.txt
+%{_libdir}/libmupdf.a
+%{_libdir}/libmupdf-js-none.a
+%{_libdir}/libmupdf-js-v8.a
+%{_includedir}/mupdf
+
+%if 0
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libmupdf.a
+%{_libdir}/libmupdf-js-none.a
+%{_libdir}/libmupdf-js-v8.a
+%endif
diff --git a/mupdf-curl.patch b/mupdf-curl.patch
new file mode 100644
index 0000000..61645bb
--- /dev/null
+++ b/mupdf-curl.patch
@@ -0,0 +1,21 @@
+--- mupdf-1.3-source/Makerules.orig	2013-11-01 20:37:30.098722412 +0100
++++ mupdf-1.3-source/Makerules	2013-11-01 20:53:10.238682958 +0100
+@@ -56,6 +56,8 @@
+ endif
+ 
+ SYS_CURL_DEPS = -lpthread -lrt
++SYS_CURL_CFLAGS = $(shell pkg-config --cflags libcurl)
++SYS_CURL_LIBS = $(shell pkg-config --libs libcurl) -lpthread
+ 
+ SYS_X11_CFLAGS = $(shell pkg-config --cflags x11 xext)
+ SYS_X11_LIBS = $(shell pkg-config --libs x11 xext)
+--- mupdf-1.3-source/Makethird.orig	2013-11-01 20:54:35.492012714 +0100
++++ mupdf-1.3-source/Makethird	2013-11-01 20:54:07.405347226 +0100
+@@ -444,5 +444,6 @@
+ CURL_CFLAGS := -I$(CURL_DIR)/include
+ CURL_LIBS := $(SYS_CURL_DEPS)
+ else
+-NOCURL := yes
++CURL_CFLAGS := $(SYS_CURL_CFLAGS)
++CURL_LIBS := $(SYS_CURL_LIBS)
+ endif
diff --git a/mupdf-openjpeg.patch b/mupdf-openjpeg.patch
new file mode 100644
index 0000000..cda5935
--- /dev/null
+++ b/mupdf-openjpeg.patch
@@ -0,0 +1,13 @@
+--- mupdf-1.3-source/Makerules.orig	2013-08-14 14:41:20.000000000 +0200
++++ mupdf-1.3-source/Makerules	2013-11-01 20:36:24.832058539 +0100
+@@ -62,8 +62,8 @@
+ 
+ SYS_FREETYPE_CFLAGS = $(shell pkg-config --cflags freetype2)
+ SYS_FREETYPE_LIBS = $(shell pkg-config --libs freetype2)
+-SYS_OPENJPEG_CFLAGS = $(shell pkg-config --cflags libopenjpeg1)
+-SYS_OPENJPEG_LIBS = $(shell pkg-config --libs libopenjpeg1)
++SYS_OPENJPEG_CFLAGS = -I/usr/include/openjpeg-2.0
++SYS_OPENJPEG_LIBS = -lopenjp2
+ SYS_JBIG2DEC_LIBS = -ljbig2dec
+ SYS_JPEG_LIBS = -ljpeg
+ SYS_ZLIB_LIBS = -lz
diff --git a/mupdf-v8.patch b/mupdf-v8.patch
new file mode 100644
index 0000000..0a9cf20
--- /dev/null
+++ b/mupdf-v8.patch
@@ -0,0 +1,13 @@
+--- mupdf-1.3-source/Makethird.orig	2013-11-01 20:54:07.405347226 +0100
++++ mupdf-1.3-source/Makethird	2013-11-01 20:56:12.078675327 +0100
+@@ -43,7 +43,9 @@
+ 
+ V8_PRESENT := yes
+ else
+-V8_PRESENT := no
++ifneq "$(V8_PRESENT)" "no"
++V8_LIBS = -lv8 -lstdc++
++endif
+ endif
+ 
+ # --- FreeType 2 ---
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mupdf.git/commitdiff/69d32f06ce3d52697c3f0757ed41225d9be0115f



More information about the pld-cvs-commit mailing list