From 1c698413c57ee099da49741b3e40570267767f79 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Sat, 13 Jun 2026 20:00:33 +0300 Subject: [PATCH] Switch to new package format --- pkg.info => info.yml | 4 +++- source.sh => recipe.sh | 17 +++++++------- source-files/mupdf-install-targets.patch | 29 ------------------------ 3 files changed, 12 insertions(+), 38 deletions(-) rename pkg.info => info.yml (97%) rename source.sh => recipe.sh (92%) delete mode 100644 source-files/mupdf-install-targets.patch diff --git a/pkg.info b/info.yml similarity index 97% rename from pkg.info rename to info.yml index 658c0b8..6e3b9c9 100644 --- a/pkg.info +++ b/info.yml @@ -1,7 +1,7 @@ name: mupdf description: Lightweight PDF and XPS viewer version: 1.27.2 -revision: 1 +revision: 2 url: https://mupdf.com/ license: AGPL3-or-later maintainers: @@ -17,6 +17,7 @@ make_depends: - freetype2 - glu - harfbuzz + - jbig2dec - libjpeg-turbo - libx11 - libxext @@ -67,6 +68,7 @@ split_packages: - gcc-libs - glibc - harfbuzz + - jbig2dec - libjpeg-turbo - openjpeg - zlib diff --git a/source.sh b/recipe.sh similarity index 92% rename from source.sh rename to recipe.sh index 43fe071..568d611 100644 --- a/source.sh +++ b/recipe.sh @@ -1,4 +1,4 @@ -# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package +# This is the recipe.sh script. It is executed by BPM in a temporary directory when compiling a source package # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT @@ -6,17 +6,16 @@ # This function is used for putting downloaded files to the correct location or applying patches prepare() { cd "$BPM_SOURCE" - # Apply patch for additional install targets - patch -Np1 -i "$BPM_WORKDIR"/mupdf-install-targets.patch # Setup make configuration cat > user.make <<-EOF +LINUX_OR_OPENBSD := yes USE_SYSTEM_LIBS := yes USE_SYSTEM_FREETYPE := yes USE_SYSTEM_HARFBUZZ := yes -USE_SYSTEM_JBIG2DEC := no -USE_SYSTEM_JPEGXR := no -USE_SYSTEM_LCMS2 := no +USE_SYSTEM_JBIG2DEC := yes +USE_SYSTEM_JPEGXR := yes +USE_SYSTEM_LCMS2 := yes USE_SYSTEM_LIBJPEG := yes USE_SYSTEM_MUJS := no USE_SYSTEM_OPENJPEG := yes @@ -24,15 +23,17 @@ USE_SYSTEM_ZLIB := yes USE_SYSTEM_GLUT := yes USE_SYSTEM_CURL := yes USE_SYSTEM_GUMBO := no +USE_SYSTEM_ZXINGCPP := yes EOF } # The build function is executed in the source directory # This function is used to compile the source code build() { - export XCFLAGS=-fPIC + export XCFLAGS="-fPIC" + export XCXXFLAGS="-fPIC" - make -j1 VENV_FLAG= shared=yes verbose=yes build=release libs apps extra-apps c++ python + make -j1 VENV_FLAG= shared=yes verbose=yes build=release libs apps extra-apps } # The package function is executed in the source directory diff --git a/source-files/mupdf-install-targets.patch b/source-files/mupdf-install-targets.patch deleted file mode 100644 index d9e28ca..0000000 --- a/source-files/mupdf-install-targets.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/Makefile b/Makefile -index 7b04ff5cd..8d16d98b0 100644 ---- a/Makefile -+++ b/Makefile -@@ -635,18 +635,17 @@ endif - - install-shared-c: install-shared-check install-libs install-headers - --install-shared-c++: install-shared-c c++ -- install -m 644 platform/c++/include/mupdf/*.h $(DESTDIR)$(incdir)/mupdf -- install -m $(SO_INSTALL_MODE) $(OUT)/libmupdfcpp.$(SO)$(SO_VERSION) $(DESTDIR)$(libdir)/ -+install-shared-c++: install-shared-check -+ install -vDm 644 platform/c++/include/mupdf/*.h -t $(DESTDIR)$(incdir)/mupdf -+ install -vDm $(SO_INSTALL_MODE) $(OUT)/libmupdfcpp.$(SO)$(SO_VERSION) -t $(DESTDIR)$(libdir)/ - ifneq ($(OS),OpenBSD) - ln -sf libmupdfcpp.$(SO)$(SO_VERSION) $(DESTDIR)$(libdir)/libmupdfcpp.$(SO) - ln -sf libmupdfcpp.$(SO)$(SO_VERSION) $(DESTDIR)$(libdir)/libmupdfcpp.$(SO)$(SO_VERSION_MAJOR) - endif - --install-shared-python: install-shared-c++ python -- install -d $(DESTDIR)$(pydir)/mupdf -- install -m $(SO_INSTALL_MODE) $(OUT)/_mupdf.$(SO) $(DESTDIR)$(pydir)/mupdf -- install -m 644 $(OUT)/mupdf.py $(DESTDIR)$(pydir)/mupdf/__init__.py -+install-shared-python: -+ install -vDm $(SO_INSTALL_MODE) $(OUT)/_mupdf.$(SO) -t $(DESTDIR)$(pydir)/mupdf -+ install -vDm 644 $(OUT)/mupdf.py $(DESTDIR)$(pydir)/mupdf/__init__.py - - else -