gentoo-ebuilds/app-text/mupdf/files/mupdf-1.26.3-Makefile.patch
Philipp Rösner 63ac7d0d00
app-text/mupdf: add 1.26.3
- Add ebuild for app-text/mupdf-1.26.3
- Add use flag brotli, enabling support for brotli compression
- Add use flag barcode, enabling support for detecting and generating
  barcodes using mutool
- Remove c23 patch, as it got patched upstream
- Add mupdf-1.26.3-jpx.patch fixing code regarding openjpg being
  included even if -jpeg2k is set
- Adjust other patches to be aligned with upstream Makefile
  changes/cleanup
- Tested on amd64 via `pkg-testing-tool --test-feature-scope once`
- Remove keywords alpha, hppa, mips, ppc, s390, sparc, because
  media-libs/zxing-cpp first needs a rekeyword for those (if possible)

Signed-off-by: Philipp Rösner <rndxelement@protonmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/43124
Signed-off-by: Sam James <sam@gentoo.org>
2025-09-14 12:53:17 +01:00

39 lines
972 B
Diff

# Enable debug build (TODO: Is this needed?),
# fix library names, and don't install thirdparty
# libraries.
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@
-include user.make
ifndef build
- build := release
+ build := debug
endif
default: apps libs
@@ -311,10 +311,12 @@ ifeq ($(shared),yes)
endif
endif
else
- MUPDF_LIB = $(OUT)/libmupdf.a
- THIRD_LIB = $(OUT)/libmupdf-third.a
- $(MUPDF_LIB) : $(MUPDF_OBJ)
- $(THIRD_LIB) : $(THIRD_OBJ)
+ MUPDF_LIB = libmupdf.so.$(GENTOO_PV)
+ THIRD_LIB =
+ MUPDF_STATIC = $(OUT)/libmupdf.a
+ $(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_OBJ)
+ $(QUIET_LINK) $(CC) $(LDFLAGS) --shared -Wl,-soname -Wl,$(MUPDF_LIB) -o $@ $^ $(THIRD_LIBS) $(LIBS)
+ $(MUPDF_STATIC): $(MUPDF_OBJ) $(THIRD_OBJ)
endif
ifneq ($(USE_SYSTEM_GLUT),yes)
@@ -466,7 +468,6 @@ ifeq ($(shared),yes)
endif
else
install -m 644 $(MUPDF_LIB) $(DESTDIR)$(libdir)
- install -m 644 $(THIRD_LIB) $(DESTDIR)$(libdir)
endif
install-tools: tools