summaryrefslogtreecommitdiff
path: root/dev-libs/tlsh
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /dev-libs/tlsh
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'dev-libs/tlsh')
-rw-r--r--dev-libs/tlsh/Manifest5
-rw-r--r--dev-libs/tlsh/files/tlsh-4.8.2-gnuinstalldirs.patch37
-rw-r--r--dev-libs/tlsh/files/tlsh-4.8.2-respect-flags.patch21
-rw-r--r--dev-libs/tlsh/metadata.xml15
-rw-r--r--dev-libs/tlsh/tlsh-4.8.2.ebuild33
5 files changed, 111 insertions, 0 deletions
diff --git a/dev-libs/tlsh/Manifest b/dev-libs/tlsh/Manifest
new file mode 100644
index 000000000000..7918f6b640e7
--- /dev/null
+++ b/dev-libs/tlsh/Manifest
@@ -0,0 +1,5 @@
+AUX tlsh-4.8.2-gnuinstalldirs.patch 1244 BLAKE2B 1369902e03db4837e02c01d63262545725b241a02f02462fd4fb41e7204dee9bae668bf16daf0990b083ced13d4234348ba3df220eab6d69fd77a1e3979b71f3 SHA512 68cf688a8587a301299efb5779ab47473a508e0f0cf6dc90e3ada21bda3cae25142da7d83b67098adef0f03cfbbea40952acffffcaf75c18842efeacb5bcfda8
+AUX tlsh-4.8.2-respect-flags.patch 820 BLAKE2B 9159f50d554168497ad9f416e4e002fd757a88543529fe6e2a180f6250399956bb6d967b06bc458e71b9dcf7f01cbb5d98d762ee65d9fd61392fd59b81dd25c4 SHA512 4b90021f2a01992d68d52f11b20a2ce9c4900216c8a6cd7c6fb95cfad20b44fbe37ab118ceee2811e65da7380e12960b5ddbf883198573491c2cf40f25b0fed1
+DIST tlsh-4.8.2.tar.gz 3345458 BLAKE2B 27d5eece16bb36225b9ae8b3d3a9d055a0f214fffae08a58c39211c3d918dd842497315a62237b291ee1055dfadad78826bbd24f7b9d88f510e9a31f74654039 SHA512 5355c7734f5356a3a7a31ccc078254835871fc0369f1889a34131a0f810735201c68f674eb18e975b6a03a32e5c284899ca9ffdc1f583e42192188c172d2aad0
+EBUILD tlsh-4.8.2.ebuild 701 BLAKE2B f9a25d4319bedf551fb642076d9b9b653fd0dbfac41736c43992f2e84939f3f25838b5358dd2e392c9cbce8e4c97fd9fc5c938ec882d9e4eb03fda0506ab7bc1 SHA512 3b845f43b55529379b39beaf7d0522067dc040cc0e15450781c5a15486cc65530ef9ead96b87f8cacc8c22d607bad504332ffb5b33eaec409d189bf6e455437e
+MISC metadata.xml 471 BLAKE2B 2e17c59829f15d1439933fef59fd14a8525723aae1de1c640c8a83a9df612776ff33d24904a30ffcf27eddcd9c778af09d6d65c3b4e66542288810f416ca0ec4 SHA512 e8a8759d526e1d0b9607f84df503440a650f5835c864c0c5c89c5f978b58839620e2ed7e0bc39af51e38e1da1fe86fac1a398394069f4b3820219db40254a284
diff --git a/dev-libs/tlsh/files/tlsh-4.8.2-gnuinstalldirs.patch b/dev-libs/tlsh/files/tlsh-4.8.2-gnuinstalldirs.patch
new file mode 100644
index 000000000000..d30363de6d74
--- /dev/null
+++ b/dev-libs/tlsh/files/tlsh-4.8.2-gnuinstalldirs.patch
@@ -0,0 +1,37 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -51,7 +51,7 @@
+ # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ # OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-cmake_minimum_required(VERSION 2.6)
++cmake_minimum_required(VERSION 2.8.5)
+
+ project(TLSH)
+
+@@ -133,6 +133,8 @@ else(CMAKE_BUILD_TYPE STREQUAL Debug)
+ endif()
+ endif(CMAKE_BUILD_TYPE STREQUAL Debug)
+
++include(GNUInstallDirs)
++
+ if(MSVC)
+ add_definitions(-DWINDOWS -DTLSH_LIB)
+ include_directories(Windows)
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -78,10 +78,10 @@ if(TLSH_SHARED_LIBRARY EQUAL 1)
+ endif()
+
+ if(TLSH_SHARED_LIBRARY)
+- install(TARGETS tlsh_static tlsh_shared DESTINATION lib)
++ install(TARGETS tlsh_static tlsh_shared DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ else()
+- install(TARGETS tlsh_static DESTINATION lib)
++ install(TARGETS tlsh_static DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ endif()
+
+-install(FILES ../include/tlsh.h DESTINATION include/tlsh)
+-install(FILES ../include/tlsh_version.h DESTINATION include/tlsh)
++install(FILES ../include/tlsh.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/tlsh)
++install(FILES ../include/tlsh_version.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/tlsh)
diff --git a/dev-libs/tlsh/files/tlsh-4.8.2-respect-flags.patch b/dev-libs/tlsh/files/tlsh-4.8.2-respect-flags.patch
new file mode 100644
index 000000000000..fc22b9a1d521
--- /dev/null
+++ b/dev-libs/tlsh/files/tlsh-4.8.2-respect-flags.patch
@@ -0,0 +1,21 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -126,7 +126,7 @@ if (CMAKE_BUILD_TYPE STREQUAL Debug)
+ endif()
+ else(CMAKE_BUILD_TYPE STREQUAL Debug)
+ if(CMAKE_COMPILER_IS_GNUCXX)
+- set(CMAKE_CXX_FLAGS "-O2 -fvisibility=internal") ## Remove TlshImpl symbols
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=internal") ## Remove TlshImpl symbols
+ endif()
+ if(MSVC)
+ set(CMAKE_CXX_FLAGS "/O2") ## Optimize
+@@ -142,8 +142,7 @@ endif()
+
+ # user can override CXX; make sure tests link and load properly regardless of LD_LIBRARY_PATH
+ if(CMAKE_COMPILER_IS_GNUCXX)
+- set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc")
+- set(CMAKE_EXE_LINKER_FLAGS "-static-libstdc++")
++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++")
+ endif()
+
+ enable_testing()
diff --git a/dev-libs/tlsh/metadata.xml b/dev-libs/tlsh/metadata.xml
new file mode 100644
index 000000000000..8ffb367f45ce
--- /dev/null
+++ b/dev-libs/tlsh/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>t@laumann.xyz</email>
+ <name>Thomas Bracht Laumann Jespersen</name>
+ </maintainer>
+ <maintainer type="person" proxied="proxy">
+ <email>sam@gentoo.org</email>
+ <name>Sam James</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">trendmicro/tlsh</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-libs/tlsh/tlsh-4.8.2.ebuild b/dev-libs/tlsh/tlsh-4.8.2.ebuild
new file mode 100644
index 000000000000..e6fb73d50849
--- /dev/null
+++ b/dev-libs/tlsh/tlsh-4.8.2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CMAKE_IN_SOURCE_BUILD=1
+inherit cmake
+
+DESCRIPTION="Fuzzy matching library"
+HOMEPAGE="https://github.com/trendmicro/tlsh"
+SRC_URI="https://github.com/trendmicro/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="|| ( Apache-2.0 BSD )"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gnuinstalldirs.patch
+ "${FILESDIR}"/${P}-respect-flags.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DTLSH_CHECKSUM_1B=1
+ -DTLSH_SHARED_LIBRARY=1
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+ find "${ED}" -name '*.a' -delete || die # Remove the static lib
+}