Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-util/eureka/files/, games-util/eureka/
Date: Fri, 08 May 2020 11:07:18
Message-Id: 1588936003.7c6510c00764dad11d3d1d6f1d02f013c0ed1d2e.chewi@gentoo
1 commit: 7c6510c00764dad11d3d1d6f1d02f013c0ed1d2e
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 8 11:06:43 2020 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Fri May 8 11:06:43 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c6510c0
7
8 games-util/eureka: New package
9
10 Package-Manager: Portage-2.3.99, Repoman-2.3.22
11 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
12
13 games-util/eureka/Manifest | 1 +
14 games-util/eureka/eureka-1.27b.ebuild | 52 +++++++++++++++++++
15 games-util/eureka/files/eureka-Makefile.patch | 74 +++++++++++++++++++++++++++
16 games-util/eureka/metadata.xml | 11 ++++
17 4 files changed, 138 insertions(+)
18
19 diff --git a/games-util/eureka/Manifest b/games-util/eureka/Manifest
20 new file mode 100644
21 index 00000000000..958451c501b
22 --- /dev/null
23 +++ b/games-util/eureka/Manifest
24 @@ -0,0 +1 @@
25 +DIST eureka-1.27b-source.tar.gz 1159366 BLAKE2B 00410b0cd53c907983241bf94c631c3068015e29ac947d092048a5701a4e0102d66d99134731b152a1310473dd30513e1fdc89bde82a5ede47185419575c9dd2 SHA512 4b2ce44a99acbe1b9dd2cf31ee5c3307f5f667422ba18bee8c3f9858e9244ee05c48e96b5afa4cdf65dfd079bca19a5693b6d123b5563549d1f84ca03137eb5e
26
27 diff --git a/games-util/eureka/eureka-1.27b.ebuild b/games-util/eureka/eureka-1.27b.ebuild
28 new file mode 100644
29 index 00000000000..f31ff7c9e48
30 --- /dev/null
31 +++ b/games-util/eureka/eureka-1.27b.ebuild
32 @@ -0,0 +1,52 @@
33 +# Copyright 1999-2020 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +inherit desktop toolchain-funcs xdg
39 +
40 +DESCRIPTION="Graphical map editor for games using the DOOM engine"
41 +HOMEPAGE="http://eureka-editor.sourceforge.net/"
42 +SRC_URI="mirror://sourceforge/${PN}-editor/Eureka/${PV%[a-z]}/${P}-source.tar.gz"
43 +LICENSE="GPL-2"
44 +SLOT="0"
45 +KEYWORDS="~amd64"
46 +IUSE="+opengl"
47 +
48 +DEPEND="
49 + media-libs/glu
50 + sys-libs/zlib
51 + x11-libs/fltk:1[opengl?]
52 + opengl? ( virtual/opengl )
53 +"
54 +
55 +RDEPEND="
56 + ${DEPEND}
57 +"
58 +
59 +S="${WORKDIR}/${P}-source"
60 +
61 +PATCHES=(
62 + "${FILESDIR}"/${PN}-Makefile.patch
63 +)
64 +
65 +DOCS=(
66 + AUTHORS.txt
67 + CHANGES.txt
68 + README.txt
69 + TODO.txt
70 +)
71 +
72 +src_compile() {
73 + emake \
74 + CXX="$(tc-getCXX)" \
75 + OPENGL="$(usex opengl 1 0)"
76 +}
77 +
78 +src_install() {
79 + emake install PREFIX="${ED}/usr"
80 + einstalldocs
81 +
82 + doicon -s 32 misc/${PN}.xpm
83 + domenu misc/${PN}.desktop
84 +}
85
86 diff --git a/games-util/eureka/files/eureka-Makefile.patch b/games-util/eureka/files/eureka-Makefile.patch
87 new file mode 100644
88 index 00000000000..567f5476c03
89 --- /dev/null
90 +++ b/games-util/eureka/files/eureka-Makefile.patch
91 @@ -0,0 +1,74 @@
92 +From faf9c604becc44135d6c5a7c8427982e203a327f Mon Sep 17 00:00:00 2001
93 +From: James Le Cuirot <chewi@g.o>
94 +Date: Fri, 8 May 2020 11:26:18 +0100
95 +Subject: [PATCH 1/2] Allow software rendering to be easily chosen over OpenGL
96 + with OPENGL=0
97 +
98 +---
99 + Makefile | 17 ++++++++++++-----
100 + 1 file changed, 12 insertions(+), 5 deletions(-)
101 +
102 +diff --git a/Makefile b/Makefile
103 +index ebbd53a4..adabaa92 100644
104 +--- a/Makefile
105 ++++ b/Makefile
106 +@@ -26,19 +26,26 @@ CPPFLAGS ?=
107 + LDFLAGS ?= $(OPTIMISE)
108 + LIBS ?=
109 +
110 ++# set this to 0 to use software rendering instead of OpenGL
111 ++OPENGL = 1
112 ++
113 + # general things needed by Eureka
114 + CXXFLAGS += $(CXX_DIALECT)
115 +-LIBS += -lGLU -lGL
116 + LIBS += -lz -lm
117 ++FLTK_CONFIG_FLAGS =
118 +
119 +-# add this for software rendering, remove '--use-gl' below, remove -lGL and -lGLU from LIBS
120 +-# CXXFLAGS += -DNO_OPENGL
121 ++ifeq ($(OPENGL),1)
122 ++LIBS += -lGLU -lGL
123 ++FLTK_CONFIG_FLAGS += --use-gl
124 ++else
125 ++CXXFLAGS += -DNO_OPENGL
126 ++endif
127 +
128 + # FLTK flags (this assumes a system-wide FLTK installation)
129 + FLTK_CONFIG ?= fltk-config
130 +
131 +-CXXFLAGS += $(shell $(FLTK_CONFIG) --use-images --use-gl --cxxflags)
132 +-LDFLAGS += $(shell $(FLTK_CONFIG) --use-images --use-gl --ldflags)
133 ++CXXFLAGS += $(shell $(FLTK_CONFIG) --use-images --cxxflags $(FLTK_CONFIG_FLAGS))
134 ++LDFLAGS += $(shell $(FLTK_CONFIG) --use-images --ldflags $(FLTK_CONFIG_FLAGS))
135 +
136 + # NOTE: the following is commented out since it does not work as expected.
137 + # the --libs option gives us static libraries, but --ldflags option
138 +--
139 +2.26.2
140 +
141 +From decee12e317e58128420771392b77c44a7c81122 Mon Sep 17 00:00:00 2001
142 +From: James Le Cuirot <chewi@g.o>
143 +Date: Fri, 8 May 2020 11:27:49 +0100
144 +Subject: [PATCH 2/2] Ensure bin directory is present before installing binary
145 +
146 +It might not be when using DESTDIR.
147 +---
148 + Makefile | 1 +
149 + 1 file changed, 1 insertion(+)
150 +
151 +diff --git a/Makefile b/Makefile
152 +index adabaa92..424ad4b5 100644
153 +--- a/Makefile
154 ++++ b/Makefile
155 +@@ -158,6 +158,7 @@ stripped: all
156 + INSTALL_DIR=$(DESTDIR)$(PREFIX)/share/eureka
157 +
158 + install: all
159 ++ install -d $(DESTDIR)$(PREFIX)/bin
160 + install -m 755 $(PROGRAM) $(DESTDIR)$(PREFIX)/bin/
161 + install -d $(INSTALL_DIR)/games
162 + install -d $(INSTALL_DIR)/common
163 +--
164 +2.26.2
165 +
166
167 diff --git a/games-util/eureka/metadata.xml b/games-util/eureka/metadata.xml
168 new file mode 100644
169 index 00000000000..d122d0e0090
170 --- /dev/null
171 +++ b/games-util/eureka/metadata.xml
172 @@ -0,0 +1,11 @@
173 +<?xml version="1.0" encoding="UTF-8"?>
174 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
175 +<pkgmetadata>
176 + <maintainer type="project">
177 + <email>games@g.o</email>
178 + <name>Gentoo Games Project</name>
179 + </maintainer>
180 + <upstream>
181 + <remote-id type="sourceforge">eureka-editor</remote-id>
182 + </upstream>
183 +</pkgmetadata>