pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
mupdf: Add support for the `opengl' option via graphics/glut
Module Name: pkgsrc-wip
Committed By: Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By: leot
Date: Fri Dec 1 15:42:53 2017 +0100
Changeset: 1e0c54fad27403e5383c445655c0eef925b99a67
Modified Files:
mupdf/PLIST
mupdf/buildlink3.mk
mupdf/distinfo
mupdf/options.mk
mupdf/patches/patch-ab
Added Files:
mupdf/patches/patch-platform_gl_gl-app.h
Removed Files:
mupdf/TODO
Log Message:
mupdf: Add support for the `opengl' option via graphics/glut
- Get rid of `glfw' option, since 1.12 release the glfw support is no longer
available and glut is used instead.
- Adjust patch/patch-ab to request `glut' information via pkg-config, not
`freeglut' ones.
- Add patches/patch-platform_gl_gl-app.h to avoid forcing every non-APPLE
platforms to use freeglut implementation and to properly include
<GL/glut.h>.
- Adjust PLIST, options.mk and buildlink3.mk for the `opengl' option.
- Delete TODO, also the `opengl' option now works!
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=1e0c54fad27403e5383c445655c0eef925b99a67
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
mupdf/PLIST | 2 +-
mupdf/TODO | 1 -
mupdf/buildlink3.mk | 4 ++--
mupdf/distinfo | 3 ++-
mupdf/options.mk | 13 ++++++-------
mupdf/patches/patch-ab | 6 +++---
mupdf/patches/patch-platform_gl_gl-app.h | 20 ++++++++++++++++++++
7 files changed, 34 insertions(+), 15 deletions(-)
diffs:
diff --git a/mupdf/PLIST b/mupdf/PLIST
index 035e06f766..98872762ad 100644
--- a/mupdf/PLIST
+++ b/mupdf/PLIST
@@ -2,7 +2,7 @@
bin/mjsgen
bin/mujstest
bin/mupdf
-${PLIST.glfw}bin/mupdf-gl
+${PLIST.opengl}bin/mupdf-gl
bin/muraster
bin/mutool
include/mupdf/fitz.h
diff --git a/mupdf/TODO b/mupdf/TODO
deleted file mode 100644
index 7d90ebfb97..0000000000
--- a/mupdf/TODO
+++ /dev/null
@@ -1 +0,0 @@
-- Adjust for `glfw -> freeglut' transition and test it
diff --git a/mupdf/buildlink3.mk b/mupdf/buildlink3.mk
index 26d5989882..050ec501ad 100644
--- a/mupdf/buildlink3.mk
+++ b/mupdf/buildlink3.mk
@@ -16,9 +16,9 @@ pkgbase := mupdf
.include "../../www/curl/buildlink3.mk"
.endif
-.if !empty(PKG_BUILD_OPTIONS.mupdf:Mglfw)
+.if !empty(PKG_BUILD_OPTIONS.mupdf:Mopengl)
.include "../../graphics/MesaLib/buildlink3.mk"
-.include "../../graphics/glfw/buildlink3.mk"
+.include "../../graphics/glut/buildlink3.mk"
.endif
.include "../../devel/zlib/buildlink3.mk"
diff --git a/mupdf/distinfo b/mupdf/distinfo
index 85be72b361..3b29d5a540 100644
--- a/mupdf/distinfo
+++ b/mupdf/distinfo
@@ -5,8 +5,9 @@ RMD160 (mupdf-1.12-rc1-source.tar.gz) = 10c00e49e282f4475920cfdfdac38f765e254930
SHA512 (mupdf-1.12-rc1-source.tar.gz) = 12b232224b2a73794e3a70270b3dd3d6cdb51400c8ec421f2d96436ec5f221f567634851a9892e60a3fe39d74def6f2c666e301fa6f40c4f28e6a26b5dd5deb6
Size (mupdf-1.12-rc1-source.tar.gz) = 51372273 bytes
SHA1 (patch-Makethird) = 77820f7344e00140a9792b5a6a3ddb1afa01b7bb
-SHA1 (patch-ab) = 15e93808a811f45e4c56568a416c541ffc7bb509
+SHA1 (patch-ab) = 755cb079c820240e7a3fba0cf16427fdba693dfd
SHA1 (patch-ac) = 799efd894505fd960953905e61022411e8adf1ef
SHA1 (patch-ae) = c6b113818b32cb4470e8549c00a16e0b2f364ede
+SHA1 (patch-platform_gl_gl-app.h) = 6e5e547df27ecb2b82cadd71489d2eb9138c1ce2
SHA1 (patch-source_fitz_load-jpx.c) = 4170091042ca3c7d43f5adeeb4cf5b71d8d27e15
SHA1 (patch-thirdparty_mujs_Makefile) = 713946f25ae1ea44878b19b9430324e3d9f98990
diff --git a/mupdf/options.mk b/mupdf/options.mk
index fce0fd513c..031a4bf803 100644
--- a/mupdf/options.mk
+++ b/mupdf/options.mk
@@ -1,11 +1,11 @@
# $NetBSD: options.mk,v 1.5 2017/04/12 13:03:08 leot Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.mupdf
-PKG_SUPPORTED_OPTIONS= curl glfw
+PKG_SUPPORTED_OPTIONS= curl opengl
.include "../../mk/bsd.options.mk"
-PLIST_VARS+= glfw
+PLIST_VARS+= opengl
#
# curl support
@@ -15,11 +15,10 @@ PLIST_VARS+= glfw
.endif
#
-# glfw support
+# glut support
#
-.if !empty(PKG_OPTIONS:Mglfw)
-PLIST.glfw= yes
+.if !empty(PKG_OPTIONS:Mopengl)
+PLIST.opengl= yes
.include "../../graphics/MesaLib/buildlink3.mk"
-BUILDLINK_API_DEPENDS.glfw+= glfw>=3.2.1
-.include "../../graphics/glfw/buildlink3.mk"
+.include "../../graphics/glut/buildlink3.mk"
.endif
diff --git a/mupdf/patches/patch-ab b/mupdf/patches/patch-ab
index 4c898b47b7..ca4d792226 100644
--- a/mupdf/patches/patch-ab
+++ b/mupdf/patches/patch-ab
@@ -64,10 +64,10 @@ $NetBSD: patch-ab,v 1.15 2017/05/19 18:00:38 fhajny Exp $
SYS_X11_LIBS := $(shell pkg-config --libs x11 xext)
endif
-+ifeq "$(shell pkg-config --exists freeglut && pkg-config --exists gl && echo yes)" "yes"
++ifeq "$(shell pkg-config --exists glut && pkg-config --exists gl && echo yes)" "yes"
+HAVE_GLUT := yes
-+SYS_GLUT_CFLAGS := $(shell pkg-config --cflags freeglut)
-+SYS_GLUT_LIBS := $(shell pkg-config --libs freeglut)
++SYS_GLUT_CFLAGS := $(shell pkg-config --cflags glut)
++SYS_GLUT_LIBS := $(shell pkg-config --libs glut)
+endif
+
ifeq "$(shell pkg-config --exists harfbuzz && echo yes)" "yes"
diff --git a/mupdf/patches/patch-platform_gl_gl-app.h b/mupdf/patches/patch-platform_gl_gl-app.h
new file mode 100644
index 0000000000..6269f6a1f6
--- /dev/null
+++ b/mupdf/patches/patch-platform_gl_gl-app.h
@@ -0,0 +1,20 @@
+$NetBSD$
+
+- Do not force freeglut GLUT implementation to every non-APPLE platforms.
+- Adjust the glut.h include.
+
+--- platform/gl/gl-app.h.orig 2017-11-23 11:42:45.000000000 +0000
++++ platform/gl/gl-app.h
+@@ -7,11 +7,7 @@ int win_open_file(char *buf, int len);
+ #include "mupdf/fitz.h"
+ #include "mupdf/ucdn.h"
+
+-#ifndef __APPLE__
+-#include <GL/freeglut.h>
+-#else
+-#include <GLUT/glut.h>
+-#endif
++#include <GL/glut.h>
+
+ extern fz_context *ctx;
+
Home |
Main Index |
Thread Index |
Old Index