diff options
Diffstat (limited to 'dev-python/leechcorepyc')
-rw-r--r-- | dev-python/leechcorepyc/Manifest | 1 | ||||
-rw-r--r-- | dev-python/leechcorepyc/files/leechcorepyc-2.12.0-respect-CC.patch | 41 | ||||
-rw-r--r-- | dev-python/leechcorepyc/leechcorepyc-2.12.0.ebuild | 34 |
3 files changed, 76 insertions, 0 deletions
diff --git a/dev-python/leechcorepyc/Manifest b/dev-python/leechcorepyc/Manifest index 996d1eee59a1..cacb30a5f45e 100644 --- a/dev-python/leechcorepyc/Manifest +++ b/dev-python/leechcorepyc/Manifest @@ -1 +1,2 @@ DIST leechcorepyc-2.10.2.tar.gz 119984 BLAKE2B e9bba5dd548ce5ce8c3a367d1ae21b66fca796e5614fe3cc86cdc16ddd1b589261534b551992a3964542f6d61fb6fb64bc9e2e03f8775486761107a4ffbeb958 SHA512 16048f3494452ff75fa946d65dfa36a7b0dd30c132db10c01fdc1dbe0de051c69856bf7b9830d68ee17ec1e4ce5fb29ba17a14f0facb928b81e4094ac5009716 +DIST leechcorepyc-2.12.0.tar.gz 120774 BLAKE2B 7e7de1388acb73bb391ae5451c5b4f3f4b6c4891a1c420f2d662c930a37d4db702731c70861d8467b82b4e29dc1c22560215b1f8fe9ec8f7675fe69b63844ae3 SHA512 bb8c4c76ab8ec610f8c879c75dbed36006b16a165c20ac17ccd8a8978e1e0b4f5543c8aa8b054ea4cf58d38e908e8b92ba13898697c2465776add1bc964762b1 diff --git a/dev-python/leechcorepyc/files/leechcorepyc-2.12.0-respect-CC.patch b/dev-python/leechcorepyc/files/leechcorepyc-2.12.0-respect-CC.patch new file mode 100644 index 000000000000..6bf48b0c6bcd --- /dev/null +++ b/dev-python/leechcorepyc/files/leechcorepyc-2.12.0-respect-CC.patch @@ -0,0 +1,41 @@ +--- a/leechcore/Makefile ++++ b/leechcore/Makefile +@@ -1,7 +1,8 @@ +-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`
+ #CFLAGS += -g -O0 -Wextra -Wno-unused-parameter
+-CFLAGS += -fPIE -fPIC -pie -fstack-protector -D_FORTIFY_SOURCE=2 -O1 -Wl,-z,noexecstack
++CFLAGS += -fPIE -fPIC -pie -D_FORTIFY_SOURCE=2 -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
+--- 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.12.0.ebuild b/dev-python/leechcorepyc/leechcorepyc-2.12.0.ebuild new file mode 100644 index 000000000000..80330d420909 --- /dev/null +++ b/dev-python/leechcorepyc/leechcorepyc-2.12.0.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{8..10} ) + +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.12.0-respect-CC.patch +) + +src_configure() { + tc-export CC + + distutils-r1_src_configure +} |