mupdf: Build static libs
This commit is contained in:
parent
989801561e
commit
7f6ad85c24
@ -1,7 +1,20 @@
|
||||
diff -uNr mupdf-1.18.0-source/Makefile mupdf-1.18.0-source.mod/Makefile
|
||||
--- mupdf-1.18.0-source/Makefile 2020-10-07 13:35:03.000000000 +0300
|
||||
+++ mupdf-1.18.0-source.mod/Makefile 2021-08-05 19:47:26.364131551 +0300
|
||||
@@ -66,6 +66,14 @@
|
||||
@@ -48,6 +48,7 @@
|
||||
QUIET_CXX = @ echo " CXX $@" ;
|
||||
QUIET_GEN = @ echo " GEN $@" ;
|
||||
QUIET_LINK = @ echo " LINK $@" ;
|
||||
+ QUIET_LINK_FOR_BUILD = @ echo " LINK_FOR_BUILD $@" ;
|
||||
QUIET_RM = @ echo " RM $@" ;
|
||||
QUIET_TAGS = @ echo " TAGS $@" ;
|
||||
QUIET_WINDRES = @ echo " WINDRES $@" ;
|
||||
@@ -62,10 +63,19 @@
|
||||
RANLIB_CMD = $(QUIET_RANLIB) $(RANLIB) $@
|
||||
endif
|
||||
LINK_CMD = $(QUIET_LINK) $(MKTGTDIR) ; $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
|
||||
+LINK_FOR_BUILD_CMD = $(QUIET_LINK_FOR_BUILD) $(MKTGTDIR) ; $(CC_FOR_BUILD) -o $@ $^
|
||||
TAGS_CMD = $(QUIET_TAGS) ctags -R --c-kinds=+p
|
||||
WINDRES_CMD = $(QUIET_WINDRES) $(MKTGTDIR) ; $(WINDRES) $< $@
|
||||
OBJCOPY_CMD = $(QUIET_OBJCOPY) $(MKTGTDIR) ; $(LD) -r -b binary -z noexecstack -o $@ $<
|
||||
|
||||
@ -16,6 +29,15 @@ diff -uNr mupdf-1.18.0-source/Makefile mupdf-1.18.0-source.mod/Makefile
|
||||
# --- Rules ---
|
||||
|
||||
$(OUT)/%.a :
|
||||
@@ -73,7 +81,7 @@
|
||||
$(RANLIB_CMD)
|
||||
|
||||
$(OUT)/%.exe: %.c
|
||||
- $(LINK_CMD)
|
||||
+ $(LINK_FOR_BUILD_CMD)
|
||||
|
||||
$(OUT)/%.$(SO):
|
||||
$(LINK_CMD) $(LIB_LDFLAGS) $(THIRD_LIBS) $(LIBCRYPTO_LIBS)
|
||||
@@ -321,7 +329,7 @@
|
||||
$(OUT)/example: docs/examples/example.c $(MUPDF_LIB) $(THIRD_LIB)
|
||||
$(LINK_CMD) $(CFLAGS) $(THIRD_LIBS)
|
||||
|
@ -1,7 +1,17 @@
|
||||
diff -uNr mupdf-1.15.0-source/Makerules mupdf-1.15.0-source.mod/Makerules
|
||||
--- mupdf-1.15.0-source/Makerules 2019-05-06 14:53:09.000000000 +0300
|
||||
+++ mupdf-1.15.0-source.mod/Makerules 2019-07-01 02:08:28.604522907 +0300
|
||||
@@ -134,7 +134,7 @@
|
||||
@@ -116,7 +116,8 @@
|
||||
RANLIB = xcrun ranlib
|
||||
|
||||
else ifeq ($(OS),Linux)
|
||||
- HAVE_OBJCOPY := yes
|
||||
+ #HAVE_OBJCOPY := yes
|
||||
+ HAVE_OBJCOPY := no
|
||||
|
||||
ifeq ($(shell pkg-config --exists freetype2 && echo yes),yes)
|
||||
SYS_FREETYPE_CFLAGS := $(shell pkg-config --cflags freetype2)
|
||||
@@ -186,7 +187,7 @@
|
||||
HAVE_PTHREAD := yes
|
||||
ifeq ($(HAVE_PTHREAD),yes)
|
||||
PTHREAD_CFLAGS :=
|
||||
|
@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Lightweight PDF and XPS viewer (library)"
|
||||
TERMUX_PKG_LICENSE="AGPL-V3"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=1.18.0
|
||||
TERMUX_PKG_REVISION=4
|
||||
TERMUX_PKG_REVISION=5
|
||||
TERMUX_PKG_SRCURL=https://mupdf.com/downloads/archive/mupdf-${TERMUX_PKG_VERSION}-source.tar.xz
|
||||
TERMUX_PKG_SHA256=592d4f6c0fba41bb954eb1a41616661b62b134d5b383e33bd45a081af5d4a59a
|
||||
TERMUX_PKG_DEPENDS="freetype, gumbo-parser, harfbuzz, jbig2dec, libjpeg-turbo, openjpeg, zlib"
|
||||
@ -15,3 +15,9 @@ termux_step_pre_configure() {
|
||||
export USE_SYSTEM_LIBS=yes
|
||||
LDFLAGS+=" -llog"
|
||||
}
|
||||
|
||||
termux_step_post_make_install() {
|
||||
TERMUX_PKG_EXTRA_MAKE_ARGS="${TERMUX_PKG_EXTRA_MAKE_ARGS/shared=yes/}"
|
||||
termux_step_make
|
||||
install -Dm600 -t $TERMUX_PREFIX/lib build/release/libmupdf{-third,}.a
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user