atari-fdisk-0.7.1.5.4.ebuild 1.2 KB

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