1 |
commit: eb100a85c7481ac78d7c95f035924f267aca798a |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 30 08:30:36 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 30 08:30:53 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb100a85 |
7 |
|
8 |
app-emulation/simh: bump up to 3.11.0, take package |
9 |
|
10 |
Reported-by: https://bugs.gentoo.org/706866 |
11 |
Closes: https://bugs.gentoo.org/706866 |
12 |
Package-Manager: Portage-2.3.86, Repoman-2.3.20 |
13 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
14 |
|
15 |
app-emulation/simh/Manifest | 1 + |
16 |
app-emulation/simh/files/simh-3.11.0-fcommon.patch | 37 +++++++++++++ |
17 |
.../simh/files/simh-3.11.0-fix-mkdir-race.patch | 11 ++++ |
18 |
.../simh/files/simh-3.11.0-respect-FLAGS.patch | 13 +++++ |
19 |
app-emulation/simh/metadata.xml | 5 +- |
20 |
app-emulation/simh/simh-3.11.0.ebuild | 62 ++++++++++++++++++++++ |
21 |
6 files changed, 128 insertions(+), 1 deletion(-) |
22 |
|
23 |
diff --git a/app-emulation/simh/Manifest b/app-emulation/simh/Manifest |
24 |
index 5da6120f5d2..881e4b244a1 100644 |
25 |
--- a/app-emulation/simh/Manifest |
26 |
+++ b/app-emulation/simh/Manifest |
27 |
@@ -1 +1,2 @@ |
28 |
+DIST simhv311-0.zip 2790607 BLAKE2B f9399977093f07d7f58067ed40e22f60e43228bbb1e0fdaa6b04408956962d9ea14b6dc57d758b819cee59f3bade9505a6802d42804df49622990402c0f22600 SHA512 e5fb6915c050e7402363cd9c1f99feb00874c3693905067ce901ffa86fc29a0cd2648684f111216b09a3c847f75812e2db2e2f2fa9f9d0db5dc932d53ec832fa |
29 |
DIST simhv39-0.zip 3103657 BLAKE2B 3b5fcaa7f1aa24bd5afa78452fb2d5e2822654bcaa3caa478dbdf939770c13f7f1d3f95859674fc02e2cc35a4cfff239bb9ee6a726fb9e31586f639cdf40ca10 SHA512 5e8cbf92e980b7cb40d68ff60a266f70c0bef0eecdc169a8077ae72a6a71fe12a7be5c62bd033ca36727e2cb8f266a5a6f8a5ed6dd509afbf0a9d7b618f1a4f6 |
30 |
|
31 |
diff --git a/app-emulation/simh/files/simh-3.11.0-fcommon.patch b/app-emulation/simh/files/simh-3.11.0-fcommon.patch |
32 |
new file mode 100644 |
33 |
index 00000000000..b23866aaab4 |
34 |
--- /dev/null |
35 |
+++ b/app-emulation/simh/files/simh-3.11.0-fcommon.patch |
36 |
@@ -0,0 +1,37 @@ |
37 |
+From ca4b7338836edb7325c82f86dccdeb4808cb4a89 Mon Sep 17 00:00:00 2001 |
38 |
+From: Mark Pizzolato <mark@××××××××.com> |
39 |
+Date: Wed, 29 Jan 2020 11:39:36 -0800 |
40 |
+Subject: [PATCH] makefile: Force gcc/clang -fcommon to address future gcc |
41 |
+ -fno-common default |
42 |
+ |
43 |
+as reported and discussed in #794 |
44 |
+--- |
45 |
+ makefile | 7 +++++++ |
46 |
+ 1 file changed, 7 insertions(+) |
47 |
+ |
48 |
+--- a/makefile |
49 |
++++ b/makefile |
50 |
+@@ -506,9 +506,13 @@ else |
51 |
+ ifneq (3,$(GCC_MAJOR_VERSION)) |
52 |
+ ifeq (,$(GCC_OPTIMIZERS_CMD)) |
53 |
+ GCC_OPTIMIZERS_CMD = $(GCC) --help=optimizers |
54 |
++ GCC_COMMON_CMD = $(GCC) --help=common |
55 |
+ endif |
56 |
+ GCC_OPTIMIZERS = $(shell $(GCC_OPTIMIZERS_CMD)) |
57 |
+ endif |
58 |
++ ifneq (,$(GCC_COMMON_CMD)) |
59 |
++ GCC_OPTIMIZERS += $(shell $(GCC_COMMON_CMD)) |
60 |
++ endif |
61 |
+ ifneq (,$(findstring $(GCC_VERSION),$(LTO_EXCLUDE_VERSIONS))) |
62 |
+ NO_LTO = 1 |
63 |
+ endif |
64 |
+@@ -530,6 +534,9 @@ else |
65 |
+ ifneq (,$(findstring -fstrict-overflow,$(GCC_OPTIMIZERS))) |
66 |
+ CFLAGS_O += -fno-strict-overflow |
67 |
+ endif |
68 |
++ ifneq (,$(findstring -fcommon,$(GCC_OPTIMIZERS))$(findstring -fno-common,$(GCC_OPTIMIZERS))) |
69 |
++ CFLAGS_O += -fcommon |
70 |
++ endif |
71 |
+ ifeq (,$(NO_LTO)) |
72 |
+ ifneq (,$(findstring -flto,$(GCC_OPTIMIZERS))) |
73 |
+ CFLAGS_O += -flto -fwhole-program |
74 |
|
75 |
diff --git a/app-emulation/simh/files/simh-3.11.0-fix-mkdir-race.patch b/app-emulation/simh/files/simh-3.11.0-fix-mkdir-race.patch |
76 |
new file mode 100644 |
77 |
index 00000000000..e2b1b5547ef |
78 |
--- /dev/null |
79 |
+++ b/app-emulation/simh/files/simh-3.11.0-fix-mkdir-race.patch |
80 |
@@ -0,0 +1,11 @@ |
81 |
+--- simh-3.9.0/makefile |
82 |
++++ simh-3.9.0/makefile |
83 |
+@@ -249,7 +249,7 @@ |
84 |
+ NETWORK_OPT = $(NETWORK_CCDEFS) |
85 |
+ endif |
86 |
+ ifneq (binexists,$(shell if $(TEST) -e BIN; then echo binexists; fi)) |
87 |
+- MKDIRBIN = if $(TEST) ! -e BIN; then mkdir BIN; fi |
88 |
++ MKDIRBIN = mkdir -p BIN |
89 |
+ endif |
90 |
+ else |
91 |
+ #Win32 Environments (via MinGW32) |
92 |
|
93 |
diff --git a/app-emulation/simh/files/simh-3.11.0-respect-FLAGS.patch b/app-emulation/simh/files/simh-3.11.0-respect-FLAGS.patch |
94 |
new file mode 100644 |
95 |
index 00000000000..0ceca7b0abf |
96 |
--- /dev/null |
97 |
+++ b/app-emulation/simh/files/simh-3.11.0-respect-FLAGS.patch |
98 |
@@ -0,0 +1,13 @@ |
99 |
+--- a/makefile |
100 |
++++ b/makefile |
101 |
+@@ -497,8 +497,8 @@ ifneq ($(DEBUG),) |
102 |
+ CFLAGS_O = -O0 |
103 |
+ BUILD_FEATURES = - debugging support |
104 |
+ else |
105 |
+- CFLAGS_O = -O2 |
106 |
+- LDFLAGS_O = |
107 |
++ CFLAGS_O ?= -O2 |
108 |
++ LDFLAGS_O ?= |
109 |
+ ifeq (Darwin,$(OSTYPE)) |
110 |
+ NO_LTO = 1 |
111 |
+ endif |
112 |
|
113 |
diff --git a/app-emulation/simh/metadata.xml b/app-emulation/simh/metadata.xml |
114 |
index 7a38bb90096..c5298995d2d 100644 |
115 |
--- a/app-emulation/simh/metadata.xml |
116 |
+++ b/app-emulation/simh/metadata.xml |
117 |
@@ -1,5 +1,8 @@ |
118 |
<?xml version="1.0" encoding="UTF-8"?> |
119 |
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
120 |
<pkgmetadata> |
121 |
- <!-- maintainer-needed --> |
122 |
+ <maintainer type="person"> |
123 |
+ <email>slyfox@g.o</email> |
124 |
+ <name>Sergei Trofimovich</name> |
125 |
+ </maintainer> |
126 |
</pkgmetadata> |
127 |
|
128 |
diff --git a/app-emulation/simh/simh-3.11.0.ebuild b/app-emulation/simh/simh-3.11.0.ebuild |
129 |
new file mode 100644 |
130 |
index 00000000000..5c9e5593eac |
131 |
--- /dev/null |
132 |
+++ b/app-emulation/simh/simh-3.11.0.ebuild |
133 |
@@ -0,0 +1,62 @@ |
134 |
+# Copyright 1999-2020 Gentoo Authors |
135 |
+# Distributed under the terms of the GNU General Public License v2 |
136 |
+ |
137 |
+EAPI=7 |
138 |
+ |
139 |
+inherit toolchain-funcs |
140 |
+ |
141 |
+MY_P="${PN}v$(ver_rs 1 '' 2 '-')" # 'a.b.c' -> 'ab-c' |
142 |
+DESCRIPTION="a simulator for historical computers such as Vax, PDP-11 etc.)" |
143 |
+HOMEPAGE="http://simh.trailing-edge.com/" |
144 |
+SRC_URI="http://simh.trailing-edge.com/sources/${MY_P}.zip" |
145 |
+ |
146 |
+LICENSE="MIT" |
147 |
+SLOT="0" |
148 |
+KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" |
149 |
+IUSE="" |
150 |
+ |
151 |
+RDEPEND="net-libs/libpcap" |
152 |
+DEPEND="${RDEPEND} |
153 |
+ app-arch/unzip" |
154 |
+ |
155 |
+S=${WORKDIR}/sim |
156 |
+ |
157 |
+PATCHES=( |
158 |
+ "${FILESDIR}"/${PN}-3.11.0-respect-FLAGS.patch |
159 |
+ "${FILESDIR}"/${PN}-3.11.0-fix-mkdir-race.patch |
160 |
+ "${FILESDIR}"/${PN}-3.11.0-fcommon.patch |
161 |
+) |
162 |
+ |
163 |
+src_prepare() { |
164 |
+ default |
165 |
+ |
166 |
+ # fix linking on Darwin |
167 |
+ if [[ ${CHOST} == *-darwin* ]] ; then |
168 |
+ sed -e 's/-lrt//g' \ |
169 |
+ -i makefile || die |
170 |
+ fi |
171 |
+} |
172 |
+ |
173 |
+src_compile() { |
174 |
+ export GCC="$(tc-getCC)" |
175 |
+ export LDFLAGS_O="${LDFLAGS}" |
176 |
+ export CFLAGS_O="${CFLAGS}" |
177 |
+ |
178 |
+ local my_makeopts="USE_NETWORK=1" |
179 |
+ if tc-is-gcc && ver_test $(gcc-version) -lt 4.6 ; then |
180 |
+ my_makeopts+=" NO_LTO=1" |
181 |
+ fi |
182 |
+ |
183 |
+ emake ${my_makeopts} |
184 |
+} |
185 |
+ |
186 |
+src_install() { |
187 |
+ for BINFILE in BIN/* ; do |
188 |
+ newbin ${BINFILE} "simh-$(basename ${BINFILE})" |
189 |
+ done |
190 |
+ |
191 |
+ insinto /usr/share/simh |
192 |
+ doins VAX/*.bin |
193 |
+ |
194 |
+ dodoc *.txt */*.txt |
195 |
+} |