summaryrefslogtreecommitdiff
path: root/dev-cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dev-cpp')
-rw-r--r--dev-cpp/highway/Manifest1
-rw-r--r--dev-cpp/highway/highway-1.4.0.ebuild92
-rw-r--r--dev-cpp/lucene++/files/lucene++-3.0.9-no-inline.patch70
-rw-r--r--dev-cpp/lucene++/lucene++-3.0.9-r2.ebuild1
4 files changed, 164 insertions, 0 deletions
diff --git a/dev-cpp/highway/Manifest b/dev-cpp/highway/Manifest
index cd4a1e8e8f92..d6470f59da0d 100644
--- a/dev-cpp/highway/Manifest
+++ b/dev-cpp/highway/Manifest
@@ -1,2 +1,3 @@
DIST highway-1.2.0.tar.gz 2234665 BLAKE2B b92f699c0f2f15fd9d223cf9546125b68a5c12ba9c84f8a3a990129f40bc56a266858e4f99eebe34e47c9904bd9164a138de1af8d405911d4b03bea67532489a SHA512 e94b9cc51c81157ccd6bf4d6163445b1acc1a2667dc2650d1c4aea0a5021989c08dafcb92564fcbecb9445ab2f1779051260be2f5b29c3932803b8a42ed2f824
DIST highway-1.3.0.tar.gz 3634890 BLAKE2B c8db95b003c1d00e87b42f3d7bf06005873c225ef950f7cb32057f6f690f219a400dcf68220a0dbbb72cdb12f13afabcd9c1b8e9c7e5eb007734bfe4b617c347 SHA512 8b9f4fdc4fa60b6817417959853f5b55bf86aec9d35fc6664dda15179cc55e0a9940f3a46011a84b95263ba342dc47ca1cb93b04481ff4b63d724cce1815d7c6
+DIST highway-1.4.0.tar.gz 3691240 BLAKE2B 25282ceb02f1bb50e188e01f1b1daf0622d93f03325d71a3da822c91525790f894f2c02e8418127899e72956981a2cbb0ae801b497799ec52a8a37a114d6213f SHA512 819422857d6a74e3a936c402698e078db5b7b88fb43767e62429ec7bd954fe93b017e75029a4df4a1a97ef3a2486107eef5247da751eb487640dea409f3f2fa2
diff --git a/dev-cpp/highway/highway-1.4.0.ebuild b/dev-cpp/highway/highway-1.4.0.ebuild
new file mode 100644
index 000000000000..d298f9b09c82
--- /dev/null
+++ b/dev-cpp/highway/highway-1.4.0.ebuild
@@ -0,0 +1,92 @@
+# Copyright 2021-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake-multilib toolchain-funcs
+
+DESCRIPTION="Performance-portable, length-agnostic SIMD with runtime dispatch"
+HOMEPAGE="https://github.com/google/highway"
+
+if [[ "${PV}" == *9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/google/highway.git"
+else
+ SRC_URI="https://github.com/google/highway/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+LICENSE="|| ( Apache-2.0 BSD ) CC0-1.0"
+SLOT="0"
+IUSE="cpu_flags_arm_neon test"
+
+DEPEND="test? ( dev-cpp/gtest[${MULTILIB_USEDEP}] )"
+BDEPEND="|| ( >=sys-devel/binutils-2.44:* llvm-core/lld sys-devel/native-cctools )"
+
+RESTRICT="!test? ( test )"
+
+check_binutils_version() {
+ if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]] && ! tc-ld-is-gold && ! tc-ld-is-lld ; then
+ # Okay, hopefully it's Binutils, but we don't have a nice way of checking
+ # the gas version.
+ #
+ # Convert this:
+ # ```
+ # GNU assembler (Gentoo 2.44 p1) 2.44
+ # Copyright (C) 2022 Free Software Foundation, Inc.
+ # This program is free software; you may redistribute it under the terms of
+ # the GNU General Public License version 3 or (at your option) a later version.
+ # This program has absolutely no warranty.
+ # ```
+ #
+ # into...
+ # ```
+ # 2.44
+ # ```
+ local ver=$($(tc-getAS) --version 2>&1 | head -n 1 | rev | cut -d' ' -f1 | rev)
+
+ if ! [[ ${ver} =~ [0-9].[0-9][0-9] ]] ; then
+ # Skip if unrecognised format so we don't pass something
+ # odd into ver_cut.
+ return
+ fi
+
+ ver_major=$(ver_cut 1 "${ver}")
+ ver_minor=$(ver_cut 2 "${ver}")
+
+ # Check borrowed from sys-apps/pciutils (see bug #966644).
+ if [[ ${ver_major} -eq 2 && ${ver_minor} -lt 44 ]] ; then
+ eerror "Old version of binutils activated! ${P} cannot be built with an old version."
+ eerror "Please follow these steps:"
+ eerror "1. Select a newer binutils (>= 2.44) using binutils-config"
+ eerror " (If no such version is installed, run emerge -v1 sys-devel/binutils)"
+ eerror "2. Run: . /etc/profile"
+ eerror "3. Try emerging again with: emerge -v1 ${CATEGORY}/${P}"
+ eerror "4. Complete your world upgrade if you were performing one."
+ eerror "5. Perform a depclean (emerge -acv)"
+ eerror "\tYou MUST depclean after every world upgrade in future!"
+ die "Old binutils found! Change to a newer (g)as using binutils-config."
+ fi
+ fi
+}
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && check_binutils_version
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && check_binutils_version
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DHWY_CMAKE_ARM7=$(usex cpu_flags_arm_neon)
+ -DBUILD_TESTING=$(usex test)
+ -DHWY_ENABLE_TESTS=$(usex test)
+ -DHWY_WARNINGS_ARE_ERRORS=OFF
+ )
+
+ use test && mycmakeargs+=( "-DHWY_SYSTEM_GTEST=ON" )
+
+ cmake_src_configure
+}
diff --git a/dev-cpp/lucene++/files/lucene++-3.0.9-no-inline.patch b/dev-cpp/lucene++/files/lucene++-3.0.9-no-inline.patch
new file mode 100644
index 000000000000..58b00b2295e1
--- /dev/null
+++ b/dev-cpp/lucene++/files/lucene++-3.0.9-no-inline.patch
@@ -0,0 +1,70 @@
+From https://github.com/luceneplusplus/LucenePlusPlus/pull/200
+Bug: https://bugs.gentoo.org/973146
+Pruned compiler errors to relevant lines.
+
+From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
+Date: Sat, 24 Feb 2024 21:26:58 +0100
+Subject: [PATCH] Update DefaultSimilarity.cpp
+
+This fixes a linker failure when building tests (lto related?)
+https://launchpadlibrarian.net/715939877/buildlog_ubuntu-noble-amd64.lucene++_3.0.9-1_BUILDING.txt.gz
+..
+/usr/bin/ld: /tmp/ccUJivoA.ltrans35.ltrans.o:(.data.rel.ro+0x558): undefined reference to `Lucene::DefaultSimilarity::queryNorm(double)'
+/usr/bin/ld: /tmp/ccUJivoA.ltrans35.ltrans.o:(.data.rel.ro+0x568): undefined reference to `Lucene::DefaultSimilarity::sloppyFreq(int)'
+/usr/bin/ld: /tmp/ccUJivoA.ltrans35.ltrans.o:(.data.rel.ro+0x570): undefined reference to `Lucene::DefaultSimilarity::tf(double)'
+/usr/bin/ld: /tmp/ccUJivoA.ltrans35.ltrans.o:(.data.rel.ro+0x588): undefined reference to `Lucene::DefaultSimilarity::idf(int, int)'
+/usr/bin/ld: /tmp/ccUJivoA.ltrans35.ltrans.o:(.data.rel.ro+0x590): undefined reference to `Lucene::DefaultSimilarity::coord(int, int)'
+/usr/bin/ld: /tmp/ccUJivoA.ltrans72.ltrans.o:(.data.rel.ro+0x360): undefined reference to `Lucene::DefaultSimilarity::lengthNorm(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&, int)'
+..
+---
+ src/core/search/DefaultSimilarity.cpp | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/src/core/search/DefaultSimilarity.cpp b/src/core/search/DefaultSimilarity.cpp
+index c98f2d95..da4c3db2 100644
+--- a/src/core/search/DefaultSimilarity.cpp
++++ b/src/core/search/DefaultSimilarity.cpp
+@@ -27,35 +27,35 @@ double DefaultSimilarity::computeNorm(const String& fieldName, const FieldInvert
+ return (state->getBoost() * lengthNorm(fieldName, numTerms));
+ }
+
+-inline double DefaultSimilarity::lengthNorm(const String& fieldName, int32_t numTokens) {
++double DefaultSimilarity::lengthNorm(const String& fieldName, int32_t numTokens) {
+ return (double)(1.0 / std::sqrt((double)numTokens));
+ }
+
+-inline double DefaultSimilarity::queryNorm(double sumOfSquaredWeights) {
++double DefaultSimilarity::queryNorm(double sumOfSquaredWeights) {
+ return (double)(1.0 / std::sqrt(sumOfSquaredWeights));
+ }
+
+-inline double DefaultSimilarity::tf(double freq) {
++double DefaultSimilarity::tf(double freq) {
+ return (double)std::sqrt(freq);
+ }
+
+-inline double DefaultSimilarity::sloppyFreq(int32_t distance) {
++double DefaultSimilarity::sloppyFreq(int32_t distance) {
+ return (1.0 / (double)(distance + 1));
+ }
+
+-inline double DefaultSimilarity::idf(int32_t docFreq, int32_t numDocs) {
++double DefaultSimilarity::idf(int32_t docFreq, int32_t numDocs) {
+ return (double)(std::log((double)numDocs / (double)(docFreq + 1)) + 1.0);
+ }
+
+-inline double DefaultSimilarity::coord(int32_t overlap, int32_t maxOverlap) {
++double DefaultSimilarity::coord(int32_t overlap, int32_t maxOverlap) {
+ return (double)overlap / (double)maxOverlap;
+ }
+
+-inline void DefaultSimilarity::setDiscountOverlaps(bool v) {
++void DefaultSimilarity::setDiscountOverlaps(bool v) {
+ discountOverlaps = v;
+ }
+
+-inline bool DefaultSimilarity::getDiscountOverlaps() {
++bool DefaultSimilarity::getDiscountOverlaps() {
+ return discountOverlaps;
+ }
+
diff --git a/dev-cpp/lucene++/lucene++-3.0.9-r2.ebuild b/dev-cpp/lucene++/lucene++-3.0.9-r2.ebuild
index d3b127f1f2ea..5ef6841741c8 100644
--- a/dev-cpp/lucene++/lucene++-3.0.9-r2.ebuild
+++ b/dev-cpp/lucene++/lucene++-3.0.9-r2.ebuild
@@ -33,6 +33,7 @@ PATCHES=(
"${FILESDIR}/${PN}-3.0.9-gcc15.patch"
"${FILESDIR}/${PN}-3.0.9-boost-1.89.patch"
"${FILESDIR}/${PN}-3.0.9-boost-1.90.patch"
+ "${FILESDIR}/${PN}-3.0.9-no-inline.patch"
)
src_configure() {