24091b4d2ac29eb45ca2280581b15e8f31465b7b
[gentoo.git] / sys-fs / atari-fdisk / atari-fdisk-0.7.1.5.4.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="5"
5
6 inherit versionator toolchain-funcs eutils
7
8 MY_PV=$(get_version_component_range 1-3)
9 DEB_PV=$(get_version_component_range 4-5)
10 DESCRIPTION="create and edit the partition table of a disk partitioned in Atari format"
11 HOMEPAGE="https://packages.qa.debian.org/a/atari-fdisk.html"
12 SRC_URI="mirror://debian/pool/main/a/${PN}/${PN}_${MY_PV}-${DEB_PV}.tar.gz"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 # Note: The code assumes sizeof(long) == 4 everywhere.  If you try to
17 # use this on 64bit systems (where sizeof(long) == 8), then misbehavior
18 # and memory corruption will ensue.
19 KEYWORDS="-* m68k x86"
20 IUSE=""
21
22 S=${WORKDIR}/${PN}-${MY_PV}
23
24 src_prepare() {
25         epatch "${FILESDIR}"/${PN}-0.7.1.5.4-prompt-logic.patch
26         epatch "${FILESDIR}"/${PN}-0.7.1.5.4-gcc-5-inline.patch
27 }
28
29 src_compile() {
30         emake \
31                 CFLAGS="${CFLAGS}" \
32                 LDFLAGS="${LDFLAGS}" \
33                 CC="$(tc-getCC)" \
34                 COMPILE_ARCH=m68k
35 }
36
37 src_install() {
38         dodoc NEWS README TODO debian/changelog
39         doman debian/atari-fdisk.8
40
41         into /
42         if [[ $(tc-arch) == "m68k" ]] ; then
43                 dosbin fdisk
44                 dosym fdisk /sbin/atari-fdisk
45                 dosym atari-fdisk.8 /usr/share/man/man8/fdisk.8
46         else
47                 dosbin atari-fdisk
48         fi
49 }