Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions switch/mupdf/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,28 @@
# Contributor: Julian Uy <uyjulian@gmail.com>

pkgname=switch-mupdf
pkgver=1.17.0
pkgver=1.24.11
pkgrel=1
pkgdesc='MuPDF is a lightweight PDF, XPS, and E-book viewer.'
arch=('any')
url='https://www.mupdf.com/'
license=('AGPL')
options=(!strip libtool staticlibs)
depends=("switch-freetype"
"switch-harfbuzz"
"switch-libjpeg-turbo"
"switch-zlib"
)

makedepends=('dkp-toolchain-vars')
makedepends=('switch-pkg-config' 'dkp-toolchain-vars')

source=("https://www.mupdf.com/downloads/archive/mupdf-$pkgver-source.tar.xz" "mupdf.patch")
source=("https://casper.mupdf.com/downloads/archive/mupdf-$pkgver-source.tar.lz" "mupdf.patch")

groups=('switch-portlibs')

sha256sums=(
'c935fb2593d9a28d9b56b59dad6e3b0716a6790f8a257a68fa7dcb4430bc6086'
'5641105980d95c2cb77cf053a13d2255c422767b5c9ec4c2a13c1aa14d1e18bb'
'ac159293040934e250e4495782f8cd04c8cbbaf992fbd9faf32dab2ec657117b'
'396a8350670e363adabe12485e3ee32b695c46b7a97e9acd50a0816fc110eabf'
)

build() {
Expand All @@ -44,7 +45,5 @@ package() {
make build=release \
prefix="${PORTLIBS_PREFIX}" DESTDIR="$pkgdir" \
OS=switch \
TOOL_APPS=/dev/null \
VIEW_APPS= \
install
install-libs
}
29 changes: 8 additions & 21 deletions switch/mupdf/mupdf.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/Makerules b/Makerules
index b96fc7138..91b853208 100644
index f582dc0614..81178aa2b7 100644
--- a/Makerules
+++ b/Makerules
@@ -201,3 +201,18 @@ ifeq "$(OS)" "ios"
@@ -379,3 +379,20 @@ ifeq "$(OS)" "ios"
LD = xcrun ld
RANLIB = xcrun ranlib
endif
Expand All @@ -17,17 +17,19 @@ index b96fc7138..91b853208 100644
+ USE_SYSTEM_FREETYPE = yes
+ SYS_FREETYPE_CFLAGS = $(shell freetype-config --cflags)
+ SYS_FREETYPE_LIBS = $(shell freetype-config --libs)
+ USE_SYSTEM_HARFBUZZ = yes
+ SYS_HARFBUZZ_CFLAGS = $(shell aarch64-none-elf-pkg-config --cflags harfbuzz)
+ SYS_HARFBUZZ_LIBS = $(shell aarch64-none-elf-pkg-config --libs harfbuzz)
+ USE_SYSTEM_LIBJPEG = yes
+ USE_SYSTEM_ZLIB = yes
+endif
+
diff --git a/source/fitz/string.c b/source/fitz/string.c
index 2918c3f16..c8b709c2f 100644
index 4a0de4fc48..aeaf8cabf6 100644
--- a/source/fitz/string.c
+++ b/source/fitz/string.c
@@ -158,7 +158,11 @@ char *fz_realpath(const char *path, char buf[PATH_MAX])
@@ -235,7 +235,11 @@ char *fz_realpath(const char *path, char *buf)

char *fz_realpath(const char *path, char buf[PATH_MAX])
char *fz_realpath(const char *path, char *buf)
{
+#ifdef __SWITCH__
+ return NULL;
Expand All @@ -37,18 +39,3 @@ index 2918c3f16..c8b709c2f 100644
}

#endif
Submodule thirdparty/harfbuzz contains modified content
diff --git a/thirdparty/harfbuzz/src/hb.hh b/thirdparty/harfbuzz/src/hb.hh
index fcbd3305..ff36ef63 100644
--- a/thirdparty/harfbuzz/src/hb.hh
+++ b/thirdparty/harfbuzz/src/hb.hh
@@ -182,6 +182,7 @@
#include <assert.h>
#include <stdio.h>
#include <stdarg.h>
+#include <climits>

#if (defined(_MSC_VER) && _MSC_VER >= 1500) || defined(__MINGW32__)
#ifdef __MINGW32_VERSION
Submodule thirdparty/lcms2 05db680de...29b0d7953 (commits not present)
Submodule thirdparty/libjpeg 9a532f2d5...cae42f6ea (commits not present)