ports

morpheus ports
git clone git://git.2f30.org/ports
Log | Files | Refs | LICENSE

commit 7a51be1b8132f595d754a4cfe2971b5dc9cf76ee
parent d41a1bd0f2d8758e63df2ed0ba6173954d180132
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Fri,  2 May 2014 17:02:07 +0000

add mupdf

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>

Diffstat:
Amupdf/Makerules | 33+++++++++++++++++++++++++++++++++
Amupdf/mkfile | 6++++++
Amupdf/mupdf.mk | 48++++++++++++++++++++++++++++++++++++++++++++++++
Amupdf/v.mk | 1+
4 files changed, 88 insertions(+), 0 deletions(-)

diff --git a/mupdf/Makerules b/mupdf/Makerules @@ -0,0 +1,33 @@ +# Configuration for the Makefile + +OS ?= Linux + +CFLAGS += -Wall + +ifeq "$(build)" "debug" +CFLAGS += -pipe -g -DDEBUG +else ifeq "$(build)" "profile" +CFLAGS += -pipe -O2 -DNDEBUG -pg +LDFLAGS += -pg +else ifeq "$(build)" "release" +CFLAGS += -pipe -O2 -DNDEBUG -fomit-frame-pointer +else ifeq "$(build)" "coverage" +CFLAGS += -pipe -g -DDEBUG -pg -fprofile-arcs -ftest-coverage +LIBS += -lgcov +else ifeq "$(build)" "native" +CFLAGS += -pipe -O2 -DNDEBUG -fomit-frame-pointer -march=native -mfpmath=sse +else ifeq "$(build)" "memento" +CFLAGS += -pipe -g -DMEMENTO -DDEBUG +else +$(error unknown build setting: '$(build)') +endif + +SYS_CURL_DEPS = -lpthread -lrt + +SYS_FREETYPE_CFLAGS = +SYS_FREETYPE_LIBS = +SYS_OPENJPEG_CFLAGS = +SYS_OPENJPEG_LIBS = +SYS_JBIG2DEC_LIBS = -ljbig2dec +SYS_JPEG_LIBS = -ljpeg +SYS_ZLIB_LIBS = -lz diff --git a/mupdf/mkfile b/mupdf/mkfile @@ -0,0 +1,6 @@ +<$mkbuild/mk.3rdparty + +<v.mk +src = mupdf-$v-source +url = http://www.mupdf.com/downloads/mupdf-$v-source.tar.gz +mkfile = ../mupdf.mk diff --git a/mupdf/mupdf.mk b/mupdf/mupdf.mk @@ -0,0 +1,48 @@ +TARG = mupdf +DEPS = openssl xorglibx11 xorglibxext xorgxproto xorgxextproto xorglibxcb xorgxcbproto xorglibxau + +<$mkbuild/mk.common-noinst + +mupdf:QV: + # default build was "debug", use "release". + build="release" + # fix for Makerules: hardcoded (X11) paths etc. + cp ../Makerules Makerules + # build tools used in build + # (CROSSCOMPILE="yes" disables these in the normal build). + mkdir -p generated build/${build} + for tool in bin2hex cmapdump cquote fontdump; do + CC="cc" CFLAGS="" LDFLAGS="" make scripts/${tool} + cp "scripts/${tool}" "build/${build}" + done + # + export CFLAGS="$CFLAGS $DEPS_CFLAGS" + export LDFLAGS="$LDFLAGS $DEPS_LDFLAGS" + # TODO: disable hardcoded X11 include paths etc in Makefile? + # TODO: change X11_LIBS etc. depending on DEPS, don't hardcode them. + make -j$nprocs \ + build="${build}" \ + prefix="$prefix" \ + verbose="yes" \ + CROSSCOMPILE="yes" \ + HAVE_X11="yes" \ + HAVE_CURL="no" \ + X11_CFLAGS="-I${xorglibx11_includedir} -I${xorglibxext_includedir} -L${xorglibx11_libdir} -L${xorglibxext_libdir}" \ + X11_LIBS="-lX11 -lX11-xcb -lXext -lxcb -lXau" \ + OPENSSL_CFLAGS="-DHAVE_OPENSSL -I${openssl_includedir} -L${openssl_libdir}" \ + OPENSSL_LIBS="-lcrypto -lssl" + +install:QV: + build="release" + make -j$nprocs install \ + DESTDIR="$ROOT" \ + build="${build}" \ + prefix="$prefix" \ + verbose="yes" \ + CROSSCOMPILE="yes" \ + HAVE_X11="yes" \ + HAVE_CURL="no" \ + X11_CFLAGS="-I${xorglibx11_includedir} -I${xorglibxext_includedir} -L${xorglibx11_libdir} -L${xorglibxext_libdir}" \ + X11_LIBS="-lX11 -lX11-xcb -lXext -lxcb -lXau" \ + OPENSSL_CFLAGS="-DHAVE_OPENSSL -I${openssl_includedir} -L${openssl_libdir}" \ + OPENSSL_LIBS="-lcrypto -lssl" diff --git a/mupdf/v.mk b/mupdf/v.mk @@ -0,0 +1 @@ +v = 1.4