diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-03-31 12:14:26 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-03-31 12:57:51 +0000 |
commit | b9917e50986b2c2d7366c61cf8c89c9ced04bacc (patch) | |
tree | b07a50d6d0cc816c28d57ac42563385fbebd2887 /testing/mupdf | |
parent | ed9d2e0c12c43bcd3885af014724669049032c58 (diff) | |
download | aports-b9917e50986b2c2d7366c61cf8c89c9ced04bacc.tar.bz2 aports-b9917e50986b2c2d7366c61cf8c89c9ced04bacc.tar.xz |
testing/mupdf: build with shared lib, split -dev
Diffstat (limited to 'testing/mupdf')
-rw-r--r-- | testing/mupdf/APKBUILD | 15 | ||||
-rw-r--r-- | testing/mupdf/shared-lib.patch | 37 |
2 files changed, 47 insertions, 5 deletions
diff --git a/testing/mupdf/APKBUILD b/testing/mupdf/APKBUILD index 8cd9d2053a..7acad95248 100644 --- a/testing/mupdf/APKBUILD +++ b/testing/mupdf/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Michael Zhou <zhoumichaely@gmail.com> pkgname=mupdf pkgver=1.6 -pkgrel=1 +pkgrel=2 pkgdesc="A lightweight PDF and XPS viewer" url="http://mupdf.com" arch="all" @@ -10,9 +10,10 @@ depends="" makedepends="freetype-dev jpeg-dev jbig2dec-dev libx11-dev libxext-dev openjpeg-dev" install="" -subpackages="$pkgname-doc" +subpackages="$pkgname-doc $pkgname-dev" source="http://mupdf.com/downloads/$pkgname-$pkgver-source.tar.gz mupdf-openjpeg-2.1.patch + shared-lib.patch " _builddir="$srcdir/$pkgname-$pkgver-source" @@ -36,11 +37,15 @@ package() { cd "$_builddir" make prefix=/usr DESTDIR="$pkgdir" install || return 1 rm -f "$pkgdir"/usr/lib/*.la + ln -s libmupdf.so.0 "$pkgdir"/usr/lib/libmupdf.so } md5sums="8d69db41ae9e0b6807b76bb6ed70dc2f mupdf-1.6-source.tar.gz -4a8772b09af5152d9bf58e69834b74bf mupdf-openjpeg-2.1.patch" +4a8772b09af5152d9bf58e69834b74bf mupdf-openjpeg-2.1.patch +fab3502b8bcf3b6c4e5698f1cb33611d shared-lib.patch" sha256sums="9813ee330950a641364181649ebd369c947adbcea9d41ed953ec5365640ea563 mupdf-1.6-source.tar.gz -7b49af879df5eb2c79884a0983635fa335422edc9854bc4fbc44f653892827f2 mupdf-openjpeg-2.1.patch" +7b49af879df5eb2c79884a0983635fa335422edc9854bc4fbc44f653892827f2 mupdf-openjpeg-2.1.patch +43c6a6ea06757e63ae581be89338f38ec22beb504ca6e5ee3073ef1585aabe01 shared-lib.patch" sha512sums="3a47d47b81550f531039153385fc22bb81a24df334706e23b7f118d08d97bb103566eef2a6ea3602ebe242fcb9d53304bb9d8230109572204491415a3a1b0645 mupdf-1.6-source.tar.gz -0a07dc0a0312ef0b6a20f6a89da7a2010008cf804a1c9b33667b17f263a69e46047a34dcb24e8015a98a61e28e1e302dc302c0fbb7303a61b00d9490146b7b83 mupdf-openjpeg-2.1.patch" +0a07dc0a0312ef0b6a20f6a89da7a2010008cf804a1c9b33667b17f263a69e46047a34dcb24e8015a98a61e28e1e302dc302c0fbb7303a61b00d9490146b7b83 mupdf-openjpeg-2.1.patch +66bc7474473987a30009e54fbd12b49cb6682f12c86f5d9b9e6f6efd4c162d04d55a65f9d8373517e958951608c9e49eade8b63b140441c04ad2e75eebb8f053 shared-lib.patch" diff --git a/testing/mupdf/shared-lib.patch b/testing/mupdf/shared-lib.patch new file mode 100644 index 0000000000..6a3982f70a --- /dev/null +++ b/testing/mupdf/shared-lib.patch @@ -0,0 +1,37 @@ +--- ./Makefile.orig ++++ ./Makefile +@@ -13,6 +13,7 @@ + # XCFLAGS or XLIBS instead. Make ignores any lines in the makefile that + # set a variable that was set on the command line. + CFLAGS += $(XCFLAGS) -Iinclude -I$(GEN) ++CFLAGS += -fPIC + LIBS += $(XLIBS) -lm + + include Makerules +@@ -55,6 +56,7 @@ + CXX_CMD = $(QUIET_CXX) $(CXX) $(CFLAGS) -o $@ -c $< + AR_CMD = $(QUIET_AR) $(AR) cr $@ $^ + LINK_CMD = $(QUIET_LINK) $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) ++LINK_SHARED_CMD = $(QUIET_LINK) $(CC) $(LDFLAGS) -shared -Wl,-soname,$(notdir $@) -o $@ $^ $(LIBS) + MKDIR_CMD = $(QUIET_MKDIR) mkdir -p $@ + RM_CMD = $(QUIET_RM) rm -f $@ + +@@ -128,7 +130,7 @@ + + # --- Library --- + +-MUPDF_LIB := $(OUT)/libmupdf.a ++MUPDF_LIB := $(OUT)/libmupdf.so.0 + + $(MUPDF_LIB) : $(FITZ_OBJ) $(PDF_OBJ) $(XPS_OBJ) $(CBZ_OBJ) $(IMG_OBJ) $(TIFF_OBJ) + +@@ -143,6 +145,9 @@ + $(RM_CMD) + $(AR_CMD) + $(RANLIB_CMD) ++ ++$(OUT)/%.so.0 : $(OUT)/%.a ++ $(LINK_SHARED_CMD) + + $(OUT)/%: $(OUT)/%.o + $(LINK_CMD) |