dev-ros/filters: Backport upstream fix to build without rostest when tests are not...
[gentoo.git] / app-emulation / simh / simh-3.3.0.ebuild
1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 inherit eutils versionator
6
7 MY_P="${PN}v$(get_version_component_range 1)$(get_version_component_range 2)-$(get_version_component_range 3)"
8 DESCRIPTION="a simulator for historical computers such as Vax, PDP-11 etc.)"
9 HOMEPAGE="http://simh.trailing-edge.com/"
10 SRC_URI="http://simh.trailing-edge.com/sources/${MY_P}.zip"
11
12 LICENSE="MIT"
13 SLOT="0"
14 KEYWORDS="x86"
15
16 RDEPEND="net-libs/libpcap"
17 DEPEND="${RDEPEND}
18         app-arch/unzip"
19
20 S="${WORKDIR}"
21
22 MAKEOPTS="USE_NETWORK=1 ${MAKEOPTS}"
23
24 src_unpack() {
25         mkdir "${WORKDIR}/BIN"
26         unpack ${A}
27
28         # convert makefile from dos format to unix format
29         sed -i 's/.$//' makefile
30
31         epatch "${FILESDIR}/makefile.patch"
32 }
33
34 src_compile() {
35         emake || die "make failed"
36 }
37
38 src_install() {
39         cd "${S}/BIN"
40         for BINFILE in *; do
41                 newbin ${BINFILE} "simh-${BINFILE}"
42         done
43
44         cd "${S}"
45         dodir /usr/share/simh
46         insinto /usr/share/simh
47         doins VAX/*.bin
48         dodoc *.txt */*.txt
49 }