[gentoo-commits] proj/musl:master commit in: dev-util/dwarves/files/, dev-util/dwarves/

2020-05-25 Thread Anthony G. Basile
commit: 1f60892479e9e14d72f33c6ae9dfae7d9c67660d
Author: Dan Robertson  dlrobertson  com>
AuthorDate: Sun May 17 02:01:39 2020 +
Commit: Anthony G. Basile  gentoo  org>
CommitDate: Mon May 25 23:40:51 2020 +
URL:https://gitweb.gentoo.org/proj/musl.git/commit/?id=1f608924

dev-util/dwarves: patch for musl build

Signed-off-by: Dan Robertson  dlrobertson.com>
Signed-off-by: Anthony G. Basile  gentoo.org>

 dev-util/dwarves/Manifest  |   1 +
 dev-util/dwarves/dwarves-1.17.ebuild   |  46 +
 .../dwarves/files/dwarves-1.10-python-import.patch |  15 ++
 dev-util/dwarves/files/dwarves-1.17-musl.patch | 190 +
 dev-util/dwarves/metadata.xml  |   5 +
 5 files changed, 257 insertions(+)

diff --git a/dev-util/dwarves/Manifest b/dev-util/dwarves/Manifest
new file mode 100644
index 000..d9e3668
--- /dev/null
+++ b/dev-util/dwarves/Manifest
@@ -0,0 +1 @@
+DIST dwarves-1.17.tar.xz 309028 BLAKE2B 
600d095359fa1ef208cc83655761505a07512faf9957144cc5fdd9e69bef98be3afc8b29a4c13aa0246aa43fdc9b4906de95f37c86fc6790ece52a79e3b13695
 SHA512 
8916ea24316efe1eb322d045fb2d81c230905f2fe33942eac641e9e0311f33a3bcf55be454eac32781799c255303bafacd8f1bd1b3ec08f0dae4d5f38d8186ba

