diff options
Diffstat (limited to 'games-util/eureka/files/eureka-Makefile.patch')
-rw-r--r-- | games-util/eureka/files/eureka-Makefile.patch | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/games-util/eureka/files/eureka-Makefile.patch b/games-util/eureka/files/eureka-Makefile.patch new file mode 100644 index 000000000000..567f5476c037 --- /dev/null +++ b/games-util/eureka/files/eureka-Makefile.patch @@ -0,0 +1,74 @@ +From faf9c604becc44135d6c5a7c8427982e203a327f Mon Sep 17 00:00:00 2001 +From: James Le Cuirot <chewi@gentoo.org> +Date: Fri, 8 May 2020 11:26:18 +0100 +Subject: [PATCH 1/2] Allow software rendering to be easily chosen over OpenGL + with OPENGL=0 + +--- + Makefile | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) + +diff --git a/Makefile b/Makefile +index ebbd53a4..adabaa92 100644 +--- a/Makefile ++++ b/Makefile +@@ -26,19 +26,26 @@ CPPFLAGS ?= + LDFLAGS ?= $(OPTIMISE) + LIBS ?= + ++# set this to 0 to use software rendering instead of OpenGL ++OPENGL = 1 ++ + # general things needed by Eureka + CXXFLAGS += $(CXX_DIALECT) +-LIBS += -lGLU -lGL + LIBS += -lz -lm ++FLTK_CONFIG_FLAGS = + +-# add this for software rendering, remove '--use-gl' below, remove -lGL and -lGLU from LIBS +-# CXXFLAGS += -DNO_OPENGL ++ifeq ($(OPENGL),1) ++LIBS += -lGLU -lGL ++FLTK_CONFIG_FLAGS += --use-gl ++else ++CXXFLAGS += -DNO_OPENGL ++endif + + # FLTK flags (this assumes a system-wide FLTK installation) + FLTK_CONFIG ?= fltk-config + +-CXXFLAGS += $(shell $(FLTK_CONFIG) --use-images --use-gl --cxxflags) +-LDFLAGS += $(shell $(FLTK_CONFIG) --use-images --use-gl --ldflags) ++CXXFLAGS += $(shell $(FLTK_CONFIG) --use-images --cxxflags $(FLTK_CONFIG_FLAGS)) ++LDFLAGS += $(shell $(FLTK_CONFIG) --use-images --ldflags $(FLTK_CONFIG_FLAGS)) + + # NOTE: the following is commented out since it does not work as expected. + # the --libs option gives us static libraries, but --ldflags option +-- +2.26.2 + +From decee12e317e58128420771392b77c44a7c81122 Mon Sep 17 00:00:00 2001 +From: James Le Cuirot <chewi@gentoo.org> +Date: Fri, 8 May 2020 11:27:49 +0100 +Subject: [PATCH 2/2] Ensure bin directory is present before installing binary + +It might not be when using DESTDIR. +--- + Makefile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Makefile b/Makefile +index adabaa92..424ad4b5 100644 +--- a/Makefile ++++ b/Makefile +@@ -158,6 +158,7 @@ stripped: all + INSTALL_DIR=$(DESTDIR)$(PREFIX)/share/eureka + + install: all ++ install -d $(DESTDIR)$(PREFIX)/bin + install -m 755 $(PROGRAM) $(DESTDIR)$(PREFIX)/bin/ + install -d $(INSTALL_DIR)/games + install -d $(INSTALL_DIR)/common +-- +2.26.2 + |