aboutsummaryrefslogtreecommitdiffstats
path: root/main/binutils/APKBUILD
blob: acc1ad434596393e8dfbde8700ea95ddf7d57be9 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=binutils
pkgver=2.23.2
pkgrel=0
pkgdesc="Tools necessary to build programs"
url="http://www.gnu.org/software/binutils/"
depends=
makedepends="bison flex texinfo zlib-dev"
arch="all"
license="GPL"
subpackages="$pkgname-doc"
source="http://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.bz2
	binutils-ld-fix-static-linking.patch"

_builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch|*.diff)
			msg "Applying $i..."
			patch -p1 -i "$srcdir"/$i || return 1
			;;
		esac
	done
}

build() {
	cd "$_builddir"

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--with-build-sysroot="${CBUILDROOT}" \
		--target=${CTARGET} \
		--disable-multilib \
		--enable-shared \
		--enable-64-bit-bfd \
		--disable-werror \
		--disable-nls \
		|| return 1

	make || return 1
}

package() {
	cd "$srcdir/$pkgname-$pkgver"
	make install DESTDIR="$pkgdir" 
	if [ -d "$pkgdir"/usr/lib64 ]; then
		mv "$pkgdir"/usr/lib64/* "$pkgdir"/usr/lib/
		rmdir "$pkgdir"/usr/lib64
	fi
	rm "$pkgdir"/usr/lib/*.la || return 1
}
md5sums="4f8fa651e35ef262edc01d60fb45702e  binutils-2.23.2.tar.bz2
6b744d0574338cc69d3096a890a7b609  binutils-ld-fix-static-linking.patch"
sha256sums="fe914e56fed7a9ec2eb45274b1f2e14b0d8b4f41906a5194eac6883cfe5c1097  binutils-2.23.2.tar.bz2
a3ebf58f95fc6c1bfe05377d222d876593f692fa9098d1ccce43874ecbb0501d  binutils-ld-fix-static-linking.patch"
sha512sums="dec753bbba008f1526b89cf1bd85feba78f362f5333ffdf93953fd131eb755976dec82a0a4ba38c43d2434da007137780cfe674de5414be5cf7ce7fbc6af6d16  binutils-2.23.2.tar.bz2
d013566655041eee1e484d6f8b7168a2817839e88d370f064be3917c9c6be11d1b13e90fd9e769f5f095e6709520b6308d3cfca69c2956ada311c07ff697bab4  binutils-ld-fix-static-linking.patch"