From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: [PR PATCH] bloaty: Unmark nocross
Date: Sat, 11 Jan 2020 00:28:17 +0100 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-18201@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 306 bytes --]
There is a new pull request by ndowens against master on the void-packages repository
https://github.com/ndowens/void-packages bloaty
https://github.com/void-linux/void-packages/pull/18201
bloaty: Unmark nocross
A patch file from https://github.com/void-linux/void-packages/pull/18201.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-bloaty-18201.patch --]
[-- Type: text/x-diff, Size: 9237 bytes --]
From b8f0267746ed82b09c5ffb57bd7f5808e9922762 Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens04@gmail.com>
Date: Fri, 10 Jan 2020 17:10:09 -0600
Subject: [PATCH] bloaty: Unmark nocross
---
...m-deps-for-protobuf-capstone-and-re2.patch | 215 ++++++++++++++++++
srcpkgs/bloaty/template | 2 +-
2 files changed, 216 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/bloaty/patches/0001-Use-system-deps-for-protobuf-capstone-and-re2.patch
diff --git a/srcpkgs/bloaty/patches/0001-Use-system-deps-for-protobuf-capstone-and-re2.patch b/srcpkgs/bloaty/patches/0001-Use-system-deps-for-protobuf-capstone-and-re2.patch
new file mode 100644
index 00000000000..801ffebe4ab
--- /dev/null
+++ b/srcpkgs/bloaty/patches/0001-Use-system-deps-for-protobuf-capstone-and-re2.patch
@@ -0,0 +1,215 @@
+From 12496ce5cc65daaf1563f33175147e71e3ca5908 Mon Sep 17 00:00:00 2001
+From: Steve Wills <steve@mouf.net>
+Date: Fri, 4 Jan 2019 14:12:40 -0500
+Subject: [PATCH] Use system deps for protobuf, capstone and re2
+
+Also, add option to disable setting build id for systems where this flag
+is not supported by ld and an option to disable installing cmake target
+files in case they aren't needed.
+---
+ CMakeLists.txt | 140 ++++++++++++++++++++++++++++++++++++++++++-------
+ 1 file changed, 120 insertions(+), 20 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 053fd7b..b61ffea 100644
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -5,6 +5,34 @@ project (Bloaty VERSION 1.0)
+ # Options we define for users.
+ option(BLOATY_ENABLE_ASAN "Enable address sanitizer." OFF)
+ option(BLOATY_ENABLE_UBSAN "Enable undefined behavior sanitizer." OFF)
++option(BLOATY_ENABLE_CMAKETARGETS "Enable installing cmake target files." ON)
++option(BLOATY_ENABLE_BUILDID "Enable build id." ON)
++
++if(UNIX)
++find_package(PkgConfig)
++if(${PKG_CONFIG_FOUND})
++pkg_search_module(RE2 re2)
++pkg_search_module(CAPSTONE capstone)
++pkg_search_module(PROTOBUF protobuf)
++if(${RE2_FOUND})
++ MESSAGE(STATUS "System re2 found, using")
++else(${RE2_FOUND})
++ MESSAGE(STATUS "System re2 not found, using bundled version")
++endif(${RE2_FOUND})
++if(${CAPSTONE_FOUND})
++ MESSAGE(STATUS "System capstone found, using")
++else(${CAPSTONE_FOUND})
++ MESSAGE(STATUS "System capstone not found, using bundled version")
++endif(${CAPSTONE_FOUND})
++if(${PROTOBUF_FOUND})
++ MESSAGE(STATUS "System protobuf found, using")
++else(${PROTOBUF_FOUND})
++ MESSAGE(STATUS "System protobuf not found, using bundled version")
++endif(${PROTOBUF_FOUND})
++else(${PKG_CONFIG_FOUND})
++ MESSAGE(STATUS "pkg-config not found, using bundled dependencies")
++endif(${PKG_CONFIG_FOUND})
++endif(UNIX)
+
+ # Set default build type.
+ if(NOT CMAKE_BUILD_TYPE)
+@@ -21,19 +49,42 @@ if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.gitmodules")
+ endif()
+
+ # Add third_party libraries, disabling as much as we can of their builds.
+-set(RE2_BUILD_TESTING OFF CACHE BOOL "enable testing for RE2" FORCE)
+-set(CAPSTONE_BUILD_SHARED OFF CACHE BOOL "Build shared library" FORCE)
+-set(CAPSTONE_BUILD_TESTS OFF CACHE BOOL "Build tests" FORCE)
+-set(protobuf_BUILD_TESTS OFF CACHE BOOL "enable tests for proto2" FORCE)
+-set(protobuf_BUILD_SHARED_LIBS OFF CACHE BOOL "enable shared libs for proto2" FORCE)
++
+ add_definitions(-D_LIBCXXABI_FUNC_VIS=) # For Demumble.
+-add_subdirectory(third_party/re2)
+-add_subdirectory(third_party/capstone)
+-add_subdirectory(third_party/protobuf/cmake)
+
+-include_directories(third_party/capstone/include)
+-include_directories(third_party/re2)
+-include_directories(third_party/protobuf/src)
++if(UNIX)
++ if(${RE2_FOUND})
++ include_directories(${RE2_INCLUDE_DIRS})
++ else(${RE2_FOUND})
++ set(RE2_BUILD_TESTING OFF CACHE BOOL "enable testing for RE2" FORCE)
++ add_subdirectory(third_party/re2)
++ include_directories(third_party/re2)
++ endif(${RE2_FOUND})
++ if(${CAPSTONE_FOUND})
++ include_directories(${CAPSTONE_INCLUDE_DIRS})
++ else(${CAPSTONE_FOUND})
++ set(CAPSTONE_BUILD_SHARED OFF CACHE BOOL "Build shared library" FORCE)
++ set(CAPSTONE_BUILD_TESTS OFF CACHE BOOL "Build tests" FORCE)
++ add_subdirectory(third_party/capstone)
++ include_directories(third_party/capstone/include)
++ endif(${CAPSTONE_FOUND})
++ if(${PROTOBUF_FOUND})
++ include_directories(${PROTOBUF_INCLUDE_DIRS})
++ else(${PROTOBUF_FOUND})
++ set(protobuf_BUILD_TESTS OFF CACHE BOOL "enable tests for proto2" FORCE)
++ set(protobuf_BUILD_SHARED_LIBS OFF CACHE BOOL "enable shared libs for proto2" FORCE)
++ add_subdirectory(third_party/protobuf/cmake)
++ include_directories(third_party/protobuf/src)
++ endif(${PROTOBUF_FOUND})
++else(UNIX)
++ add_subdirectory(third_party/re2)
++ add_subdirectory(third_party/capstone)
++ add_subdirectory(third_party/protobuf/cmake)
++ include_directories(third_party/re2)
++ include_directories(third_party/capstone/include)
++ include_directories(third_party/protobuf/src)
++endif(UNIX)
++
+ include_directories(.)
+ include_directories(src)
+ include_directories(third_party/abseil-cpp)
+@@ -47,7 +98,9 @@ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g1")
+
+ if(APPLE)
+ elseif(UNIX)
+- set(CMAKE_EXE_LINKER_FLAGS "-Wl,--build-id")
++ if(BLOATY_ENABLE_BUILDID)
++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--build-id")
++ endif(BLOATY_ENABLE_BUILDID)
+ endif()
+
+ # When using Ninja, compiler output won't be colorized without this.
+@@ -73,6 +126,7 @@ if(DEFINED ENV{CXXFLAGS})
+ endif()
+
+ file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/src)
++if(${PROTOC_FOUND})
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/src/bloaty.pb.cc
+ DEPENDS protoc ${CMAKE_CURRENT_SOURCE_DIR}/src/bloaty.proto
+@@ -80,6 +134,14 @@ add_custom_command(
+ --cpp_out=${CMAKE_CURRENT_BINARY_DIR}/src
+ -I${CMAKE_CURRENT_SOURCE_DIR}/src
+ )
++else(${PROTOC_FOUND})
++add_custom_command(
++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/src/bloaty.pb.cc
++ COMMAND protoc ${CMAKE_CURRENT_SOURCE_DIR}/src/bloaty.proto
++ --cpp_out=${CMAKE_CURRENT_BINARY_DIR}/src
++ -I${CMAKE_CURRENT_SOURCE_DIR}/src
++)
++endif(${PROTOC_FOUND})
+
+ add_library(libbloaty
+ src/bloaty.cc
+@@ -112,9 +174,38 @@ add_library(libbloaty
+ third_party/demumble/third_party/libcxxabi/cxa_demangle.cpp
+ )
+
++if(UNIX)
++ set(LIBBLOATY_LIBS libbloaty)
++ if(${PROTOBUF_FOUND})
++ set(LIBBLOATY_LIBS ${LIBBLOATY_LIBS} ${PROTOBUF_LIBRARIES})
++ else(${PROTOBUF_FOUND})
++ set(LIBBLOATY_LIBS ${LIBBLOATY_LIBS} libprotoc)
++ endif(${PROTOBUF_FOUND})
++ if(${RE2_FOUND})
++ set(LIBBLOATY_LIBS ${LIBBLOATY_LIBS} ${RE2_LIBRARIES})
++ else(${RE2_FOUND})
++ set(LIBBLOATY_LIBS ${LIBBLOATY_LIBS} re2)
++ endif(${RE2_FOUND})
++ if(${CAPSTONE_FOUND})
++ set(LIBBLOATY_LIBS ${LIBBLOATY_LIBS} ${CAPSTONE_LIBRARIES})
++ else(${CAPSTONE_FOUND})
++ set(LIBBLOATY_LIBS ${LIBBLOATY_LIBS} capstone-static)
++ endif(${CAPSTONE_FOUND})
++else(UNIX)
++ set(LIBBLOATY_LIBS libbloaty libprotoc re2 capstone-static)
++endif(UNIX)
+
+-set(LIBBLOATY_LIBS libbloaty libprotoc re2 capstone-static)
+-
++if(UNIX)
++ if(${RE2_FOUND})
++ link_directories(${RE2_LIBRARY_DIRS})
++ endif(${RE2_FOUND})
++ if(${CAPSTONE_FOUND})
++ link_directories(${CAPSTONE_LIBRARY_DIRS})
++ endif(${CAPSTONE_FOUND})
++ if(${PROTOBUF_FOUND})
++ link_directories(${PROTOBUF_LIBRARY_DIRS})
++ endif(${PROTOBUF_FOUND})
++endif(UNIX)
+
+ if(DEFINED ENV{LIB_FUZZING_ENGINE})
+ message("LIB_FUZZING_ENGINE set, building fuzz_target instead of Bloaty")
+@@ -134,11 +225,18 @@ else()
+ target_link_libraries(bloaty "${CMAKE_THREAD_LIBS_INIT}")
+ endif()
+
+- install(
+- TARGETS bloaty
+- EXPORT ${PROJECT_NAME}Targets
+- RUNTIME DESTINATION bin
+- )
++ if(BLOATY_ENABLE_CMAKETARGETS)
++ install(
++ TARGETS bloaty
++ EXPORT ${PROJECT_NAME}Targets
++ RUNTIME DESTINATION bin
++ )
++ else(BLOATY_ENABLE_CMAKETARGETS)
++ install(
++ TARGETS bloaty
++ RUNTIME DESTINATION bin
++ )
++ endif(BLOATY_ENABLE_CMAKETARGETS)
+
+ if (IS_DIRECTORY "${PROJECT_SOURCE_DIR}/tests")
+ enable_testing()
+@@ -172,5 +270,7 @@ else()
+ endif()
+ endif()
+
+- install(EXPORT ${PROJECT_NAME}Targets NAMESPACE ${PROJECT_NAME} DESTINATION lib/${PROJECT_NAME})
++ if(BLOATY_ENABLE_CMAKETARGETS)
++ install(EXPORT ${PROJECT_NAME}Targets NAMESPACE ${PROJECT_NAME} DESTINATION lib/${PROJECT_NAME})
++ endif(BLOATY_ENABLE_CMAKETARGETS)
+ endif()
+--
+2.24.1
diff --git a/srcpkgs/bloaty/template b/srcpkgs/bloaty/template
index d496211f35f..d922716473b 100644
--- a/srcpkgs/bloaty/template
+++ b/srcpkgs/bloaty/template
@@ -3,6 +3,7 @@ pkgname=bloaty
version=1.0
revision=1
build_style=cmake
+build_helper=qemu
makedepends="zlib-devel"
# vendored: capstone protobuf re2
short_desc="Bloaty McBloatface: a size profiler for binaries"
@@ -11,7 +12,6 @@ license="Apache-2.0"
homepage="https://github.com/google/bloaty"
distfiles="https://github.com/google/bloaty/releases/download/v${version}/bloaty-${version}.tar.bz2"
checksum=e1cf9830ba6c455218fdb50e7a8554ff256da749878acfaf77c032140d7ddde0
-nocross="fails to use vendored protobuf"
case "$XBPS_TARGET_MACHINE" in
ppc64*) ;;
next reply other threads:[~2020-01-10 23:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-10 23:28 voidlinux-github [this message]
2020-01-10 23:39 ` voidlinux-github
2020-01-10 23:48 ` voidlinux-github
2020-01-10 23:50 ` voidlinux-github
2020-01-11 0:00 ` [PR PATCH] [Updated] " voidlinux-github
2020-01-11 0:13 ` voidlinux-github
2020-01-11 21:49 ` voidlinux-github
2020-01-11 21:49 ` [PR PATCH] [Merged]: " voidlinux-github
2020-01-11 22:19 ` voidlinux-github
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-18201@inbox.vuxu.org \
--to=voidlinux-github@inbox.vuxu.org \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).