| 1 |
xmw |
1.1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
|
|
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
pinkbyte |
1.2 |
# $Header: /var/cvsroot/gentoo-x86/app-emulation/simh/simh-3.9.0-r1.ebuild,v 1.1 2012/06/23 19:10:37 xmw Exp $
|
| 4 |
xmw |
1.1 |
|
| 5 |
|
|
EAPI=4
|
| 6 |
|
|
|
| 7 |
|
|
inherit eutils toolchain-funcs versionator
|
| 8 |
|
|
|
| 9 |
|
|
MY_P="${PN}v$(get_version_component_range 1)$(get_version_component_range 2)-$(get_version_component_range 3)"
|
| 10 |
|
|
DESCRIPTION="a simulator for historical computers such as Vax, PDP-11 etc.)"
|
| 11 |
|
|
HOMEPAGE="http://simh.trailing-edge.com/"
|
| 12 |
|
|
SRC_URI="http://simh.trailing-edge.com/sources/${MY_P}.zip"
|
| 13 |
|
|
|
| 14 |
pinkbyte |
1.2 |
LICENSE="MIT"
|
| 15 |
xmw |
1.1 |
SLOT="0"
|
| 16 |
|
|
KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
|
| 17 |
|
|
IUSE=""
|
| 18 |
|
|
|
| 19 |
|
|
RDEPEND="net-libs/libpcap"
|
| 20 |
|
|
DEPEND="${RDEPEND}
|
| 21 |
|
|
app-arch/unzip"
|
| 22 |
|
|
|
| 23 |
|
|
S=${WORKDIR}
|
| 24 |
|
|
|
| 25 |
|
|
src_prepare() {
|
| 26 |
|
|
# convert makefile from dos format to unix format
|
| 27 |
|
|
edos2unix makefile
|
| 28 |
|
|
|
| 29 |
|
|
epatch "${FILESDIR}"/${P}-respect-FLAGS.patch \
|
| 30 |
|
|
"${FILESDIR}"/${P}-fix-mkdir-race.patch
|
| 31 |
|
|
|
| 32 |
|
|
# fix linking on Darwin
|
| 33 |
|
|
if [[ ${CHOST} == *-darwin* ]] ; then
|
| 34 |
|
|
sed -e 's/-lrt//g' \
|
| 35 |
|
|
-i makefile || die
|
| 36 |
|
|
fi
|
| 37 |
|
|
}
|
| 38 |
|
|
|
| 39 |
|
|
src_compile() {
|
| 40 |
|
|
export GCC="$(tc-getCC)"
|
| 41 |
|
|
export LDFLAGS_O="${LDFLAGS}"
|
| 42 |
|
|
export CFLAGS_O="${CFLAGS}"
|
| 43 |
|
|
|
| 44 |
|
|
local my_makeopts="USE_NETWORK=1"
|
| 45 |
|
|
if [ "$(gcc-major-version)" -le "4" -a "$(gcc-minor-version)" -lt "6" ] ; then
|
| 46 |
|
|
my_makeopts+=" NO_LTO=1"
|
| 47 |
|
|
fi
|
| 48 |
|
|
|
| 49 |
|
|
emake ${my_makeopts}
|
| 50 |
|
|
}
|
| 51 |
|
|
|
| 52 |
|
|
src_install() {
|
| 53 |
|
|
for BINFILE in BIN/* ; do
|
| 54 |
|
|
newbin ${BINFILE} "simh-$(basename ${BINFILE})"
|
| 55 |
|
|
done
|
| 56 |
|
|
|
| 57 |
|
|
insinto /usr/share/simh
|
| 58 |
|
|
doins VAX/*.bin
|
| 59 |
|
|
|
| 60 |
|
|
dodoc *.txt */*.txt
|
| 61 |
|
|
}
|