- new
authorJakub Bogusz <qboosh@pld-linux.org>
Fri, 1 Nov 2013 21:29:52 +0000 (22:29 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Fri, 1 Nov 2013 21:29:52 +0000 (22:29 +0100)
- 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 [new file with mode: 0644]
mupdf-openjpeg.patch [new file with mode: 0644]
mupdf-v8.patch [new file with mode: 0644]
mupdf.spec [new file with mode: 0644]

diff --git a/mupdf-curl.patch b/mupdf-curl.patch
new file mode 100644 (file)
index 0000000..61645bb
--- /dev/null
@@ -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 (file)
index 0000000..cda5935
--- /dev/null
@@ -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 (file)
index 0000000..0a9cf20
--- /dev/null
@@ -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 ---
diff --git a/mupdf.spec b/mupdf.spec
new file mode 100644 (file)
index 0000000..5af5057
--- /dev/null
@@ -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
This page took 0.253297 seconds and 4 git commands to generate.