mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
Add PM recipe for libdwarf, based on latest version
This commit is contained in:
73
dev-libs/libdwarf/libdwarf-20130729.recipe
Normal file
73
dev-libs/libdwarf/libdwarf-20130729.recipe
Normal file
@@ -0,0 +1,73 @@
|
||||
SUMMARY="libdwarf and dwarfdump"
|
||||
DESCRIPTION="libdwarf and dwarfdump - library and utility for working with DWARF Debugging Information Format"
|
||||
HOMEPAGE="http://www.prevanders.net/dwarf.html"
|
||||
SRC_URI="http://www.prevanders.net/libdwarf-20130729.tar.gz"
|
||||
CHECKSUM_MD5="4cc5e48693f7b93b7aa0261e63c0e21d"
|
||||
LICENSE="
|
||||
GNU GPL v2
|
||||
GNU LGPL v2.1
|
||||
"
|
||||
COPYRIGHT="
|
||||
2000,2002,2004,2005 Silicon Graphics, Inc. All Rights Reserved.
|
||||
2007-2010 David Anderson. All Rights Reserved.
|
||||
2007-2010 Sun Microsystems, Inc. All rights reserved
|
||||
"
|
||||
REVISION="1"
|
||||
ARCHITECTURES="x86 x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
|
||||
SOURCE_DIR="dwarf-20130729"
|
||||
PATCHES="libdwarf-20130729.patch"
|
||||
|
||||
PROVIDES="
|
||||
lib:libdwarf$secondaryArchSuffix = $portVersion
|
||||
cmd:dwarfdump = $portVersion
|
||||
"
|
||||
# cmd:dwarfdump2 = $portVersion
|
||||
# "
|
||||
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix >= $haikuVersion
|
||||
lib:libelf$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
lib:libelf$secondaryArchSuffix
|
||||
devel:libelf$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel >= $haikuVersion
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd libdwarf
|
||||
runConfigure ./configure --enable-shared
|
||||
make
|
||||
cd ../dwarfdump
|
||||
LDFLAGS="-L../libdwarf -L/boot/common/lib" ./configure $configureDirArgs
|
||||
LIBRARY_PATH=$LIBRARY_PATH:../libdwarf/ make
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd libdwarf
|
||||
make install
|
||||
cd ../dwarfdump
|
||||
make install
|
||||
#prepareInstalledDevelLib libdwarf
|
||||
packageEntries devel develop
|
||||
}
|
||||
|
||||
PROVIDES_devel="
|
||||
devel:libdwarf$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
|
||||
REQUIRES_devel="
|
||||
lib:libelf$secondaryArchSuffix
|
||||
devel:libelf$secondaryArchSuffix
|
||||
lib:libdwarf$secondaryArchSuffix == $portVersion
|
||||
"
|
||||
79
dev-libs/libdwarf/patches/libdwarf-20130729.patch
Normal file
79
dev-libs/libdwarf/patches/libdwarf-20130729.patch
Normal file
@@ -0,0 +1,79 @@
|
||||
diff -Naur dwarf-20130729/dwarfdump/Makefile.in dwarf-20130729-c89/dwarfdump/Makefile.in
|
||||
--- dwarf-20130729/dwarfdump/Makefile.in 2013-02-02 19:13:55.027000832 +0000
|
||||
+++ dwarf-20130729-c89/dwarfdump/Makefile.in 2014-01-02 23:57:54.130809856 +0000
|
||||
@@ -154,9 +154,11 @@
|
||||
# will work and leave sensible permissions on the resulting files.
|
||||
# Some adjustment might be required, see README.
|
||||
install: all
|
||||
- $(INSTALL) dwarfdump $(bindir)/dwarfdump
|
||||
- $(INSTALL) $(srcdir)/dwarfdump.conf $(libdir)/dwarfdump.conf
|
||||
- $(INSTALL) $(srcdir)/dwarfdump.1 $(man1dir)/dwarfdump.1
|
||||
+ install -m 0755 -d $(bindir)
|
||||
+ install -m 0755 -d $(man1dir)
|
||||
+ install -m 0755 dwarfdump $(bindir)
|
||||
+ install -m 0755 dwarfdump.conf $(libdir)
|
||||
+ install -m 0755 dwarfdump.1 $(man1dir)
|
||||
|
||||
uninstall:
|
||||
-rm -f $(bindir)/dwarfdump
|
||||
diff -Naur dwarf-20130729/dwarfdump/print_die.c dwarf-20130729-c89/dwarfdump/print_die.c
|
||||
--- dwarf-20130729/dwarfdump/print_die.c 2013-02-06 20:48:07.019922944 +0000
|
||||
+++ dwarf-20130729-c89/dwarfdump/print_die.c 2014-01-02 23:11:00.841744384 +0000
|
||||
@@ -3380,6 +3380,7 @@
|
||||
we have a serious botch. this FORM
|
||||
defines the value as a .debug_info
|
||||
global offset. */
|
||||
+ int res = 0;
|
||||
Dwarf_Off cuoff = 0;
|
||||
Dwarf_Off culen = 0;
|
||||
Dwarf_Off die_overall_offset = 0;
|
||||
@@ -3399,7 +3400,7 @@
|
||||
print_error(dbg,small_buf,DW_DLV_OK,0);
|
||||
}
|
||||
|
||||
- int res = dwarf_die_CU_offset_range(die,&cuoff,
|
||||
+ res = dwarf_die_CU_offset_range(die,&cuoff,
|
||||
&culen,&err);
|
||||
DWARF_CHECK_COUNT(tag_tree_result,1);
|
||||
if (res != DW_DLV_OK) {
|
||||
diff -Naur dwarf-20130729/libdwarf/gennames.c dwarf-20130729-c89/libdwarf/gennames.c
|
||||
--- dwarf-20130729/libdwarf/gennames.c 2013-01-25 19:09:11.052166656 +0000
|
||||
+++ dwarf-20130729-c89/libdwarf/gennames.c 2014-01-02 22:57:20.856162304 +0000
|
||||
@@ -486,8 +486,8 @@
|
||||
|
||||
/* Process each line from 'dwarf.h' */
|
||||
while (!feof(f_dwarf_in)) {
|
||||
- errno = 0;
|
||||
char *fgbad = fgets(line_in,sizeof(line_in),f_dwarf_in);
|
||||
+ errno = 0;
|
||||
if(!fgbad) {
|
||||
if(feof(f_dwarf_in)) {
|
||||
break;
|
||||
diff -Naur dwarf-20130729/libdwarf/Makefile.in dwarf-20130729-c89/libdwarf/Makefile.in
|
||||
--- dwarf-20130729/libdwarf/Makefile.in 2013-07-28 17:58:54.051904512 +0000
|
||||
+++ dwarf-20130729-c89/libdwarf/Makefile.in 2014-01-03 00:36:16.817627136 +0000
|
||||
@@ -46,8 +46,9 @@
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
-bindir = $(exec_prefix)/bin
|
||||
-libdir = $(exec_prefix)/lib
|
||||
+bindir = $(DESTDIR)$(prefix)/bin
|
||||
+libdir = $(DESTDIR)$(prefix)/lib
|
||||
+incdir = $(DESTDIR)$(prefix)/develop/include/libdwarf
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
@@ -213,7 +214,11 @@
|
||||
rm -f dwarf_names_enum.h dwarf_names_new.h dwarf_names.c dwarf_names.h
|
||||
|
||||
install: all
|
||||
- echo "No install provided, see comments in the README"
|
||||
+ install -m 0755 -d $(incdir)
|
||||
+ install -m 0755 -d $(libdir)
|
||||
+ install -m 0755 libdwarf.h $(incdir)
|
||||
+ install -m 0755 dwarf.h $(incdir)
|
||||
+ install -m 0755 libdwarf.so $(libdir)
|
||||
|
||||
distclean: clean
|
||||
rm -f config.status config.log config.cache config.h
|
||||
Reference in New Issue
Block a user