]> git.ipfire.org Git - ipfire-3.x.git/blob - pkgs/core/binutils/binutils.nm
naoki: Initial checkin.
[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 ../../Config
26
27 PKG_NAME = binutils
28 PKG_VER = 2.19.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 = glibc
43 PKG_DEPS += zlib
44
45 PKG_OBJECTS += $(THISAPP).tar.bz2
46
47 PKG_PATCHES += $(THISAPP)-ld_makefile.patch
48 PKG_PATCHES += $(THISAPP)-pt_pax-1.patch
49 PKG_PATCHES += $(THISAPP)-lazy-1.patch
50 PKG_PATCHES += $(THISAPP)-asprintf_fix.patch
51
52 include ../../Rules
53
54 ###############################################################################
55 # Installation Details
56 ###############################################################################
57
58 $(STAGE_PREPARE): $(OBJECTS)
59 @$(PRE_PREPARE)
60 cd $(DIR_SRC) && $(DO_EXTRACT) $(DIR_DL)/$(THISAPP).tar.bz2
61
62 cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-pt_pax-1.patch
63 cd $(DIR_APP) && patch -Np0 -i $(DIR_PATCHES)/$(THISAPP)-asprintf_fix.patch
64
65 -mkdir -pv $(DIR_SRC)/binutils-build
66
67 @$(POST_PREPARE)
68
69 $(STAGE_BUILD): $(STAGE_PREPARE)
70 @$(PRE_BUILD)
71
72 cd $(DIR_SRC)/binutils-build && \
73 CC="gcc -specs=$$(dirname $$(gcc --print-libgcc-file-name))/myspecs -B/usr/lib/ -B/usr/bin/" \
74 ../$(THISAPP)/configure \
75 $(CONFIGURE_ARCH) \
76 --prefix=/usr \
77 --enable-shared \
78 --disable-nls \
79 --disable-werror \
80 --disable-static
81
82 cd $(DIR_SRC)/binutils-build && make tooldir=/usr $(PARALLELISMFLAGS)
83
84 @$(POST_BUILD)
85
86 $(STAGE_INSTALL): $(STAGE_BUILD)
87 @$(PRE_INSTALL)
88
89 cd $(DIR_SRC)/binutils-build && make tooldir=/usr install DESTDIR=$(BUILDROOT)
90
91 cp -fv ../$(THISAPP)/include/libiberty.h $(BUILDROOT)/usr/include
92 rm -vf /usr/lib/libiberty.a $(BUILDROOT)/usr/lib/lib{bfd,opcodes}.la
93
94 @$(POST_INSTALL)