diff --git a/dev-util/dwarves/dwarves-1.17.ebuild 
b/dev-util/dwarves/dwarves-1.17.ebuild
new file mode 100644
index 000..b507d41
--- /dev/null
+++ b/dev-util/dwarves/dwarves-1.17.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+inherit multilib cmake-utils python-single-r1
+
+DESCRIPTION="pahole (Poke-a-Hole) and other DWARF2 utilities"
+HOMEPAGE="https://git.kernel.org/cgit/devel/pahole/pahole.git/";
+
+LICENSE="GPL-2" # only
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~arm64"
+IUSE="debug"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+   >=dev-libs/elfutils-0.178
+   sys-libs/zlib"
+DEPEND="${RDEPEND}"
+
+if [[ ${PV//_p} == ${PV} ]]; then
+   SRC_URI="http://fedorapeople.org/~acme/dwarves/${P}.tar.xz";
+else
+   SRC_URI="https://dev.gentoo.org/~zzam/${PN}/${P}.tar.xz";
+fi
+
+DOCS=( README README.ctracer NEWS )
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-1.10-python-import.patch
+   "${FILESDIR}"/${PN}-1.17-musl.patch
+
+)
+
+src_configure() {
+   local mycmakeargs=( "-D__LIB=$(get_libdir)" )
+   cmake-utils_src_configure
+}
+
+src_test() { :; }
+
+src_install() {
+   cmake-utils_src_install
+}

diff --git a/dev-util/dwarves/files/dwarves-1.10-python-import.patch 
b/dev-util/dwarves/files/dwarves-1.10-python-import.patch
new file mode 100644
index 000..e308ac6
--- /dev/null
+++ b/dev-util/dwarves/files/dwarves-1.10-python-import.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/show_bug.cgi?id=423817
+
+--- dwarves-1.10/ostra/ostra-cg
 dwarves-1.10/ostra/ostra-cg
+@@ -10,7 +10,9 @@
+ # under the terms of version 2 of the GNU General Public License as
+ # published by the Free Software Foundation.
+ 
+-import sys, datetime, os, ostra
++import sys
++sys.path.insert(0, "/usr/share/dwarves/runtime/python")
++import datetime, os, ostra
+ 
+ class_def = None
+ 

diff --git a/dev-util/dwarves/files/dwarves-1.17-musl.patch 
b/dev-util/dwarves/files/dwarves-1.17-musl.patch
new file mode 100644
index 000..12dd516
--- /dev/null
+++ b/dev-util/dwarves/files/dwarves-1.17-musl.patch
@@ -0,0 +1,190 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2d23226..1798a96 100644
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -74,6 +74,35 @@ if (NOT HAVE_REALLOCARRAY_SUPPORT)
+   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCOMPAT_NEED_REALLOCARRAY")
+ endif()
+ 
++CHECK_C_SOURCE_COMPILES(
++"
++#include 
++int main(void)
++{
++_obstack_begin(0, 0, 0, NULL, NULL);
++return 0;
++}
++" LIBC_IMPLEMENTS_OBSTACK)
++if (NOT LIBC_IMPLEMENTS_OBSTACK)
++  find_package(OBSTACK)
++endif()
++
++CHECK_C_SOURCE_COMPILES(
++"
++#include 
++int main(void)
++{
++int argc=1;
++char *argv[]={\"argp\"};
++argp_parse(0,argc,&argv,0,0,0); return 0;
++return 0;
++}
++" LIBC_IMPLEMENTS_ARGP)
++
++if (NOT LIBC_IMPLEMENTS_ARGP)
++  find_package(ARGP)
++endif()
++
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE64_SOURCE 
-D_FILE_OFFSET_BITS=64")
+ 
+ file(GLOB libbpf_sources "lib/bpf/src/*.c")
+@@ -91,7 +120,8 @@ set_target_properties(dwarves PROPERTIES VERSION 1.0.0 
SOVERSION 1)
+ set_target_properties(dwarves PROPERTIES INTERFACE_LINK_LIBRARIES "")
+ target_include_directories(dwarves PRIVATE
+  ${CMAKE_CURRENT_SOURCE_DIR}/lib/bpf/include/uapi)
+-target_link_libraries(dwarves ${DWARF_LIBRARIES} ${ZLIB_LIBRARIES})
++target_link_libraries(dwarves ${DWARF_LIBRARIES} ${ZLIB_LIBRARIES}
++${ARGP_LIBRARY} ${OBSTACK_LIBRARY})
+ 
+ set(dwarves_emit_LIB_SRCS dwarves_emit.c)
+ add_library(dwarves_emit SHARED ${dwarves_emit_LIB_SRCS})
+diff --git a/cmak

[gentoo-commits] proj/musl:master commit in: dev-util/dwarves/files/, dev-util/dwarves/

2020-05-25 Thread Anthony G. Basile
commit: 1f60892479e9e14d72f33c6ae9dfae7d9c67660d
Author: Dan Robertson  dlrobertson  com>
AuthorDate: Sun May 17 02:01:39 2020 +
Commit: Anthony G. Basile  gentoo  org>
CommitDate: Mon May 25 23:40:51 2020 +
URL:https://gitweb.gentoo.org/proj/musl.git/commit/?id=1f608924

dev-util/dwarves: patch for musl build

Signed-off-by: Dan Robertson  dlrobertson.com>
Signed-off-by: Anthony G. Basile  gentoo.org>

 dev-util/dwarves/Manifest  |   1 +
 dev-util/dwarves/dwarves-1.17.ebuild   |  46 +
 .../dwarves/files/dwarves-1.10-python-import.patch |  15 ++
 dev-util/dwarves/files/dwarves-1.17-musl.patch | 190 +
 dev-util/dwarves/metadata.xml  |   5 +
 5 files changed, 257 insertions(+)

diff --git a/dev-util/dwarves/Manifest b/dev-util/dwarves/Manifest
new file mode 100644
index 000..d9e3668
--- /dev/null
+++ b/dev-util/dwarves/Manifest
@@ -0,0 +1 @@
+DIST dwarves-1.17.tar.xz 309028 BLAKE2B 
600d095359fa1ef208cc83655761505a07512faf9957144cc5fdd9e69bef98be3afc8b29a4c13aa0246aa43fdc9b4906de95f37c86fc6790ece52a79e3b13695
 SHA512 
8916ea24316efe1eb322d045fb2d81c230905f2fe33942eac641e9e0311f33a3bcf55be454eac32781799c255303bafacd8f1bd1b3ec08f0dae4d5f38d8186ba

diff --git a/dev-util/dwarves/dwarves-1.17.ebuild 
b/dev-util/dwarves/dwarves-1.17.ebuild
new file mode 100644
index 000..b507d41
--- /dev/null
+++ b/dev-util/dwarves/dwarves-1.17.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+inherit multilib cmake-utils python-single-r1
+
+DESCRIPTION="pahole (Poke-a-Hole) and other DWARF2 utilities"
+HOMEPAGE="https://git.kernel.org/cgit/devel/pahole/pahole.git/";
+
+LICENSE="GPL-2" # only
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~arm64"
+IUSE="debug"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+   >=dev-libs/elfutils-0.178
+   sys-libs/zlib"
+DEPEND="${RDEPEND}"
+
+if [[ ${PV//_p} == ${PV} ]]; then
+   SRC_URI="http://fedorapeople.org/~acme/dwarves/${P}.tar.xz";
+else
+   SRC_URI="https://dev.gentoo.org/~zzam/${PN}/${P}.tar.xz";
+fi
+
+DOCS=( README README.ctracer NEWS )
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-1.10-python-import.patch
+   "${FILESDIR}"/${PN}-1.17-musl.patch
+
+)
+
+src_configure() {
+   local mycmakeargs=( "-D__LIB=$(get_libdir)" )
+   cmake-utils_src_configure
+}
+
+src_test() { :; }
+
+src_install() {
+   cmake-utils_src_install
+}

diff --git a/dev-util/dwarves/files/dwarves-1.10-python-import.patch 
b/dev-util/dwarves/files/dwarves-1.10-python-import.patch
new file mode 100644
index 000..e308ac6
--- /dev/null
+++ b/dev-util/dwarves/files/dwarves-1.10-python-import.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/show_bug.cgi?id=423817
+
+--- dwarves-1.10/ostra/ostra-cg
 dwarves-1.10/ostra/ostra-cg
+@@ -10,7 +10,9 @@
+ # under the terms of version 2 of the GNU General Public License as
+ # published by the Free Software Foundation.
+ 
+-import sys, datetime, os, ostra
++import sys
++sys.path.insert(0, "/usr/share/dwarves/runtime/python")
++import datetime, os, ostra
+ 
+ class_def = None
+ 

diff --git a/dev-util/dwarves/files/dwarves-1.17-musl.patch 
b/dev-util/dwarves/files/dwarves-1.17-musl.patch
new file mode 100644
index 000..12dd516
--- /dev/null
+++ b/dev-util/dwarves/files/dwarves-1.17-musl.patch
@@ -0,0 +1,190 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2d23226..1798a96 100644
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -74,6 +74,35 @@ if (NOT HAVE_REALLOCARRAY_SUPPORT)
+   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCOMPAT_NEED_REALLOCARRAY")
+ endif()
+ 
++CHECK_C_SOURCE_COMPILES(
++"
++#include 
++int main(void)
++{
++_obstack_begin(0, 0, 0, NULL, NULL);
++return 0;
++}
++" LIBC_IMPLEMENTS_OBSTACK)
++if (NOT LIBC_IMPLEMENTS_OBSTACK)
++  find_package(OBSTACK)
++endif()
++
++CHECK_C_SOURCE_COMPILES(
++"
++#include 
++int main(void)
++{
++int argc=1;
++char *argv[]={\"argp\"};
++argp_parse(0,argc,&argv,0,0,0); return 0;
++return 0;
++}
++" LIBC_IMPLEMENTS_ARGP)
++
++if (NOT LIBC_IMPLEMENTS_ARGP)
++  find_package(ARGP)
++endif()
++
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE64_SOURCE 
-D_FILE_OFFSET_BITS=64")
+ 
+ file(GLOB libbpf_sources "lib/bpf/src/*.c")
+@@ -91,7 +120,8 @@ set_target_properties(dwarves PROPERTIES VERSION 1.0.0 
SOVERSION 1)
+ set_target_properties(dwarves PROPERTIES INTERFACE_LINK_LIBRARIES "")
+ target_include_directories(dwarves PRIVATE
+  ${CMAKE_CURRENT_SOURCE_DIR}/lib/bpf/include/uapi)
+-target_link_libraries(dwarves ${DWARF_LIBRARIES} ${ZLIB_LIBRARIES})
++target_link_libraries(dwarves ${DWARF_LIBRARIES} ${ZLIB_LIBRARIES}
++${ARGP_LIBRARY} ${OBSTACK_LIBRARY})
+ 
+ set(dwarves_emit_LIB_SRCS dwarves_emit.c)
+ add_library(dwarves_emit SHARED ${dwarves_emit_LIB_SRCS})
+diff --git a/cmak

[gentoo-commits] proj/musl:master commit in: dev-util/dwarves/files/, dev-util/dwarves/

2020-05-25 Thread Anthony G. Basile
commit: 1f60892479e9e14d72f33c6ae9dfae7d9c67660d
Author: Dan Robertson  dlrobertson  com>
AuthorDate: Sun May 17 02:01:39 2020 +
Commit: Anthony G. Basile  gentoo  org>
CommitDate: Mon May 25 23:40:51 2020 +
URL:https://gitweb.gentoo.org/proj/musl.git/commit/?id=1f608924

dev-util/dwarves: patch for musl build

Signed-off-by: Dan Robertson  dlrobertson.com>
Signed-off-by: Anthony G. Basile  gentoo.org>

 dev-util/dwarves/Manifest  |   1 +
 dev-util/dwarves/dwarves-1.17.ebuild   |  46 +
 .../dwarves/files/dwarves-1.10-python-import.patch |  15 ++
 dev-util/dwarves/files/dwarves-1.17-musl.patch | 190 +
 dev-util/dwarves/metadata.xml  |   5 +
 5 files changed, 257 insertions(+)

diff --git a/dev-util/dwarves/Manifest b/dev-util/dwarves/Manifest
new file mode 100644
index 000..d9e3668
--- /dev/null
+++ b/dev-util/dwarves/Manifest
@@ -0,0 +1 @@
+DIST dwarves-1.17.tar.xz 309028 BLAKE2B 
600d095359fa1ef208cc83655761505a07512faf9957144cc5fdd9e69bef98be3afc8b29a4c13aa0246aa43fdc9b4906de95f37c86fc6790ece52a79e3b13695
 SHA512 
8916ea24316efe1eb322d045fb2d81c230905f2fe33942eac641e9e0311f33a3bcf55be454eac32781799c255303bafacd8f1bd1b3ec08f0dae4d5f38d8186ba

diff --git a/dev-util/dwarves/dwarves-1.17.ebuild 
b/dev-util/dwarves/dwarves-1.17.ebuild
new file mode 100644
index 000..b507d41
--- /dev/null
+++ b/dev-util/dwarves/dwarves-1.17.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+inherit multilib cmake-utils python-single-r1
+
+DESCRIPTION="pahole (Poke-a-Hole) and other DWARF2 utilities"
+HOMEPAGE="https://git.kernel.org/cgit/devel/pahole/pahole.git/";
+
+LICENSE="GPL-2" # only
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~arm64"
+IUSE="debug"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+   >=dev-libs/elfutils-0.178
+   sys-libs/zlib"
+DEPEND="${RDEPEND}"
+
+if [[ ${PV//_p} == ${PV} ]]; then
+   SRC_URI="http://fedorapeople.org/~acme/dwarves/${P}.tar.xz";
+else
+   SRC_URI="https://dev.gentoo.org/~zzam/${PN}/${P}.tar.xz";
+fi
+
+DOCS=( README README.ctracer NEWS )
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-1.10-python-import.patch
+   "${FILESDIR}"/${PN}-1.17-musl.patch
+
+)
+
+src_configure() {
+   local mycmakeargs=( "-D__LIB=$(get_libdir)" )
+   cmake-utils_src_configure
+}
+
+src_test() { :; }
+
+src_install() {
+   cmake-utils_src_install
+}

diff --git a/dev-util/dwarves/files/dwarves-1.10-python-import.patch 
b/dev-util/dwarves/files/dwarves-1.10-python-import.patch
new file mode 100644
index 000..e308ac6
--- /dev/null
+++ b/dev-util/dwarves/files/dwarves-1.10-python-import.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/show_bug.cgi?id=423817
+
+--- dwarves-1.10/ostra/ostra-cg
 dwarves-1.10/ostra/ostra-cg
+@@ -10,7 +10,9 @@
+ # under the terms of version 2 of the GNU General Public License as
+ # published by the Free Software Foundation.
+ 
+-import sys, datetime, os, ostra
++import sys
++sys.path.insert(0, "/usr/share/dwarves/runtime/python")
++import datetime, os, ostra
+ 
+ class_def = None
+ 

diff --git a/dev-util/dwarves/files/dwarves-1.17-musl.patch 
b/dev-util/dwarves/files/dwarves-1.17-musl.patch
new file mode 100644
index 000..12dd516
--- /dev/null
+++ b/dev-util/dwarves/files/dwarves-1.17-musl.patch
@@ -0,0 +1,190 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2d23226..1798a96 100644
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -74,6 +74,35 @@ if (NOT HAVE_REALLOCARRAY_SUPPORT)
+   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCOMPAT_NEED_REALLOCARRAY")
+ endif()
+ 
++CHECK_C_SOURCE_COMPILES(
++"
++#include 
++int main(void)
++{
++_obstack_begin(0, 0, 0, NULL, NULL);
++return 0;
++}
++" LIBC_IMPLEMENTS_OBSTACK)
++if (NOT LIBC_IMPLEMENTS_OBSTACK)
++  find_package(OBSTACK)
++endif()
++
++CHECK_C_SOURCE_COMPILES(
++"
++#include 
++int main(void)
++{
++int argc=1;
++char *argv[]={\"argp\"};
++argp_parse(0,argc,&argv,0,0,0); return 0;
++return 0;
++}
++" LIBC_IMPLEMENTS_ARGP)
++
++if (NOT LIBC_IMPLEMENTS_ARGP)
++  find_package(ARGP)
++endif()
++
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE64_SOURCE 
-D_FILE_OFFSET_BITS=64")
+ 
+ file(GLOB libbpf_sources "lib/bpf/src/*.c")
+@@ -91,7 +120,8 @@ set_target_properties(dwarves PROPERTIES VERSION 1.0.0 
SOVERSION 1)
+ set_target_properties(dwarves PROPERTIES INTERFACE_LINK_LIBRARIES "")
+ target_include_directories(dwarves PRIVATE
+  ${CMAKE_CURRENT_SOURCE_DIR}/lib/bpf/include/uapi)
+-target_link_libraries(dwarves ${DWARF_LIBRARIES} ${ZLIB_LIBRARIES})
++target_link_libraries(dwarves ${DWARF_LIBRARIES} ${ZLIB_LIBRARIES}
++${ARGP_LIBRARY} ${OBSTACK_LIBRARY})
+ 
+ set(dwarves_emit_LIB_SRCS dwarves_emit.c)
+ add_library(dwarves_emit SHARED ${dwarves_emit_LIB_SRCS})
+diff --git a/cmak

[gentoo-commits] proj/musl:master commit in: dev-util/dwarves/files/, dev-util/dwarves/

2020-05-25 Thread Anthony G. Basile
commit: 1f60892479e9e14d72f33c6ae9dfae7d9c67660d
Author: Dan Robertson  dlrobertson  com>
AuthorDate: Sun May 17 02:01:39 2020 +
Commit: Anthony G. Basile  gentoo  org>
CommitDate: Mon May 25 23:40:51 2020 +
URL:https://gitweb.gentoo.org/proj/musl.git/commit/?id=1f608924

dev-util/dwarves: patch for musl build

Signed-off-by: Dan Robertson  dlrobertson.com>
Signed-off-by: Anthony G. Basile  gentoo.org>

 dev-util/dwarves/Manifest  |   1 +
 dev-util/dwarves/dwarves-1.17.ebuild   |  46 +
 .../dwarves/files/dwarves-1.10-python-import.patch |  15 ++
 dev-util/dwarves/files/dwarves-1.17-musl.patch | 190 +
 dev-util/dwarves/metadata.xml  |   5 +
 5 files changed, 257 insertions(+)

diff --git a/dev-util/dwarves/Manifest b/dev-util/dwarves/Manifest
new file mode 100644
index 000..d9e3668
--- /dev/null
+++ b/dev-util/dwarves/Manifest
@@ -0,0 +1 @@
+DIST dwarves-1.17.tar.xz 309028 BLAKE2B 
600d095359fa1ef208cc83655761505a07512faf9957144cc5fdd9e69bef98be3afc8b29a4c13aa0246aa43fdc9b4906de95f37c86fc6790ece52a79e3b13695
 SHA512 
8916ea24316efe1eb322d045fb2d81c230905f2fe33942eac641e9e0311f33a3bcf55be454eac32781799c255303bafacd8f1bd1b3ec08f0dae4d5f38d8186ba

diff --git a/dev-util/dwarves/dwarves-1.17.ebuild 
b/dev-util/dwarves/dwarves-1.17.ebuild
new file mode 100644
index 000..b507d41
--- /dev/null
+++ b/dev-util/dwarves/dwarves-1.17.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+inherit multilib cmake-utils python-single-r1
+
+DESCRIPTION="pahole (Poke-a-Hole) and other DWARF2 utilities"
+HOMEPAGE="https://git.kernel.org/cgit/devel/pahole/pahole.git/";
+
+LICENSE="GPL-2" # only
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~arm64"
+IUSE="debug"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+   >=dev-libs/elfutils-0.178
+   sys-libs/zlib"
+DEPEND="${RDEPEND}"
+
+if [[ ${PV//_p} == ${PV} ]]; then
+   SRC_URI="http://fedorapeople.org/~acme/dwarves/${P}.tar.xz";
+else
+   SRC_URI="https://dev.gentoo.org/~zzam/${PN}/${P}.tar.xz";
+fi
+
+DOCS=( README README.ctracer NEWS )
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-1.10-python-import.patch
+   "${FILESDIR}"/${PN}-1.17-musl.patch
+
+)
+
+src_configure() {
+   local mycmakeargs=( "-D__LIB=$(get_libdir)" )
+   cmake-utils_src_configure
+}
+
+src_test() { :; }
+
+src_install() {
+   cmake-utils_src_install
+}

diff --git a/dev-util/dwarves/files/dwarves-1.10-python-import.patch 
b/dev-util/dwarves/files/dwarves-1.10-python-import.patch
new file mode 100644
index 000..e308ac6
--- /dev/null
+++ b/dev-util/dwarves/files/dwarves-1.10-python-import.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/show_bug.cgi?id=423817
+
+--- dwarves-1.10/ostra/ostra-cg
 dwarves-1.10/ostra/ostra-cg
+@@ -10,7 +10,9 @@
+ # under the terms of version 2 of the GNU General Public License as
+ # published by the Free Software Foundation.
+ 
+-import sys, datetime, os, ostra
++import sys
++sys.path.insert(0, "/usr/share/dwarves/runtime/python")
++import datetime, os, ostra
+ 
+ class_def = None
+ 

diff --git a/dev-util/dwarves/files/dwarves-1.17-musl.patch 
b/dev-util/dwarves/files/dwarves-1.17-musl.patch
new file mode 100644
index 000..12dd516
--- /dev/null
+++ b/dev-util/dwarves/files/dwarves-1.17-musl.patch
@@ -0,0 +1,190 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2d23226..1798a96 100644
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -74,6 +74,35 @@ if (NOT HAVE_REALLOCARRAY_SUPPORT)
+   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCOMPAT_NEED_REALLOCARRAY")
+ endif()
+ 
++CHECK_C_SOURCE_COMPILES(
++"
++#include 
++int main(void)
++{
++_obstack_begin(0, 0, 0, NULL, NULL);
++return 0;
++}
++" LIBC_IMPLEMENTS_OBSTACK)
++if (NOT LIBC_IMPLEMENTS_OBSTACK)
++  find_package(OBSTACK)
++endif()
++
++CHECK_C_SOURCE_COMPILES(
++"
++#include 
++int main(void)
++{
++int argc=1;
++char *argv[]={\"argp\"};
++argp_parse(0,argc,&argv,0,0,0); return 0;
++return 0;
++}
++" LIBC_IMPLEMENTS_ARGP)
++
++if (NOT LIBC_IMPLEMENTS_ARGP)
++  find_package(ARGP)
++endif()
++
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE64_SOURCE 
-D_FILE_OFFSET_BITS=64")
+ 
+ file(GLOB libbpf_sources "lib/bpf/src/*.c")
+@@ -91,7 +120,8 @@ set_target_properties(dwarves PROPERTIES VERSION 1.0.0 
SOVERSION 1)
+ set_target_properties(dwarves PROPERTIES INTERFACE_LINK_LIBRARIES "")
+ target_include_directories(dwarves PRIVATE
+  ${CMAKE_CURRENT_SOURCE_DIR}/lib/bpf/include/uapi)
+-target_link_libraries(dwarves ${DWARF_LIBRARIES} ${ZLIB_LIBRARIES})
++target_link_libraries(dwarves ${DWARF_LIBRARIES} ${ZLIB_LIBRARIES}
++${ARGP_LIBRARY} ${OBSTACK_LIBRARY})
+ 
+ set(dwarves_emit_LIB_SRCS dwarves_emit.c)
+ add_library(dwarves_emit SHARED ${dwarves_emit_LIB_SRCS})
+diff --git a/cmak

[gentoo-commits] proj/musl:master commit in: dev-util/dwarves/files/, dev-util/dwarves/

2020-05-25 Thread Anthony G. Basile
commit: 1f60892479e9e14d72f33c6ae9dfae7d9c67660d
Author: Dan Robertson  dlrobertson  com>
AuthorDate: Sun May 17 02:01:39 2020 +
Commit: Anthony G. Basile  gentoo  org>
CommitDate: Mon May 25 23:40:51 2020 +
URL:https://gitweb.gentoo.org/proj/musl.git/commit/?id=1f608924

dev-util/dwarves: patch for musl build

Signed-off-by: Dan Robertson  dlrobertson.com>
Signed-off-by: Anthony G. Basile  gentoo.org>

 dev-util/dwarves/Manifest  |   1 +
 dev-util/dwarves/dwarves-1.17.ebuild   |  46 +
 .../dwarves/files/dwarves-1.10-python-import.patch |  15 ++
 dev-util/dwarves/files/dwarves-1.17-musl.patch | 190 +
 dev-util/dwarves/metadata.xml  |   5 +
 5 files changed, 257 insertions(+)

diff --git a/dev-util/dwarves/Manifest b/dev-util/dwarves/Manifest
new file mode 100644
index 000..d9e3668
--- /dev/null
+++ b/dev-util/dwarves/Manifest
@@ -0,0 +1 @@
+DIST dwarves-1.17.tar.xz 309028 BLAKE2B 
600d095359fa1ef208cc83655761505a07512faf9957144cc5fdd9e69bef98be3afc8b29a4c13aa0246aa43fdc9b4906de95f37c86fc6790ece52a79e3b13695
 SHA512 
8916ea24316efe1eb322d045fb2d81c230905f2fe33942eac641e9e0311f33a3bcf55be454eac32781799c255303bafacd8f1bd1b3ec08f0dae4d5f38d8186ba

diff --git a/dev-util/dwarves/dwarves-1.17.ebuild 
b/dev-util/dwarves/dwarves-1.17.ebuild
new file mode 100644
index 000..b507d41
--- /dev/null
+++ b/dev-util/dwarves/dwarves-1.17.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+inherit multilib cmake-utils python-single-r1
+
+DESCRIPTION="pahole (Poke-a-Hole) and other DWARF2 utilities"
+HOMEPAGE="https://git.kernel.org/cgit/devel/pahole/pahole.git/";
+
+LICENSE="GPL-2" # only
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~arm64"
+IUSE="debug"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+   >=dev-libs/elfutils-0.178
+   sys-libs/zlib"
+DEPEND="${RDEPEND}"
+
+if [[ ${PV//_p} == ${PV} ]]; then
+   SRC_URI="http://fedorapeople.org/~acme/dwarves/${P}.tar.xz";
+else
+   SRC_URI="https://dev.gentoo.org/~zzam/${PN}/${P}.tar.xz";
+fi
+
+DOCS=( README README.ctracer NEWS )
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-1.10-python-import.patch
+   "${FILESDIR}"/${PN}-1.17-musl.patch
+
+)
+
+src_configure() {
+   local mycmakeargs=( "-D__LIB=$(get_libdir)" )
+   cmake-utils_src_configure
+}
+
+src_test() { :; }
+
+src_install() {
+   cmake-utils_src_install
+}

diff --git a/dev-util/dwarves/files/dwarves-1.10-python-import.patch 
b/dev-util/dwarves/files/dwarves-1.10-python-import.patch
new file mode 100644
index 000..e308ac6
--- /dev/null
+++ b/dev-util/dwarves/files/dwarves-1.10-python-import.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/show_bug.cgi?id=423817
+
+--- dwarves-1.10/ostra/ostra-cg
 dwarves-1.10/ostra/ostra-cg
+@@ -10,7 +10,9 @@
+ # under the terms of version 2 of the GNU General Public License as
+ # published by the Free Software Foundation.
+ 
+-import sys, datetime, os, ostra
++import sys
++sys.path.insert(0, "/usr/share/dwarves/runtime/python")
++import datetime, os, ostra
+ 
+ class_def = None
+ 

diff --git a/dev-util/dwarves/files/dwarves-1.17-musl.patch 
b/dev-util/dwarves/files/dwarves-1.17-musl.patch
new file mode 100644
index 000..12dd516
--- /dev/null
+++ b/dev-util/dwarves/files/dwarves-1.17-musl.patch
@@ -0,0 +1,190 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2d23226..1798a96 100644
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -74,6 +74,35 @@ if (NOT HAVE_REALLOCARRAY_SUPPORT)
+   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCOMPAT_NEED_REALLOCARRAY")
+ endif()
+ 
++CHECK_C_SOURCE_COMPILES(
++"
++#include 
++int main(void)
++{
++_obstack_begin(0, 0, 0, NULL, NULL);
++return 0;
++}
++" LIBC_IMPLEMENTS_OBSTACK)
++if (NOT LIBC_IMPLEMENTS_OBSTACK)
++  find_package(OBSTACK)
++endif()
++
++CHECK_C_SOURCE_COMPILES(
++"
++#include 
++int main(void)
++{
++int argc=1;
++char *argv[]={\"argp\"};
++argp_parse(0,argc,&argv,0,0,0); return 0;
++return 0;
++}
++" LIBC_IMPLEMENTS_ARGP)
++
++if (NOT LIBC_IMPLEMENTS_ARGP)
++  find_package(ARGP)
++endif()
++
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE64_SOURCE 
-D_FILE_OFFSET_BITS=64")
+ 
+ file(GLOB libbpf_sources "lib/bpf/src/*.c")
+@@ -91,7 +120,8 @@ set_target_properties(dwarves PROPERTIES VERSION 1.0.0 
SOVERSION 1)
+ set_target_properties(dwarves PROPERTIES INTERFACE_LINK_LIBRARIES "")
+ target_include_directories(dwarves PRIVATE
+  ${CMAKE_CURRENT_SOURCE_DIR}/lib/bpf/include/uapi)
+-target_link_libraries(dwarves ${DWARF_LIBRARIES} ${ZLIB_LIBRARIES})
++target_link_libraries(dwarves ${DWARF_LIBRARIES} ${ZLIB_LIBRARIES}
++${ARGP_LIBRARY} ${OBSTACK_LIBRARY})
+ 
+ set(dwarves_emit_LIB_SRCS dwarves_emit.c)
+ add_library(dwarves_emit SHARED ${dwarves_emit_LIB_SRCS})
+diff --git a/cmak

[gentoo-commits] proj/musl:master commit in: dev-util/dwarves/files/, dev-util/dwarves/

2020-05-25 Thread Anthony G. Basile
commit: 1f60892479e9e14d72f33c6ae9dfae7d9c67660d
Author: Dan Robertson  dlrobertson  com>
AuthorDate: Sun May 17 02:01:39 2020 +
Commit: Anthony G. Basile  gentoo  org>
CommitDate: Mon May 25 23:40:51 2020 +
URL:https://gitweb.gentoo.org/proj/musl.git/commit/?id=1f608924

dev-util/dwarves: patch for musl build

Signed-off-by: Dan Robertson  dlrobertson.com>
Signed-off-by: Anthony G. Basile  gentoo.org>

 dev-util/dwarves/Manifest  |   1 +
 dev-util/dwarves/dwarves-1.17.ebuild   |  46 +
 .../dwarves/files/dwarves-1.10-python-import.patch |  15 ++
 dev-util/dwarves/files/dwarves-1.17-musl.patch | 190 +
 dev-util/dwarves/metadata.xml  |   5 +
 5 files changed, 257 insertions(+)

diff --git a/dev-util/dwarves/Manifest b/dev-util/dwarves/Manifest
new file mode 100644
index 000..d9e3668
--- /dev/null
+++ b/dev-util/dwarves/Manifest
@@ -0,0 +1 @@
+DIST dwarves-1.17.tar.xz 309028 BLAKE2B 
600d095359fa1ef208cc83655761505a07512faf9957144cc5fdd9e69bef98be3afc8b29a4c13aa0246aa43fdc9b4906de95f37c86fc6790ece52a79e3b13695
 SHA512 
8916ea24316efe1eb322d045fb2d81c230905f2fe33942eac641e9e0311f33a3bcf55be454eac32781799c255303bafacd8f1bd1b3ec08f0dae4d5f38d8186ba

diff --git a/dev-util/dwarves/dwarves-1.17.ebuild 
b/dev-util/dwarves/dwarves-1.17.ebuild
new file mode 100644
index 000..b507d41
--- /dev/null
+++ b/dev-util/dwarves/dwarves-1.17.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+inherit multilib cmake-utils python-single-r1
+
+DESCRIPTION="pahole (Poke-a-Hole) and other DWARF2 utilities"
+HOMEPAGE="https://git.kernel.org/cgit/devel/pahole/pahole.git/";
+
+LICENSE="GPL-2" # only
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~arm64"
+IUSE="debug"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+   >=dev-libs/elfutils-0.178
+   sys-libs/zlib"
+DEPEND="${RDEPEND}"
+
+if [[ ${PV//_p} == ${PV} ]]; then
+   SRC_URI="http://fedorapeople.org/~acme/dwarves/${P}.tar.xz";
+else
+   SRC_URI="https://dev.gentoo.org/~zzam/${PN}/${P}.tar.xz";
+fi
+
+DOCS=( README README.ctracer NEWS )
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-1.10-python-import.patch
+   "${FILESDIR}"/${PN}-1.17-musl.patch
+
+)
+
+src_configure() {
+   local mycmakeargs=( "-D__LIB=$(get_libdir)" )
+   cmake-utils_src_configure
+}
+
+src_test() { :; }
+
+src_install() {
+   cmake-utils_src_install
+}

diff --git a/dev-util/dwarves/files/dwarves-1.10-python-import.patch 
b/dev-util/dwarves/files/dwarves-1.10-python-import.patch
new file mode 100644
index 000..e308ac6
--- /dev/null
+++ b/dev-util/dwarves/files/dwarves-1.10-python-import.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/show_bug.cgi?id=423817
+
+--- dwarves-1.10/ostra/ostra-cg
 dwarves-1.10/ostra/ostra-cg
+@@ -10,7 +10,9 @@
+ # under the terms of version 2 of the GNU General Public License as
+ # published by the Free Software Foundation.
+ 
+-import sys, datetime, os, ostra
++import sys
++sys.path.insert(0, "/usr/share/dwarves/runtime/python")
++import datetime, os, ostra
+ 
+ class_def = None
+ 

diff --git a/dev-util/dwarves/files/dwarves-1.17-musl.patch 
b/dev-util/dwarves/files/dwarves-1.17-musl.patch
new file mode 100644
index 000..12dd516
--- /dev/null
+++ b/dev-util/dwarves/files/dwarves-1.17-musl.patch
@@ -0,0 +1,190 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2d23226..1798a96 100644
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -74,6 +74,35 @@ if (NOT HAVE_REALLOCARRAY_SUPPORT)
+   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCOMPAT_NEED_REALLOCARRAY")
+ endif()
+ 
++CHECK_C_SOURCE_COMPILES(
++"
++#include 
++int main(void)
++{
++_obstack_begin(0, 0, 0, NULL, NULL);
++return 0;
++}
++" LIBC_IMPLEMENTS_OBSTACK)
++if (NOT LIBC_IMPLEMENTS_OBSTACK)
++  find_package(OBSTACK)
++endif()
++
++CHECK_C_SOURCE_COMPILES(
++"
++#include 
++int main(void)
++{
++int argc=1;
++char *argv[]={\"argp\"};
++argp_parse(0,argc,&argv,0,0,0); return 0;
++return 0;
++}
++" LIBC_IMPLEMENTS_ARGP)
++
++if (NOT LIBC_IMPLEMENTS_ARGP)
++  find_package(ARGP)
++endif()
++
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE64_SOURCE 
-D_FILE_OFFSET_BITS=64")
+ 
+ file(GLOB libbpf_sources "lib/bpf/src/*.c")
+@@ -91,7 +120,8 @@ set_target_properties(dwarves PROPERTIES VERSION 1.0.0 
SOVERSION 1)
+ set_target_properties(dwarves PROPERTIES INTERFACE_LINK_LIBRARIES "")
+ target_include_directories(dwarves PRIVATE
+  ${CMAKE_CURRENT_SOURCE_DIR}/lib/bpf/include/uapi)
+-target_link_libraries(dwarves ${DWARF_LIBRARIES} ${ZLIB_LIBRARIES})
++target_link_libraries(dwarves ${DWARF_LIBRARIES} ${ZLIB_LIBRARIES}
++${ARGP_LIBRARY} ${OBSTACK_LIBRARY})
+ 
+ set(dwarves_emit_LIB_SRCS dwarves_emit.c)
+ add_library(dwarves_emit SHARED ${dwarves_emit_LIB_SRCS})
+diff --git a/cmak

[gentoo-commits] proj/musl:master commit in: dev-util/dwarves/files/, dev-util/dwarves/

2020-05-25 Thread Anthony G. Basile
commit: 1f60892479e9e14d72f33c6ae9dfae7d9c67660d
Author: Dan Robertson  dlrobertson  com>
AuthorDate: Sun May 17 02:01:39 2020 +
Commit: Anthony G. Basile  gentoo  org>
CommitDate: Mon May 25 23:40:51 2020 +
URL:https://gitweb.gentoo.org/proj/musl.git/commit/?id=1f608924

dev-util/dwarves: patch for musl build

Signed-off-by: Dan Robertson  dlrobertson.com>
Signed-off-by: Anthony G. Basile  gentoo.org>

 dev-util/dwarves/Manifest  |   1 +
 dev-util/dwarves/dwarves-1.17.ebuild   |  46 +
 .../dwarves/files/dwarves-1.10-python-import.patch |  15 ++
 dev-util/dwarves/files/dwarves-1.17-musl.patch | 190 +
 dev-util/dwarves/metadata.xml  |   5 +
 5 files changed, 257 insertions(+)

diff --git a/dev-util/dwarves/Manifest b/dev-util/dwarves/Manifest
new file mode 100644
index 000..d9e3668
--- /dev/null
+++ b/dev-util/dwarves/Manifest
@@ -0,0 +1 @@
+DIST dwarves-1.17.tar.xz 309028 BLAKE2B 
600d095359fa1ef208cc83655761505a07512faf9957144cc5fdd9e69bef98be3afc8b29a4c13aa0246aa43fdc9b4906de95f37c86fc6790ece52a79e3b13695
 SHA512 
8916ea24316efe1eb322d045fb2d81c230905f2fe33942eac641e9e0311f33a3bcf55be454eac32781799c255303bafacd8f1bd1b3ec08f0dae4d5f38d8186ba

diff --git a/dev-util/dwarves/dwarves-1.17.ebuild 
b/dev-util/dwarves/dwarves-1.17.ebuild
new file mode 100644
index 000..b507d41
--- /dev/null
+++ b/dev-util/dwarves/dwarves-1.17.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+inherit multilib cmake-utils python-single-r1
+
+DESCRIPTION="pahole (Poke-a-Hole) and other DWARF2 utilities"
+HOMEPAGE="https://git.kernel.org/cgit/devel/pahole/pahole.git/";
+
+LICENSE="GPL-2" # only
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~arm64"
+IUSE="debug"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+   >=dev-libs/elfutils-0.178
+   sys-libs/zlib"
+DEPEND="${RDEPEND}"
+
+if [[ ${PV//_p} == ${PV} ]]; then
+   SRC_URI="http://fedorapeople.org/~acme/dwarves/${P}.tar.xz";
+else
+   SRC_URI="https://dev.gentoo.org/~zzam/${PN}/${P}.tar.xz";
+fi
+
+DOCS=( README README.ctracer NEWS )
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-1.10-python-import.patch
+   "${FILESDIR}"/${PN}-1.17-musl.patch
+
+)
+
+src_configure() {
+   local mycmakeargs=( "-D__LIB=$(get_libdir)" )
+   cmake-utils_src_configure
+}
+
+src_test() { :; }
+
+src_install() {
+   cmake-utils_src_install
+}

diff --git a/dev-util/dwarves/files/dwarves-1.10-python-import.patch 
b/dev-util/dwarves/files/dwarves-1.10-python-import.patch
new file mode 100644
index 000..e308ac6
--- /dev/null
+++ b/dev-util/dwarves/files/dwarves-1.10-python-import.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/show_bug.cgi?id=423817
+
+--- dwarves-1.10/ostra/ostra-cg
 dwarves-1.10/ostra/ostra-cg
+@@ -10,7 +10,9 @@
+ # under the terms of version 2 of the GNU General Public License as
+ # published by the Free Software Foundation.
+ 
+-import sys, datetime, os, ostra
++import sys
++sys.path.insert(0, "/usr/share/dwarves/runtime/python")
++import datetime, os, ostra
+ 
+ class_def = None
+ 

diff --git a/dev-util/dwarves/files/dwarves-1.17-musl.patch 
b/dev-util/dwarves/files/dwarves-1.17-musl.patch
new file mode 100644
index 000..12dd516
--- /dev/null
+++ b/dev-util/dwarves/files/dwarves-1.17-musl.patch
@@ -0,0 +1,190 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2d23226..1798a96 100644
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -74,6 +74,35 @@ if (NOT HAVE_REALLOCARRAY_SUPPORT)
+   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCOMPAT_NEED_REALLOCARRAY")
+ endif()
+ 
++CHECK_C_SOURCE_COMPILES(
++"
++#include 
++int main(void)
++{
++_obstack_begin(0, 0, 0, NULL, NULL);
++return 0;
++}
++" LIBC_IMPLEMENTS_OBSTACK)
++if (NOT LIBC_IMPLEMENTS_OBSTACK)
++  find_package(OBSTACK)
++endif()
++
++CHECK_C_SOURCE_COMPILES(
++"
++#include 
++int main(void)
++{
++int argc=1;
++char *argv[]={\"argp\"};
++argp_parse(0,argc,&argv,0,0,0); return 0;
++return 0;
++}
++" LIBC_IMPLEMENTS_ARGP)
++
++if (NOT LIBC_IMPLEMENTS_ARGP)
++  find_package(ARGP)
++endif()
++
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE64_SOURCE 
-D_FILE_OFFSET_BITS=64")
+ 
+ file(GLOB libbpf_sources "lib/bpf/src/*.c")
+@@ -91,7 +120,8 @@ set_target_properties(dwarves PROPERTIES VERSION 1.0.0 
SOVERSION 1)
+ set_target_properties(dwarves PROPERTIES INTERFACE_LINK_LIBRARIES "")
+ target_include_directories(dwarves PRIVATE
+  ${CMAKE_CURRENT_SOURCE_DIR}/lib/bpf/include/uapi)
+-target_link_libraries(dwarves ${DWARF_LIBRARIES} ${ZLIB_LIBRARIES})
++target_link_libraries(dwarves ${DWARF_LIBRARIES} ${ZLIB_LIBRARIES}
++${ARGP_LIBRARY} ${OBSTACK_LIBRARY})
+ 
+ set(dwarves_emit_LIB_SRCS dwarves_emit.c)
+ add_library(dwarves_emit SHARED ${dwarves_emit_LIB_SRCS})
+diff --git a/cmak

[gentoo-commits] proj/musl:master commit in: dev-util/dwarves/files/, dev-util/dwarves/

2020-05-25 Thread Anthony G. Basile
commit: 1f60892479e9e14d72f33c6ae9dfae7d9c67660d
Author: Dan Robertson  dlrobertson  com>
AuthorDate: Sun May 17 02:01:39 2020 +
Commit: Anthony G. Basile  gentoo  org>
CommitDate: Mon May 25 23:40:51 2020 +
URL:https://gitweb.gentoo.org/proj/musl.git/commit/?id=1f608924

dev-util/dwarves: patch for musl build

Signed-off-by: Dan Robertson  dlrobertson.com>
Signed-off-by: Anthony G. Basile  gentoo.org>

 dev-util/dwarves/Manifest  |   1 +
 dev-util/dwarves/dwarves-1.17.ebuild   |  46 +
 .../dwarves/files/dwarves-1.10-python-import.patch |  15 ++
 dev-util/dwarves/files/dwarves-1.17-musl.patch | 190 +
 dev-util/dwarves/metadata.xml  |   5 +
 5 files changed, 257 insertions(+)

diff --git a/dev-util/dwarves/Manifest b/dev-util/dwarves/Manifest
new file mode 100644
index 000..d9e3668
--- /dev/null
+++ b/dev-util/dwarves/Manifest
@@ -0,0 +1 @@
+DIST dwarves-1.17.tar.xz 309028 BLAKE2B 
600d095359fa1ef208cc83655761505a07512faf9957144cc5fdd9e69bef98be3afc8b29a4c13aa0246aa43fdc9b4906de95f37c86fc6790ece52a79e3b13695
 SHA512 
8916ea24316efe1eb322d045fb2d81c230905f2fe33942eac641e9e0311f33a3bcf55be454eac32781799c255303bafacd8f1bd1b3ec08f0dae4d5f38d8186ba

diff --git a/dev-util/dwarves/dwarves-1.17.ebuild 
b/dev-util/dwarves/dwarves-1.17.ebuild
new file mode 100644
index 000..b507d41
--- /dev/null
+++ b/dev-util/dwarves/dwarves-1.17.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+inherit multilib cmake-utils python-single-r1
+
+DESCRIPTION="pahole (Poke-a-Hole) and other DWARF2 utilities"
+HOMEPAGE="https://git.kernel.org/cgit/devel/pahole/pahole.git/";
+
+LICENSE="GPL-2" # only
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~arm64"
+IUSE="debug"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+   >=dev-libs/elfutils-0.178
+   sys-libs/zlib"
+DEPEND="${RDEPEND}"
+
+if [[ ${PV//_p} == ${PV} ]]; then
+   SRC_URI="http://fedorapeople.org/~acme/dwarves/${P}.tar.xz";
+else
+   SRC_URI="https://dev.gentoo.org/~zzam/${PN}/${P}.tar.xz";
+fi
+
+DOCS=( README README.ctracer NEWS )
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-1.10-python-import.patch
+   "${FILESDIR}"/${PN}-1.17-musl.patch
+
+)
+
+src_configure() {
+   local mycmakeargs=( "-D__LIB=$(get_libdir)" )
+   cmake-utils_src_configure
+}
+
+src_test() { :; }
+
+src_install() {
+   cmake-utils_src_install
+}

diff --git a/dev-util/dwarves/files/dwarves-1.10-python-import.patch 
b/dev-util/dwarves/files/dwarves-1.10-python-import.patch
new file mode 100644
index 000..e308ac6
--- /dev/null
+++ b/dev-util/dwarves/files/dwarves-1.10-python-import.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/show_bug.cgi?id=423817
+
+--- dwarves-1.10/ostra/ostra-cg
 dwarves-1.10/ostra/ostra-cg
+@@ -10,7 +10,9 @@
+ # under the terms of version 2 of the GNU General Public License as
+ # published by the Free Software Foundation.
+ 
+-import sys, datetime, os, ostra
++import sys
++sys.path.insert(0, "/usr/share/dwarves/runtime/python")
++import datetime, os, ostra
+ 
+ class_def = None
+ 

diff --git a/dev-util/dwarves/files/dwarves-1.17-musl.patch 
b/dev-util/dwarves/files/dwarves-1.17-musl.patch
new file mode 100644
index 000..12dd516
--- /dev/null
+++ b/dev-util/dwarves/files/dwarves-1.17-musl.patch
@@ -0,0 +1,190 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2d23226..1798a96 100644
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -74,6 +74,35 @@ if (NOT HAVE_REALLOCARRAY_SUPPORT)
+   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCOMPAT_NEED_REALLOCARRAY")
+ endif()
+ 
++CHECK_C_SOURCE_COMPILES(
++"
++#include 
++int main(void)
++{
++_obstack_begin(0, 0, 0, NULL, NULL);
++return 0;
++}
++" LIBC_IMPLEMENTS_OBSTACK)
++if (NOT LIBC_IMPLEMENTS_OBSTACK)
++  find_package(OBSTACK)
++endif()
++
++CHECK_C_SOURCE_COMPILES(
++"
++#include 
++int main(void)
++{
++int argc=1;
++char *argv[]={\"argp\"};
++argp_parse(0,argc,&argv,0,0,0); return 0;
++return 0;
++}
++" LIBC_IMPLEMENTS_ARGP)
++
++if (NOT LIBC_IMPLEMENTS_ARGP)
++  find_package(ARGP)
++endif()
++
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE64_SOURCE 
-D_FILE_OFFSET_BITS=64")
+ 
+ file(GLOB libbpf_sources "lib/bpf/src/*.c")
+@@ -91,7 +120,8 @@ set_target_properties(dwarves PROPERTIES VERSION 1.0.0 
SOVERSION 1)
+ set_target_properties(dwarves PROPERTIES INTERFACE_LINK_LIBRARIES "")
+ target_include_directories(dwarves PRIVATE
+  ${CMAKE_CURRENT_SOURCE_DIR}/lib/bpf/include/uapi)
+-target_link_libraries(dwarves ${DWARF_LIBRARIES} ${ZLIB_LIBRARIES})
++target_link_libraries(dwarves ${DWARF_LIBRARIES} ${ZLIB_LIBRARIES}
++${ARGP_LIBRARY} ${OBSTACK_LIBRARY})
+ 
+ set(dwarves_emit_LIB_SRCS dwarves_emit.c)
+ add_library(dwarves_emit SHARED ${dwarves_emit_LIB_SRCS})
+diff --git a/cmak