From a09e9b3040a74b9b1bdee8a705caa814f08669dd Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Sun, 8 Oct 2017 09:45:40 +0200 Subject: [PATCH] libdwarf: bump version, fix recipe (#1698) --- dev-libs/libdwarf/libdwarf-20130729.recipe | 86 --------- ...170416.recipe => libdwarf-20170709.recipe} | 25 ++- .../libdwarf/patches/libdwarf-20130729.patch | 168 ------------------ ...16.patchset => libdwarf-20170709.patchset} | 47 +++-- 4 files changed, 52 insertions(+), 274 deletions(-) delete mode 100644 dev-libs/libdwarf/libdwarf-20130729.recipe rename dev-libs/libdwarf/{libdwarf-20170416.recipe => libdwarf-20170709.recipe} (81%) delete mode 100644 dev-libs/libdwarf/patches/libdwarf-20130729.patch rename dev-libs/libdwarf/patches/{libdwarf-20170416.patchset => libdwarf-20170709.patchset} (68%) diff --git a/dev-libs/libdwarf/libdwarf-20130729.recipe b/dev-libs/libdwarf/libdwarf-20130729.recipe deleted file mode 100644 index 2cfc199e7..000000000 --- a/dev-libs/libdwarf/libdwarf-20130729.recipe +++ /dev/null @@ -1,86 +0,0 @@ -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. - -libdwarf allows reading, creation and manipulation of dwarf data. dwarfdump \ -(written in C) and dwarfdump2 (written in C++) do the same job, they let you \ -dump out, in readable form, the DWARF2, DWARF3, or DWARF4 data from an object \ -file, but dwarfdump2 does a better job in some respects. - -This package includes dwarfdump2 and libdwarf, although the source package has \ -been patched to make dwarfdump and dwarfgen Haiku compatible as well." -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="http://www.prevanders.net/libdwarf-20130729.tar.gz" -CHECKSUM_SHA256="b6455d8616baf2883e2af91f006d6cbd583128fdfff46e3d1fae460bc223bb7b" -SOURCE_DIR="dwarf-$portVersion" -PATCHES="libdwarf-20130729.patch" - -ARCHITECTURES="x86 x86_gcc2" -SECONDARY_ARCHITECTURES="x86_gcc2 x86" - -PROVIDES=" - lib:libdwarf$secondaryArchSuffix = $portVersion - cmd:dwarfdump = $portVersion - " -REQUIRES=" - haiku$secondaryArchSuffix - lib:libelf$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 - " -BUILD_PREREQUIRES=" - cmd:gcc$secondaryArchSuffix - cmd:ld$secondaryArchSuffix - cmd:make - " - -BUILD() -{ - cd libdwarf - runConfigure ./configure --enable-shared - make - cd ../dwarfdump2 - LDFLAGS="-L../libdwarf" ./configure $configureDirArgs - LIBRARY_PATH=$LIBRARY_PATH:%A/../libdwarf make -} - -INSTALL() -{ - cd libdwarf - make install bindir=$binDir libdir=$libDir incdir=$includeDir - cd ../dwarfdump2 - make install mandir=$manDir - packageEntries devel $developDir -} diff --git a/dev-libs/libdwarf/libdwarf-20170416.recipe b/dev-libs/libdwarf/libdwarf-20170709.recipe similarity index 81% rename from dev-libs/libdwarf/libdwarf-20170416.recipe rename to dev-libs/libdwarf/libdwarf-20170709.recipe index 60f4a2b91..596a22c01 100644 --- a/dev-libs/libdwarf/libdwarf-20170416.recipe +++ b/dev-libs/libdwarf/libdwarf-20170709.recipe @@ -24,13 +24,13 @@ COPYRIGHT="2000,2002,2004,2005 Silicon Graphics, 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_URI="https://www.prevanders.net/libdwarf-$portVersion.tar.gz" +CHECKSUM_SHA256="46ccfb24ecd24bd7cce466d67a7bfeb62b9ed405dafdc924918d58c529abccb8" SOURCE_DIR="dwarf-$portVersion" -PATCHES="libdwarf-20170416.patchset" +PATCHES="libdwarf-20170709.patchset" -ARCHITECTURES="?x86_gcc2 x86 x86_64" -SECONDARY_ARCHITECTURES="x86_gcc2 x86" +ARCHITECTURES="x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="x86" # On x86_gcc2 we don't want to install the commands in bin//, but in bin/. commandSuffix=$secondaryArchSuffix @@ -39,9 +39,9 @@ if [ "$targetArchitecture" = x86_gcc2 ]; then fi PROVIDES=" - libdwarf$secondaryArchSuffix = $portVersion + libdwarf$secondaryArchSuffix = $portVersion compat >= 1 cmd:dwarfdump$commandSuffix = $portVersion - lib:libdwarf$secondaryArchSuffix = $portVersion + lib:libdwarf$secondaryArchSuffix = $portVersion compat >= 1 " REQUIRES=" haiku$secondaryArchSuffix @@ -51,7 +51,7 @@ REQUIRES=" PROVIDES_devel=" libdwarf${secondaryArchSuffix}_devel = $portVersion - devel:libdwarf$secondaryArchSuffix = $portVersion + devel:libdwarf$secondaryArchSuffix = $portVersion compat >= 1 " REQUIRES_devel=" lib:libdwarf$secondaryArchSuffix == $portVersion base @@ -77,14 +77,21 @@ BUILD() make cd ../dwarfdump LDFLAGS="-L../libdwarf" ./configure $configureDirArgs - LIBRARY_PATH=$LIBRARY_PATH:%A/../libdwarf make + LIBRARY_PATH=$LIBRARY_PATH:%A/../libdwarf + make $jobArgs } INSTALL() { cd libdwarf make install bindir=$binDir libdir=$libDir incdir=$includeDir + cp libdwarf.so.1 $libDir + cp libdwarf.a $libDir + cd ../dwarfdump make install mandir=$manDir + + prepareInstalledDevelLibs libdwarf + packageEntries devel $developDir } diff --git a/dev-libs/libdwarf/patches/libdwarf-20130729.patch b/dev-libs/libdwarf/patches/libdwarf-20130729.patch deleted file mode 100644 index d3f8072dd..000000000 --- a/dev-libs/libdwarf/patches/libdwarf-20130729.patch +++ /dev/null @@ -1,168 +0,0 @@ -diff -Naur dwarf-20130729/dwarfdump/Makefile.in dwarf-20130729-c89/dwarfdump/Makefile.in ---- dwarf-20130729/dwarfdump/Makefile.in 2013-02-02 19:13:55.031981568 +0000 -+++ dwarf-20130729-c89/dwarfdump/Makefile.in 2014-01-06 11:16:30.116916224 +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.024903680 +0000 -+++ dwarf-20130729-c89/dwarfdump/print_die.c 2014-01-06 11:16:30.131596288 +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/dwarfdump2/dwarfdump.cc dwarf-20130729-c89/dwarfdump2/dwarfdump.cc ---- dwarf-20130729/dwarfdump2/dwarfdump.cc 2013-07-30 16:12:36.033292288 +0000 -+++ dwarf-20130729-c89/dwarfdump2/dwarfdump.cc 2014-01-06 11:19:43.419168256 +0000 -@@ -47,6 +47,9 @@ - #include - #include // for sort - #include -+#if __GNUC__ == 2 -+#include -+#endif - - /* for 'open' */ - #include -@@ -2413,7 +2416,11 @@ - Compiler *pCompiler, Dwarf_Check_Categories category) - { - Dwarf_Check_Result result = pCompiler->results_[category]; -+#if __GNUC__ == 2 -+ cerr << std::setw(24) << ios::left << str << -+#else - cerr << std::setw(24) << std::left << str << -+#endif - IToDec(result.checks_,10) << - " " << - IToDec(result.errors_,10) << endl; -diff -Naur dwarf-20130729/dwarfdump2/Makefile.in dwarf-20130729-c89/dwarfdump2/Makefile.in ---- dwarf-20130729/dwarfdump2/Makefile.in 2013-02-02 19:16:44.038797312 +0000 -+++ dwarf-20130729-c89/dwarfdump2/Makefile.in 2014-01-06 12:53:29.018350080 +0000 -@@ -133,9 +133,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.1 $(man1dir)/dwarfdump.1 -- $(INSTALL) $(srcdir)/dwarfdump.conf $(libdir)/dwarfdump.conf -+ 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/dwarfgen/createirepformfrombinary.cc dwarf-20130729-c89/dwarfgen/createirepformfrombinary.cc ---- dwarf-20130729/dwarfgen/createirepformfrombinary.cc 2013-02-01 16:20:06.020971520 +0000 -+++ dwarf-20130729-c89/dwarfgen/createirepformfrombinary.cc 2014-01-06 11:16:30.163577856 +0000 -@@ -28,7 +28,6 @@ - #include // For memset etc - #include //open - #include //open --#include "elf.h" - #include "gelf.h" - #include "strtabdata.h" - #include "dwarf.h" -diff -Naur dwarf-20130729/dwarfgen/createirepfrombinary.cc dwarf-20130729-c89/dwarfgen/createirepfrombinary.cc ---- dwarf-20130729/dwarfgen/createirepfrombinary.cc 2013-02-01 16:20:11.022282240 +0000 -+++ dwarf-20130729-c89/dwarfgen/createirepfrombinary.cc 2014-01-06 11:16:30.171442176 +0000 -@@ -30,7 +30,6 @@ - #include // For memset etc - #include //open - #include //open --#include "elf.h" - #include "gelf.h" - #include "strtabdata.h" - #include "dwarf.h" -diff -Naur dwarf-20130729/dwarfgen/dwarfgen.cc dwarf-20130729-c89/dwarfgen/dwarfgen.cc ---- dwarf-20130729/dwarfgen/dwarfgen.cc 2013-02-01 16:20:17.023330816 +0000 -+++ dwarf-20130729-c89/dwarfgen/dwarfgen.cc 2014-01-06 11:16:30.179830784 +0000 -@@ -56,8 +56,8 @@ - #include // For memset etc - #include //open - #include //open -+#include - #include "general.h" --#include "elf.h" - #include "gelf.h" - #include "strtabdata.h" - #include "dwarf.h" -diff -Naur dwarf-20130729/dwarfgen/irepattrtodbg.cc dwarf-20130729-c89/dwarfgen/irepattrtodbg.cc ---- dwarf-20130729/dwarfgen/irepattrtodbg.cc 2013-02-01 16:20:21.021495808 +0000 -+++ dwarf-20130729-c89/dwarfgen/irepattrtodbg.cc 2014-01-06 11:16:30.192937984 +0000 -@@ -30,7 +30,6 @@ - #include //open - #include //open - #include "general.h" --#include "elf.h" - #include "gelf.h" - #include "strtabdata.h" - #include "dwarf.h" -diff -Naur dwarf-20130729/dwarfgen/ireptodbg.cc dwarf-20130729-c89/dwarfgen/ireptodbg.cc ---- dwarf-20130729/dwarfgen/ireptodbg.cc 2013-02-01 16:20:26.022544384 +0000 -+++ dwarf-20130729-c89/dwarfgen/ireptodbg.cc 2014-01-06 11:16:30.201064448 +0000 -@@ -28,7 +28,6 @@ - #include // For memset etc - #include //open - #include //open --#include "elf.h" - #include "gelf.h" - #include "strtabdata.h" - #include "dwarf.h" -diff -Naur dwarf-20130729/libdwarf/gennames.c dwarf-20130729-c89/libdwarf/gennames.c ---- dwarf-20130729/libdwarf/gennames.c 2013-01-25 19:09:11.056885248 +0000 -+++ dwarf-20130729-c89/libdwarf/gennames.c 2014-01-06 11:16:30.209715200 +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.056885248 +0000 -+++ dwarf-20130729-c89/libdwarf/Makefile.in 2014-01-06 11:16:30.217055232 +0000 -@@ -213,8 +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 - rm -rf autom4te.cache diff --git a/dev-libs/libdwarf/patches/libdwarf-20170416.patchset b/dev-libs/libdwarf/patches/libdwarf-20170709.patchset similarity index 68% rename from dev-libs/libdwarf/patches/libdwarf-20170416.patchset rename to dev-libs/libdwarf/patches/libdwarf-20170709.patchset index 5f7e13b7e..76a2edd87 100644 --- a/dev-libs/libdwarf/patches/libdwarf-20170416.patchset +++ b/dev-libs/libdwarf/patches/libdwarf-20170709.patchset @@ -1,14 +1,14 @@ -From bbe4b9bc3ac315454aefa2922d7ae59fb82a31db Mon Sep 17 00:00:00 2001 +From 295a6a28837307dfe16d7ce26c70e7c4f36b81e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= Date: Wed, 21 Jun 2017 12:05:45 +0200 Subject: LibDWARF: Applying patches diff --git a/dwarfdump/Makefile.in b/dwarfdump/Makefile.in -index 91e89d1..db16055 100644 +index 415a1a6..c110495 100644 --- a/dwarfdump/Makefile.in +++ b/dwarfdump/Makefile.in -@@ -203,9 +203,11 @@ selftest: +@@ -212,9 +212,11 @@ selftest: # will work and leave sensible permissions on the resulting files. # Some adjustment might be required, see README. install: all @@ -24,10 +24,10 @@ index 91e89d1..db16055 100644 uninstall: -rm -f $(bindir)/dwarfdump diff --git a/libdwarf/Makefile.in b/libdwarf/Makefile.in -index 6a3fd0e..89943f4 100644 +index 355d2df..ce1c445 100644 --- a/libdwarf/Makefile.in +++ b/libdwarf/Makefile.in -@@ -226,7 +226,11 @@ clean: +@@ -227,7 +227,11 @@ clean: rm -f *~ install: all @@ -41,7 +41,7 @@ index 6a3fd0e..89943f4 100644 distclean: clean rm -f config.status config.log config.cache config.h diff --git a/libdwarf/gennames.c b/libdwarf/gennames.c -index 0ba2227..8052629 100644 +index a033f60..c12baf9 100644 --- a/libdwarf/gennames.c +++ b/libdwarf/gennames.c @@ -547,8 +547,8 @@ ParseDefinitionsAndWriteOutput(void) @@ -55,20 +55,20 @@ index 0ba2227..8052629 100644 if(feof(f_dwarf_in)) { break; -- -2.12.2 +2.7.0 -From 849094fe092611f3a885caba9819a85c6b44f6f2 Mon Sep 17 00:00:00 2001 +From 933601827fb4ac569ebc7538ae46f2d023809042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= Date: Wed, 21 Jun 2017 12:06:12 +0200 Subject: Hardlinks not supported on BFS diff --git a/libdwarf/Makefile.in b/libdwarf/Makefile.in -index 89943f4..c536032 100644 +index ce1c445..98513b6 100644 --- a/libdwarf/Makefile.in +++ b/libdwarf/Makefile.in -@@ -136,7 +136,7 @@ libdwarf.a: dwarf_names.h dwarf_names.c $(OBJS) dwarf_names.o +@@ -137,7 +137,7 @@ libdwarf.a: dwarf_names.h dwarf_names.c $(OBJS) dwarf_names.o libdwarf.so: dwarf_names.h dwarf_names.c $(OBJS) dwarf_names.o $(CC) $(CFLAGS) $(LDFLAGS) -shared $(OBJS) -Wl,-soname=$(SONAME) dwarf_names.o $(dwfzlib) -o $@ @@ -78,5 +78,30 @@ index 89943f4..c536032 100644 nosharedlibrary: echo "Not building shared library libdwarf.so" -- -2.12.2 +2.7.0 + + +From fd415eb7aa4df529183f31688b0f12ab757d78a6 Mon Sep 17 00:00:00 2001 +From: begasus +Date: Sat, 7 Oct 2017 12:38:02 +0200 +Subject: va_copy, gcc2 fix + + +diff --git a/dwarfdump/esb.c b/dwarfdump/esb.c +index 76e64ff..4991a22 100644 +--- a/dwarfdump/esb.c ++++ b/dwarfdump/esb.c +@@ -288,7 +288,9 @@ esb_allocate_more_if_needed(struct esb_s *data, + va_list ap_copy; + + /* Preserve the original argument list, to be used a second time */ +- va_copy(ap_copy,ap); ++ #if __GNUC__ == 2 ++ #define va_copy(ap_copy,ap) __va_copy(ap_copy,ap); ++ #endif + + #ifdef _WIN32 + netlen = vfprintf(null_device_handle,in_string,ap_copy); +-- +2.7.0