Files
haikuports/dev-libs/libdwarf/libdwarf-20170416.recipe
2017-07-20 19:41:00 -04:00

91 lines
2.9 KiB
Bash

SUMMARY="Libraries to dump and manipulate DWARF data"
DESCRIPTION="DWARF is a widely used, standardized debugging data format. \
DWARF was originally designed along with Executable and Linkable Format (ELF),\
although it is independent of object file formats. The name is a medieval \
fantasy complement to ELF that has no official meaning, although the \
backronym 'Debugging With Attributed Record Formats' was later proposed.
The DWARF Debugging Information Format is of interest to programmers working \
on compilers and debuggers (and anyone interested in reading or writing DWARF \
information). DWARF uses a data structure called a Debugging Information Entry \
(DIE) to represent each variable, type, procedure, etc. It was developed by a \
committee (known as the PLSIG at the time) starting around 1991. Starting \
around 1991 SGI developed the libdwarf and dwarfdump tools for internal use and \
as part of SGI IRIX developer tools. Since that time dwarfdump and libdwarf \
have been shipped (as an executable and archive respectively, not source) with \
every release of the SGI MIPS/IRIX C compiler. In 1994 (I think the correct \
year) SGI agreed to open-source libdwarf (and in 1999 to open-source dwarfdump) \
so anyone could use them.
"
HOMEPAGE="http://www.prevanders.net/dwarf.html"
COPYRIGHT="2000,2002,2004,2005 Silicon Graphics, Inc.
2007-2010 David Anderson
2007-2010 Sun Microsystems, Inc."
LICENSE="GNU GPL v2
GNU LGPL v2.1"
REVISION="1"
SOURCE_URI="https://www.prevanders.net/libdwarf-20170416.tar.gz"
CHECKSUM_SHA256="d340c395217d78a67bec069f9991130622626a87cdba73131d091cb2f1005d81"
SOURCE_DIR="dwarf-$portVersion"
PATCHES="libdwarf-20170416.patchset"
ARCHITECTURES="?x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
commandSuffix=$secondaryArchSuffix
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
fi
PROVIDES="
libdwarf$secondaryArchSuffix = $portVersion
cmd:dwarfdump$commandSuffix = $portVersion
lib:libdwarf$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libelf$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
libdwarf${secondaryArchSuffix}_devel = $portVersion
devel:libdwarf$secondaryArchSuffix = $portVersion
"
REQUIRES_devel="
lib:libdwarf$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libelf$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:make
"
BUILD()
{
cd libdwarf
runConfigure ./configure --enable-shared
make
cd ../dwarfdump
LDFLAGS="-L../libdwarf" ./configure $configureDirArgs
LIBRARY_PATH=$LIBRARY_PATH:%A/../libdwarf make
}
INSTALL()
{
cd libdwarf
make install bindir=$binDir libdir=$libDir incdir=$includeDir
cd ../dwarfdump
make install mandir=$manDir
packageEntries devel $developDir
}