From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 94D151582EF for ; Sat, 15 Feb 2025 09:53:24 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 81EEA3430B6 for ; Sat, 15 Feb 2025 09:53:24 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 5C2EF110474; Sat, 15 Feb 2025 09:53:16 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 56733110474 for ; Sat, 15 Feb 2025 09:53:16 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 060F034305D for ; Sat, 15 Feb 2025 09:53:16 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 631402715 for ; Sat, 15 Feb 2025 09:53:14 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1739613169.a5dbd29234da64c46b83751ccbddd9c3113f199b.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/leechcorepyc/files/, dev-python/leechcorepyc/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/leechcorepyc/Manifest dev-python/leechcorepyc/files/leechcorepyc-2.19.2-cflags-ldflags.patch dev-python/leechcorepyc/files/leechcorepyc-2.21.0-respect-CC.patch dev-python/leechcorepyc/leechcorepyc-2.21.0.ebuild X-VCS-Directories: dev-python/leechcorepyc/files/ dev-python/leechcorepyc/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: a5dbd29234da64c46b83751ccbddd9c3113f199b X-VCS-Branch: master Date: Sat, 15 Feb 2025 09:53:14 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d97c0b79-2303-4587-8b65-f629daa25698 X-Archives-Hash: dc794b845b7cc0c9c870c702d591e3b8 commit: a5dbd29234da64c46b83751ccbddd9c3113f199b Author: Mario Haustein hrz tu-chemnitz de> AuthorDate: Thu Jan 2 20:41:01 2025 +0000 Commit: Michał Górny gentoo org> CommitDate: Sat Feb 15 09:52:49 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5dbd292 dev-python/leechcorepyc: add 2.21.0 Closes: https://bugs.gentoo.org/927935 Closes: https://bugs.gentoo.org/934210 Closes: https://bugs.gentoo.org/933273 Signed-off-by: Mario Haustein hrz.tu-chemnitz.de> Closes: https://github.com/gentoo/gentoo/pull/39952 Signed-off-by: Michał Górny gentoo.org> dev-python/leechcorepyc/Manifest | 1 + .../files/leechcorepyc-2.19.2-cflags-ldflags.patch | 19 ++++++++++ .../files/leechcorepyc-2.21.0-respect-CC.patch | 30 ++++++++++++++++ dev-python/leechcorepyc/leechcorepyc-2.21.0.ebuild | 42 ++++++++++++++++++++++ 4 files changed, 92 insertions(+) diff --git a/dev-python/leechcorepyc/Manifest b/dev-python/leechcorepyc/Manifest index 037c3c104253..8811557cb82f 100644 --- a/dev-python/leechcorepyc/Manifest +++ b/dev-python/leechcorepyc/Manifest @@ -1 +1,2 @@ DIST leechcorepyc-2.18.7.tar.gz 234929 BLAKE2B 5e785ec50975fdf3f943a18a09bdae6308e8426691ee5f1eb11d0db9534126b39d009946b8ff2f02783d6e97e2d45e2cf9cddd1cc7882a1569412dc50d08694f SHA512 8938ff389aed0b49df4c0f3c9f00838a418784dd21d019f6c821fc4d1561414d17ac4f59702cb54f4e1584f39d48bcd3bbd8247e8eed2bd38ec6941524948ffa +DIST leechcorepyc-2.21.0.tar.gz 241055 BLAKE2B fbf2423044ec2a0d43c81b2e70c4171d912e2811878c398120305ac3cfa2b024ca8b785ab5df6487f8d6100959d1b7a556710516d4669445122ce6066c61a138 SHA512 107036e9feba18a0c7f076d21f4b81b0ffe96f6dded441521241875e62e4cc76cb1a327b4231aadf6ae0093b6af00e191b74dd2525d164cf906fcca50318ab10 diff --git a/dev-python/leechcorepyc/files/leechcorepyc-2.19.2-cflags-ldflags.patch b/dev-python/leechcorepyc/files/leechcorepyc-2.19.2-cflags-ldflags.patch new file mode 100644 index 000000000000..23e796dbf732 --- /dev/null +++ b/dev-python/leechcorepyc/files/leechcorepyc-2.19.2-cflags-ldflags.patch @@ -0,0 +1,19 @@ +From: Mario Haustein +Bug: https://bugs.gentoo.org/927935 +Bug: https://bugs.gentoo.org/934210 + +Remove debugging warning treatment CFLAGS which should only be set by +make.conf. Move linker flags from CFLAGS to LDFLAGS. + +--- a/leechcore_device_qemu/Makefile ++++ b/leechcore_device_qemu/Makefile +@@ -1,7 +1,7 @@ + CC=gcc + # -Wno-unused-variable -> unused variable in leechcore.h +-CFLAGS += -I. -I../includes -D LINUX -shared -fPIC -lrt -l:leechcore.so -L. -lm -fvisibility=hidden -g -Wall -Werror -Wextra -Wno-unused-variable +-LDFLAGS += -Wl,-rpath,'$$ORIGIN' -g -ldl -shared ++CFLAGS += -I. -I../includes -D LINUX -shared -fPIC -fvisibility=hidden ++LDFLAGS += -Wl,-rpath,'$$ORIGIN' -lrt -lm -ldl -shared -L. -lleechcore.so + OBJ = leechcore_device_qemu.o + + %.o: %.c $(DEPS) diff --git a/dev-python/leechcorepyc/files/leechcorepyc-2.21.0-respect-CC.patch b/dev-python/leechcorepyc/files/leechcorepyc-2.21.0-respect-CC.patch new file mode 100644 index 000000000000..a894e84a6423 --- /dev/null +++ b/dev-python/leechcorepyc/files/leechcorepyc-2.21.0-respect-CC.patch @@ -0,0 +1,30 @@ +--- a/leechcore/Makefile ++++ b/leechcore/Makefile +@@ -1,5 +1,6 @@ +-CC=gcc +-CFLAGS += -I. -I../includes/ -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. -I../includes/ -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_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.21.0.ebuild b/dev-python/leechcorepyc/leechcorepyc-2.21.0.ebuild new file mode 100644 index 000000000000..e8f976f0b5cf --- /dev/null +++ b/dev-python/leechcorepyc/leechcorepyc-2.21.0.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..13} ) + +inherit distutils-r1 toolchain-funcs pypi + +DESCRIPTION="Python binding for LeechCore Physical Memory Acquisition Library" +HOMEPAGE="https://github.com/ufrisk/LeechCore" + +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.21.0-respect-CC.patch" + "${FILESDIR}/${PN}-2.19.2-cflags-ldflags.patch" +) + +src_prepare() { + default + + # Avoid redefining _FORTIFY_SOURCE. See #893824, #906715. + sed -i -e 's/ -D_FORTIFY_SOURCE=2 / /g' leechcore/Makefile || die +} + +src_configure() { + tc-export CC + + distutils-r1_src_configure +}