diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-emulation/simh | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-emulation/simh')
-rw-r--r-- | app-emulation/simh/Manifest | 3 | ||||
-rw-r--r-- | app-emulation/simh/files/makefile.patch | 11 | ||||
-rw-r--r-- | app-emulation/simh/files/simh-3.8.1-asneeded.patch | 168 | ||||
-rw-r--r-- | app-emulation/simh/files/simh-3.8.1-makefile.patch | 11 | ||||
-rw-r--r-- | app-emulation/simh/files/simh-3.9.0-fix-mkdir-race.patch | 11 | ||||
-rw-r--r-- | app-emulation/simh/files/simh-3.9.0-respect-FLAGS.patch | 13 | ||||
-rw-r--r-- | app-emulation/simh/metadata.xml | 13 | ||||
-rw-r--r-- | app-emulation/simh/simh-3.3.0.ebuild | 49 | ||||
-rw-r--r-- | app-emulation/simh/simh-3.8.1.ebuild | 55 | ||||
-rw-r--r-- | app-emulation/simh/simh-3.9.0-r1.ebuild | 61 |
10 files changed, 395 insertions, 0 deletions
diff --git a/app-emulation/simh/Manifest b/app-emulation/simh/Manifest new file mode 100644 index 000000000000..e30b80eca8e1 --- /dev/null +++ b/app-emulation/simh/Manifest @@ -0,0 +1,3 @@ +DIST simhv33-0.zip 2153444 SHA256 28fcdc8443f6e2460193eb6ed8d41be95d75226490926219a0dfd5028eaf051c SHA512 33d9dd4652f7a240a6f2d14be53dbb00bb03cf02e753d8e80defa4c83916ff28b79a2058d0ec0cc8b8eaf8c1c280d05c01e444e7b6087ccdc04fb3ec691f07ee WHIRLPOOL 683fe1dd5baf4504ea5b1b549a08f7b621831ca3b242ca5b1e40d326ceb2bda0e6db5630ecf43535c81706879b63d60e6d86dd409346f65ec5a477109c92646e +DIST simhv38-1.zip 2954982 SHA256 4fe294fa5285b1d6d0bd69f60889c00e518ce2be5f00abc2bd4adfa8daa85b06 SHA512 b9ff1c2a9d52df98ca99f243dd89102f3afa9018d03990cefecb1fbf1c9d5244cc00335ada7d190d6890f81db9cd4606b02ab1b620854b8de7b2f489a74f1bdb WHIRLPOOL 7c30e3be18a82a7f9316f9d0c33601c34173ceb052d19c1126068a04df3ca9df339898cb44a4d110de4676717f5dfeebc18b306586f046176b805126175002a0 +DIST simhv39-0.zip 3103657 SHA256 e49b259b66ad6311ca9066dee3d3693cd915106a6938a52ed685cdbada8eda3b SHA512 5e8cbf92e980b7cb40d68ff60a266f70c0bef0eecdc169a8077ae72a6a71fe12a7be5c62bd033ca36727e2cb8f266a5a6f8a5ed6dd509afbf0a9d7b618f1a4f6 WHIRLPOOL 3b324046169df5b0378dfb00520c80b4372d2b7bd717484151e00dc17a8e60b42daaf8f8fd200cbf25ab693271783d9b307f4d34985de0f33bd68e484b92b2de diff --git a/app-emulation/simh/files/makefile.patch b/app-emulation/simh/files/makefile.patch new file mode 100644 index 000000000000..15cd4406a17e --- /dev/null +++ b/app-emulation/simh/files/makefile.patch @@ -0,0 +1,11 @@ +--- simh/makefile 2004-12-09 15:37:34.823634965 +0000 ++++ simh.new/makefile 2004-12-09 15:38:34.401562833 +0000 +@@ -13,7 +13,7 @@ + CC = gcc -std=c99 -O2 -g -lm $(OS_CCDEFS) -I . + ifeq ($(USE_NETWORK),) + else +-NETWORK_OPT = -DUSE_NETWORK -isystem /usr/local/include /usr/local/lib/libpcap.a ++NETWORK_OPT = -DUSE_NETWORK -DNEED_PCAP_SENDPACKET -lpcap + endif + else + #Win32 Environments diff --git a/app-emulation/simh/files/simh-3.8.1-asneeded.patch b/app-emulation/simh/files/simh-3.8.1-asneeded.patch new file mode 100644 index 000000000000..8843d3412a3b --- /dev/null +++ b/app-emulation/simh/files/simh-3.8.1-asneeded.patch @@ -0,0 +1,168 @@ +--- makefile.orig 2010-09-07 15:30:17.000000000 -0400 ++++ makefile 2010-09-07 15:31:37.000000000 -0400 +@@ -12,7 +12,8 @@ + OS_CCDEFS = -lrt -lm -D_GNU_SOURCE + endif + endif +- CC = gcc -std=c99 -U__STRICT_ANSI__ -g $(OS_CCDEFS) -I . ++ CC := $(CC) -std=c99 -U__STRICT_ANSI__ $(OS_CCDEFS) -I . $(CFLAGS) ++ LIBS = -lm -lrt + ifeq ($(USE_NETWORK),) + else + NETWORK_OPT = -DUSE_NETWORK -isystem /usr/local/include /usr/local/lib/libpcap.a +@@ -274,129 +275,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/files/simh-3.8.1-makefile.patch b/app-emulation/simh/files/simh-3.8.1-makefile.patch new file mode 100644 index 000000000000..612a4afce2c9 --- /dev/null +++ b/app-emulation/simh/files/simh-3.8.1-makefile.patch @@ -0,0 +1,11 @@ +--- makefile.orig 2010-09-07 15:05:01.000000000 -0400 ++++ makefile 2010-09-07 15:05:19.000000000 -0400 +@@ -15,7 +15,7 @@ + CC = gcc -std=c99 -U__STRICT_ANSI__ -g $(OS_CCDEFS) -I . + ifeq ($(USE_NETWORK),) + else +- NETWORK_OPT = -DUSE_NETWORK -isystem /usr/local/include /usr/local/lib/libpcap.a ++ NETWORK_OPT = -DUSE_NETWORK -DNEED_PCAP_SENDPACKET -lpcap + endif + else + #Win32 Environments diff --git a/app-emulation/simh/files/simh-3.9.0-fix-mkdir-race.patch b/app-emulation/simh/files/simh-3.9.0-fix-mkdir-race.patch new file mode 100644 index 000000000000..3a2aae35207c --- /dev/null +++ b/app-emulation/simh/files/simh-3.9.0-fix-mkdir-race.patch @@ -0,0 +1,11 @@ +--- simh-3.9.0/makefile ++++ simh-3.9.0/makefile +@@ -249,7 +249,7 @@ + NETWORK_OPT = $(NETWORK_CCDEFS) + endif + ifneq (binexists,$(shell if $(TEST) -e BIN; then echo binexists; fi)) +- MKDIRBIN = if $(TEST) ! -e BIN; then mkdir BIN; fi ++ MKDIRBIN = mkdir -p BIN + endif + else + #Win32 Environments (via MinGW32) diff --git a/app-emulation/simh/files/simh-3.9.0-respect-FLAGS.patch b/app-emulation/simh/files/simh-3.9.0-respect-FLAGS.patch new file mode 100644 index 000000000000..0f7cd1d114ea --- /dev/null +++ b/app-emulation/simh/files/simh-3.9.0-respect-FLAGS.patch @@ -0,0 +1,13 @@ +--- simh-3.9.0/makefile ++++ simh-3.9.0/makefile +@@ -300,8 +300,8 @@ + CFLAGS_O = -O0 + BUILD_FEATURES = - debugging support + else +- CFLAGS_O = -O2 +- LDFLAGS_O = ++ CFLAGS_O ?= -O2 ++ LDFLAGS_O ?= + GCC_MAJOR_VERSION = $(firstword $(subst ., ,$(GCC_VERSION))) + ifneq (3,$(GCC_MAJOR_VERSION)) + ifeq (,$(GCC_OPTIMIZERS_CMD)) diff --git a/app-emulation/simh/metadata.xml b/app-emulation/simh/metadata.xml new file mode 100644 index 000000000000..1adcc9617845 --- /dev/null +++ b/app-emulation/simh/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>proxy-maintainers</herd> + <maintainer> + <email>alex.buell@munted.eu</email> + <name>Alex Buell</name> + </maintainer> + <maintainer> + <email>xmw@gentoo.org</email> + <name>Michael Weber</name> + </maintainer> +</pkgmetadata> diff --git a/app-emulation/simh/simh-3.3.0.ebuild b/app-emulation/simh/simh-3.3.0.ebuild new file mode 100644 index 000000000000..ac5ffef39723 --- /dev/null +++ b/app-emulation/simh/simh-3.3.0.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils 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.)" +HOMEPAGE="http://simh.trailing-edge.com/" +SRC_URI="http://simh.trailing-edge.com/sources/${MY_P}.zip" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="x86" + +RDEPEND="net-libs/libpcap" +DEPEND="${RDEPEND} + app-arch/unzip" + +S="${WORKDIR}" + +MAKEOPTS="USE_NETWORK=1 ${MAKEOPTS}" + +src_unpack() { + mkdir "${WORKDIR}/BIN" + unpack ${A} + + # convert makefile from dos format to unix format + sed -i 's/.$//' makefile + + epatch "${FILESDIR}/makefile.patch" +} + +src_compile() { + emake || die "make failed" +} + +src_install() { + cd "${S}/BIN" + for BINFILE in *; do + newbin ${BINFILE} "simh-${BINFILE}" + done + + cd "${S}" + dodir /usr/share/simh + insinto /usr/share/simh + doins VAX/*.bin + dodoc *.txt */*.txt +} diff --git a/app-emulation/simh/simh-3.8.1.ebuild b/app-emulation/simh/simh-3.8.1.ebuild new file mode 100644 index 000000000000..8cc23cddc6f9 --- /dev/null +++ b/app-emulation/simh/simh-3.8.1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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.)" +HOMEPAGE="http://simh.trailing-edge.com/" +SRC_URI="http://simh.trailing-edge.com/sources/${MY_P}.zip" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="" + +RDEPEND="net-libs/libpcap" +DEPEND="${RDEPEND} + app-arch/unzip" + +S=${WORKDIR} + +MAKEOPTS="USE_NETWORK=1 ${MAKEOPTS}" + +src_unpack() { + mkdir "${WORKDIR}/BIN" + unpack ${A} + + # convert makefile from dos format to unix format + edos2unix makefile + + epatch "${FILESDIR}/${P}-makefile.patch" \ + "${FILESDIR}/${P}-asneeded.patch" + + # fix linking on Darwin + [[ ${CHOST} == *-darwin* ]] && sed -i 's/-lrt//g' makefile +} + +src_compile() { + tc-export CC + emake || die "make failed" +} + +src_install() { + cd "${S}/BIN" + for BINFILE in *; do + newbin ${BINFILE} "simh-${BINFILE}" + done + + cd "${S}" + dodir /usr/share/simh + insinto /usr/share/simh + doins VAX/*.bin + dodoc *.txt */*.txt +} diff --git a/app-emulation/simh/simh-3.9.0-r1.ebuild b/app-emulation/simh/simh-3.9.0-r1.ebuild new file mode 100644 index 000000000000..1149d0f161cc --- /dev/null +++ b/app-emulation/simh/simh-3.9.0-r1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +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.)" +HOMEPAGE="http://simh.trailing-edge.com/" +SRC_URI="http://simh.trailing-edge.com/sources/${MY_P}.zip" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="" + +RDEPEND="net-libs/libpcap" +DEPEND="${RDEPEND} + app-arch/unzip" + +S=${WORKDIR} + +src_prepare() { + # convert makefile from dos format to unix format + edos2unix makefile + + epatch "${FILESDIR}"/${P}-respect-FLAGS.patch \ + "${FILESDIR}"/${P}-fix-mkdir-race.patch + + # fix linking on Darwin + if [[ ${CHOST} == *-darwin* ]] ; then + sed -e 's/-lrt//g' \ + -i makefile || die + fi +} + +src_compile() { + export GCC="$(tc-getCC)" + export LDFLAGS_O="${LDFLAGS}" + export CFLAGS_O="${CFLAGS}" + + local my_makeopts="USE_NETWORK=1" + if [ "$(gcc-major-version)" -le "4" -a "$(gcc-minor-version)" -lt "6" ] ; then + my_makeopts+=" NO_LTO=1" + fi + + emake ${my_makeopts} +} + +src_install() { + for BINFILE in BIN/* ; do + newbin ${BINFILE} "simh-$(basename ${BINFILE})" + done + + insinto /usr/share/simh + doins VAX/*.bin + + dodoc *.txt */*.txt +} |