Gentoo Archives: gentoo-commits

From: Ionen Wolkens <ionen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-action/snipes/, games-action/snipes/files/
Date: Wed, 15 Sep 2021 21:20:17
Message-Id: 1631740749.2bcc305712bba0e7f340557771f03dcf11d7473c.ionen@gentoo
1 commit: 2bcc305712bba0e7f340557771f03dcf11d7473c
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 15 20:55:00 2021 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 15 21:19:09 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2bcc3057
7
8 games-action/snipes: EAPI6->8, fix building with lld
9
10 Also pass raw ldflags where they weren't used (side-needed for lld),
11 plus cleanup old tc-getLD most likely was meant to be tc-export.
12
13 HOMEPAGE seems gone, there is another very similar game on github
14 by the same name but it uses an entirely different code base and
15 does not seem to be the same project.
16
17 Closes: https://bugs.gentoo.org/730852
18 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
19
20 .../snipes/files/snipes-1.0.4-ldflags.patch | 9 ++++++
21 .../snipes/files/snipes-1.0.4-nongnulinker.patch | 20 -------------
22 games-action/snipes/snipes-1.0.4-r1.ebuild | 33 +++++++++++++---------
23 3 files changed, 28 insertions(+), 34 deletions(-)
24
25 diff --git a/games-action/snipes/files/snipes-1.0.4-ldflags.patch b/games-action/snipes/files/snipes-1.0.4-ldflags.patch
26 new file mode 100644
27 index 00000000000..af1f40d0291
28 --- /dev/null
29 +++ b/games-action/snipes/files/snipes-1.0.4-ldflags.patch
30 @@ -0,0 +1,9 @@
31 +"fake" flags cause non-gnu linkers to fail, and need a way to pass raw flags.
32 +https://bugs.gentoo.org/369287
33 +--- a/Makefile
34 ++++ b/Makefile
35 +@@ -54,3 +54,3 @@
36 + $(INTERMEDIATE)/%.o: $(IMG)/%.pbm
37 +- $(LD) -r -b binary -z noexecstack -z really_noexecstack -z pretty_please_noexecstack -o $@ $<
38 ++ $(LD) -r -b binary -z noexecstack $(RAW_LDFLAGS) -o $@ $<
39 +
40
41 diff --git a/games-action/snipes/files/snipes-1.0.4-nongnulinker.patch b/games-action/snipes/files/snipes-1.0.4-nongnulinker.patch
42 deleted file mode 100644
43 index 8bdaeef3e35..00000000000
44 --- a/games-action/snipes/files/snipes-1.0.4-nongnulinker.patch
45 +++ /dev/null
46 @@ -1,20 +0,0 @@
47 ---- a/Makefile 2011-12-18 17:24:28.795315064 +0100
48 -+++ b/Makefile 2011-12-18 17:24:59.005311478 +0100
49 -@@ -33,7 +33,7 @@
50 - IMGOBJ = $(OIMGS:%.pbm=$(INTERMEDIATE)/%.o)
51 -
52 - CFLAGS += `sdl-config --cflags` -I$(INTERMEDIATE)
53 --LDLIBS += `sdl-config --libs`
54 -+LDLIBS += `sdl-config --libs` -lm
55 - LDFLAGS += -Wl,-z,noexecstack
56 -
57 -
58 -@@ -52,7 +52,7 @@
59 -
60 - # Why does this result in an executable stack? Can I run my bitmaps? Do bitmaps behave like Conway's game of life, when run?
61 - $(INTERMEDIATE)/%.o: $(IMG)/%.pbm
62 -- $(LD) -r -b binary -z noexecstack -z really_noexecstack -z pretty_please_noexecstack -o $@ $<
63 -+ $(LD) -r -b binary -z noexecstack -o $@ $<
64 -
65 - snipes.6: snipes.6.in
66 - sed s/'`VERSION`'/`cat VERSION`/ < $< > $@
67
68 diff --git a/games-action/snipes/snipes-1.0.4-r1.ebuild b/games-action/snipes/snipes-1.0.4-r1.ebuild
69 index 666172514c6..6b6beac3a3a 100644
70 --- a/games-action/snipes/snipes-1.0.4-r1.ebuild
71 +++ b/games-action/snipes/snipes-1.0.4-r1.ebuild
72 @@ -1,35 +1,40 @@
73 -# Copyright 1999-2018 Gentoo Foundation
74 +# Copyright 1999-2021 Gentoo Authors
75 # Distributed under the terms of the GNU General Public License v2
76
77 -EAPI=6
78 +EAPI=8
79
80 -inherit desktop toolchain-funcs
81 +inherit desktop flag-o-matic toolchain-funcs
82
83 DESCRIPTION="2D scrolling shooter, resembles the old DOS game of same name"
84 -HOMEPAGE="https://cyp.github.com/snipes/"
85 -SRC_URI="https://cyp.github.com/snipes/${P}.tar.gz"
86 +HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
87 +SRC_URI="mirror://gentoo/${P}.tar.gz"
88
89 -LICENSE="GPL-2"
90 +LICENSE="GPL-2+"
91 SLOT="0"
92 KEYWORDS="~amd64 ~x86"
93 -IUSE=""
94
95 -DEPEND="media-libs/libsdl[sound,video]"
96 -RDEPEND=${DEPEND}
97 +RDEPEND="media-libs/libsdl[sound,video]"
98 +DEPEND="${RDEPEND}"
99
100 PATCHES=(
101 - "${FILESDIR}"/${P}-nongnulinker.patch
102 + "${FILESDIR}"/${P}-ldflags.patch
103 )
104
105 src_compile() {
106 - tc-getLD
107 - default
108 + tc-export CC LD
109 +
110 + # lld requires arch flags to be passed even if native (bug #730852)
111 + local archflags=
112 + tc-ld-is-lld && eval archflags=\${LDFLAGS_${ARCH}}
113 +
114 + LDLIBS=-lm emake RAW_LDFLAGS="${archflags} $(raw-ldflags)"
115 }
116
117 src_install() {
118 dobin snipes
119 doman snipes.6
120 - dodoc ChangeLog
121 + einstalldocs
122 +
123 doicon ${PN}.png
124 - make_desktop_entry snipes "Snipes"
125 + make_desktop_entry ${PN} ${PN^}
126 }