/[gentoo-x86]/app-emulation/simh/simh-3.9.0-r1.ebuild
Gentoo

Contents of /app-emulation/simh/simh-3.9.0-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Sat Jun 23 19:10:37 2012 UTC (2 years, 5 months ago) by xmw
Branch: MAIN
Revbump to fix binary installation (thanks Robert Carboneau, bug 423069)

(Portage version: 2.1.10.65/cvs/Linux x86_64)

1 xmw 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3     # $Header: /var/cvsroot/gentoo-x86/app-emulation/simh/simh-3.9.0.ebuild,v 1.1 2012/05/19 09:52:52 xmw Exp $
4    
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     LICENSE="as-is"
15     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     }

  ViewVC Help
Powered by ViewVC 1.1.20