Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: haikuports/haikuports
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2e4ede891cdf
Choose a base ref
...
head repository: haikuports/haikuports
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e314db9da9ab
Choose a head ref
  • 2 commits
  • 4 files changed
  • 1 contributor

Commits on Oct 18, 2021

  1. bear: bump version

    korli committed Oct 18, 2021
    Copy the full SHA
    305449a View commit details
  2. nlohmann_json: new recipe

    used by bear
    korli committed Oct 18, 2021
    Copy the full SHA
    e314db9 View commit details
Showing with 328 additions and 58 deletions.
  1. +44 −0 dev-cpp/nlohmann_json/nlohmann_json-3.10.4.recipe
  2. +0 −58 dev-util/bear/bear-2.4.2.recipe
  3. +111 −0 dev-util/bear/bear-3.0.16.recipe
  4. +173 −0 dev-util/bear/patches/bear-3.0.16.patchset
44 changes: 44 additions & 0 deletions dev-cpp/nlohmann_json/nlohmann_json-3.10.4.recipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
SUMMARY="JSON for Modern C++"
DESCRIPTION="Header only library"
HOMEPAGE="https://github.com/nlohmann/json"
COPYRIGHT="2013-2021 Niels Lohmann"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="http://github.com/nlohmann/json/archive/v$portVersion/json-$portVersion.tar.gz"
CHECKSUM_SHA256="1155fd1a83049767360e9a120c43c578145db3204d2b309eba49fbbedd0f4ed3"
SOURCE_DIR="json-$portVersion"

ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
nlohmann_json$secondaryArchSuffix = $portVersion
devel:nlohmann_json$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"

BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
"

BUILD()
{
sed -i -e "s|:include>|:${relativeIncludeDir}>|" CMakeLists.txt
cmake -B build -S . $cmakeDirArgs \
-DCMAKE_BUILD_TYPE=Release
make -C build $jobArgs
}

INSTALL()
{
make -C build install

fixPkgconfig
}
58 changes: 0 additions & 58 deletions dev-util/bear/bear-2.4.2.recipe

This file was deleted.

111 changes: 111 additions & 0 deletions dev-util/bear/bear-3.0.16.recipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
SUMMARY="Automatically generate compilation database for Clang tooling"
DESCRIPTION="Bear records the flags passed to the compiler for each translation unit and \
stores them in a JSON file. This file can be used by Clang's tooling interface \
and programs like clang-check to process a translation unit.\
\
cmake supports the generation of JSON compilation databases out of the box. \
For any other build system that does not support this, Bear can be used \
instead to intercept the invocation of the compiler."
HOMEPAGE="https://github.com/rizsotto/Bear"
COPYRIGHT="2012-2021 by László Nagy"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://github.com/rizsotto/Bear/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="877ee5e89e8445f74df95f2f3896597f04b86a4e5d0dbbca07ac71027dcb362d"
SOURCE_DIR="Bear-$portVersion"
PATCHES="bear-$portVersion.patchset"

ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"

PROVIDES="
bear$secondaryArchSuffix = $portVersion
cmd:bear = $portVersion compat >= 3
cmd:citnames = $portVersion compat >= 3
cmd:intercept = $portVersion compat >= 3
"
REQUIRES="
haiku$secondaryArchSuffix
cmd:python2
lib:libabsl_bad_optional_access$secondaryArchSuffix
lib:libabsl_bad_variant_access$secondaryArchSuffix
lib:libabsl_base$secondaryArchSuffix
lib:libabsl_city$secondaryArchSuffix
lib:libabsl_civil_time$secondaryArchSuffix
lib:libabsl_cord$secondaryArchSuffix
lib:libabsl_debugging_internal$secondaryArchSuffix
lib:libabsl_demangle_internal$secondaryArchSuffix
lib:libabsl_exponential_biased$secondaryArchSuffix
lib:libabsl_graphcycles_internal$secondaryArchSuffix
lib:libabsl_hash$secondaryArchSuffix
lib:libabsl_hashtablez_sampler$secondaryArchSuffix
lib:libabsl_int128$secondaryArchSuffix
lib:libabsl_log_severity$secondaryArchSuffix
lib:libabsl_malloc_internal$secondaryArchSuffix
lib:libabsl_raw_hash_set$secondaryArchSuffix
lib:libabsl_raw_logging_internal$secondaryArchSuffix
lib:libabsl_spinlock_wait$secondaryArchSuffix
lib:libabsl_stacktrace$secondaryArchSuffix
lib:libabsl_status$secondaryArchSuffix
lib:libabsl_statusor$secondaryArchSuffix
lib:libabsl_strings$secondaryArchSuffix
lib:libabsl_strings_internal$secondaryArchSuffix
lib:libabsl_str_format_internal$secondaryArchSuffix
lib:libabsl_symbolize$secondaryArchSuffix
lib:libabsl_synchronization$secondaryArchSuffix
lib:libabsl_throw_delegate$secondaryArchSuffix
lib:libabsl_time$secondaryArchSuffix
lib:libabsl_time_zone$secondaryArchSuffix
lib:libabsl_wyhash$secondaryArchSuffix
lib:libaddress_sorting$secondaryArchSuffix
lib:libcares$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libfmt$secondaryArchSuffix
lib:libgpr$secondaryArchSuffix
lib:libgrpc++$secondaryArchSuffix
lib:libgrpc$secondaryArchSuffix
lib:libprotobuf$secondaryArchSuffix
lib:libre2$secondaryArchSuffix
lib:libspdlog$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
lib:libupb$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"

BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libfmt$secondaryArchSuffix
devel:libgrpc$secondaryArchSuffix
devel:libgtest$secondaryArchSuffix
devel:libspdlog$secondaryArchSuffix
devel:nlohmann_json$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:g++$secondaryArchSuffix
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python2
"

BUILD()
{
cmake -B build -S . -DCMAKE_INSTALL_PREFIX=$prefix \
-DCMAKE_BUILD_TYPE=Release
unset -f cmake
cmake --build build $jobArgs
}

INSTALL()
{
unset -f cmake
cmake --install build

mkdir -vp $manDir
cp -vrd $prefix/share/man/man1 $manDir

mkdir -p $dataDir
mv -v $prefix/share $dataDir
}
173 changes: 173 additions & 0 deletions dev-util/bear/patches/bear-3.0.16.patchset
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
From 057a70653e3fb8f3652b7248fa9fcc25ccb67daa Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Mon, 18 Oct 2021 11:19:05 +0200
Subject: protobuf search path


diff --git a/source/intercept/proto/CMakeLists.txt b/source/intercept/proto/CMakeLists.txt
index e4fb8c1..8bbd58c 100644
--- a/source/intercept/proto/CMakeLists.txt
+++ b/source/intercept/proto/CMakeLists.txt
@@ -11,6 +11,7 @@ add_custom_command(
${_PROTOBUF_PROTOC}
ARGS
-I "${SUPERVISE_PROTO_PATH}"
+ -I "/system/develop/headers"
--grpc_out "${CMAKE_CURRENT_BINARY_DIR}"
--cpp_out "${CMAKE_CURRENT_BINARY_DIR}"
--plugin=protoc-gen-grpc="${_GRPC_CPP_PLUGIN_EXECUTABLE}"
@@ -34,6 +35,7 @@ add_custom_command(
${_PROTOBUF_PROTOC}
ARGS
-I "${SUPERVISE_PROTO_PATH}"
+ -I "/system/develop/headers"
--grpc_out "${CMAKE_CURRENT_BINARY_DIR}"
--cpp_out "${CMAKE_CURRENT_BINARY_DIR}"
--plugin=protoc-gen-grpc="${_GRPC_CPP_PLUGIN_EXECUTABLE}"
--
2.30.2


From 0b60677308b8f180f435a448e86f86f684b756e1 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Mon, 18 Oct 2021 15:22:06 +0200
Subject: link against stdc++fs

workaround gtest with Haiku error definition

diff --git a/source/bear/CMakeLists.txt b/source/bear/CMakeLists.txt
index 376a003..cbcdc35 100644
--- a/source/bear/CMakeLists.txt
+++ b/source/bear/CMakeLists.txt
@@ -7,7 +7,8 @@ target_link_libraries(bear
sys_a
flags_a
fmt::fmt
- spdlog::spdlog)
+ spdlog::spdlog
+ stdc++fs)

include(GNUInstallDirs)
install(TARGETS bear
diff --git a/source/citnames/CMakeLists.txt b/source/citnames/CMakeLists.txt
index dc9d5f3..7de5477 100644
--- a/source/citnames/CMakeLists.txt
+++ b/source/citnames/CMakeLists.txt
@@ -52,7 +52,8 @@ add_executable(citnames
)
target_link_libraries(citnames
citnames_a
- citnames_json_a)
+ citnames_json_a
+ stdc++fs)

include(GNUInstallDirs)
install(TARGETS citnames
@@ -82,6 +83,7 @@ if (ENABLE_UNIT_TESTS)
target_link_libraries(citnames_unit_test citnames_a)
target_link_libraries(citnames_unit_test citnames_json_a)
target_link_libraries(citnames_unit_test PkgConfig::GTest ${CMAKE_THREAD_LIBS_INIT})
+ target_link_libraries(citnames_unit_test stdc++fs)

add_test(NAME bear::citnames_unit_test COMMAND $<TARGET_FILE:citnames_unit_test>)
endif ()
diff --git a/source/intercept/CMakeLists.txt b/source/intercept/CMakeLists.txt
index e9598c0..62b741d 100644
--- a/source/intercept/CMakeLists.txt
+++ b/source/intercept/CMakeLists.txt
@@ -59,7 +59,8 @@ add_executable(intercept
source/collect/main.cc)
target_link_libraries(intercept
main_a
- intercept_a)
+ intercept_a
+ stdc++fs)

install(TARGETS intercept
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
@@ -103,7 +104,8 @@ add_executable(wrapper
target_include_directories(wrapper PUBLIC source/)
target_link_libraries(wrapper
main_a
- wrapper_a)
+ wrapper_a
+ stdc++fs)

install(TARGETS wrapper
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/bear)
@@ -202,6 +204,8 @@ if (ENABLE_UNIT_TESTS)
target_include_directories(exec_unit_test PRIVATE test)
target_link_libraries(exec_unit_test exec_a)
target_link_libraries(exec_unit_test PkgConfig::GTest ${CMAKE_THREAD_LIBS_INIT})
+ target_link_libraries(exec_unit_test stdc++fs)
+

add_test(NAME bear::exec_unit_test COMMAND $<TARGET_FILE:exec_unit_test>)

@@ -212,6 +216,7 @@ if (ENABLE_UNIT_TESTS)
target_link_libraries(intercept_unit_test intercept_a)
target_link_libraries(intercept_unit_test wrapper_a)
target_link_libraries(intercept_unit_test PkgConfig::GTest ${CMAKE_THREAD_LIBS_INIT})
+ target_link_libraries(intercept_unit_test stdc++fs)

add_test(NAME bear::intercept_unit_test COMMAND $<TARGET_FILE:intercept_unit_test>)
endif ()
diff --git a/source/libsys/CMakeLists.txt b/source/libsys/CMakeLists.txt
index a285dd1..0c40b3e 100644
--- a/source/libsys/CMakeLists.txt
+++ b/source/libsys/CMakeLists.txt
@@ -28,6 +28,7 @@ if (ENABLE_UNIT_TESTS)
target_include_directories(sys_unit_test PRIVATE source/)
target_link_libraries(sys_unit_test sys_a)
target_link_libraries(sys_unit_test PkgConfig::GTest ${CMAKE_THREAD_LIBS_INIT})
+ target_link_libraries(sys_unit_test stdc++fs)

add_test(NAME bear::sys_unit_test COMMAND $<TARGET_FILE:sys_unit_test>)
endif ()
diff --git a/source/libsys/test/ErrorsTest.cc b/source/libsys/test/ErrorsTest.cc
index 0ead223..9360cef 100644
--- a/source/libsys/test/ErrorsTest.cc
+++ b/source/libsys/test/ErrorsTest.cc
@@ -23,6 +23,9 @@

#include <cerrno>

+#undef ENOENT
+#define ENOENT 0x80006003
+
namespace {

TEST(errors, ENOENT)
@@ -31,4 +34,4 @@ namespace {

EXPECT_STREQ("No such file or directory", result.data());
}
-}
\ No newline at end of file
+}
--
2.30.2


From c6151731473c81d2727a48a59017147aa5d8cda2 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Mon, 18 Oct 2021 18:03:47 +0200
Subject: Haiku: use libroot as libc name


diff --git a/source/libsys/CMakeLists.txt b/source/libsys/CMakeLists.txt
index 0c40b3e..81832bf 100644
--- a/source/libsys/CMakeLists.txt
+++ b/source/libsys/CMakeLists.txt
@@ -50,6 +50,8 @@ if (SUPPORT_PRELOAD AND NOT HAVE_GNU_LIB_NAMES_H)
)
# cmake_path(GET LIBC_SO_PATH FILENAME LIBC_SO)
get_filename_component(LIBC_SO ${LIBC_SO_PATH} NAME)
+ elseif (HAIKU)
+ set(LIBC_SO "libroot.so")
else()
set(LIBC_SO "libc.so")
endif()
--
2.30.2