From 564f8bfdb74759f8e95ec50a16419425e8ba8f25 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 6 Aug 2023 15:22:56 +0100 Subject: gentoo auto-resync : 06:08:2023 - 15:22:56 --- dev-embedded/urjtag/Manifest | 5 +- .../files/urjtag-2021.03-fix-python-setup.patch | 14 ++++ dev-embedded/urjtag/urjtag-2021.03.ebuild | 84 ++++++++++++++++++++++ dev-embedded/urjtag/urjtag-9999.ebuild | 48 ++++++++++--- 4 files changed, 142 insertions(+), 9 deletions(-) create mode 100644 dev-embedded/urjtag/files/urjtag-2021.03-fix-python-setup.patch create mode 100644 dev-embedded/urjtag/urjtag-2021.03.ebuild (limited to 'dev-embedded/urjtag') diff --git a/dev-embedded/urjtag/Manifest b/dev-embedded/urjtag/Manifest index 57b6a758623b..3c525f56fda8 100644 --- a/dev-embedded/urjtag/Manifest +++ b/dev-embedded/urjtag/Manifest @@ -1,4 +1,7 @@ +AUX urjtag-2021.03-fix-python-setup.patch 598 BLAKE2B 9c466950fb3dad58c1eeb0b781f8dc2217fd6d44446d8592a35ac70f5edc755e543f63e895f07f9fac004e522a2d15ff4d8fdbfdf42b71487ffd8cec251cf644 SHA512 5be37a5313ae26adf38fbe33518f3b4412e6b7a9709d04a98a7055d05b3515c643f2a9967c6b43faf0ffd69dae89d74c2900ae3bcd95198153a0a649763c2226 DIST urjtag-2019.12.tar.xz 1208432 BLAKE2B 69963cbd39dcbec1abd73778fc6e98d743e36f6d4a17ba673b8691598ac0d4cec97e8b9c79068ad8971e6e07de81553bfd3bf5f684515b4a19303dd95ed477a2 SHA512 e149e53410a6591bdadc2c0138c6f81dac0fd6e35601461e19d356decdb820ec8e6bd53d59a1fd9781dfa1fee88d23dcafbd8df9adc0f8e51256c626d2ee0f36 +DIST urjtag-2021.03.tar.xz 1208440 BLAKE2B 68d0f0ec15c25ef351e0523eea21c18e723871032a046d31c031809a2774b0b8339b0b5d1a6f11a681ab3d3074b7f5f4fcd819fa7de1fdcac5f20ab39c6a40dd SHA512 baf203e556d1d41437539d3f5c018b35fbb496f71391c2bec2786ffa47bff33d38654b3e7d106e38bcf36d075d86fc02b18eaaf634cdb65e2840ff50ca0da8b2 EBUILD urjtag-2019.12.ebuild 1148 BLAKE2B 3f210baaa90c97bea2c2de5f3088cf55e005871a19a0f7cee62293f4c4dcea51c24a106633fb8638874183f9563965b4b14afcf4130be11f9e73032fa33a9294 SHA512 62b506b74a8ad33eb2ce39342079e4f734ced5ef20a8e31553340def5533900e9b091e949ba85f9ac3852effd21b9ceb81233b18339b298e59d270ab2d1e8d23 -EBUILD urjtag-9999.ebuild 1082 BLAKE2B 607bfe0c6ca0b8191e20d4f24c12251f27426adb16610c4f7009282759820e735577360f6312b1516a3227cb18732c318c2fc22205409355030ca98b722cca57 SHA512 5eb18ffb9eb0933b86f44b4ab67c8dc32dd5be0f0a62ee956e143d753fb46edff04badba7051ff516ad3bfc51e00f51a81ced285af81171b5d7ba47d0195a669 +EBUILD urjtag-2021.03.ebuild 1698 BLAKE2B aecea688ff1bf9e24885f3a23c1ee79e7581158ca3bcd18e64ec270f1adefc5e9ea5604de41a0fabc0a34abb70bead2ce45ed50f672730346219550296d9c36a SHA512 98b64310e34b26584e7ca9db1abddc4f762123c619c905bf5a64a92a6a2d712a6dbdfef0940c1f29248dd209398a34ffda6c435b78167aa5c354c7f375011b7a +EBUILD urjtag-9999.ebuild 1698 BLAKE2B aecea688ff1bf9e24885f3a23c1ee79e7581158ca3bcd18e64ec270f1adefc5e9ea5604de41a0fabc0a34abb70bead2ce45ed50f672730346219550296d9c36a SHA512 98b64310e34b26584e7ca9db1abddc4f762123c619c905bf5a64a92a6a2d712a6dbdfef0940c1f29248dd209398a34ffda6c435b78167aa5c354c7f375011b7a MISC metadata.xml 541 BLAKE2B d55c3fb90be36d6e3f26aeff7e82f1a62cf0cedbf5b7260674b33fcf6269fa758c5012d106db60fa69cc9f7ae6b1f62290814948231c7339b3699700ba4cde88 SHA512 4c88c663470a1c04f6d94a28ddaf16f69d6fdc4c660a58c0e2d7daac5b92f9c8639e1287c2ca314d943bf1fd8409ea7aab3dedbf51439ffbeb7324db0662c73e diff --git a/dev-embedded/urjtag/files/urjtag-2021.03-fix-python-setup.patch b/dev-embedded/urjtag/files/urjtag-2021.03-fix-python-setup.patch new file mode 100644 index 000000000000..c6206fefee2e --- /dev/null +++ b/dev-embedded/urjtag/files/urjtag-2021.03-fix-python-setup.patch @@ -0,0 +1,14 @@ +Subject: [PATCH] python: replace distutils with setuptools + +distutils is deprecated for sometime and it was removed in python 3.12. + +--- a/bindings/python/setup.py.in 2018-03-24 20:27:41.000000000 +0800 ++++ b/bindings/python/setup.py.in 2023-08-06 10:31:12.932358441 +0800 +@@ -1,6 +1,6 @@ + # python extension setup script for urjtag + +-from distutils.core import setup, Extension ++from setuptools import setup, Extension + + libraries = ['urjtag'] + libraries.extend( w.replace('-l', '') for w in "@LIBFTDI_LIBS@ @FTD2XXLIB@ @LIBUSB_LIBS@ @LIBINTL@".split() if w.replace('-l', '') not in libraries ) diff --git a/dev-embedded/urjtag/urjtag-2021.03.ebuild b/dev-embedded/urjtag/urjtag-2021.03.ebuild new file mode 100644 index 000000000000..031c9e8c7232 --- /dev/null +++ b/dev-embedded/urjtag/urjtag-2021.03.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit python-r1 + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="git://git.code.sf.net/p/urjtag/git" + inherit git-r3 autotools + S="${WORKDIR}/${P}/${PN}" +else + SRC_URI="mirror://sourceforge/urjtag/${P}.tar.xz" + KEYWORDS="~amd64 ~ppc ~sparc ~x86" +fi + +DESCRIPTION="Tool for communicating over JTAG with flash chips, CPUs, and many more" +HOMEPAGE="https://urjtag.sourceforge.net/" + +LICENSE="GPL-2" +SLOT="0" + +IUSE="ftdi ftd2xx python readline usb" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +DEPEND="ftdi? ( dev-embedded/libftdi:1 ) + ftd2xx? ( dev-embedded/libftd2xx ) + python? ( ${PYTHON_DEPS} ) + readline? ( sys-libs/readline:= ) + usb? ( virtual/libusb:1 )" +RDEPEND="${DEPEND}" +BDEPEND=" + python? ( dev-python/setuptools[${PYTHON_USEDEP}] ) +" + +PATCHES=( + "${FILESDIR}/${PN}-2021.03-fix-python-setup.patch" +) + +src_prepare() { + default + + if [[ ${PV} == "9999" ]] ; then + mkdir -p m4 || die + eautopoint + eautoreconf + fi +} + +src_configure() { + econf \ + --disable-werror \ + --disable-python \ + $(use_with readline) \ + $(use_with ftdi libftdi) \ + $(use_with ftd2xx) \ + $(use_with usb libusb 1.0) +} + +src_compile() { + use python && python_copy_sources + + emake +} + +src_install() { + default + + if use python; then + installation() { + cd bindings/python || die + ln -s "${S}"/src/.libs ../../src/.libs || die + "${EPYTHON}" setup.py install \ + --root="${D}" \ + --prefix="${EPREFIX}/usr" || die + } + python_foreach_impl run_in_build_dir installation + python_foreach_impl python_optimize + fi + + find "${ED}" -name '*.la' -delete || die +} diff --git a/dev-embedded/urjtag/urjtag-9999.ebuild b/dev-embedded/urjtag/urjtag-9999.ebuild index 290a76a683c9..031c9e8c7232 100644 --- a/dev-embedded/urjtag/urjtag-9999.ebuild +++ b/dev-embedded/urjtag/urjtag-9999.ebuild @@ -1,7 +1,11 @@ # Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit python-r1 if [[ ${PV} == "9999" ]] ; then EGIT_REPO_URI="git://git.code.sf.net/p/urjtag/git" @@ -17,14 +21,23 @@ HOMEPAGE="https://urjtag.sourceforge.net/" LICENSE="GPL-2" SLOT="0" -# TODO: Figure out if anyone wants the Python bindings -IUSE="ftdi readline usb" + +IUSE="ftdi ftd2xx python readline usb" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" DEPEND="ftdi? ( dev-embedded/libftdi:1 ) + ftd2xx? ( dev-embedded/libftd2xx ) + python? ( ${PYTHON_DEPS} ) readline? ( sys-libs/readline:= ) usb? ( virtual/libusb:1 )" -RDEPEND="${DEPEND} - !dev-embedded/jtag" +RDEPEND="${DEPEND}" +BDEPEND=" + python? ( dev-python/setuptools[${PYTHON_USEDEP}] ) +" + +PATCHES=( + "${FILESDIR}/${PN}-2021.03-fix-python-setup.patch" +) src_prepare() { default @@ -37,16 +50,35 @@ src_prepare() { } src_configure() { - use readline || export vl_cv_lib_readline=no - econf \ --disable-werror \ --disable-python \ + $(use_with readline) \ $(use_with ftdi libftdi) \ - $(use_with usb libusb) + $(use_with ftd2xx) \ + $(use_with usb libusb 1.0) +} + +src_compile() { + use python && python_copy_sources + + emake } src_install() { default + + if use python; then + installation() { + cd bindings/python || die + ln -s "${S}"/src/.libs ../../src/.libs || die + "${EPYTHON}" setup.py install \ + --root="${D}" \ + --prefix="${EPREFIX}/usr" || die + } + python_foreach_impl run_in_build_dir installation + python_foreach_impl python_optimize + fi + find "${ED}" -name '*.la' -delete || die } -- cgit v1.2.3