diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-08-07 12:37:21 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-08-07 12:37:21 +0100 |
commit | b8c7370a682e4e29cda623222d17a790c01c3642 (patch) | |
tree | f6caa14689bd00a5760eadaa381ff41e50ef3c1b /app-arch/lz4 | |
parent | 8a4997a7e2d1e36c089d4d76935b5a902d98d3d0 (diff) |
gentoo auto-resync : 07:08:2024 - 12:37:20
Diffstat (limited to 'app-arch/lz4')
-rw-r--r-- | app-arch/lz4/Manifest | 5 | ||||
-rw-r--r-- | app-arch/lz4/files/1.10.0-fix-freestanding-test.patch | 42 | ||||
-rw-r--r-- | app-arch/lz4/files/1.10.0-meson-do-not-force-c99-mode.patch | 44 | ||||
-rw-r--r-- | app-arch/lz4/lz4-1.10.0-r1.ebuild | 40 | ||||
-rw-r--r-- | app-arch/lz4/lz4-1.10.0.ebuild | 25 |
5 files changed, 156 insertions, 0 deletions
diff --git a/app-arch/lz4/Manifest b/app-arch/lz4/Manifest index 140a805f3625..7a8aa4804199 100644 --- a/app-arch/lz4/Manifest +++ b/app-arch/lz4/Manifest @@ -1,3 +1,8 @@ +AUX 1.10.0-fix-freestanding-test.patch 1691 BLAKE2B f5faa5f34336fb7bde7713324a87ef59f08cf3ebc4fc33be030372115251f6357a54b45e1b0091526a25eaf3f85a584ea606897f51aa9add4a20834c51030a51 SHA512 3cbcd91ff1d8bd93375cfbfe71e1334ae52a55465c3e1465d679ed150bdcffaeb92f4c6809f7efe27d3f8e44aefb71b993064a58d9723e3c9f27a5037e443fe7 +AUX 1.10.0-meson-do-not-force-c99-mode.patch 1754 BLAKE2B 1c1c39abb57eace614b49a17030741ae0d8b37fd6eeb26042dca7760742c0e0212e997b4cc9d71d8029e920928856ea7992817264cd9514954c76fe7f0507fe9 SHA512 c1c9787240c49d3697dff48cb3805bfff215ff33e3f6c3fd591eca2e67c8f3136b9ab14d8e8395e9a2f108cd41e97a1fac2122fb56336303ff19d12c98638f26 +DIST lz4-1.10.0.tar.gz 387114 BLAKE2B c87a939b748b0449e4f1869579ebc109704aa89e8699b6029217f6786c351d1b0329580dd3a955fe509efb113f29aecbafc83084d65d153f5d43610f4840a819 SHA512 8c4ceb217e6dc8e7e0beba99adc736aca8963867bcf9f970d621978ba11ce92855912f8b66138037a1d2ae171e8e17beb7be99281fea840106aa60373c455b28 DIST lz4-1.9.4.tar.gz 354063 BLAKE2B 2289cdce36acd35283bf2f02ef4d6d8f4805563be6d5a3492f3d6ea7975fb6bd14e1ac2e505df9747776edf8bcf0da7ba4ae7084b150e3ec08a52a9885f92ad5 SHA512 043a9acb2417624019d73db140d83b80f1d7c43a6fd5be839193d68df8fd0b3f610d7ed4d628c2a9184f7cde9a0fd1ba9d075d8251298e3eb4b3a77f52736684 +EBUILD lz4-1.10.0-r1.ebuild 1125 BLAKE2B e5d3ec2a84b26141baa0f7e7ca5c1b7b938cff1681d23a87f81d10f7e5501081f87f5d2daea9c7868a5232b8628b83617052c7316bccb8bdb6995e7a28659a69 SHA512 dd58f109158a82891636052e32bf35f461171873f476694aea6254e26972aed76d3058cc6ecdff681ba4b24c669601857f474d7bf823ae8a5b45da58e9c51613 +EBUILD lz4-1.10.0.ebuild 685 BLAKE2B 9f1ce1f6b9e5bfdf75bf800dd63624faa38fb56c08f802aed149ae300b955ee6c5c73e59cddcc6763e693744b3c32ba15b7a7298d48c79b14c589a288f001577 SHA512 b74236a38947e860e34d3ba75bfa3ad5770dcab91961594f84c9765d17fc8e959d33c989862cb07a5d8ba7c3d35bc87116cdfc75fd2622706057b360af508eeb EBUILD lz4-1.9.4.ebuild 726 BLAKE2B 01d68b54820f51e07d88d33e4b484bdc6fd3a1781507b22210d77ac952412110ce5889bb8384c46beb60304a69e2548289c913e5fa74eb19e84a1e789e94e53f SHA512 ea4ebcd18d97986e48dfa1df48c0929d51d586c55b83d0fe9fb59198dfc14f4930b71d62a7d8abd999612839447c201b8ea5e5a66578d440403f61640f529a2d MISC metadata.xml 489 BLAKE2B 4dfd77b68f91836f564b22e46a9a7fddcfd783e7a9668888812e97a460d7dbd88200eff9e3f3e3643c8d92df6642b32eb018bb6d0b8b41aab4e7da61806ec6e2 SHA512 ea1b256a35b7f0597e1fac0457e1e33af4203e65dcf26a1c527228ab1c60dcfa244929efed83bc07e4d8d4db7547efa3a1a0a4c725a04e395423f11a5b47234d diff --git a/app-arch/lz4/files/1.10.0-fix-freestanding-test.patch b/app-arch/lz4/files/1.10.0-fix-freestanding-test.patch new file mode 100644 index 000000000000..f8dfe2a41c64 --- /dev/null +++ b/app-arch/lz4/files/1.10.0-fix-freestanding-test.patch @@ -0,0 +1,42 @@ + +From: https://github.com/lz4/lz4/pull/1468 + +commit 63267a77d863f63826d8b13ddb8c190d3a4c01c5 +Author: Holger Hoffstätte <holger@applied-asynchrony.com> +Date: Mon Jul 22 22:11:19 2024 +0200 + + Fix stack alignment of _start() in freestanding test + + When the freestanding test is built with any kind of optimization + that enables vectorized loops, special care must be taken to align + the stack for _start() at a 16-byte boundary. + +diff --git a/tests/freestanding.c b/tests/freestanding.c +index 6109aa7..96de9d3 100644 +--- a/tests/freestanding.c ++++ b/tests/freestanding.c +@@ -225,7 +225,7 @@ EXTERN_C int memcmp(const void *s1, const void *s2, size_t n) { + + + // +-EXTERN_C void _start(void) { ++EXTERN_C void __attribute__((force_align_arg_pointer)) _start(void) { + test(); + MY_exit(0); + } + +Disable the stack protector to allow building with clang. +See https://bugs.gentoo.org/936480 + +diff -up lz4-1.10.0/build/meson/meson/tests/meson.build lz4-1.10.0/build/meson/meson/tests/meson.build +--- lz4-1.10.0/build/meson/meson/tests/meson.build 2024-07-21 19:29:49.000000000 +0200 ++++ lz4-1.10.0/build/meson/meson/tests/meson.build 2024-07-23 01:26:40.561113031 +0200 +@@ -47,7 +47,7 @@ test_exes = { + }, + 'freestanding': { + 'sources': files(lz4_source_root / 'tests/freestanding.c'), +- 'c_args': ['-ffreestanding', '-Wno-unused-parameter', '-Wno-declaration-after-statement'], ++ 'c_args': ['-ffreestanding', '-fno-stack-protector', '-Wno-unused-parameter', '-Wno-declaration-after-statement'], + 'link_args': ['-nostdlib'], + 'build': cc.get_id() in ['gcc', 'clang'] and + host_machine.system() == 'linux' and host_machine.cpu_family() == 'x86_64', diff --git a/app-arch/lz4/files/1.10.0-meson-do-not-force-c99-mode.patch b/app-arch/lz4/files/1.10.0-meson-do-not-force-c99-mode.patch new file mode 100644 index 000000000000..0d056b98833a --- /dev/null +++ b/app-arch/lz4/files/1.10.0-meson-do-not-force-c99-mode.patch @@ -0,0 +1,44 @@ +https://github.com/lz4/lz4/pull/1485 + +From bce6a94c25a9077fdcd7c94079a24f9713b192e1 Mon Sep 17 00:00:00 2001 +From: Fabian Groffen <grobian@gentoo.org> +Date: Tue, 30 Jul 2024 21:50:06 +0200 +Subject: [PATCH] meson: do not force c99 mode +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +On Solaris/OpenIndiana hosts forcing (old) C99 means disabling POSIX +2001 functionality, resulting in errors like + +In file included from ../../../net/ptah/export/gentoo/working-repos/lz4/programs/bench.c:39: +../../../net/ptah/export/gentoo/working-repos/lz4/programs/util.h: In function UTIL_getOpenFileSize’: +../../../net/ptah/export/gentoo/working-repos/lz4/programs/util.h:156:23: error: implicit declaration of function ‘fileno’ [-Wimplicit-function-declaration] + 156 | # define UTIL_fileno fileno + | ^~~~~~ +../../../net/ptah/export/gentoo/working-repos/lz4/programs/util.h:325:10: note: in expansion of macro ‘UTIL_fileno’ + 325 | fd = UTIL_fileno(file); + | ^~~~~~~~~~~ + +These can be fixed either by forcing a standard to be applied in programs/platform.h or by not forcing the compiler to use an old standard. + +Since CMake and Makefile don't force C99 by default either, just drop it from +meson.build. + +Signed-off-by: Fabian Groffen <grobian@gentoo.org> +--- + build/meson/meson.build | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/build/meson/meson.build b/build/meson/meson.build +index fc6408af6..7e1696802 100644 +--- a/build/meson/meson.build ++++ b/build/meson/meson.build +@@ -16,7 +16,6 @@ project( + 'c', + license: 'BSD-2-Clause-Patent AND GPL-2.0-or-later', + default_options: [ +- 'c_std=c99', + 'buildtype=release', + 'warning_level=3' + ], diff --git a/app-arch/lz4/lz4-1.10.0-r1.ebuild b/app-arch/lz4/lz4-1.10.0-r1.ebuild new file mode 100644 index 000000000000..e4b728753c9a --- /dev/null +++ b/app-arch/lz4/lz4-1.10.0-r1.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit meson-multilib + +DESCRIPTION="Extremely Fast Compression algorithm" +HOMEPAGE="https://github.com/lz4/lz4" +SRC_URI="https://github.com/lz4/lz4/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD-2 GPL-2" +SLOT="0/1.10.0-meson" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="static-libs test" +RESTRICT="!test? ( test )" + +EMESON_SOURCE=${S}/build/meson + +PATCHES=( + "${FILESDIR}/${PV}-fix-freestanding-test.patch" + # https://github.com/lz4/lz4/pull/1485 + "${FILESDIR}/${PV}-meson-do-not-force-c99-mode.patch" +) + +multilib_src_configure() { + local emesonargs=( + -Dtests=$(usex test true false) + -Ddefault_library=$(usex static-libs both shared) + ) + # with -Dprograms=false, the test suite is only rudimentary, + # so build them for testing non-native ABI as well + if multilib_is_native_abi || use test; then + emesonargs+=( + -Dprograms=true + ) + fi + + meson_src_configure +} diff --git a/app-arch/lz4/lz4-1.10.0.ebuild b/app-arch/lz4/lz4-1.10.0.ebuild new file mode 100644 index 000000000000..325d4225f601 --- /dev/null +++ b/app-arch/lz4/lz4-1.10.0.ebuild @@ -0,0 +1,25 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake-multilib + +DESCRIPTION="Extremely Fast Compression algorithm" +HOMEPAGE="https://github.com/lz4/lz4" +SRC_URI="https://github.com/lz4/lz4/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD-2 GPL-2" +SLOT="0/1.10.0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="static-libs" + +CMAKE_USE_DIR=${S}/build/cmake + +multilib_src_configure() { + local mycmakeargs=( + -DBUILD_STATIC_LIBS=$(usex static-libs) + ) + + cmake_src_configure +} |