1 ###############################################################################
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt #
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. #
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. #
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/>. #
19 ###############################################################################
21 ###############################################################################
23 ###############################################################################
31 PKG_MAINTAINER = Michael Tremer <michael.tremer@ipfire.org>
32 PKG_GROUP = Development/Tools
33 PKG_URL = http://www.gnu.org/software/binutils/
35 PKG_SUMMARY = The GNU Binutils are a collection of binary tools.
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.
42 PKG_BUILD_DEPS = glibc
45 PKG_OBJECTS += $(THISAPP).tar.bz2
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
54 ###############################################################################
55 # Installation Details
56 ###############################################################################
58 $(STAGE_PREPARE): $(OBJECTS)
60 cd $(DIR_SRC) && $(DO_EXTRACT) $(DIR_DL)/$(THISAPP).tar.bz2
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
65 -mkdir -pv $(DIR_SRC)/binutils-build
69 $(STAGE_BUILD): $(STAGE_PREPARE)
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 \
82 cd $(DIR_SRC)/binutils-build && make tooldir=/usr $(PARALLELISMFLAGS)
86 $(STAGE_INSTALL): $(STAGE_BUILD)
89 cd $(DIR_SRC)/binutils-build && make tooldir=/usr install DESTDIR=$(BUILDROOT)
91 cp -fv ../$(THISAPP)/include/libiberty.h $(BUILDROOT)/usr/include
92 rm -vf /usr/lib/libiberty.a $(BUILDROOT)/usr/lib/lib{bfd,opcodes}.la