]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - pkgs/core/binutils/binutils.nm
Remove legacy build system.
[people/ms/ipfire-3.x.git] / pkgs / core / binutils / binutils.nm
1 ###############################################################################
2 # #
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt #
5 # #
6 # This program is free software: you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
10 # #
11 # This program is distributed in the hope that it will be useful, #
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14 # GNU General Public License for more details. #
15 # #
16 # You should have received a copy of the GNU General Public License #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
18 # #
19 ###############################################################################
20
21 ###############################################################################
22 # Definitions
23 ###############################################################################
24
25 include $(PKGROOT)/Include
26
27 PKG_NAME = binutils
28 PKG_VER = 2.20.1
29 PKG_REL = 0
30
31 PKG_MAINTAINER = Michael Tremer <michael.tremer@ipfire.org>
32 PKG_GROUP = Development/Tools
33 PKG_URL = http://www.gnu.org/software/binutils/
34 PKG_LICENSE = GPLv2+
35 PKG_SUMMARY = The GNU Binutils are a collection of binary tools.
36
37 define PKG_DESCRIPTION
38 The GNU Binary Utilities, or binutils, is a collection of programming \
39 tools for the manipulation of object code in various object file formats.
40 endef
41
42 PKG_BUILD_DEPS+= dejagnu texinfo zlib-devel
43
44 PKG_TARBALL += $(THISAPP).tar.bz2
45
46 define STAGE_PREPARE_CMDS
47 -mkdir -pv $(DIR_SRC)/binutils-build
48
49 # Suppress the installation of an outdated standards.info file as a newer
50 # one is installed later on in the Autoconf instructions:
51 cd $(DIR_APP) && rm -fv etc/standards.info
52 cd $(DIR_APP) && sed -e '/^INFO/s/standards.info //' -i etc/Makefile.in
53 endef
54
55 BINUTILS_TARGET_PLATFORM = $(subst -gnu,,$(DISTRO_MACHINE))
56
57 define STAGE_BUILD
58 cd $(DIR_SRC)/binutils-build && \
59 ../$(THISAPP)/configure \
60 --host=$(BINUTILS_TARGET_PLATFORM) \
61 --build=$(BINUTILS_TARGET_PLATFORM) \
62 --target=$(BINUTILS_TARGET_PLATFORM) \
63 --prefix=/usr \
64 --mandir=/usr/share/man \
65 --enable-shared \
66 --disable-nls \
67 --disable-werror \
68 --disable-static
69
70 cd $(DIR_SRC)/binutils-build && make tooldir=/usr $(PARALLELISMFLAGS)
71 endef
72
73 #define STAGE_TEST
74 # Apply a sed substitution to prevent a testsuite error:
75 #cd $(DIR_APP) && sed -i 's/getline/get_line/' libiberty/testsuite/test-demangle.c
76 #cd $(DIR_SRC)/binutils-build && make check
77 #endef
78
79 define STAGE_INSTALL
80 cd $(DIR_SRC)/binutils-build && make tooldir=/usr install DESTDIR=$(BUILDROOT)
81
82 cp -fv $(DIR_APP)/include/libiberty.h $(BUILDROOT)/usr/include
83 endef