mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 06:28:55 +02:00
binutils: update to version that does not need flex.
This commit is contained in:
171
sys-devel/binutils/binutils-2.17_2016_07_24.recipe
Normal file
171
sys-devel/binutils/binutils-2.17_2016_07_24.recipe
Normal file
@@ -0,0 +1,171 @@
|
||||
SUMMARY="The GNU assembler, linker and binary utilities"
|
||||
HOMEPAGE="http://www.gnu.org/software/binutils"
|
||||
commit="560f4f562f2eaf6ad27a30880f027a6ca4bdb4a6"
|
||||
SOURCE_URI="https://github.com/haiku/buildtools/archive/$commit.tar.gz"
|
||||
SOURCE_FILENAME="$portName-$portVersion.tar.gz"
|
||||
SOURCE_DIR="buildtools-$commit/legacy/binutils"
|
||||
CHECKSUM_SHA256="5de9d57ebb5534468b65a64958159e2a25b715b26ce2eb0149842810a04f5a57"
|
||||
REVISION="2"
|
||||
LICENSE="
|
||||
GNU GPL v2
|
||||
GNU LGPL v2
|
||||
"
|
||||
COPYRIGHT="1988-2006 Free Software Foundation, Inc."
|
||||
|
||||
ARCHITECTURES="x86_gcc2 !x86"
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2"
|
||||
|
||||
PROVIDES="
|
||||
binutils$secondaryArchSuffix = $portVersion compat >= 2.17
|
||||
cmd:addr2line$secondaryArchSuffix = $portVersion compat >= 2.17
|
||||
cmd:ar$secondaryArchSuffix = $portVersion compat >= 2.17
|
||||
cmd:as$secondaryArchSuffix = $portVersion compat >= 2.17
|
||||
cmd:c++filt$secondaryArchSuffix = $portVersion compat >= 2.17
|
||||
cmd:gprof$secondaryArchSuffix = $portVersion compat >= 2.17
|
||||
cmd:ld$secondaryArchSuffix = $portVersion compat >= 2.17
|
||||
cmd:nm$secondaryArchSuffix = $portVersion compat >= 2.17
|
||||
cmd:objcopy$secondaryArchSuffix = $portVersion compat >= 2.17
|
||||
cmd:objdump$secondaryArchSuffix = $portVersion compat >= 2.17
|
||||
cmd:ranlib$secondaryArchSuffix = $portVersion compat >= 2.17
|
||||
cmd:readelf$secondaryArchSuffix = $portVersion compat >= 2.17
|
||||
cmd:size$secondaryArchSuffix = $portVersion compat >= 2.17
|
||||
cmd:strings$secondaryArchSuffix = $portVersion compat >= 2.17
|
||||
cmd:strip$secondaryArchSuffix = $portVersion compat >= 2.17
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
cmd:autoconf
|
||||
cmd:find
|
||||
cmd:flex
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:makeinfo
|
||||
cmd:sed
|
||||
cmd:tar
|
||||
cmd:xargs
|
||||
"
|
||||
|
||||
BUILD_PACKAGE_ACTIVATION_PHASE=INSTALL
|
||||
|
||||
binutilsDir=$(pwd)
|
||||
relativeInstallDir="develop/tools$secondaryArchSubDir"
|
||||
installDir="$prefix/$relativeInstallDir"
|
||||
binutilsObjectsDir=$binutilsDir/../binutils-obj
|
||||
|
||||
BUILD()
|
||||
{
|
||||
rm -rf $binutilsObjectsDir
|
||||
|
||||
# Touch all *.info files, as newer texinfos don't like their format
|
||||
cd $binutilsDir
|
||||
find . -name \*.info | xargs touch
|
||||
|
||||
# build binutils
|
||||
mkdir -p $binutilsObjectsDir
|
||||
cd $binutilsObjectsDir
|
||||
CFLAGS="-O2" CXXFLAGS="-O2" runConfigure --omit-dirs "docDir dataRootDir" \
|
||||
"$binutilsDir/configure" \
|
||||
--exec-prefix=$installDir \
|
||||
--includedir=$includeDir/binutils \
|
||||
--with-htmldir=$relativeDocDir \
|
||||
--disable-nls --enable-shared=yes
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd $binutilsObjectsDir
|
||||
archName=$(grep '^target_alias' Makefile | cut -d= -f2)
|
||||
|
||||
make install
|
||||
make install-html
|
||||
|
||||
# Remove the development libraries and headers. Nobody uses those anyway.
|
||||
rm -r $libDir
|
||||
rm -r $developDir/headers
|
||||
|
||||
### HTML documentation ####################################
|
||||
|
||||
echo "Organizing HTML documentation..."
|
||||
cd $docDir
|
||||
|
||||
mv as.html as
|
||||
ln -sf as/index.html as.html
|
||||
mv bfd.html bfd
|
||||
ln -sf bfd/index.html bfd.html
|
||||
mv binutils.html binutils
|
||||
ln -sf binutils/index.html binutils.html
|
||||
mv gprof.html gprof
|
||||
ln -sf gprof/index.html gprof.html
|
||||
mv ld.html ld
|
||||
ln -sf ld/index.html ld.html
|
||||
rm libiberty.html standards.html
|
||||
|
||||
# no info documentation
|
||||
rm -r $infoDir
|
||||
|
||||
### Strip #################################################
|
||||
|
||||
echo "Strip debug info"
|
||||
|
||||
cd $prefix
|
||||
find bin -type f | xargs -r strip --strip-debug
|
||||
strip --strip-debug $installDir/$archName/bin/*
|
||||
|
||||
### Symlinks ##############################################
|
||||
|
||||
echo "Creating required symlinks"
|
||||
|
||||
# There are copies of a subset of the commands below installDir. We
|
||||
# overwrite those with symlinks to the ones in binDir.
|
||||
for file in $installDir/i586-pc-haiku/bin/*; do
|
||||
symlinkRelative -sfn $binDir/$(basename $file) $file
|
||||
done
|
||||
|
||||
### Cleanup #################################################
|
||||
|
||||
echo "Cleanup"
|
||||
|
||||
# delete man pages for commands that we aren't including
|
||||
cd $manDir
|
||||
for cmd in dlltool nlmconv windmc windres; do
|
||||
rm -f man1/$cmd.1
|
||||
done
|
||||
}
|
||||
|
||||
DESCRIPTION="
|
||||
The GNU Binutils are a collection of binary tools. The main ones are:
|
||||
- ld - the GNU linker.
|
||||
- as - the GNU assembler.
|
||||
But they also include:
|
||||
- addr2line - Converts addresses into filenames and line numbers.
|
||||
- ar - A utility for creating, modifying and extracting from archives.
|
||||
- c++filt - Filter to demangle encoded C++ symbols.
|
||||
- dlltool - Creates files for building and using DLLs.
|
||||
- gold - A new, faster, ELF only linker, still in beta test.
|
||||
- gprof - Displays profiling information.
|
||||
- nlmconv - Converts object code into an NLM.
|
||||
- nm - Lists symbols from object files.
|
||||
- objcopy - Copys and translates object files.
|
||||
- objdump - Displays information from object files.
|
||||
- ranlib - Generates an index to the contents of an archive.
|
||||
- readelf - Displays information from any ELF format object file.
|
||||
- size - Lists the section sizes of an object or archive file.
|
||||
- strings - Lists printable strings from files.
|
||||
- strip - Discards symbols.
|
||||
- windmc - A Windows compatible message compiler.
|
||||
- windres - A compiler for Windows resource files.
|
||||
Most of these programs use BFD, the Binary File Descriptor library, to do \
|
||||
low-level manipulation. Many of them also use the opcodes library to assemble \
|
||||
and disassemble machine instructions.
|
||||
The binutils have been ported to most major Unix variants as well as Wintel \
|
||||
systems, and their main reason for existence is to give the GNU system (and \
|
||||
GNU/Linux) the facility to compile and link programs.
|
||||
"
|
||||
Reference in New Issue
Block a user