Mail archive
alpine-aports

[alpine-aports] [PATCH 1/1] testing/mupdf: upgrade to 1.9a

From: Daniel Sabogal <dsabogalcc_at_gmail.com>
Date: Thu, 4 Aug 2016 12:45:02 -0400

From: Daniel Sabogal <dsabogalcc_at_gmail.com>

---
 testing/mupdf/APKBUILD         | 48 +++++++++++++++++++++++-------------------
 testing/mupdf/shared-lib.patch | 22 +++++++++----------
 2 files changed, 37 insertions(+), 33 deletions(-)
diff --git a/testing/mupdf/APKBUILD b/testing/mupdf/APKBUILD
index ebab488..27b0948 100644
--- a/testing/mupdf/APKBUILD
+++ b/testing/mupdf/APKBUILD
_at_@ -1,44 +1,48 @@
 # Contributor: Sören Tempel <soeren+alpine_at_soeren-tempel.net>
+# Contributor: Daniel Sabogal <dsabogalcc_at_gmail.com>
 # Maintainer: Michael Zhou <zhoumichaely_at_gmail.com>
 pkgname=mupdf
-pkgver=1.8
+pkgver=1.9a
 pkgrel=0
 pkgdesc="A lightweight PDF and XPS viewer"
 url="http://mupdf.com"
 arch="all"
-license="GPL3+"
+license="AGPL3+"
 depends=""
-makedepends="freetype-dev jpeg-dev jbig2dec-dev libx11-dev libxext-dev
-	openjpeg-dev"
+makedepends="freetype-dev harfbuzz-dev jpeg-dev jbig2dec-dev libx11-dev libxext-dev openjpeg-dev"
 install=""
 subpackages="$pkgname-doc $pkgname-dev"
-source="http://mupdf.com/downloads/mupdf-${pkgver}-source.tar.gz
+source="http://mupdf.com/downloads/archive/mupdf-$pkgver-source.tar.gz
 	mupdf-openjpeg-2.1.patch
 	shared-lib.patch
 	"
 
