@@ -, +, @@ --- graphics/mupdf/Makefile | 9 ++++++--- graphics/mupdf/files/patch-Makerules | 2 +- graphics/mupdf/files/patch-Makethird | 19 +++++++++++++++++++ 3 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 graphics/mupdf/files/patch-Makethird --- b/graphics/mupdf/Makefile +++ b/graphics/mupdf/Makefile @@ -22,8 +22,8 @@ LIB_DEPENDS= libcurl.so:ftp/curl \ libopenjp2.so:graphics/openjpeg USES= cpe compiler:c++11-lang gl gmake jpeg pkgconfig xorg -USE_XORG= x11 xcursor xext xinerama xrandr -USE_GL= gl glut +USE_XORG= ice x11 xcursor xext xi xinerama xrandr +USE_GL= gl glu USE_LDCONFIG= yes CPE_VENDOR= artifex @@ -33,7 +33,7 @@ CFLAGS+= `pkg-config --cflags libopenjp2` LDFLAGS+= `pkg-config --libs libjpeg libopenjp2` -ljbig2dec MAKE_ARGS= build=release prefix=${PREFIX} mandir=${PREFIX}/man verbose=yes \ - XCFLAGS+="-I${WRKSRC}/include/mupdf -fPIC" \ + XCFLAGS+="-I${WRKSRC}/include/mupdf -I${WRKSRC}/thirdparty/freeglut/include -fPIC" \ XLIBS+="-L${LOCALBASE}/lib -L${WRKSRC}/build/release" \ SOVERSION=${DISTVERSION} ALL_TARGET= all extra-libs @@ -52,6 +52,9 @@ PLIST_SUB= SOVERSION=${PORTVERSION} post-patch: @${REINPLACE_CMD} -e 's/-pipe -O2//' -e 's/-ldl//' ${WRKSRC}/Makerules + @(cd ${WRKSRC}/thirdparty/freeglut/src && \ + ${REINPLACE_CMD} -E 's/defined *\( *__FreeBSD(_kernel)?__ *\)/0/g' \ + fg_internal.h fg_joystick.c x11/fg_internal_x11.h x11/fg_joystick_x11.c) post-install: ${MV} ${STAGEDIR}${PREFIX}/bin/mupdf-x11 \ --- b/graphics/mupdf/files/patch-Makerules +++ b/graphics/mupdf/files/patch-Makerules @@ -61,7 +61,7 @@ + SYS_FREETYPE_LIBS := $(shell pkg-config --libs freetype2) + # glut + HAVE_GLUT := yes -+ USE_SYSTEM_GLUT := yes ++ USE_SYSTEM_GLUT := no + SYS_GLUT_CFLAGS := + SYS_GLUT_LIBS := -lglut -lGL + # harfbuzz --- /dev/null +++ b/graphics/mupdf/files/patch-Makethird @@ -0,0 +1,19 @@ +--- Makethird.orig 2020-11-21 14:51:06 UTC ++++ Makethird +@@ -436,6 +436,7 @@ GLUT_OBJ := $(GLUT_SRC:%.c=$(OUT)/%.o) + + LOCAL_GLUT_CFLAGS += -Ithirdparty/freeglut/include + LOCAL_GLUT_CFLAGS += -Ithirdparty/freeglut/src ++LOCAL_GLUT_CFLAGS += $(shell pkgconf --cflags gl) + LOCAL_GLUT_CFLAGS += -DHAVE_UNISTD_H -DHAVE_STDINT_H -DHAVE_X11_EXTENSIONS_XRANDR_H + LOCAL_GLUT_CFLAGS += -Wno-sign-compare + +@@ -447,7 +448,7 @@ $(OUT)/thirdparty/freeglut/%.o: thirdpar + $(CC_CMD) $(LIB_CFLAGS) $(LOCAL_GLUT_CFLAGS) + + GLUT_CFLAGS := -Ithirdparty/freeglut/include +-GLUT_LIBS := -lGL -lX11 -lXrandr ++GLUT_LIBS := $(shell pkgconf --libs gl) -lX11 -lXrandr + + endif + --