summary refs log tree commit diff
path: root/pkgs/applications/misc/mupdf/darwin.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/misc/mupdf/darwin.patch')
-rw-r--r--pkgs/applications/misc/mupdf/darwin.patch71
1 files changed, 27 insertions, 44 deletions
diff --git a/pkgs/applications/misc/mupdf/darwin.patch b/pkgs/applications/misc/mupdf/darwin.patch
index 7466fc2ca62b..be1b84b0012f 100644
--- a/pkgs/applications/misc/mupdf/darwin.patch
+++ b/pkgs/applications/misc/mupdf/darwin.patch
@@ -1,47 +1,30 @@
-diff --git a/Makerules b/Makerules
---- a/Makerules
-+++ b/Makerules
-@@ -81,22 +81,10 @@ HAVE_GLUT ?= yes
- SYS_GLUT_CFLAGS := -Wno-deprecated-declarations
- SYS_GLUT_LIBS := -framework GLUT -framework OpenGL
- 
--CC = xcrun cc
--AR = xcrun ar
--LD = xcrun ld
--RANLIB_CMD = xcrun ranlib $@
--
--# Linux uses pkg-config for system libraries.
--else ifeq "$(OS)" "Linux"
+diff -ruN mupdf-1.14.0-source.orig/Makerules mupdf-1.14.0-source/Makerules
+--- mupdf-1.14.0-source.orig/Makerules	2018-11-02 06:57:12.114012496 +0100
++++ mupdf-1.14.0-source/Makerules	2018-11-02 10:11:56.717232992 +0100
+@@ -80,13 +80,6 @@
+   HAVE_GLUT := yes
+   SYS_GLUT_CFLAGS := -Wno-deprecated-declarations
+   SYS_GLUT_LIBS := -framework GLUT -framework OpenGL
+-  CC = xcrun cc
+-  AR = xcrun ar
+-  LD = xcrun ld
+-  RANLIB = xcrun ranlib
 -
- HAVE_PTHREAD := yes
- SYS_PTHREAD_CFLAGS :=
- SYS_PTHREAD_LIBS := -lpthread
+-else ifeq ($(OS),Linux)
+-  HAVE_OBJCOPY := yes
  
--HAVE_GLUT := yes
--SYS_GLUT_CFLAGS :=
--SYS_GLUT_LIBS := -lglut -lGL
--
- ifeq "$(shell pkg-config --exists 'libcrypto >= 1.1.0' && echo yes)" "yes"
- HAVE_LIBCRYPTO := yes
- SYS_LIBCRYPTO_CFLAGS := -DHAVE_LIBCRYPTO $(shell pkg-config --cflags libcrypto)
-@@ -113,7 +101,7 @@ SYS_CURL_CFLAGS += $(shell pkg-config --cflags openssl)
- SYS_CURL_DEPS += $(shell pkg-config --libs openssl)
- endif
- endif
--SYS_CURL_DEPS += -lpthread -lrt
-+SYS_CURL_DEPS += -lpthread
+   ifeq ($(shell pkg-config --exists freetype2 && echo yes),yes)
+ 	SYS_FREETYPE_CFLAGS := $(shell pkg-config --cflags freetype2)
+@@ -119,12 +112,6 @@
+ 	SYS_CURL_LIBS := $(shell pkg-config --libs libcurl)
+   endif
  
- ifeq "$(shell pkg-config --exists x11 xext && echo yes)" "yes"
- HAVE_X11 := yes
-diff --git a/platform/gl/gl-main.c b/platform/gl/gl-main.c
-index d58f7ba..808af18 100644
---- a/platform/gl/gl-main.c
-+++ b/platform/gl/gl-main.c
-@@ -16,6 +16,7 @@ void glutExit(void) {}
- void glutMouseWheelFunc(void *fn) {}
- void glutInitErrorFunc(void *fn) {}
- void glutInitWarningFunc(void *fn) {}
-+#define glutSetOption(X,Y)
- #endif
- 
- enum
+-  HAVE_GLUT := yes
+-  ifeq ($(HAVE_GLUT),yes)
+-	SYS_GLUT_CFLAGS :=
+-	SYS_GLUT_LIBS := -lglut -lGL
+-  endif
+-
+   HAVE_X11 := $(shell pkg-config --exists x11 xext && echo yes)
+   ifeq ($(HAVE_X11),yes)
+ 	X11_CFLAGS := $(shell pkg-config --cflags x11 xext)