summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d0cbc9b009f633d04c4773729fe2dcaa085229f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Contributor: carstene1ns <arch carsten-teibes de>
# Contributor: felix <base64 -d <<< ZmVsaXgudm9uLnNAcG9zdGVvLmRlCg==>
# Contributor: janezz55

pkgname=dosbox-binutils
pkgver=2.35
pkgrel=8
pkgdesc="binutils for the djgpp dosbox cross-compiler"
arch=('i686' 'x86_64')
url="http://www.gnu.org/software/binutils"
license=('GPL')
groups=('djgpp')
depends=('zlib' 'patch')
options=('!libtool' '!emptydirs')
source=("http://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz"
      	"binutils-bfd-djgpp.patch"
	      "binutils-djgpp.patch")
sha256sums=('SKIP'
            'SKIP'
            'SKIP')
_target="i586-pc-msdosdjgpp"

prepare() {
  cd binutils-$pkgver
  patch -Np1 <${srcdir}/binutils-djgpp.patch
  patch -Np1 <${srcdir}/binutils-bfd-djgpp.patch
}

build() {
  mkdir -p binutils-$_target
  cd binutils-$_target
  CPPFLAGS="$CPPFLAGS -Ofast" \
  ../binutils-$pkgver/configure \
    --prefix=/usr \
    --target="$_target" \
    --infodir="/usr/share/info/$_target" \
    --datadir="/usr/$_target/share" \
    --disable-install-libiberty \
    --disable-multilib \
    --disable-nls \
    --disable-plugins \
    --disable-werror \
    --enable-lto
  make
}

package() {
  make -C binutils-$_target DESTDIR="$pkgdir/" install
  rm -rf $pkgdir/usr/share/{man,info}
}