-_builddir="$srcdir/$pkgname-${pkgver}-source"
+builddir="$srcdir/$pkgname-$pkgver-source"
 prepare() {
-	cd "$_builddir"
+	cd "$builddir"
+
+	rm -rf thirdparty/curl
+	rm -rf thirdparty/freetype
+	rm -rf thirdparty/freetype
+	rm -rf thirdparty/glfw
+	rm -rf thirdparty/harfbuzz
+	rm -rf thirdparty/jbig2dec
+	rm -rf thirdparty/jpeg
+	rm -rf thirdparty/openjpeg
+	rm -rf thirdparty/zlib
 
-	rm -rf thirdparty
 	sed '/^JBIG2DEC_CFLAGS :=/s|$| -I./include/mupdf|' -i Makethird
 
-	local i=
-	for i in $source; do
-		case $i in
-		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1 ;;
-		esac
-	done
+	default_prepare || return 1
 }
 
 build() {
-	cd "$_builddir"
+	cd "$builddir"
 	make prefix=/usr || return 1
 }
 
 package() {
-	cd "$_builddir"
+	cd "$builddir"
 	make prefix=/usr DESTDIR="$pkgdir" install || return 1
 
 	ln -s libmupdf.so.0 "$pkgdir"/usr/lib/libmupdf.so
_at_@ -47,12 +51,12 @@ package() {
 	ln -s /usr/bin/$pkgname-x11 "$pkgdir"/usr/bin/$pkgname
 }
 
-md5sums="3205256d78d8524d67dd2a47c7a345fa  mupdf-1.8-source.tar.gz
+md5sums="658b90788a57d858dcb069cf326e11c3  mupdf-1.9a-source.tar.gz
 4a8772b09af5152d9bf58e69834b74bf  mupdf-openjpeg-2.1.patch
-fab3502b8bcf3b6c4e5698f1cb33611d  shared-lib.patch"
-sha256sums="a2a3c64d8b24920f87cf4ea9339a25abf7388496440f13b37482d1403c33c206  mupdf-1.8-source.tar.gz
+685ad501d000b1ae56021ab86a615da7  shared-lib.patch"
+sha256sums="8015c55f4e6dd892d3c50db4f395c1e46660a10b460e2ecd180a497f55bbc4cc  mupdf-1.9a-source.tar.gz
 7b49af879df5eb2c79884a0983635fa335422edc9854bc4fbc44f653892827f2  mupdf-openjpeg-2.1.patch
-43c6a6ea06757e63ae581be89338f38ec22beb504ca6e5ee3073ef1585aabe01  shared-lib.patch"
-sha512sums="938fbed4afc0dd0aa621911cd70b9289c6a4f13d026f9390b11fc86d5b37845a76943c9fa42f218f67fe298295f15d6664a18be7bf73b5d952724122510f9deb  mupdf-1.8-source.tar.gz
+668ab6884a22410b25ab12a0097628b7496e083133ddeb22e3bc0a6e702de72d  shared-lib.patch"
+sha512sums="9f804fd65c2dc6b7a3bd73961b1f1a8bf93d52903cccf6302acd6982dfa433125a3b8e77b808984921aee097877280fa21aafb87468cd0a8e4cfa900284a262b  mupdf-1.9a-source.tar.gz
 0a07dc0a0312ef0b6a20f6a89da7a2010008cf804a1c9b33667b17f263a69e46047a34dcb24e8015a98a61e28e1e302dc302c0fbb7303a61b00d9490146b7b83  mupdf-openjpeg-2.1.patch
-66bc7474473987a30009e54fbd12b49cb6682f12c86f5d9b9e6f6efd4c162d04d55a65f9d8373517e958951608c9e49eade8b63b140441c04ad2e75eebb8f053  shared-lib.patch"
+af04d49f471f17c0273759194ef4a0c82152758b2fba70e6e346d9aca3c12a57b097f9fd1b1733ee8a33ac68de3c4081cc30e40544f4b04e17b0d1b556101f00  shared-lib.patch"
diff --git a/testing/mupdf/shared-lib.patch b/testing/mupdf/shared-lib.patch
index 6a3982f..99b22f2 100644
--- a/testing/mupdf/shared-lib.patch
+++ b/testing/mupdf/shared-lib.patch
_at_@ -1,14 +1,14 @@
---- ./Makefile.orig
-+++ ./Makefile
-_at_@ -13,6 +13,7 @@
+--- mupdf-1.9a-source/Makefile.orig
++++ mupdf-1.9a-source/Makefile
+_at_@ -16,6 +16,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
-_at_@ -55,6 +56,7 @@
+ LIBS += $(FREETYPE_LIBS)
+_at_@ -52,6 +53,7 @@
  CXX_CMD = $(QUIET_CXX) $(CXX) $(CFLAGS) -o $_at_ -c $<
  AR_CMD = $(QUIET_AR) $(AR) cr $_at_ $^
  LINK_CMD = $(QUIET_LINK) $(CC) $(LDFLAGS) -o $_at_ $^ $(LIBS)
_at_@ -16,16 +16,16 @@
  MKDIR_CMD = $(QUIET_MKDIR) mkdir -p $_at_
  RM_CMD = $(QUIET_RM) rm -f $_at_
  
-_at_@ -128,7 +130,7 @@
+_at_@ -141,7 +143,7 @@
  
  # --- Library ---
  
--MUPDF_LIB := $(OUT)/libmupdf.a
-+MUPDF_LIB := $(OUT)/libmupdf.so.0
+-MUPDF_LIB = $(OUT)/libmupdf.a
++MUPDF_LIB = $(OUT)/libmupdf.so.0
+ THIRD_LIB = $(OUT)/libmupdfthird.a
  
- $(MUPDF_LIB) : $(FITZ_OBJ) $(PDF_OBJ) $(XPS_OBJ) $(CBZ_OBJ) $(IMG_OBJ) $(TIFF_OBJ)
- 
-_at_@ -143,6 +145,9 @@
+ MUPDF_OBJ := $(FITZ_OBJ) $(FONT_OBJ) $(PDF_OBJ) $(XPS_OBJ) $(CBZ_OBJ) $(HTML_OBJ) $(GPRF_OBJ)
+_at_@ -161,6 +163,9 @@
  	$(RM_CMD)
  	$(AR_CMD)
  	$(RANLIB_CMD)
-- 
2.8.3
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Thu Aug 04 2016 - 12:45:02 GMT