]> git.pld-linux.org Git - packages/mupdf.git/blobdiff - mupdf.spec
- updated to 1.8 (note: needs ~2016 mujs, mudraw is gone)
[packages/mupdf.git] / mupdf.spec
index 1c2842647686f239d0c7245026a8bd099feda627..b36c66949449abadf19ed1e1a42f329473758e9a 100644 (file)
@@ -1,36 +1,38 @@
+#
+# Conditional build:
+%bcond_with    v8      # use V8 JS engine instead of MuJS
+#
 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:       3
+Version:       1.8
+Release:       1
 License:       AGPL v3+
 Group:         Applications/Text
-#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
+Source0:       http://www.mupdf.com/downloads/%{name}-%{version}-source.tar.gz
+# Source0-md5: 3205256d78d8524d67dd2a47c7a345fa
 Patch0:                %{name}-openjpeg.patch
-Patch1:                %{name}-curl.patch
-Patch2:                %{name}-v8.patch
-Patch3:                %{name}-shared.patch
+Patch1:                %{name}-shared.patch
+Patch2:                %{name}-mujs.patch
 URL:           http://www.mupdf.com/
+BuildRequires: OpenGL-glut-devel
 BuildRequires: curl-devel
 BuildRequires: freetype-devel >= 2
+BuildRequires: glfw-devel
 BuildRequires: jbig2dec-devel
 BuildRequires: libjpeg-devel
 BuildRequires: libstdc++-devel
+%{!?with_v8:BuildRequires:     mujs-devel >= 0-0.20160302}
 BuildRequires: openjpeg2-devel >= 2.1.0
 BuildRequires: openssl-devel
 BuildRequires: pkgconfig
-BuildRequires: v8-devel
+%{?with_v8:BuildRequires:      v8-devel}
 BuildRequires: xorg-lib-libX11-devel
 BuildRequires: xorg-lib-libXext-devel
 BuildRequires: zlib-devel
 Requires:      %{name}-libs = %{version}-%{release}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-# needs symbols from one of libmupdf-js-*
-%define                skip_post_check_so      libmupdf.so.*
-
 %description
 MuPDF is a lightweight PDF, XPS and CBZ viewer and parser/rendering
 library.
@@ -59,9 +61,10 @@ Requires:    freetype-devel >= 2
 Requires:      jbig2dec-devel
 Requires:      libjpeg-devel
 Requires:      libstdc++-devel
+%{!?with_v8:Requires:  mujs-devel}
 Requires:      openjpeg2-devel >= 2.1.0
 Requires:      openssl-devel
-Requires:      v8-devel
+%{?with_v8:Requires:   v8-devel}
 Requires:      zlib-devel
 
 %description devel
@@ -87,10 +90,9 @@ Statyczne biblioteki MuPDF.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
-%patch3 -p1
 
 # use system libs instead
-%{__rm} -r thirdparty/{curl,freetype,jbig2dec,jpeg,openjpeg,zlib}
+%{__rm} -r thirdparty/{curl,freetype,glfw,jbig2dec,jpeg,mujs,openjpeg,zlib}
 
 %build
 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
@@ -98,7 +100,15 @@ LDFLAGS="%{rpmldflags}" \
 %{__make} \
        CC="%{__cc}" \
        CXX="%{__cxx}" \
-       V8_PRESENT=yes \
+%if %{with v8}
+       HAVE_V8=yes \
+       V8_CFLAGS= \
+       V8_LIBS="-lv8 -lstdc++" \
+%else
+       HAVE_MUJS=yes \
+       MUJS_CFLAGS= \
+       MUJS_LIBS="-lmujs" \
+%endif
        SYS_OPENJPEG_CFLAGS="$(pkg-config --cflags libopenjp2)" \
        build=release \
        libdir=%{_libdir} \
@@ -126,13 +136,10 @@ rm -rf $RPM_BUILD_ROOT
 %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}/mujstest
 %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*
 
@@ -140,24 +147,14 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libmupdf.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libmupdf.so.0
-%attr(755,root,root) %{_libdir}/libmupdf-js-none.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libmupdf-js-none.so.0
-%attr(755,root,root) %{_libdir}/libmupdf-js-v8.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libmupdf-js-v8.so.0
 
 %files devel
 %defattr(644,root,root,755)
 %doc docs/{naming,overview,progressive,refcount,thirdparty}.txt
 %attr(755,root,root) %{_libdir}/libmupdf.so
-%attr(755,root,root) %{_libdir}/libmupdf-js-none.so
-%attr(755,root,root) %{_libdir}/libmupdf-js-v8.so
 %{_libdir}/libmupdf.la
-%{_libdir}/libmupdf-js-none.la
-%{_libdir}/libmupdf-js-v8.la
 %{_includedir}/mupdf
 
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libmupdf.a
-%{_libdir}/libmupdf-js-none.a
-%{_libdir}/libmupdf-js-v8.a
This page took 0.033602 seconds and 4 git commands to generate.