summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/bloaty')
-rw-r--r--dev-util/bloaty/Manifest1
-rw-r--r--dev-util/bloaty/bloaty-0_p20170420.ebuild38
-rw-r--r--dev-util/bloaty/bloaty-1.1-r1.ebuild (renamed from dev-util/bloaty/bloaty-1.1.ebuild)18
-rw-r--r--dev-util/bloaty/bloaty-9999.ebuild20
-rw-r--r--dev-util/bloaty/files/bloaty-1.1-system-abseil.patch92
-rw-r--r--dev-util/bloaty/metadata.xml11
6 files changed, 122 insertions, 58 deletions
diff --git a/dev-util/bloaty/Manifest b/dev-util/bloaty/Manifest
index 62eeef4698b9..ba9d6612b834 100644
--- a/dev-util/bloaty/Manifest
+++ b/dev-util/bloaty/Manifest
@@ -1,2 +1 @@
-DIST bloaty-0_p20170420.tar.gz 3100016 BLAKE2B 74a3b44a5e63f8f06da7b554588be0ced62a0f6792513984fbf7cfab520f6f6173868d588427dd9ca322c6fbc29fd1b8931453ec045c591fd8de58904178bf2c SHA512 93947fd0c49c3223c1ec216c88fe22b24e68654511d4b9d4fb2bcbc816b92bbdaf47344abc1dc8f80ed0b38a8c8b09909f862f916fd9182048235582aa10feb0
DIST bloaty-1.1.tar.bz2 5363836 BLAKE2B a538cf5634ed72844bb128238a521caf375eaab34fd3cce8fdd46002bcbc6c53ba986cc7c1e4b761b1253b2f01cb557c94e1e1585507ff89bec10c891e5f5a88 SHA512 142d0dd58fc0aadce3aee6e9260c6ed792a18cf5fe260c89051d51b9357c7527ba352c3d6c9e23a3494796fba3d88314b6ed8a3a76c6c0d111d4c509cae6b216
diff --git a/dev-util/bloaty/bloaty-0_p20170420.ebuild b/dev-util/bloaty/bloaty-0_p20170420.ebuild
deleted file mode 100644
index e26da812ab42..000000000000
--- a/dev-util/bloaty/bloaty-0_p20170420.ebuild
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit vcs-snapshot toolchain-funcs
-
-COMMIT="73594cde8c9a52a102c4341c244c833aa61b9c06"
-
-DESCRIPTION="A size profiler for binaries"
-HOMEPAGE="https://github.com/google/bloaty"
-SRC_URI="https://github.com/google/bloaty/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE=""
-
-DEPEND=">=dev-libs/re2-0.2017.03.01"
-RDEPEND="${DEPEND}"
-
-src_prepare() {
- default
- sed -i -e "s#\$(RE2_[AH])##"\
- -e "s#\tar #\t$(tc-getAR) #"\
- -e "s#-lpthread#-lre2 -lpthread#"\
- -e "/^CXXFLAGS/ s#-I third_party/re2##"\
- Makefile || die
-}
-
-src_compile() {
- CXX=$(tc-getCXX) emake
-}
-
-src_install() {
- dobin ${PN}
- dodoc README.md
-}
diff --git a/dev-util/bloaty/bloaty-1.1.ebuild b/dev-util/bloaty/bloaty-1.1-r1.ebuild
index 227dcc50dcdf..61b19bcb8d78 100644
--- a/dev-util/bloaty/bloaty-1.1.ebuild
+++ b/dev-util/bloaty/bloaty-1.1-r1.ebuild
@@ -1,14 +1,12 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit cmake
DESCRIPTION="A size profiler for binaries"
HOMEPAGE="https://github.com/google/bloaty"
-LICENSE="Apache-2.0"
-SLOT="0"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
@@ -17,29 +15,39 @@ if [[ ${PV} == 9999 ]]; then
RESTRICT="!test? ( test )"
else
SRC_URI="https://github.com/google/${PN}/releases/download/v${PV}/${P}.tar.bz2"
- KEYWORDS="~amd64"
+ KEYWORDS="amd64 ~arm64"
fi
+LICENSE="Apache-2.0"
+SLOT="0"
+
BDEPEND="
virtual/pkgconfig
"
DEPEND="
+ dev-cpp/abseil-cpp:=
dev-libs/capstone:=
dev-libs/protobuf:=
dev-libs/re2:=
"
RDEPEND="${DEPEND}"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.1-system-abseil.patch
+)
+
src_configure() {
local mycmakeargs=(
-DBLOATY_ENABLE_CMAKETARGETS=OFF
-DBUILD_SHARED_LIBS=OFF
)
+
if [[ ${PV} == 9999 ]]; then
mycmakeargs+=(
-DBUILD_TESTING=$(usex test)
$(usex test -DINSTALL_GTEST=OFF "")
)
fi
+
cmake_src_configure
}
diff --git a/dev-util/bloaty/bloaty-9999.ebuild b/dev-util/bloaty/bloaty-9999.ebuild
index 4aa412ab17d3..e8c0b98fe27a 100644
--- a/dev-util/bloaty/bloaty-9999.ebuild
+++ b/dev-util/bloaty/bloaty-9999.ebuild
@@ -1,14 +1,12 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit cmake
DESCRIPTION="A size profiler for binaries"
HOMEPAGE="https://github.com/google/bloaty"
-LICENSE="Apache-2.0"
-SLOT="0"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
@@ -17,27 +15,39 @@ if [[ ${PV} == 9999 ]]; then
RESTRICT="!test? ( test )"
else
SRC_URI="https://github.com/google/${PN}/releases/download/v${PV}/${P}.tar.bz2"
- KEYWORDS="~amd64"
+ KEYWORDS="~amd64 ~arm64"
fi
+LICENSE="Apache-2.0"
+SLOT="0"
+
BDEPEND="
virtual/pkgconfig
"
DEPEND="
+ dev-cpp/abseil-cpp:=
dev-libs/capstone:=
dev-libs/protobuf:=
dev-libs/re2:=
"
RDEPEND="${DEPEND}"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.1-system-abseil.patch
+)
+
src_configure() {
local mycmakeargs=(
-DBLOATY_ENABLE_CMAKETARGETS=OFF
+ -DBUILD_SHARED_LIBS=OFF
)
+
if [[ ${PV} == 9999 ]]; then
mycmakeargs+=(
-DBUILD_TESTING=$(usex test)
+ $(usex test -DINSTALL_GTEST=OFF "")
)
fi
+
cmake_src_configure
}
diff --git a/dev-util/bloaty/files/bloaty-1.1-system-abseil.patch b/dev-util/bloaty/files/bloaty-1.1-system-abseil.patch
new file mode 100644
index 000000000000..40a1d2df97ba
--- /dev/null
+++ b/dev-util/bloaty/files/bloaty-1.1-system-abseil.patch
@@ -0,0 +1,92 @@
+https://src.fedoraproject.org/rpms/bloaty/blob/rawhide/f/bloaty-1.1-absl.patch
+https://github.com/google/bloaty/pull/347
+
+diff -up ./CMakeLists.txt.1 ./CMakeLists.txt
+--- ./CMakeLists.txt.1 2020-05-24 00:36:23.000000000 -0400
++++ ./CMakeLists.txt 2020-12-19 12:32:29.021943521 -0500
+@@ -2,7 +2,8 @@ cmake_minimum_required(VERSION 3.5)
+ cmake_policy(SET CMP0048 NEW)
+ project (Bloaty VERSION 1.0)
+ project (Bloaty VERSION 1.1)
+-set(CMAKE_CXX_STANDARD 11)
++set(CMAKE_CXX_STANDARD 17)
++set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+
+ # Options we define for users.
+ option(BLOATY_ENABLE_ASAN "Enable address sanitizer." OFF)
+@@ -36,6 +37,8 @@ else(${PKG_CONFIG_FOUND})
+ endif(${PKG_CONFIG_FOUND})
+ endif(UNIX)
+
++find_package(absl)
++
+ # Set default build type.
+ if(NOT CMAKE_BUILD_TYPE)
+ message(STATUS "Setting build type to 'RelWithDebInfo' as none was specified.")
+@@ -89,11 +92,10 @@ endif(UNIX)
+
+ include_directories(.)
+ include_directories(src)
+-include_directories(third_party/abseil-cpp)
+ include_directories("${CMAKE_CURRENT_BINARY_DIR}/src")
+
+ # Baseline build flags.
+-set(CMAKE_CXX_FLAGS "-std=c++11 -W -Wall -Wno-sign-compare")
++set(CMAKE_CXX_FLAGS "-W -Wall -Wno-sign-compare")
+ set(CMAKE_CXX_FLAGS_DEBUG "-g1")
+ set(CMAKE_CXX_FLAGS_RELEASE "-O2")
+ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g1")
+@@ -149,7 +151,7 @@ endif(${PROTOC_FOUND})
+ file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/src/bloaty_package.bloaty
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+
+-add_library(libbloaty
++add_library(libbloaty STATIC
+ src/bloaty.cc
+ src/demangle.cc
+ src/disassemble.cc
+@@ -159,6 +161,13 @@ add_library(libbloaty
+ src/macho.cc
+ src/range_map.cc
+ src/webassembly.cc
++)
++
++if (absl_FOUND)
++ target_link_libraries(libbloaty PUBLIC absl::base absl::strings absl::numeric)
++else()
++ include_directories(third_party/abseil-cpp)
++ target_sources(libbloaty
+ # Until Abseil has a proper CMake build system
+ third_party/abseil-cpp/absl/base/internal/raw_logging.cc # Grrrr...
+ third_party/abseil-cpp/absl/base/internal/throw_delegate.cc
+@@ -179,7 +188,8 @@ add_library(libbloaty
+ third_party/abseil-cpp/absl/types/bad_optional_access.cc
+ # One source file, no special build system needed.
+ third_party/demumble/third_party/libcxxabi/cxa_demangle.cpp
+- )
++ )
++endif()
+
+ if(UNIX)
+ set(LIBBLOATY_LIBS libbloaty)
+@@ -249,9 +259,8 @@ else()
+ enable_testing()
+
+ if(BUILD_TESTING)
+- add_subdirectory(third_party/googletest)
+- include_directories(third_party/googletest/googletest/include)
+- include_directories(third_party/googletest/googlemock/include)
++ find_package(GTest)
++ pkg_search_module(GMock gmock)
+
+ set(TEST_TARGETS
+ bloaty_test
+@@ -261,7 +270,7 @@ else()
+
+ foreach(target ${TEST_TARGETS})
+ add_executable(${target} tests/${target}.cc)
+- target_link_libraries(${target} "${LIBBLOATY_LIBS}" gtest_main gmock "${CMAKE_THREAD_LIBS_INIT}")
++ target_link_libraries(${target} "${LIBBLOATY_LIBS}" GTest::Main GTest::GTest ${GMock_LIBRARIES} "${CMAKE_THREAD_LIBS_INIT}")
+ endforeach(target)
+
+ add_executable(fuzz_test tests/fuzz_target.cc tests/fuzz_driver.cc)
diff --git a/dev-util/bloaty/metadata.xml b/dev-util/bloaty/metadata.xml
index 36b90a82850e..25bf3d3cec05 100644
--- a/dev-util/bloaty/metadata.xml
+++ b/dev-util/bloaty/metadata.xml
@@ -1,14 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>ngg@ngg.hu</email>
- <name>Gergely Nagy</name>
- </maintainer>
- <maintainer type="project">
- <email>proxy-maint@gentoo.org</email>
- <name>Proxy Maintainers</name>
- </maintainer>
+ <!-- maintainer-needed -->
<upstream>
<remote-id type="github">google/bloaty</remote-id>
</upstream>