pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

eureka-devel: Add opengl option



Module Name:	pkgsrc-wip
Committed By:	Michael Baeuerle <michael.baeuerle%stz-e.de@localhost>
Pushed By:	micha
Date:		Fri Nov 8 14:15:12 2019 +0100
Changeset:	f99bd242e83504c07d9982fb461ffe79db8e8b92

Modified Files:
	eureka-devel/Makefile
	eureka-devel/options.mk

Log Message:
eureka-devel: Add opengl option

Since version 1.25 Eureka uses an OpenGL renderer by default.

If FLTK is compiled without OpenGL support, this option is ignored.
If FLTK is compiled with OpenGL support, disabling this option forces
Eureka to use its software renderer (recommended without hardware
accelerationi for OpenGL).

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f99bd242e83504c07d9982fb461ffe79db8e8b92

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 eureka-devel/Makefile   | 19 +++++++++++++------
 eureka-devel/options.mk |  9 +++++++--
 2 files changed, 20 insertions(+), 8 deletions(-)

diffs:
diff --git a/eureka-devel/Makefile b/eureka-devel/Makefile
index 50a859a962..97079698ae 100644
--- a/eureka-devel/Makefile
+++ b/eureka-devel/Makefile
@@ -15,7 +15,8 @@ HOMEPAGE=	https://sourceforge.net/projects/eureka-editor/
 COMMENT=	Doom/Heretic/Hexen map editor
 LICENSE=	gnu-gpl-v2
 
-USE_LANGUAGES=	c++
+# Makefile declares "-std=c++03"
+USE_LANGUAGES=	c++03
 USE_TOOLS+=	gmake
 
 #WRKSRC=		${WRKDIR}/eureka-1.24-source
@@ -27,14 +28,14 @@ DOOMWADDIR=	share/doom
 # Modify internal search path to check ${PREFIX}/share hierarchy first
 SUBST_CLASSES+=		prefix
 SUBST_STAGE.prefix=	do-configure
-SUBST_MESSAGE.prefix=	Preparing main.cc file ...
+SUBST_MESSAGE.prefix=	Preparing main.cc ...
 SUBST_FILES.prefix=	src/main.cc
 SUBST_SED.prefix=	-e 's,PKGSRC_PREFIX,${PREFIX},'
 
 # Modify internal search path for DOOMWADDIR (if environment variable not set)
 SUBST_CLASSES+=		dwd
 SUBST_STAGE.dwd=	do-configure
-SUBST_MESSAGE.dwd=	Preparing m_files.cc file ...
+SUBST_MESSAGE.dwd=	Preparing m_files.cc ...
 SUBST_FILES.dwd=	src/m_files.cc
 SUBST_SED.dwd=		-e 's,PKGSRC_DOOMWADDIR,${PREFIX}/${DOOMWADDIR},'
 
@@ -42,12 +43,18 @@ SUBST_SED.dwd=		-e 's,PKGSRC_DOOMWADDIR,${PREFIX}/${DOOMWADDIR},'
 
 BUILDLINK_API_DEPENDS.zlib+=	zlib>=1.2.3
 .include "../../devel/zlib/buildlink3.mk"
-# FLTK must be compiled with OpenGL support
 # FLTK version 1.4 is supported too
 #.include "../../wip/fltk13/buildlink3.mk"
 .include "../../wip/fltk14-devel/buildlink3.mk"
-.if empty(PKG_OPTIONS.fltk14:Mopengl)
-PKG_FAIL_REASON+=	"FLTK must be compiled with \"opengl\" option."
+
+.if empty(PKG_OPTIONS.fltk14:Mopengl) || empty(PKG_OPTIONS:Mopengl)
+SUBST_CLASSES+=		opengl
+SUBST_STAGE.opengl=	do-configure
+SUBST_MESSAGE.opengl=	Preparing Makefile ...
+SUBST_FILES.opengl=	Makefile
+SUBST_SED.opengl=	-e 's,\# CXXFLAGS += -DNO_OPENGL,CXXFLAGS += -DNO_OPENGL,'
+SUBST_SED.opengl+=	-e 's, --use-gl,,'
 .endif
+
 .include "../../wip/mk/git-package.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/eureka-devel/options.mk b/eureka-devel/options.mk
index 9def5d7b48..73a2cd12c0 100644
--- a/eureka-devel/options.mk
+++ b/eureka-devel/options.mk
@@ -1,12 +1,17 @@
 # $NetBSD$
 
 PKG_OPTIONS_VAR=	PKG_OPTIONS.eureka-devel
-PKG_SUPPORTED_OPTIONS=	xdg-utils
-PKG_SUGGESTED_OPTIONS=	xdg-utils
+PKG_SUPPORTED_OPTIONS=	opengl xdg-utils
+PKG_SUGGESTED_OPTIONS=	opengl xdg-utils
 
 .include "../../mk/bsd.prefs.mk"
 .include "../../mk/bsd.options.mk"
 
+# opengl: Use OpenGL for drawing
+# If FLTK is compiled without opengl option, it is ignored.
+# If FLTK is compiled with opengl option, removing it here allows to force usage
+# of the software renderer (recommended without hardware acceleration).
+
 # xdg-utils: Create dependency for xdg-utils (Portland project)
 # Can be used by FLTK for fl_open_uri() on X11
 .if !empty(PKG_OPTIONS:Mxdg-utils)


Home | Main Index | Thread Index | Old Index