diff options
author | Repository mirror & CI <repomirrorci@gentoo.org> | 2022-04-24 15:48:26 +0000 |
---|---|---|
committer | Repository mirror & CI <repomirrorci@gentoo.org> | 2022-04-24 15:48:26 +0000 |
commit | 46494468ba9a95a951ab6efef7ad2fd98257babd (patch) | |
tree | 5df51db403367a4339cda410fccdbacb3fa13965 | |
parent | 2022-04-24 15:33:12 UTC (diff) | |
parent | dev-util/spirv-tools: fix hardcoded librt path in installed CMake files (diff) | |
download | gentoo-46494468ba9a95a951ab6efef7ad2fd98257babd.tar.gz gentoo-46494468ba9a95a951ab6efef7ad2fd98257babd.tar.bz2 gentoo-46494468ba9a95a951ab6efef7ad2fd98257babd.zip |
Merge updates from master
4 files changed, 182 insertions, 0 deletions
diff --git a/dev-util/spirv-tools/files/spirv-tools-1.3.211-cmake-librt.patch b/dev-util/spirv-tools/files/spirv-tools-1.3.211-cmake-librt.patch new file mode 100644 index 000000000000..48afd5a736f1 --- /dev/null +++ b/dev-util/spirv-tools/files/spirv-tools-1.3.211-cmake-librt.patch @@ -0,0 +1,40 @@ +https://github.com/KhronosGroup/SPIRV-Tools/commit/cb96abbf7affd986016f17dd09f9f971138a922b + +From: Chad Versace <chad@kiwitree.net> +Date: Thu, 14 Apr 2022 06:04:12 -0700 +Subject: [PATCH] Fix CMake for librt (#4773) + +In the installed file +/usr/lib64/cmake/SPIRV-Tools/SPIRV-ToolsTarget.cmake, occurences of +librt in the INTERFACE_LINK_LIBRARIES property are incorrect. The +property contains the absolute path to librt. In most situations, this +produces no problem. But when building in a sysroot, which is commonly +done when cross-compiling, the absolute path breaks dependent projects. + +For example, when building spirv-tools using the Chrome OS SDK, and +targeting the board 'volteer', where the build sysroot is +'/build/volteer', the file includes this line + INTERFACE_LINK_LIBRARIES "/build/volteer/usr/lib64/librt.so" +when it should instead say + INTERFACE_LINK_LIBRARIES "rt" + +The CMake documentation agrees [1]: + Note that it is not advisable to populate the + INTERFACE_LINK_LIBRARIES of a target with absolute paths to + dependencies. That would hard-code into installed packages the + library file paths for dependencies as found on the machine the + package was made on. + +[1] https://cmake.org/cmake/help/latest/prop_tgt/INTERFACE_LINK_LIBRARIES.html +--- a/source/CMakeLists.txt ++++ b/source/CMakeLists.txt +@@ -407,7 +407,7 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") + find_library(LIBRT rt) + if(LIBRT) + foreach(target ${SPIRV_TOOLS_TARGETS}) +- target_link_libraries(${target} ${LIBRT}) ++ target_link_libraries(${target} rt) + endforeach() + endif() + endif() + diff --git a/dev-util/spirv-tools/spirv-tools-1.3.211-r1.ebuild b/dev-util/spirv-tools/spirv-tools-1.3.211-r1.ebuild new file mode 100644 index 000000000000..b85f5ddda7c5 --- /dev/null +++ b/dev-util/spirv-tools/spirv-tools-1.3.211-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MY_PN=SPIRV-Tools +CMAKE_ECLASS="cmake" +PYTHON_COMPAT=( python3_{8..10} ) +PYTHON_REQ_USE="xml(+)" +inherit cmake-multilib python-any-r1 + +if [[ ${PV} == *9999* ]]; then + EGIT_REPO_URI="https://github.com/KhronosGroup/${MY_PN}.git" + inherit git-r3 +else + EGIT_COMMIT="sdk-${PV}.0" + SRC_URI="https://github.com/KhronosGroup/${MY_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" + S="${WORKDIR}"/${MY_PN}-${EGIT_COMMIT} +fi + +DESCRIPTION="Provides an API and commands for processing SPIR-V modules" +HOMEPAGE="https://github.com/KhronosGroup/SPIRV-Tools" + +LICENSE="Apache-2.0" +SLOT="0" +# Tests fail upon finding symbols that do not match a regular expression +# in the generated library. Easily hit with non-standard compiler flags +RESTRICT="test" +COMMON_DEPEND="~dev-util/spirv-headers-${PV}" +DEPEND="${COMMON_DEPEND}" +RDEPEND="" +BDEPEND="${PYTHON_DEPS} + ${COMMON_DEPEND}" + +PATCHES=( + "${FILESDIR}"/${P}-cmake-librt.patch +) + +multilib_src_configure() { + local mycmakeargs=( + "-DSPIRV-Headers_SOURCE_DIR=${ESYSROOT}/usr/" + "-DSPIRV_WERROR=OFF" + "-DSPIRV_TOOLS_BUILD_STATIC=OFF" + "-DBUILD_SHARED_LIBS=ON" + ) + + cmake_src_configure +} diff --git a/sci-libs/linux-gpib-modules/files/linux-gpib-modules-4.3.4-kernel-5.17.patch b/sci-libs/linux-gpib-modules/files/linux-gpib-modules-4.3.4-kernel-5.17.patch new file mode 100644 index 000000000000..894c33466627 --- /dev/null +++ b/sci-libs/linux-gpib-modules/files/linux-gpib-modules-4.3.4-kernel-5.17.patch @@ -0,0 +1,24 @@ +diff --git a/drivers/gpib/eastwood/fluke_gpib.c b/drivers/gpib/eastwood/fluke_gpib.c +index daebaaa..7edece1 100644 +--- a/drivers/gpib/eastwood/fluke_gpib.c ++++ b/drivers/gpib/eastwood/fluke_gpib.c +@@ -910,7 +910,6 @@ static int fluke_config_dma(gpib_board_t *board, int output) + config.src_maxburst = 1; + config.dst_maxburst = 1; + config.device_fc = true; +- config.slave_id = 0; + + if(output) + { +diff --git a/drivers/gpib/fmh_gpib/fmh_gpib.c b/drivers/gpib/fmh_gpib/fmh_gpib.c +index c4ef7d2..d245278 100644 +--- a/drivers/gpib/fmh_gpib/fmh_gpib.c ++++ b/drivers/gpib/fmh_gpib/fmh_gpib.c +@@ -926,7 +926,6 @@ static int fmh_gpib_config_dma(gpib_board_t *board, int output) + fmh_gpib_private_t *e_priv = board->private_data; + struct dma_slave_config config; + config.device_fc = true; +- config.slave_id = 0; + + if(e_priv->dma_burst_length < 1) + { diff --git a/sci-libs/linux-gpib-modules/linux-gpib-modules-4.3.4-r1.ebuild b/sci-libs/linux-gpib-modules/linux-gpib-modules-4.3.4-r1.ebuild new file mode 100644 index 000000000000..3c48db034bcd --- /dev/null +++ b/sci-libs/linux-gpib-modules/linux-gpib-modules-4.3.4-r1.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit linux-info linux-mod + +DESCRIPTION="Kernel modules for GPIB (IEEE 488.2) hardware" +HOMEPAGE="https://linux-gpib.sourceforge.io/" +SRC_URI="mirror://sourceforge/linux-gpib/linux-gpib-${PV}.tar.gz" +S="${WORKDIR}/linux-gpib-kernel-${PV}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="debug" + +COMMONDEPEND="" +RDEPEND="${COMMONDEPEND} + acct-group/gpib +" +DEPEND="${COMMONDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + # https://sourceforge.net/p/linux-gpib/code/1998/ + "${FILESDIR}/${P}-kernel-5.17.patch" +) + +pkg_setup() { + linux-mod_pkg_setup + + if kernel_is -lt 2 6 8; then + die "Kernel versions older than 2.6.8 are not supported." + fi +} + +src_unpack() { + default + unpack "${WORKDIR}/linux-gpib-${PV}/linux-gpib-kernel-${PV}.tar.gz" +} + +src_configure() { + set_arch_to_kernel + + my_gpib_makeopts='' + use debug && my_gpib_makeopts+='GPIB-DEBUG=1 ' + + my_gpib_makeopts+="LINUX_SRCDIR=${KERNEL_DIR} " +} + +src_compile() { + set_arch_to_kernel + emake \ + ${my_gpib_makeopts} +} + +src_install() { + set_arch_to_kernel + emake \ + DESTDIR="${ED}" \ + INSTALL_MOD_PATH="${ED}" \ + DEPMOD="/bin/true" \ + docdir="${ED}/usr/share/doc/${PF}/html" \ + ${my_gpib_makeopts} \ + install + + dodoc ChangeLog AUTHORS README* NEWS +} |