diff options
author | V3n3RiX <venerix@koprulu.sector> | 2025-02-11 00:12:38 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2025-02-11 00:12:38 +0000 |
commit | 0ec1e1dd7867c3dedcbea76c9b6e847d6b388c03 (patch) | |
tree | 65f42b72245de9fb9fa9ea30e6221dfff7dda7c5 /sys-devel/smatch | |
parent | 3a81cede4783e464b7485722b2eaac0280dbc570 (diff) |
gentoo auto-resync : 11:02:2025 - 00:12:37
Diffstat (limited to 'sys-devel/smatch')
-rw-r--r-- | sys-devel/smatch/Manifest | 9 | ||||
-rw-r--r-- | sys-devel/smatch/files/smatch-1.72-C23.patch | 20 | ||||
-rw-r--r-- | sys-devel/smatch/files/smatch-1.72-function-prototype.patch | 54 | ||||
-rw-r--r-- | sys-devel/smatch/files/smatch-1.72-make-deps.patch | 14 | ||||
-rw-r--r-- | sys-devel/smatch/smatch-1.72-r1.ebuild (renamed from sys-devel/smatch/smatch-1.72.ebuild) | 19 | ||||
-rw-r--r-- | sys-devel/smatch/smatch-1.73.ebuild | 73 | ||||
-rw-r--r-- | sys-devel/smatch/smatch-9999.ebuild | 12 |
7 files changed, 186 insertions, 15 deletions
diff --git a/sys-devel/smatch/Manifest b/sys-devel/smatch/Manifest index 4b93abe87151..f1d0db2dcb17 100644 --- a/sys-devel/smatch/Manifest +++ b/sys-devel/smatch/Manifest @@ -1,4 +1,9 @@ +AUX smatch-1.72-C23.patch 721 BLAKE2B e5cc3ebd2ed28f7ac86b8eab3572fe9a203bb405cbd6b5c08ca8eb4dbcff8ecfba29aa9a2cd06b5c3513cf2f0873131715eb6e053f3b03086a10a5ac2d84d3a8 SHA512 827b18c8000816de3d4209306e27829c39b6b3a5a33b06c7c900af96d3702dcc29cb35dcba37c5ee8f53683868e98214602ad5a48b29c15580d31844c5bb7cb4 +AUX smatch-1.72-function-prototype.patch 2052 BLAKE2B 85ace5cc54efc97da79d38f73cb456b981e50b3ce35fb3c2e93925a95627cd47a014dda132078a4eec50a88e6b3138204b50341b2d762684c91484d445000b44 SHA512 96e57fb954e23fbe6ff39a6a1da5ef9f841a8df5b7115924df317c38f31dea0cbb6cd076a5fe2014c7dcbc6a93526386ab06eac395901d2b44b521d9b9b428c2 +AUX smatch-1.72-make-deps.patch 561 BLAKE2B a51e7a374a41e09697aa26a75093c3624e378c0a1d7b9181f0dd78bd1683d2e6acd413d0053b14666a21242bb9d1293976d511f0788f3c04c9322d16de6a1977 SHA512 4f561fce9fffbba5a779b4d853a254cc433658e1388bea010f5afb6eb2aeafa2891bea747c9f93e70e667b15798eaf4da81b5fa8aedd2275577499601f87eeed DIST smatch-1.72.tar.gz 1431923 BLAKE2B ec4119fce985876afc9a46a74a0a56e8e8cb271a964c16496972c59ade95aa3d2df3a839a819e31cb081ca8a3b1f6bf6934ec97d73209091cfd86c87c1433557 SHA512 6d12e9ba85f332fcc56657296596e811cf3b75d4ad37007e07feb31baa4b315732361915972a2139ae13f75b8a73f953488ceb9de41529db9e84c81fb6fde77e -EBUILD smatch-1.72.ebuild 1362 BLAKE2B 2dc9c884281b9953b6d6eb9e5e82d501e921dda8ec51091336c98e728040eabfa881afa89adf860d22fcb1045e12ecea230813086a37e8039d638dd6e953a08c SHA512 313ebca6590d3c9458adf8381278cb36727d29cb944abb24455004554fe06f5e43bbe7294b2472b5d5952ad1809a1a42f78111b9cfb3874f6b7617a6eedcbc52 -EBUILD smatch-9999.ebuild 1362 BLAKE2B 2dc9c884281b9953b6d6eb9e5e82d501e921dda8ec51091336c98e728040eabfa881afa89adf860d22fcb1045e12ecea230813086a37e8039d638dd6e953a08c SHA512 313ebca6590d3c9458adf8381278cb36727d29cb944abb24455004554fe06f5e43bbe7294b2472b5d5952ad1809a1a42f78111b9cfb3874f6b7617a6eedcbc52 +DIST smatch-1.73.tar.gz 1472634 BLAKE2B 189a1f6dd684689a47afb848e5429b9e009c17c55df572e62d70802138861a4b95068a1ce7c93ac749219dc72d540cc69e9809b397b7e54af568a85c389fa080 SHA512 ea878f3e04c8a8cb5476ccf6b6fffe660380ab1ac3fad76f5793a072f692c534c4db46fed79c1e6bad7c3fac1f367b9ebb67cc77265beacfdbec38cc9b85fdd3 +EBUILD smatch-1.72-r1.ebuild 1444 BLAKE2B 52ce826826f2894ee807f6672313a721ea4b79ec2f2d9dccfd6f2b620af2927f713be5d9dfd89175c1bf0ac6bfa3f1748e1c964883600d51a8ba986b5a750dac SHA512 2e9a55f46037f25ec1e66686e6a740b28086d03df1362a25fc94ae95fc9e166beb4b3267be95d1b199fec0b7e14714faac476f5995b114d9c3f8441b6deb5b73 +EBUILD smatch-1.73.ebuild 1419 BLAKE2B 2bfe0b6a90724ad12e82a92904a63efad5c449103e90b6a25bfac5d1d6fa5dcc9c949460072d3c27ec92cb50bc316c4e9679946eb1e8a395ba8c8599bbb61a04 SHA512 d0a53e27dd1e79d3e53c4d571f2962f1de125093e2c012a62b2966477466cbeb3b9b78450d4960bbe256527a69d4a9cdcd94401021919acdf7e2f7bfcc4f0138 +EBUILD smatch-9999.ebuild 1387 BLAKE2B b3b213f21a9132ae71230ee07e04eade98728f3b707550b583c63faea4d32b6a7697e6548e5fc958a6ec80f775ddda6abfad89793951221b2831c2555d35b85e SHA512 2e436dacd9db33ed427214aa8834ba804f4ca35337985ccd39532008eed92d04e9e499acd55f4fe741019825f49caabf57d53923d13a293939789d5be5dac8e9 MISC metadata.xml 338 BLAKE2B c4bb073c88d842934dd0574360a70707c86b4a484b6b7f57464919a6e53389c5090ed4fcf757c0ade3c3030e9f91505181f0ee2020d9956090fc075e22674593 SHA512 1b0c36ac40b06b6f5cd562925f29fbcbaff1b2cb2691345146705da186932dc5908aab29c2cd773d624cd29e51fd75c2729dfbcfd26762c30a6879af7e3fe488 diff --git a/sys-devel/smatch/files/smatch-1.72-C23.patch b/sys-devel/smatch/files/smatch-1.72-C23.patch new file mode 100644 index 000000000000..40540180f25f --- /dev/null +++ b/sys-devel/smatch/files/smatch-1.72-C23.patch @@ -0,0 +1,20 @@ +unreachable() is defined in C23 as function-like macro, undefine +This definition conflicts with usage in smatch, as it has a valid +meaning in processing syntactic tree, not a mark that part of the +smatch state itself can't be reached. +Other possible solution would be mass-rename of all usages to prevent +conflict. +https://bugs.gentoo.org/944322 +--- a/smatch.h ++++ b/smatch.h +@@ -717,6 +717,10 @@ void __set_fake_cur_stree_fast(struct stree *stree); + void __pop_fake_cur_stree_fast(void); + void __merge_stree_into_cur(struct stree *stree); + ++#if __STDC_VERSION__ > 201710L ++#undef unreachable //defined in C23 ++#endif ++ + int unreachable(void); + void __set_cur_stree_readonly(void); + void __set_cur_stree_writable(void); diff --git a/sys-devel/smatch/files/smatch-1.72-function-prototype.patch b/sys-devel/smatch/files/smatch-1.72-function-prototype.patch new file mode 100644 index 000000000000..abf7a330ccd9 --- /dev/null +++ b/sys-devel/smatch/files/smatch-1.72-function-prototype.patch @@ -0,0 +1,54 @@ +https://bugs.gentoo.org/881087 +Modified to work with 1.72 and 1.73 +From 223d2a8d0391a655e853f5deba1f06c75196bdf2 Mon Sep 17 00:00:00 2001 +From: =?utf8?q?Luk=C3=A1=C5=A1=20Zaoral?= <lzaoral@redhat.com> +Date: Fri, 19 Jan 2024 17:39:39 +0100 +Subject: [PATCH 1/1] untracked_param: fix compilation errors with GCC 14 +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf8 +Content-Transfer-Encoding: 8bit + +select_return_states_hook expects that the passed function does not declare +the key and value arguments as const. + +Signed-off-by: Lukáš Zaoral <lzaoral@redhat.com> +Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> +--- + smatch.h | 2 +- + smatch_untracked_param.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/smatch.h b/smatch.h +index ce09ae73..ecdbe684 100644 +--- a/smatch.h ++++ b/smatch.h +@@ -1443,6 +1443,6 @@ bool buf_comp2_has_bytes(struct expression *buf_expr, struct expression *var); + bool buf_has_bytes(struct expression *buf, struct expression *var); + + /* smatch_untracked_param.c */ +-void mark_untracked(struct expression *expr, int param, const char *key, const char *value); ++void mark_untracked(struct expression *expr, int param, char *key, char *value); + void add_untracked_param_hook(void (func)(struct expression *call, int param)); + void add_lost_param_hook(void (func)(struct expression *call, int param)); +diff --git a/smatch_untracked_param.c b/smatch_untracked_param.c +index b7230f06..a84889ca 100644 +--- a/smatch_untracked_param.c ++++ b/smatch_untracked_param.c +@@ -120,12 +120,12 @@ free: + + } + +-void mark_untracked(struct expression *expr, int param, const char *key, const char *value) ++void mark_untracked(struct expression *expr, int param, char *key, char *value) + { + mark_untracked_lost(expr, param, key, UNTRACKED_PARAM); + } + +-void mark_lost(struct expression *expr, int param, const char *key, const char *value) ++void mark_lost(struct expression *expr, int param, char *key, char *value) + { + mark_untracked_lost(expr, param, key, LOST_PARAM); + } +-- +2.11.4.GIT + diff --git a/sys-devel/smatch/files/smatch-1.72-make-deps.patch b/sys-devel/smatch/files/smatch-1.72-make-deps.patch new file mode 100644 index 000000000000..9d2bf1e6bebc --- /dev/null +++ b/sys-devel/smatch/files/smatch-1.72-make-deps.patch @@ -0,0 +1,14 @@ +Missing build dependency was found with MAKEOPTS=--shuffle=3383668468 +and solved by expanding targets' dependencies in makefile. +https://bugs.gentoo.org/882047 +--- a/Makefile ++++ b/Makefile +@@ -400,7 +400,7 @@ cflags += $($(*)-cflags) $(CPPFLAGS) $(CFLAGS) + selfcheck: $(OBJS:.o=.sc) + + SPARSE_VERSION:=$(shell git describe --dirty 2>/dev/null || echo '$(VERSION)') +-lib.o: version.h ++lib.o options.o compile-i386.o: version.h + version.h: FORCE + @echo '#define SPARSE_VERSION "$(SPARSE_VERSION)"' > version.h.tmp + @if cmp -s version.h version.h.tmp; then \ diff --git a/sys-devel/smatch/smatch-1.72.ebuild b/sys-devel/smatch/smatch-1.72-r1.ebuild index 2e2fc45d2564..1b69db0bdad0 100644 --- a/sys-devel/smatch/smatch-1.72.ebuild +++ b/sys-devel/smatch/smatch-1.72-r1.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit toolchain-funcs if [[ ${PV} == 9999 ]] ; then @@ -9,7 +9,7 @@ if [[ ${PV} == 9999 ]] ; then https://repo.or.cz/r/${PN}.git" inherit git-r3 else - SRC_URI="http://repo.or.cz/w/smatch.git/snapshot/${PV}.tar.gz -> ${P}.tar.gz + SRC_URI="https://repo.or.cz/w/smatch.git/snapshot/${PV}.tar.gz -> ${P}.tar.gz mirror://gentoo/${P}.tar.gz" # Update on bumps S="${WORKDIR}"/${P}-7f4b936 @@ -18,7 +18,7 @@ else fi DESCRIPTION="Static analysis tool for C" -HOMEPAGE="http://smatch.sourceforge.net/" +HOMEPAGE="https://smatch.sourceforge.net/" # bug #853733 LICENSE="GPL-2+ MIT OSL-1.1" @@ -28,11 +28,16 @@ RDEPEND="dev-db/sqlite" DEPEND="${RDEPEND}" BDEPEND="virtual/pkgconfig" +PATCHES=( + "${FILESDIR}/${P}-C23.patch" + "${FILESDIR}/${P}-function-prototype.patch" + "${FILESDIR}/${P}-make-deps.patch" + ) + src_prepare() { default sed -i \ - -e '/^CFLAGS =/{s:=:+=:;s:-O2 -finline-functions:${CPPFLAGS}:}' \ -e 's:pkg-config:$(PKG_CONFIG):' \ Makefile || die } @@ -62,8 +67,8 @@ src_test() { src_install() { # default install target installs a lot of sparse cruft - dobin smatch + dobin smatch cgcc insinto /usr/share/smatch/smatch_data doins smatch_data/* - dodoc FAQ README + dodoc FAQ Documentation/smatch.rst } diff --git a/sys-devel/smatch/smatch-1.73.ebuild b/sys-devel/smatch/smatch-1.73.ebuild new file mode 100644 index 000000000000..4ad7e5da59b7 --- /dev/null +++ b/sys-devel/smatch/smatch-1.73.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://repo.or.cz/${PN}.git + https://repo.or.cz/r/${PN}.git" + inherit git-r3 +else + SRC_URI="https://repo.or.cz/w/smatch.git/snapshot/${PV}.tar.gz -> ${P}.tar.gz + mirror://gentoo/${P}.tar.gz" + # Update on bumps + S="${WORKDIR}"/${P}-2b596bf + + KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~s390 ~sparc ~x86" +fi + +DESCRIPTION="Static analysis tool for C" +HOMEPAGE="https://smatch.sourceforge.net/" + +# bug #853733 +LICENSE="GPL-2+ MIT OSL-1.1" +SLOT="0" + +RDEPEND="dev-db/sqlite" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}/${PN}-1.72-C23.patch" + "${FILESDIR}/${PN}-1.72-function-prototype.patch" +) + +src_prepare() { + default + + sed -i \ + -e 's:pkg-config:$(PKG_CONFIG):' \ + Makefile || die +} + +_emake() { + # gtk/llvm/xml is used by sparse which we don't install + emake \ + PREFIX="${EPREFIX}/usr" \ + V=1 \ + AR="$(tc-getAR)" \ + CC="$(tc-getCC)" \ + LD='$(CC)' \ + PKG_CONFIG="$(tc-getPKG_CONFIG)" \ + HAVE_GTK2=no \ + HAVE_LLVM=no \ + HAVE_LIBXML=no \ + "$@" +} + +src_compile() { + _emake smatch +} + +src_test() { + _emake check +} + +src_install() { + # default install target installs a lot of sparse cruft + dobin smatch cgcc + insinto /usr/share/smatch/smatch_data + doins smatch_data/* + dodoc FAQ Documentation/smatch.rst +} diff --git a/sys-devel/smatch/smatch-9999.ebuild b/sys-devel/smatch/smatch-9999.ebuild index 2e2fc45d2564..6432bf04a327 100644 --- a/sys-devel/smatch/smatch-9999.ebuild +++ b/sys-devel/smatch/smatch-9999.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit toolchain-funcs if [[ ${PV} == 9999 ]] ; then @@ -9,7 +9,7 @@ if [[ ${PV} == 9999 ]] ; then https://repo.or.cz/r/${PN}.git" inherit git-r3 else - SRC_URI="http://repo.or.cz/w/smatch.git/snapshot/${PV}.tar.gz -> ${P}.tar.gz + SRC_URI="https://repo.or.cz/w/smatch.git/snapshot/${PV}.tar.gz -> ${P}.tar.gz mirror://gentoo/${P}.tar.gz" # Update on bumps S="${WORKDIR}"/${P}-7f4b936 @@ -18,7 +18,7 @@ else fi DESCRIPTION="Static analysis tool for C" -HOMEPAGE="http://smatch.sourceforge.net/" +HOMEPAGE="https://smatch.sourceforge.net/" # bug #853733 LICENSE="GPL-2+ MIT OSL-1.1" @@ -62,8 +62,8 @@ src_test() { src_install() { # default install target installs a lot of sparse cruft - dobin smatch + dobin smatch cgcc insinto /usr/share/smatch/smatch_data doins smatch_data/* - dodoc FAQ README + dodoc FAQ Documentation/smatch.rst } |