summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Mende <angelos@gentoo.org>2009-01-04 14:40:35 +0000
committerChristoph Mende <angelos@gentoo.org>2009-01-04 14:40:35 +0000
commit107bd344f328ad858f376a2a49c338478f9e02e3 (patch)
tree2e6e2ac98b80efb1078074fd4f0a012c7dec622b /app-emulation/simh
parentStable on sparc, bug #249464 (diff)
downloadgentoo-2-107bd344f328ad858f376a2a49c338478f9e02e3.tar.gz
gentoo-2-107bd344f328ad858f376a2a49c338478f9e02e3.tar.bz2
gentoo-2-107bd344f328ad858f376a2a49c338478f9e02e3.zip
QA: Define IUSE, use edos2unix, respect CC, respect CFLAGS, fix compilation with --as-needed (bug 246890)
(Portage version: 2.2_rc20/cvs/Linux 2.6.28 x86_64)
Diffstat (limited to 'app-emulation/simh')
-rw-r--r--app-emulation/simh/ChangeLog9
-rw-r--r--app-emulation/simh/files/simh-3.7.0-asneeded.patch168
-rw-r--r--app-emulation/simh/simh-3.7.0.ebuild17
3 files changed, 186 insertions, 8 deletions
diff --git a/app-emulation/simh/ChangeLog b/app-emulation/simh/ChangeLog
index 6f64323ce563..157df2c639db 100644
--- a/app-emulation/simh/ChangeLog
+++ b/app-emulation/simh/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for app-emulation/simh
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/simh/ChangeLog,v 1.8 2008/02/05 21:30:34 grobian Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/simh/ChangeLog,v 1.9 2009/01/04 14:40:35 angelos Exp $
+
+ 04 Jan 2009; Christoph Mende <angelos@gentoo.org>
+ +files/simh-3.7.0-asneeded.patch, simh-3.7.0.ebuild:
+ QA: Define IUSE, use edos2unix, respect CC, respect CFLAGS, fix
+ compilation with --as-needed (bug 246890)
05 Feb 2008; Fabian Groffen <grobian@gentoo.org> simh-3.5.2.ebuild,
simh-3.7.0.ebuild:
diff --git a/app-emulation/simh/files/simh-3.7.0-asneeded.patch b/app-emulation/simh/files/simh-3.7.0-asneeded.patch
new file mode 100644
index 000000000000..fd64bbbfdff5
--- /dev/null
+++ b/app-emulation/simh/files/simh-3.7.0-asneeded.patch
@@ -0,0 +1,168 @@
+--- makefile.orig 2009-01-04 15:20:55.353840670 +0100
++++ makefile 2009-01-04 15:22:32.340991641 +0100
+@@ -10,7 +10,8 @@
+ else
+ OS_CCDEFS = -D_GNU_SOURCE
+ endif
+-CC = x86_64-pc-linux-gnu-gcc -std=c99 -march=native -Os -pipe -U__STRICT_ANSI__ -lm -lrt $(OS_CCDEFS) -I .
++CC = x86_64-pc-linux-gnu-gcc -std=c99 -march=native -Os -pipe -U__STRICT_ANSI__ $(OS_CCDEFS) -I .
++LIBS = -lm -lrt
+ ifeq ($(USE_NETWORK),)
+ else
+ NETWORK_OPT = -DUSE_NETWORK -DNEED_PCAP_SENDPACKET -lpcap
+@@ -256,129 +257,129 @@
+ pdp1 : ${BIN}pdp1${EXE}
+
+ ${BIN}pdp1${EXE} : ${PDP1} ${SIM}
+- ${CC} ${PDP1} ${SIM} ${PDP1_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${PDP1} ${SIM} ${PDP1_OPT} -o $@ $(LIBS)
+
+ pdp4 : ${BIN}pdp4${EXE}
+
+ ${BIN}pdp4${EXE} : ${PDP18B} ${SIM}
+- ${CC} ${PDP18B} ${SIM} ${PDP4_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${PDP18B} ${SIM} ${PDP4_OPT} -o $@ $(LIBS)
+
+ pdp7 : ${BIN}pdp7${EXE}
+
+ ${BIN}pdp7${EXE} : ${PDP18B} ${SIM}
+- ${CC} ${PDP18B} ${SIM} ${PDP7_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${PDP18B} ${SIM} ${PDP7_OPT} -o $@ $(LIBS)
+
+ pdp8 : ${BIN}pdp8${EXE}
+
+ ${BIN}pdp8${EXE} : ${PDP8} ${SIM}
+- ${CC} ${PDP8} ${SIM} ${PDP8_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${PDP8} ${SIM} ${PDP8_OPT} -o $@ $(LIBS)
+
+ pdp9 : ${BIN}pdp9${EXE}
+
+ ${BIN}pdp9${EXE} : ${PDP18B} ${SIM}
+- ${CC} ${PDP18B} ${SIM} ${PDP9_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${PDP18B} ${SIM} ${PDP9_OPT} -o $@ $(LIBS)
+
+ pdp15 : ${BIN}pdp15${EXE}
+
+ ${BIN}pdp15${EXE} : ${PDP18B} ${SIM}
+- ${CC} ${PDP18B} ${SIM} ${PDP15_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${PDP18B} ${SIM} ${PDP15_OPT} -o $@ $(LIBS)
+
+ pdp10 : ${BIN}pdp10${EXE}
+
+ ${BIN}pdp10${EXE} : ${PDP10} ${SIM}
+- ${CC} ${PDP10} ${SIM} ${PDP10_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${PDP10} ${SIM} ${PDP10_OPT} -o $@ $(LIBS)
+
+ pdp11 : ${BIN}pdp11${EXE}
+
+ ${BIN}pdp11${EXE} : ${PDP11} ${SIM}
+- ${CC} ${PDP11} ${SIM} ${PDP11_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${PDP11} ${SIM} ${PDP11_OPT} -o $@ $(LIBS)
+
+ vax : ${BIN}vax${EXE}
+
+ ${BIN}vax${EXE} : ${VAX} ${SIM}
+- ${CC} ${VAX} ${SIM} ${VAX_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${VAX} ${SIM} ${VAX_OPT} -o $@ $(LIBS)
+
+ vax780 : ${BIN}vax780${EXE}
+
+ ${BIN}vax780${EXE} : ${VAX780} ${SIM}
+- ${CC} ${VAX780} ${SIM} ${VAX780_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${VAX780} ${SIM} ${VAX780_OPT} -o $@ $(LIBS)
+
+ nova : ${BIN}nova${EXE}
+
+ ${BIN}nova${EXE} : ${NOVA} ${SIM}
+- ${CC} ${NOVA} ${SIM} ${NOVA_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${NOVA} ${SIM} ${NOVA_OPT} -o $@ $(LIBS)
+
+ eclipse : ${BIN}eclipse${EXE}
+
+ ${BIN}eclipse${EXE} : ${ECLIPSE} ${SIM}
+- ${CC} ${ECLIPSE} ${SIM} ${ECLIPSE_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${ECLIPSE} ${SIM} ${ECLIPSE_OPT} -o $@ $(LIBS)
+
+ h316 : ${BIN}h316${EXE}
+
+ ${BIN}h316${EXE} : ${H316} ${SIM}
+- ${CC} ${H316} ${SIM} ${H316_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${H316} ${SIM} ${H316_OPT} -o $@ $(LIBS)
+
+ hp2100 : ${BIN}hp2100${EXE}
+
+ ${BIN}hp2100${EXE} : ${HP2100} ${SIM}
+- ${CC} ${HP2100} ${SIM} ${HP2100_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${HP2100} ${SIM} ${HP2100_OPT} -o $@ $(LIBS)
+
+ i1401 : ${BIN}i1401${EXE}
+
+ ${BIN}i1401${EXE} : ${I1401} ${SIM}
+- ${CC} ${I1401} ${SIM} ${I1401_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${I1401} ${SIM} ${I1401_OPT} -o $@ $(LIBS)
+
+ i1620 : ${BIN}i1620${EXE}
+
+ ${BIN}i1620${EXE} : ${I1620} ${SIM}
+- ${CC} ${I1620} ${SIM} ${I1620_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${I1620} ${SIM} ${I1620_OPT} -o $@ $(LIBS)
+
+ i7094 : ${BIN}i7094${EXE}
+
+ ${BIN}i7094${EXE} : ${I7094} ${SIM}
+- ${CC} ${I7094} ${SIM} ${I7094_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${I7094} ${SIM} ${I7094_OPT} -o $@ $(LIBS)
+
+ ibm1130 : ${BIN}ibm1130${EXE}
+
+ ${BIN}ibm1130${EXE} : ${IBM1130}
+- ${CC} ${IBM1130} ${SIM} ${IBM1130_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${IBM1130} ${SIM} ${IBM1130_OPT} -o $@ $(LIBS)
+
+ s3 : ${BIN}s3${EXE}
+
+ ${BIN}s3${EXE} : ${S3} ${SIM}
+- ${CC} ${S3} ${SIM} ${S3_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${S3} ${SIM} ${S3_OPT} -o $@ $(LIBS)
+
+ altair : ${BIN}altair${EXE}
+
+ ${BIN}altair${EXE} : ${ALTAIR} ${SIM}
+- ${CC} ${ALTAIR} ${SIM} ${ALTAIR_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${ALTAIR} ${SIM} ${ALTAIR_OPT} -o $@ $(LIBS)
+
+ altairz80 : ${BIN}altairz80${EXE}
+
+ ${BIN}altairz80${EXE} : ${ALTAIRZ80} ${SIM}
+- ${CC} ${ALTAIRZ80} ${SIM} ${ALTAIRZ80_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${ALTAIRZ80} ${SIM} ${ALTAIRZ80_OPT} -o $@ $(LIBS)
+
+ gri : ${BIN}gri${EXE}
+
+ ${BIN}gri${EXE} : ${GRI} ${SIM}
+- ${CC} ${GRI} ${SIM} ${GRI_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${GRI} ${SIM} ${GRI_OPT} -o $@ $(LIBS)
+
+ lgp : ${BIN}lgp${EXE}
+
+ ${BIN}lgp${EXE} : ${LGP} ${SIM}
+- ${CC} ${LGP} ${SIM} ${LGP_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${LGP} ${SIM} ${LGP_OPT} -o $@ $(LIBS)
+
+ id16 : ${BIN}id16${EXE}
+
+ ${BIN}id16${EXE} : ${ID16} ${SIM}
+- ${CC} ${ID16} ${SIM} ${ID16_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${ID16} ${SIM} ${ID16_OPT} -o $@ $(LIBS)
+
+ id32 : ${BIN}id32${EXE}
+
+ ${BIN}id32${EXE} : ${ID32} ${SIM}
+- ${CC} ${ID32} ${SIM} ${ID32_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${ID32} ${SIM} ${ID32_OPT} -o $@ $(LIBS)
+
+ sds : ${BIN}sds${EXE}
+
+ ${BIN}sds${EXE} : ${SDS} ${SIM}
+- ${CC} ${SDS} ${SIM} ${SDS_OPT} -o $@ ${LDFLAGS}
++ ${CC} $(LDFLAGS) ${SDS} ${SIM} ${SDS_OPT} -o $@ $(LIBS)
diff --git a/app-emulation/simh/simh-3.7.0.ebuild b/app-emulation/simh/simh-3.7.0.ebuild
index 943692011019..22ec46d115d4 100644
--- a/app-emulation/simh/simh-3.7.0.ebuild
+++ b/app-emulation/simh/simh-3.7.0.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/simh/simh-3.7.0.ebuild,v 1.3 2008/02/05 21:30:34 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/simh/simh-3.7.0.ebuild,v 1.4 2009/01/04 14:40:35 angelos Exp $
-inherit eutils versionator
+inherit eutils toolchain-funcs versionator
MY_P="${PN}v$(get_version_component_range 1)$(get_version_component_range 2)-$(get_version_component_range 3)"
DESCRIPTION="a simulator for historical computers such as Vax, PDP-11 etc.)"
@@ -12,6 +12,7 @@ SRC_URI="http://simh.trailing-edge.com/sources/${MY_P}.zip"
LICENSE="as-is"
SLOT="0"
KEYWORDS="~amd64 ~x86"
+IUSE=""
RDEPEND="net-libs/libpcap"
DEPEND="${RDEPEND}
@@ -26,9 +27,13 @@ src_unpack() {
unpack ${A}
# convert makefile from dos format to unix format
- sed -i 's/.$//' makefile
+ edos2unix makefile
- epatch "${FILESDIR}/makefile.patch"
+ sed -i -e "s:gcc:$(tc-getCC):" \
+ -e "s: -g::" \
+ -e "s:-O2:${CFLAGS}:" makefile
+ epatch "${FILESDIR}/makefile.patch" \
+ "${FILESDIR}"/${P}-asneeded.patch
}
src_compile() {
@@ -41,7 +46,7 @@ src_install() {
newbin ${BINFILE} "simh-${BINFILE}"
done
- cd ${S}
+ cd "${S}"
dodir /usr/share/simh
insinto /usr/share/simh
doins VAX/*.bin