summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Haustein <mario.haustein@hrz.tu-chemnitz.de>2023-02-25 22:58:33 +0100
committerSam James <sam@gentoo.org>2023-02-25 22:23:25 +0000
commit84098ffdde6ad441155be0249f23e989681f65d8 (patch)
tree77c8f6c8c44ccbe224a7a2b1059d94025b21005d /dev-python/leechcorepyc
parentapp-forensics/volatility3: enable py3.11 (diff)
downloadgentoo-84098ffdde6ad441155be0249f23e989681f65d8.tar.gz
gentoo-84098ffdde6ad441155be0249f23e989681f65d8.tar.bz2
gentoo-84098ffdde6ad441155be0249f23e989681f65d8.zip
dev-python/leechcorepyc: add 2.14.0
Closes: https://bugs.gentoo.org/893824 Signed-off-by: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de> Closes: https://github.com/gentoo/gentoo/pull/29796 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python/leechcorepyc')
-rw-r--r--dev-python/leechcorepyc/Manifest1
-rw-r--r--dev-python/leechcorepyc/files/leechcorepyc-2.14.0-cflags.patch13
-rw-r--r--dev-python/leechcorepyc/files/leechcorepyc-2.14.0-respect-CC.patch38
-rw-r--r--dev-python/leechcorepyc/leechcorepyc-2.14.0.ebuild35
4 files changed, 87 insertions, 0 deletions
diff --git a/dev-python/leechcorepyc/Manifest b/dev-python/leechcorepyc/Manifest
index 9fdc752b34f0..b5f44afbfdd1 100644
--- a/dev-python/leechcorepyc/Manifest
+++ b/dev-python/leechcorepyc/Manifest
@@ -1 +1,2 @@
DIST leechcorepyc-2.13.0.tar.gz 123152 BLAKE2B 8a3ae5b0f0d52296ef71bbbea5140f9dec6abd379ae2a1b0e3a418090a11e5196731b1c4cba5320d4058c562911366cc9dd84f3a30f58ddc7c66362a9b39af8f SHA512 1420f635bebafe1e07cb5f0ade3e6b141433d4a72ec165713f959dc19e05f42a86440c5c99dd5d759aee221ee478e91e7161541cebe11be6dfa286fad79843ae
+DIST leechcorepyc-2.14.0.tar.gz 124463 BLAKE2B 26b7581da76ab3f8981e956ab2f64de2094cc906788455e38784fb50dbad31b8b14de2f510cb49b9c1e842e2a66effd44a2db94cb6ef9e7ec9f11c3af0d9434c SHA512 c7d1d50727023f6b34bbc9682dba9bc70ae69962dcd5c326612a0dcd48a2a90ecfe674391559271d65d7720d755edde02342fb999e53ad54f8095c589060b901
diff --git a/dev-python/leechcorepyc/files/leechcorepyc-2.14.0-cflags.patch b/dev-python/leechcorepyc/files/leechcorepyc-2.14.0-cflags.patch
new file mode 100644
index 000000000000..945f4e41e1c1
--- /dev/null
+++ b/dev-python/leechcorepyc/files/leechcorepyc-2.14.0-cflags.patch
@@ -0,0 +1,13 @@
+Bug: https://bugs.gentoo.org/893824
+--- a/leechcore/Makefile
++++ b/leechcore/Makefile
+@@ -6,7 +6,8 @@
+ # CFLAGS += -fsanitize=address -fsanitize=leak -fno-omit-frame-pointer -fsanitize=undefined -fsanitize=bounds-strict -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow
+ # CFLAGS += -fsanitize=pointer-compare -fsanitize=pointer-subtract -fanalyzer
+ # DEBUG FLAGS ABOVE
+-CFLAGS += -fPIE -fPIC -pie -fstack-protector -D_FORTIFY_SOURCE=2 -O1 -Wl,-z,noexecstack
++CFLAGS := -D_FORTIFY_SOURCE=2 ${CFLAGS}
++CFLAGS += -fPIE -fPIC -pie -Wl,-z,noexecstack
+ CFLAGS += -Wall -Wno-unused-result -Wno-unused-variable -Wno-unused-value -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast
+ LDFLAGS += -g -ldl -shared
+ DEPS = leechcore.h
diff --git a/dev-python/leechcorepyc/files/leechcorepyc-2.14.0-respect-CC.patch b/dev-python/leechcorepyc/files/leechcorepyc-2.14.0-respect-CC.patch
new file mode 100644
index 000000000000..4fdebf98d445
--- /dev/null
+++ b/dev-python/leechcorepyc/files/leechcorepyc-2.14.0-respect-CC.patch
@@ -0,0 +1,38 @@
+--- a/leechcore/Makefile
++++ b/leechcore/Makefile
+@@ -1,5 +1,6 @@
+-CC=gcc
+-CFLAGS += -I. -D LINUX -D _GNU_SOURCE -shared -fPIC -fvisibility=hidden -pthread `pkg-config libusb-1.0 --libs --cflags`
++CC?=gcc
++PKG_CONFIG ?= pkg-config
++CFLAGS += -I. -D LINUX -D _GNU_SOURCE -shared -fPIC -fvisibility=hidden -pthread `$(PKG_CONFIG) libusb-1.0 --libs --cflags`
+ # DEBUG FLAGS BELOW
+ # export ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:detect_invalid_pointer_pairs=2
+ # CFLAGS += -g -O0 -Wextra -Wno-unused-parameter -Wno-cast-function-type
+--- a/leechcore_device_rawtcp/Makefile
++++ b/leechcore_device_rawtcp/Makefile
+@@ -1,4 +1,4 @@
+-CC=gcc
++CC?=gcc
+ CFLAGS += -I. -I../includes -D LINUX -shared -fPIC -fvisibility=hidden
+ LDFLAGS += -g -shared
+ DEPS =
+--- a/leechcore_device_sp605tcp/Makefile
++++ b/leechcore_device_sp605tcp/Makefile
+@@ -1,4 +1,4 @@
+-CC=gcc
++CC?=gcc
+ CFLAGS += -I. -I../includes -D LINUX -shared -fPIC -fvisibility=hidden
+ LDFLAGS += -g -shared
+ DEPS =
+--- a/leechcore_ft601_driver_linux/Makefile
++++ b/leechcore_ft601_driver_linux/Makefile
+@@ -1,5 +1,6 @@
+-CC=gcc
+-CFLAGS += -I. -D LINUX -shared -fPIC -fvisibility=hidden `pkg-config libusb-1.0 --libs --cflags`
++CC?=gcc
++PKG_CONFIG ?= pkg-config
++CFLAGS += -I. -D LINUX -shared -fPIC -fvisibility=hidden `$(PKG_CONFIG) libusb-1.0 --libs --cflags`
+ LDFLAGS += -g -shared
+ DEPS = leechcore_ft601_driver_linux.h
+ OBJ = fpga_libusb.o leechcore_ft601_driver_linux.o
diff --git a/dev-python/leechcorepyc/leechcorepyc-2.14.0.ebuild b/dev-python/leechcorepyc/leechcorepyc-2.14.0.ebuild
new file mode 100644
index 000000000000..bf736abb4c7b
--- /dev/null
+++ b/dev-python/leechcorepyc/leechcorepyc-2.14.0.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit distutils-r1 toolchain-funcs
+
+DESCRIPTION="Python binding for LeechCore Physical Memory Acquisition Library"
+HOMEPAGE="https://github.com/ufrisk/LeechCore"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+# leechcorepyc ships with a bundled version of the LeechCore library. So we
+# don't depend on the library here. But we must be aware this module doesn't
+# use the system library.
+DEPEND="virtual/libusb:="
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.14.0-respect-CC.patch"
+ "${FILESDIR}/${PN}-2.14.0-cflags.patch"
+)
+
+src_configure() {
+ tc-export CC
+
+ distutils-r1_src_configure
+}