diff options
Diffstat (limited to 'dev-cpp')
| -rw-r--r-- | dev-cpp/abseil-cpp/Manifest | 1 | ||||
| -rw-r--r-- | dev-cpp/abseil-cpp/abseil-cpp-20240116.0.ebuild | 65 | ||||
| -rw-r--r-- | dev-cpp/jwt-cpp/Manifest | 1 | ||||
| -rw-r--r-- | dev-cpp/jwt-cpp/jwt-cpp-0.7.0.ebuild | 80 | ||||
| -rw-r--r-- | dev-cpp/scitokens-cpp/files/scitokens-cpp-1.1.0-invalid-vector-access.patch | 24 | ||||
| -rw-r--r-- | dev-cpp/scitokens-cpp/scitokens-cpp-1.0.2-r1.ebuild | 4 | ||||
| -rw-r--r-- | dev-cpp/scitokens-cpp/scitokens-cpp-1.0.2-r2.ebuild | 61 | ||||
| -rw-r--r-- | dev-cpp/scitokens-cpp/scitokens-cpp-1.1.0-r1.ebuild | 61 | ||||
| -rw-r--r-- | dev-cpp/scitokens-cpp/scitokens-cpp-1.1.0.ebuild | 4 |
9 files changed, 297 insertions, 4 deletions
diff --git a/dev-cpp/abseil-cpp/Manifest b/dev-cpp/abseil-cpp/Manifest index 042a5b8e628e..de417dd3333b 100644 --- a/dev-cpp/abseil-cpp/Manifest +++ b/dev-cpp/abseil-cpp/Manifest @@ -2,5 +2,6 @@ DIST abseil-cpp-20230125.2.tar.gz 2119685 BLAKE2B 130e55c68acdec7af0f807189365a5 DIST abseil-cpp-20230125.3.tar.gz 2119655 BLAKE2B 6c60201e4fc2cb5cd942fafb6023347739544f02fd257d003eeedff9e2e5137ee0c954342134d17a64844b9a5f309392a4c3ff9336907f35ba6c967ab03524ee SHA512 50509acfc4128fd31435631f71ac8cd0350acd9e290f78502723149016e7f07c9d84182ba99e0938b1873fecda09393d3fd7af8dabfb0d89cdcdd8a69a917e70 DIST abseil-cpp-20230802.0.tar.gz 2156669 BLAKE2B 34de2f949db3e7578cae39bdd851785fd5327a80662436e7d77f18e196cc28eb1b463e9f49c8fc66060073c6c88222015af8b41044d56af6811c8914e84fbea3 SHA512 320295fa687ded05b774741eb4c5285291d44cc14402ec5d997057cb4f53fb3ba54cd162c7a7b1003312b677603a1c25e14bfdbd1fc22ccf4b4443e8a6e3ec02 DIST abseil-cpp-20230802.1.tar.gz 2157158 BLAKE2B 98a9efb0fdc3801ff26d53202a1737cdf2d4115690f358abe16ba8b82625ee9df109e50ad50a30dc8e368b78630c3e7a31006801060b431c1b07b157366f1210 SHA512 14390380655c41483a98487e3b012110dd8d1743fdd68d8cde7e0d7c2730312d564b15726d8c9d2fff237d2fce3983bbbb5213f59612c7c6feaeb402dff9609f +DIST abseil-cpp-20240116.0.tar.gz 2150815 BLAKE2B bfdb94b6e88da2c99cf757d80fbf4409c882fe6c669e0ffe481ea949ff9f5e67a17ff22605a6670b20ed6eb74d756279de9e4c73db705c01c85a3dc248284f5a SHA512 018488e69cca472ef118631bd79bca4ef0cf1363432e79b81532942168d305511e4cdf4dc72611275e9a9de00cd71c0245be4ec287ff36147248e218218bf825 DIST gtest-1.13.0.tar.gz 862871 BLAKE2B d2768332c233d62f7a5f5332b63dc587c96c24765b2eeaa4f4caf5d421b175aa850d81cec4f50eeef9e06d4b86cb959555b4c2862a197ce3cb86d61fcb51f5d1 SHA512 70c0cfb1b4147bdecb467ecb22ae5b5529eec0abc085763213a796b7cdbd81d1761d12b342060539b936fa54f345d33f060601544874d6213fdde79111fa813e DIST gtest-1.14.0.tar.gz 867764 BLAKE2B c457f55ac572b9fb1553eee3df7eeeaf1e7dd2c3d747dd5e90dd279038fa5c71bb7b7d9ba1cf7e6143898b2a1d24d100584bd2a48ded41a426870c4825eec1b2 SHA512 765c326ccc1b87a01027385e69238266e356361cd4ee3e18e3c9d137a5d11fa5d657c164d02dd1be8fe693c8e10f2b580588dbfa57d27f070e2750f50d3e662c diff --git a/dev-cpp/abseil-cpp/abseil-cpp-20240116.0.ebuild b/dev-cpp/abseil-cpp/abseil-cpp-20240116.0.ebuild new file mode 100644 index 000000000000..252c4f5d21a5 --- /dev/null +++ b/dev-cpp/abseil-cpp/abseil-cpp-20240116.0.ebuild @@ -0,0 +1,65 @@ +# Copyright 2023-2024 Liguros Authors +# Distributed under the terms of the GNU General Public License v2 +EAPI=8 + +PYTHON_COMPAT=( python3_{8,9,10,11,12} ) + +inherit cmake-multilib python-any-r1 + +# yes, it needs SOURCE, not just installed one +GTEST_COMMIT="v1.14.0" +GTEST_FILE="gtest-${GTEST_COMMIT#v}.tar.gz" + +DESCRIPTION="Abseil Common Libraries (C++), LTS Branch" +HOMEPAGE="https://abseil.io" +SRC_URI="https://github.com/abseil/abseil-cpp/archive/${PV}.tar.gz -> ${P}.tar.gz + test? ( https://github.com/google/googletest/archive/${GTEST_COMMIT}.tar.gz -> ${GTEST_FILE} )" + +LICENSE=" + Apache-2.0 + test? ( BSD ) +" +SLOT="0/${PV%%.*}" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~sparc ~x86" +IUSE="test" + +BDEPEND=" + ${PYTHON_DEPS} + test? ( sys-libs/timezone-data ) +" + +RESTRICT="!test? ( test )" + +src_prepare() { + cmake_src_prepare + + # un-hardcode abseil compiler flags + sed -i \ + -e '/"-maes",/d' \ + -e '/"-msse4.1",/d' \ + -e '/"-mfpu=neon"/d' \ + -e '/"-march=armv8-a+crypto"/d' \ + absl/copts/copts.py || die + + # now generate cmake files + python_fix_shebang absl/copts/generate_copts.py + absl/copts/generate_copts.py || die + + if use test; then + sed -i 's/-Werror//g' \ + "${WORKDIR}/googletest-${GTEST_COMMIT#v}"/googletest/cmake/internal_utils.cmake || die + fi +} + +multilib_src_configure() { + local mycmakeargs=( + -DCMAKE_CXX_STANDARD=14 + -DABSL_ENABLE_INSTALL=TRUE + -DABSL_LOCAL_GOOGLETEST_DIR="${WORKDIR}/googletest-${GTEST_COMMIT#v}" + -DABSL_PROPAGATE_CXX_STD=TRUE + -DABSL_BUILD_TEST_HELPERS=$(usex test ON OFF) + -DABSL_BUILD_TESTING=$(usex test ON OFF) + $(usex test -DBUILD_TESTING=ON '') #intentional usex, it used both variables for tests. + ) + cmake_src_configure +} diff --git a/dev-cpp/jwt-cpp/Manifest b/dev-cpp/jwt-cpp/Manifest index 056eade7e21c..d7c46cc86fec 100644 --- a/dev-cpp/jwt-cpp/Manifest +++ b/dev-cpp/jwt-cpp/Manifest @@ -1 +1,2 @@ DIST jwt-cpp-0.6.0.tar.gz 275126 BLAKE2B 4bf9bed9b2aa9584b497b2ab4d1d2582d9b5e4ded402200ea3f70b0e6752338fd4e2ef9c5836c728a6907a0190209c7baeaecd26032ce64dc6bf12a23594f27b SHA512 b6d5ebb3a7eeb6fef9a1d41c707251d1ab05bf47920c280d5203f1b9ee5bf6f8e914cd2ffaed66550cfa6d78c34465d4cf86517a759d5f8739b429faf1c2c0ef +DIST jwt-cpp-0.7.0.tar.gz 133925 BLAKE2B 7f6ff1d23f60c555382e4ae4e9633954db638a93bb4f183efe057da8cc751be6f5a545e94cd8976e8b0260a6775a1ed82c7b2445401ba01fb46869489f289f38 SHA512 b6fdb93e3f2f065a2eb45fe16cb076a932b8d4bfad2251bd66d2be40d8afaf5c27a9cf17aaea61d8bfa3f5ff9ed3b45f90962dc14d72704ac5b9d717c12cc79f diff --git a/dev-cpp/jwt-cpp/jwt-cpp-0.7.0.ebuild b/dev-cpp/jwt-cpp/jwt-cpp-0.7.0.ebuild new file mode 100644 index 000000000000..64f36db0f7dd --- /dev/null +++ b/dev-cpp/jwt-cpp/jwt-cpp-0.7.0.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +if [[ ${PV} == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/Thalhammer/jwt-cpp.git" +else + SRC_URI="https://github.com/Thalhammer/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="header only library for creating and validating JSON Web Tokens in C++11" +HOMEPAGE="https://thalhammer.github.io/jwt-cpp/" + +LICENSE="MIT" +SLOT="0" +IUSE="doc +picojson test" + +DEPEND=" + dev-cpp/nlohmann_json + dev-libs/openssl + picojson? ( dev-cpp/picojson ) +" +RDEPEND="${DEPEND}" +BDEPEND=" + doc? ( app-text/doxygen[dot] ) + test? ( dev-cpp/gtest ) +" +RESTRICT=" + !picojson? ( test ) + !test? ( test ) +" + +DOCS=( README.md docs/{faqs,ssl,traits}.md ) + +src_prepare() { + # Unbundle dev-cpp/nlohmann_json. + rm -vrf include/nhlomann || die + # Unbundle dev-cpp/picojson and fix include paths. + # See also: https://github.com/Thalhammer/jwt-cpp/issues/213 + rm -vrf include/picojson || die + find -name '*.h' -type f -print0 | xargs -0 sed -r -e "s:picojson/picojson\.h:picojson.h:g" -i || die + # Prevent installation of bundled dev-cpp/picojson. + sed -i -e 's:^\s*install.*picojson/picojson\.h.*$::' CMakeLists.txt || die + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DJWT_DISABLE_PICOJSON="$(usex !picojson)" + # Not useful for now, asks for non-existent CMake module. + #-DJWT_EXTERNAL_PICOJSON="$(usex picojson)" + # Examples are not installed and for development only. + -DJWT_BUILD_EXAMPLES=NO + -DJWT_BUILD_TESTS="$(usex test)" + -DJWT_CMAKE_FILES_INSTALL_DIR="${EPREFIX}"/usr/share/cmake + ) + cmake_src_configure +} + +src_compile() { + cmake_src_compile + if use doc; then + doxygen || die + fi +} + +src_test() { + "${BUILD_DIR}"/tests/jwt-cpp-test || die +} + +src_install() { + cmake_src_install + use doc && local HTML_DOCS=(doxy/html/.) + einstalldocs +} diff --git a/dev-cpp/scitokens-cpp/files/scitokens-cpp-1.1.0-invalid-vector-access.patch b/dev-cpp/scitokens-cpp/files/scitokens-cpp-1.1.0-invalid-vector-access.patch new file mode 100644 index 000000000000..db524b4245d5 --- /dev/null +++ b/dev-cpp/scitokens-cpp/files/scitokens-cpp-1.1.0-invalid-vector-access.patch @@ -0,0 +1,24 @@ +Fix invalid std::vector access (visible with tests on hardened systems) + +From: Mattias Ellert <mattias.ellert@physics.uu.se> +Bug: https://github.com/scitokens/scitokens-cpp/pull/126 +Bug: https://bugs.gentoo.org/922679 + +--- + src/scitokens_internal.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/src/scitokens_internal.cpp ++++ b/src/scitokens_internal.cpp +@@ -978,9 +978,9 @@ bool scitokens::Validator::store_public_ec_key(const std::string &issuer, + auto x_num = BN_num_bytes(x_bignum.get()); + auto y_num = BN_num_bytes(y_bignum.get()); + std::vector<unsigned char> x_bin; +- x_bin.reserve(x_num); ++ x_bin.resize(x_num); + std::vector<unsigned char> y_bin; +- y_bin.reserve(y_num); ++ y_bin.resize(y_num); + BN_bn2bin(x_bignum.get(), &x_bin[0]); + BN_bn2bin(y_bignum.get(), &y_bin[0]); + std::string x_str(reinterpret_cast<char *>(&x_bin[0]), x_num); diff --git a/dev-cpp/scitokens-cpp/scitokens-cpp-1.0.2-r1.ebuild b/dev-cpp/scitokens-cpp/scitokens-cpp-1.0.2-r1.ebuild index 87e656009e80..91251a33990d 100644 --- a/dev-cpp/scitokens-cpp/scitokens-cpp-1.0.2-r1.ebuild +++ b/dev-cpp/scitokens-cpp/scitokens-cpp-1.0.2-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -21,7 +21,7 @@ SLOT="0" IUSE="test" DEPEND=" - dev-cpp/jwt-cpp[picojson] + <dev-cpp/jwt-cpp-0.7.0[picojson] dev-db/sqlite dev-libs/openssl:0= net-misc/curl:0= diff --git a/dev-cpp/scitokens-cpp/scitokens-cpp-1.0.2-r2.ebuild b/dev-cpp/scitokens-cpp/scitokens-cpp-1.0.2-r2.ebuild new file mode 100644 index 000000000000..afb857eab047 --- /dev/null +++ b/dev-cpp/scitokens-cpp/scitokens-cpp-1.0.2-r2.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +if [[ ${PV} == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/scitokens/scitokens-cpp" +else + SRC_URI="https://github.com/scitokens/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="C++ implementation of the SciTokens library with a C library interface" +HOMEPAGE="https://scitokens.org/" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="test" + +DEPEND=" + <dev-cpp/jwt-cpp-0.7.0[picojson] + dev-db/sqlite + dev-libs/openssl:0= + net-misc/curl:0= + kernel_linux? ( sys-apps/util-linux ) +" +RDEPEND="${DEPEND}" +BDEPEND=" + virtual/pkgconfig + test? ( dev-cpp/gtest ) +" +RESTRICT="!test? ( test )" + +PATCHES=( + "${FILESDIR}"/${PN}-1.1.0-invalid-vector-access.patch +) + +src_prepare() { + # Unbundle dev-cpp/gtest, dev-cpp/jwt-cpp + rm -r vendor || die + # Fix include path for picojson. + find src/ \( -name '*.cpp' -o -name '*.h' \) -type f -print0 | \ + xargs -0 sed -r -e "s:picojson/picojson\.h:picojson.h:g" -i || die + # Disable network-based tests relying on external services. + if use test; then + sed -i -e '/^TEST_F/s#RefreshTest#DISABLED_RefreshTest#' \ + -e '/^TEST_F/s#RefreshExpiredTest#DISABLED_RefreshExpiredTest#' test/main.cpp || die + fi + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DSCITOKENS_BUILD_UNITTESTS="$(usex test)" + -DSCITOKENS_EXTERNAL_GTEST=YES + ) + cmake_src_configure +} diff --git a/dev-cpp/scitokens-cpp/scitokens-cpp-1.1.0-r1.ebuild b/dev-cpp/scitokens-cpp/scitokens-cpp-1.1.0-r1.ebuild new file mode 100644 index 000000000000..afb857eab047 --- /dev/null +++ b/dev-cpp/scitokens-cpp/scitokens-cpp-1.1.0-r1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +if [[ ${PV} == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/scitokens/scitokens-cpp" +else + SRC_URI="https://github.com/scitokens/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="C++ implementation of the SciTokens library with a C library interface" +HOMEPAGE="https://scitokens.org/" + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="test" + +DEPEND=" + <dev-cpp/jwt-cpp-0.7.0[picojson] + dev-db/sqlite + dev-libs/openssl:0= + net-misc/curl:0= + kernel_linux? ( sys-apps/util-linux ) +" +RDEPEND="${DEPEND}" +BDEPEND=" + virtual/pkgconfig + test? ( dev-cpp/gtest ) +" +RESTRICT="!test? ( test )" + +PATCHES=( + "${FILESDIR}"/${PN}-1.1.0-invalid-vector-access.patch +) + +src_prepare() { + # Unbundle dev-cpp/gtest, dev-cpp/jwt-cpp + rm -r vendor || die + # Fix include path for picojson. + find src/ \( -name '*.cpp' -o -name '*.h' \) -type f -print0 | \ + xargs -0 sed -r -e "s:picojson/picojson\.h:picojson.h:g" -i || die + # Disable network-based tests relying on external services. + if use test; then + sed -i -e '/^TEST_F/s#RefreshTest#DISABLED_RefreshTest#' \ + -e '/^TEST_F/s#RefreshExpiredTest#DISABLED_RefreshExpiredTest#' test/main.cpp || die + fi + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DSCITOKENS_BUILD_UNITTESTS="$(usex test)" + -DSCITOKENS_EXTERNAL_GTEST=YES + ) + cmake_src_configure +} diff --git a/dev-cpp/scitokens-cpp/scitokens-cpp-1.1.0.ebuild b/dev-cpp/scitokens-cpp/scitokens-cpp-1.1.0.ebuild index 8f7d8ed53bee..c12cad405a66 100644 --- a/dev-cpp/scitokens-cpp/scitokens-cpp-1.1.0.ebuild +++ b/dev-cpp/scitokens-cpp/scitokens-cpp-1.1.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -21,7 +21,7 @@ SLOT="0" IUSE="test" DEPEND=" - dev-cpp/jwt-cpp[picojson] + <dev-cpp/jwt-cpp-0.7.0[picojson] dev-db/sqlite dev-libs/openssl:0= net-misc/curl:0= |
