wok-next view mupdf/receipt @ rev 20730
glib: up (2.56.1) with static libs and Python2
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue May 29 15:17:41 2018 +0300 (2018-05-29) |
parents | d6378d455338 |
children | d5aab818505e |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="mupdf"
4 VERSION="1.13.0"
5 CATEGORY="x-window"
6 SHORT_DESC="MuPDF document viewer"
7 MAINTAINER="jozee@slitaz.org"
8 LICENSE="AGPL3"
9 WEB_SITE="https://mupdf.com/"
11 TARBALL="$PACKAGE-$VERSION-source.tar.xz"
12 WGET_URL="https://mupdf.com/downloads/$TARBALL"
14 BUILD_DEPENDS="freetype-dev libjpeg-turbo-dev jbig2dec-dev openjpeg2-dev \
15 freeglut-dev mesa-dev glu-dev curl-dev"
16 SPLIT="mupdf mupdf-gl mupdf-tools mupdf-dev"
18 compile_rules() {
19 # use system wide libraries instead of included ones; leave mujs
20 rm -rf thirdparty/curl thirdparty/freeglut thirdparty/freetype \
21 thirdparty/harfbuzz thirdparty/jbig2dec thirdparty/lcms2 \
22 thirdparty/libjpeg thirdparty/openjpeg thirdparty/zlib
24 # fix includes for jbig2dec
25 sed -i '/^JBIG2DEC_CFLAGS :=/s|$| -I./include/mupdf|' Makethird
27 case "$ARCH" in
28 arm*)
29 ARCH_ARGS='OS="slitaz-arm"'
30 unset CC CFLAGS
31 make generate
32 cat >> Makerules <<EOT
33 ifeq "\$(OS)" "slitaz-arm"
34 SYS_FREETYPE_INC = -I/cross/$ARCH/sysroot/usr/include
35 CC = ${HOST_SYSTEM}-gcc
36 LD = ${HOST_SYSTEM}-ld
37 AR = ${HOST_SYSTEM}-ar
38 CFLAGS += -I/cross/$ARCH/sysroot/usr/include -O2 -march=armv6 -ftree-vectorize -ffast-math -fsingle-precision-constant
39 CROSSCOMPILE=yes
40 endif
41 EOT
42 ;;
43 esac
44 make $ARCH_ARGS build=small libs apps extra &&
45 make $ARCH_ARGS build=small prefix=/usr install || return 1
47 # install tools
48 cd $src/build/small
49 cp mjsgen mujstest muraster mupdf-x11-curl $install/usr/bin/
51 # desktop integration
52 install -Dm644 $stuff/mupdf.desktop \
53 $install/usr/share/applications/mupdf.desktop
54 install -Dm644 $src/docs/logo/mupdf.png \
55 $install/usr/share/icons/hicolor/48x48/apps/mupdf.png
57 # fix permissions
58 find $install/usr/include $install/usr/share $install/usr/lib -type f \
59 -exec chmod 0644 '{}' \;
60 }
62 genpkg_rules() {
63 case $PACKAGE in
64 mupdf)
65 copy mupdf-x11-curl mupdf.desktop mupdf.png
66 ln -s mupdf-x11-curl $fs/usr/bin/mupdf
67 DEPENDS="freetype jbig2dec libcurl libharfbuzz libjpeg-turbo \
68 openjpeg2 openssl xorg-libX11 xorg-libXext zlib"
69 CAT="x-window|basic X11 version"
70 ;;
71 mupdf-gl)
72 copy mupdf-gl mupdf.desktop mupdf.png
73 ln -s mupdf-gl $fs/usr/bin/mupdf
74 DEPENDS="freeglut freetype jbig2dec libharfbuzz libjpeg-turbo mesa \
75 openjpeg2 zlib"
76 CAT="x-window|full featured OpenGL accelerated version"
77 PROVIDE="mupdf:mesa"
78 ;;
79 mupdf-tools)
80 copy mutool mjsgen mujstest muraster
81 DEPENDS="freetype jbig2dec libharfbuzz libjpeg-turbo openjpeg2 \
82 openssl zlib"
83 CAT="x-window|multipurpose PDF tools"
84 ;;
85 mupdf-dev)
86 copy @dev
87 ;;
88 esac
89 }