summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2020-05-08 12:06:43 +0100
committerJames Le Cuirot <chewi@gentoo.org>2020-05-08 12:06:43 +0100
commit7c6510c00764dad11d3d1d6f1d02f013c0ed1d2e (patch)
treee847a96ffd6780b28f167bd3dc4b911bee2bc42d /games-util
parentkde-misc/latte-dock: Drop 0.9.9 (diff)
downloadgentoo-7c6510c00764dad11d3d1d6f1d02f013c0ed1d2e.tar.gz
gentoo-7c6510c00764dad11d3d1d6f1d02f013c0ed1d2e.tar.bz2
gentoo-7c6510c00764dad11d3d1d6f1d02f013c0ed1d2e.zip
games-util/eureka: New package
Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'games-util')
-rw-r--r--games-util/eureka/Manifest1
-rw-r--r--games-util/eureka/eureka-1.27b.ebuild52
-rw-r--r--games-util/eureka/files/eureka-Makefile.patch74
-rw-r--r--games-util/eureka/metadata.xml11
4 files changed, 138 insertions, 0 deletions
diff --git a/games-util/eureka/Manifest b/games-util/eureka/Manifest
new file mode 100644
index 000000000000..958451c501be
--- /dev/null
+++ b/games-util/eureka/Manifest
@@ -0,0 +1 @@
+DIST eureka-1.27b-source.tar.gz 1159366 BLAKE2B 00410b0cd53c907983241bf94c631c3068015e29ac947d092048a5701a4e0102d66d99134731b152a1310473dd30513e1fdc89bde82a5ede47185419575c9dd2 SHA512 4b2ce44a99acbe1b9dd2cf31ee5c3307f5f667422ba18bee8c3f9858e9244ee05c48e96b5afa4cdf65dfd079bca19a5693b6d123b5563549d1f84ca03137eb5e
diff --git a/games-util/eureka/eureka-1.27b.ebuild b/games-util/eureka/eureka-1.27b.ebuild
new file mode 100644
index 000000000000..f31ff7c9e486
--- /dev/null
+++ b/games-util/eureka/eureka-1.27b.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit desktop toolchain-funcs xdg
+
+DESCRIPTION="Graphical map editor for games using the DOOM engine"
+HOMEPAGE="http://eureka-editor.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}-editor/Eureka/${PV%[a-z]}/${P}-source.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+opengl"
+
+DEPEND="
+ media-libs/glu
+ sys-libs/zlib
+ x11-libs/fltk:1[opengl?]
+ opengl? ( virtual/opengl )
+"
+
+RDEPEND="
+ ${DEPEND}
+"
+
+S="${WORKDIR}/${P}-source"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-Makefile.patch
+)
+
+DOCS=(
+ AUTHORS.txt
+ CHANGES.txt
+ README.txt
+ TODO.txt
+)
+
+src_compile() {
+ emake \
+ CXX="$(tc-getCXX)" \
+ OPENGL="$(usex opengl 1 0)"
+}
+
+src_install() {
+ emake install PREFIX="${ED}/usr"
+ einstalldocs
+
+ doicon -s 32 misc/${PN}.xpm
+ domenu misc/${PN}.desktop
+}
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
+
diff --git a/games-util/eureka/metadata.xml b/games-util/eureka/metadata.xml
new file mode 100644
index 000000000000..d122d0e0090e
--- /dev/null
+++ b/games-util/eureka/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">eureka-editor</remote-id>
+ </upstream>
+</pkgmetadata>