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).
This commit is contained in:
Michael Baeuerle 2019-11-08 14:15:12 +01:00
parent dc1b590921
commit f99bd242e8
2 changed files with 20 additions and 8 deletions

View File

@ -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"

View File

@ -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)