summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Donenfeld <zx2c4@gentoo.org>2018-02-14 13:32:43 +0100
committerJason A. Donenfeld <zx2c4@gentoo.org>2018-02-14 13:37:03 +0100
commitae3c38350efab149e32d974d8642891f69f375a3 (patch)
treee4ee64fa35d130d826b6808fca8de7ec4733adbe
parentnet-p2p/pybitmessage: remove vulnerable 0.6.2-r2 (diff)
downloadgentoo-ae3c38350efab149e32d974d8642891f69f375a3.tar.gz
gentoo-ae3c38350efab149e32d974d8642891f69f375a3.tar.bz2
gentoo-ae3c38350efab149e32d974d8642891f69f375a3.zip
sys-devel/sparse: modernize
Package-Manager: Portage-2.3.24, Repoman-2.3.6
-rw-r--r--sys-devel/sparse/Manifest4
-rw-r--r--sys-devel/sparse/files/sparse-0.4.3-gentoo.patch49
-rw-r--r--sys-devel/sparse/files/sparse-0.5.1-cmdline-include.patch66
-rw-r--r--sys-devel/sparse/metadata.xml4
-rw-r--r--sys-devel/sparse/sparse-0.4.3.ebuild64
-rw-r--r--sys-devel/sparse/sparse-0.4.4.ebuild46
-rw-r--r--sys-devel/sparse/sparse-0.5.1.ebuild (renamed from sys-devel/sparse/sparse-0.5.0.ebuild)22
-rw-r--r--sys-devel/sparse/sparse-9999.ebuild22
8 files changed, 93 insertions, 184 deletions
diff --git a/sys-devel/sparse/Manifest b/sys-devel/sparse/Manifest
index e0c8eb16025b..089768e12719 100644
--- a/sys-devel/sparse/Manifest
+++ b/sys-devel/sparse/Manifest
@@ -1,3 +1 @@
-DIST sparse-0.4.3.tar.bz2 172431 BLAKE2B 06864e372e676a5f0426612774f1df2d224e8e6a12b8f7edf7056225b19725e876196c12e4c92a9a2b64eb410c8a840f777b4df2ffb9945079f4903562fb0633 SHA512 ff3dbd3e28b1a95dc9d6abf9a4ffdfaa0f470047b8232bd50930839432ae66a2249adb861c880e8eef1a906b007fd7d1c1ef8683c48c763eb523aedc9e1df631
-DIST sparse-0.4.4.tar.bz2 174074 BLAKE2B d57c5ec6f837ef1fa8992b5ec21f467583888d9ac3b7699a73e6b8fa80046253cdc554a4c685c2d98474a18fee6fca26fa004d3afa74b18c8f58b05a2900d589 SHA512 5cd5e660ea863170e86f1abaa040434c43a5cc7e92560f1bcbcce9ce906ae7355c066168bfc1dcc551e41e4c0f864122be288ed69eb1c4cda8b7c0825b5b647f
-DIST sparse-0.5.0.tar.xz 187576 BLAKE2B c525ce2a11143cd2dbeaff3e8cb1eb66b1792a678946ce001f76ac9882cd54cce4d4c5ff740c12e0e54ca91a6a2dc57bc7682ff8653333014fcc382e662ba596 SHA512 0cb70a74034c4bc4d5340ab7d19288a438f4b6d0c4c63ac95d1f4cc3c5fdfe1370a27a607605a6f0c85ea6f371141c55abfdb4438d9e87b2d544fff5674f7ce4
+DIST sparse-0.5.1.tar.gz 278241 BLAKE2B 6004631c97e2a126d1e239aa1d8fcc540a92b3f63a6a2615f2f63b79a001495e8b27ffa7377c57b43227f3b50288be24cb4657c7801806f7c6d1d11b0f8c8ee9 SHA512 04a26e2b44d99e7402b5e8a8f61ecbd62adbc9c481a0c3c8e0ab2f9599d99f50679ce3f3d0c1ccfd6204c6ec5d9fa272f9fc4c4d21173897ebd592d14c6ee852
diff --git a/sys-devel/sparse/files/sparse-0.4.3-gentoo.patch b/sys-devel/sparse/files/sparse-0.4.3-gentoo.patch
deleted file mode 100644
index 6f46687d78b3..000000000000
--- a/sys-devel/sparse/files/sparse-0.4.3-gentoo.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-diff --git a/Makefile b/Makefile
-index 74905df..1f2b2b6 100644
---- a/Makefile
-+++ b/Makefile
-@@ -4,7 +4,7 @@ OS = linux
-
-
- CC = gcc
--CFLAGS = -O2 -finline-functions -fno-strict-aliasing -g
-+CFLAGS ?= -O2 -finline-functions -fno-strict-aliasing -g
- CFLAGS += -Wall -Wwrite-strings
- LDFLAGS += -g
- AR = ar
-@@ -21,7 +21,8 @@ HAVE_GCC_DEP:=$(shell touch .gcc-test.c && \
- echo 'yes'; rm -f .gcc-test.d .gcc-test.o .gcc-test.c)
- HAVE_GTK2:=$(shell pkg-config --exists gtk+-2.0 2>/dev/null && echo 'yes')
-
--CFLAGS += -DGCC_BASE=\"$(shell $(CC) --print-file-name=)\"
-+GCC_BASE = $(shell $(CC) --print-file-name=)
-+CFLAGS += -DGCC_BASE=\"$(GCC_BASE)\"
-
- ifeq ($(HAVE_GCC_DEP),yes)
- CFLAGS += -Wp,-MD,$(@D)/.$(@F).d
-@@ -113,7 +114,9 @@ SED_PC_CMD = 's|@version@|$(VERSION)|g; \
-
- all: $(PROGRAMS) sparse.pc
-
--install: $(INST_PROGRAMS) $(LIBS) $(LIB_H) sparse.pc
-+all-installable: $(INST_PROGRAMS) $(LIBS) $(LIB_H) sparse.pc
-+
-+install: all-installable
- $(Q)install -d $(DESTDIR)$(BINDIR)
- $(Q)install -d $(DESTDIR)$(LIBDIR)
- $(Q)install -d $(DESTDIR)$(MAN1DIR)
-diff --git a/parse.h b/parse.h
-index 6b21e23..b26bd03 100644
---- a/parse.h
-+++ b/parse.h
-@@ -35,10 +35,6 @@ struct statement {
- struct /* declaration */ {
- struct symbol_list *declaration;
- };
-- struct /* label_arg */ {
-- struct symbol *label;
-- struct statement *label_statement;
-- };
- struct {
- struct expression *expression;
- struct expression *context;
diff --git a/sys-devel/sparse/files/sparse-0.5.1-cmdline-include.patch b/sys-devel/sparse/files/sparse-0.5.1-cmdline-include.patch
new file mode 100644
index 000000000000..5ea763001a05
--- /dev/null
+++ b/sys-devel/sparse/files/sparse-0.5.1-cmdline-include.patch
@@ -0,0 +1,66 @@
+diff --git a/validation/include-eval.c b/validation/include-eval.c
+new file mode 100644
+index 000000000..bf9bf63fe
+--- /dev/null
++++ b/validation/include-eval.c
+@@ -0,0 +1,7 @@
++/* nothing */
++
++/*
++ * check-name: include-eval.c
++ * check-command: sparse -include ./include-eval.inc $file
++ * check-known-to-fail
++ */
+diff --git a/validation/include-eval.inc b/validation/include-eval.inc
+new file mode 100644
+index 000000000..e2561ca41
+--- /dev/null
++++ b/validation/include-eval.inc
+@@ -0,0 +1,12 @@
++typedef unsigned long long_t;
++
++inline
++static unsigned int ok(void)
++{
++ return sizeof(long_t);
++}
++
++static unsigned int ko(void)
++{
++ return sizeof(long_t);
++}
+diff --git a/lib.c b/lib.c
+index 4602cf85d..b255fec14 100644
+--- a/lib.c
++++ b/lib.c
+@@ -1351,6 +1351,20 @@ struct symbol_list *sparse_initialize(int argc, char **argv, struct string_list
+ */
+ protect_token_alloc();
+ }
++ /*
++ * Evaluate the complete symbol list
++ * Note: This is not needed for normal cases.
++ * These symbols should only be predefined defines and
++ * declaratons which will be evaluated later, when needed.
++ * This is also the case when a file is directly included via
++ * '-include <file>' on the command line *AND* the file only
++ * contains defines, declarations and inline definitions.
++ * However, in the rare cases where the given file should
++ * contain some definitions, these will never be evaluated
++ * and thus won't be able to be linearized correctly.
++ * Hence the evaluate_symbol_list() here under.
++ */
++ evaluate_symbol_list(list);
+ return list;
+ }
+
+diff --git a/validation/include-eval.c b/validation/include-eval.c
+index bf9bf63fe..1a91dab84 100644
+--- a/validation/include-eval.c
++++ b/validation/include-eval.c
+@@ -3,5 +3,4 @@
+ /*
+ * check-name: include-eval.c
+ * check-command: sparse -include ./include-eval.inc $file
+- * check-known-to-fail
+ */
diff --git a/sys-devel/sparse/metadata.xml b/sys-devel/sparse/metadata.xml
index 58fef00ea442..ee8e0692a0ca 100644
--- a/sys-devel/sparse/metadata.xml
+++ b/sys-devel/sparse/metadata.xml
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
+ <maintainer type="person">
+ <email>zx2c4@gentoo.org</email>
+ <name>Jason A. Donenfeld</name>
+ </maintainer>
<maintainer type="project">
<email>toolchain@gentoo.org</email>
<name>Gentoo Toolchain Project</name>
diff --git a/sys-devel/sparse/sparse-0.4.3.ebuild b/sys-devel/sparse/sparse-0.4.3.ebuild
deleted file mode 100644
index c351211de29d..000000000000
--- a/sys-devel/sparse/sparse-0.4.3.ebuild
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="2"
-
-inherit eutils multilib flag-o-matic toolchain-funcs
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/devel/sparse/sparse.git"
- inherit git
-fi
-
-DESCRIPTION="C semantic parser"
-HOMEPAGE="https://sparse.wiki.kernel.org/index.php/Main_Page"
-
-if [[ ${PV} == "9999" ]] ; then
- SRC_URI=""
- #KEYWORDS=""
-else
- SRC_URI="mirror://kernel/software/devel/sparse/dist/${P}.tar.bz2"
- KEYWORDS="amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86"
-fi
-
-LICENSE="OSL-1.1"
-SLOT="0"
-IUSE="gtk xml test"
-
-RDEPEND="gtk? ( x11-libs/gtk+:2 )
- xml? ( dev-libs/libxml2 )"
-DEPEND="${RDEPEND}
- gtk? ( virtual/pkgconfig )
- xml? ( virtual/pkgconfig )"
-
-src_prepare() {
- # https://cgit.gentoo.org/proj/sparse.git
- epatch "${FILESDIR}"/${P}-gentoo.patch
-}
-
-mymake() {
- usex() { use $1 && echo ${2:-yes} || echo ${3:-no} ; }
-
- emake \
- V=1 \
- CC="$(tc-getCC)" \
- GCC_BASE="$(gcc-config -L | cut -d : -f1)" \
- HAVE_LIBXML=$(usex xml) \
- HAVE_GTK2=$(usex gtk) \
- PREFIX=/usr \
- LIBDIR="/usr/$(get_libdir)" \
- DESTDIR="${D}" \
- "$@" \
- || die
-}
-
-src_compile() {
- append-flags -fno-strict-aliasing
-
- mymake \
- $(use test && echo all) all-installable
-}
-
-src_install() {
- mymake install
- dodoc FAQ README
-}
diff --git a/sys-devel/sparse/sparse-0.4.4.ebuild b/sys-devel/sparse/sparse-0.4.4.ebuild
deleted file mode 100644
index 51173588d3c2..000000000000
--- a/sys-devel/sparse/sparse-0.4.4.ebuild
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-inherit eutils multilib toolchain-funcs
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/devel/sparse/sparse.git"
- inherit git-2
-fi
-
-DESCRIPTION="C semantic parser"
-HOMEPAGE="https://sparse.wiki.kernel.org/index.php/Main_Page"
-
-if [[ ${PV} == "9999" ]] ; then
- SRC_URI=""
- #KEYWORDS=""
-else
- SRC_URI="mirror://kernel/software/devel/sparse/dist/${P}.tar.bz2"
- KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-fi
-
-LICENSE="OSL-1.1"
-SLOT="0"
-IUSE="gtk test xml"
-
-RDEPEND="gtk? ( x11-libs/gtk+:2 )
- xml? ( dev-libs/libxml2 )"
-DEPEND="${RDEPEND}
- gtk? ( virtual/pkgconfig )
- xml? ( virtual/pkgconfig )"
-
-src_prepare() {
- tc-export AR CC PKG_CONFIG
- sed -i \
- -e '/^PREFIX=/s:=.*:=/usr:' \
- -e "/^LIBDIR=/s:/lib:/$(get_libdir):" \
- -e '/^CFLAGS =/{s:=:+= $(CPPFLAGS):;s:-O2 -finline-functions::}' \
- -e "s:pkg-config:${PKG_CONFIG}:" \
- Makefile || die
- export MAKEOPTS+=" V=1 AR=${AR} CC=${CC} HAVE_GTK2=$(usex gtk) HAVE_LIBXML=$(usex xml)"
-}
-
-src_compile() {
- emake $(usex test all all-installable)
-}
diff --git a/sys-devel/sparse/sparse-0.5.0.ebuild b/sys-devel/sparse/sparse-0.5.1.ebuild
index 8771de72828a..aad07d85db73 100644
--- a/sys-devel/sparse/sparse-0.5.0.ebuild
+++ b/sys-devel/sparse/sparse-0.5.1.ebuild
@@ -1,26 +1,23 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI="4"
+EAPI=6
inherit eutils multilib toolchain-funcs
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/devel/sparse/sparse.git"
- inherit git-2
-fi
DESCRIPTION="C semantic parser"
HOMEPAGE="https://sparse.wiki.kernel.org/index.php/Main_Page"
if [[ ${PV} == "9999" ]] ; then
- SRC_URI=""
- #KEYWORDS=""
+ inherit git-r3
+ EGIT_REPO_URI="https://git.kernel.org/pub/scm/devel/${PN}/${PN}.git"
+ KEYWORDS=""
else
- SRC_URI="mirror://kernel/software/devel/sparse/dist/${P}.tar.xz"
+ SRC_URI="https://git.kernel.org/pub/scm/devel/${PN}/${PN}.git/snapshot/${P}.tar.gz"
KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
fi
-LICENSE="OSL-1.1"
+LICENSE="MIT"
SLOT="0"
IUSE="gtk llvm test xml"
@@ -31,15 +28,18 @@ DEPEND="${RDEPEND}
gtk? ( virtual/pkgconfig )
xml? ( virtual/pkgconfig )"
+PATCHES=( "${FILESDIR}/${PN}-0.5.1-cmdline-include.patch" )
+
src_prepare() {
tc-export AR CC PKG_CONFIG
sed -i \
-e '/^PREFIX=/s:=.*:=/usr:' \
-e "/^LIBDIR=/s:/lib:/$(get_libdir):" \
- -e '/^CFLAGS =/{s:=:+= $(CPPFLAGS):;s:-O2 -finline-functions::}' \
+ -e '/^COMMON_CFLAGS =/{s:=:= $(CPPFLAGS):;s:-O2 -finline-functions -fno-strict-aliasing -g:-fno-strict-aliasing:}' \
-e "s:pkg-config:${PKG_CONFIG}:" \
Makefile || die
export MAKEOPTS+=" V=1 AR=${AR} CC=${CC} HAVE_GTK2=$(usex gtk) HAVE_LLVM=$(usex llvm) HAVE_LIBXML=$(usex xml)"
+ default
}
src_compile() {
diff --git a/sys-devel/sparse/sparse-9999.ebuild b/sys-devel/sparse/sparse-9999.ebuild
index 8771de72828a..aad07d85db73 100644
--- a/sys-devel/sparse/sparse-9999.ebuild
+++ b/sys-devel/sparse/sparse-9999.ebuild
@@ -1,26 +1,23 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI="4"
+EAPI=6
inherit eutils multilib toolchain-funcs
-if [[ ${PV} == "9999" ]] ; then
- EGIT_REPO_URI="git://git.kernel.org/pub/scm/devel/sparse/sparse.git"
- inherit git-2
-fi
DESCRIPTION="C semantic parser"
HOMEPAGE="https://sparse.wiki.kernel.org/index.php/Main_Page"
if [[ ${PV} == "9999" ]] ; then
- SRC_URI=""
- #KEYWORDS=""
+ inherit git-r3
+ EGIT_REPO_URI="https://git.kernel.org/pub/scm/devel/${PN}/${PN}.git"
+ KEYWORDS=""
else
- SRC_URI="mirror://kernel/software/devel/sparse/dist/${P}.tar.xz"
+ SRC_URI="https://git.kernel.org/pub/scm/devel/${PN}/${PN}.git/snapshot/${P}.tar.gz"
KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
fi
-LICENSE="OSL-1.1"
+LICENSE="MIT"
SLOT="0"
IUSE="gtk llvm test xml"
@@ -31,15 +28,18 @@ DEPEND="${RDEPEND}
gtk? ( virtual/pkgconfig )
xml? ( virtual/pkgconfig )"
+PATCHES=( "${FILESDIR}/${PN}-0.5.1-cmdline-include.patch" )
+
src_prepare() {
tc-export AR CC PKG_CONFIG
sed -i \
-e '/^PREFIX=/s:=.*:=/usr:' \
-e "/^LIBDIR=/s:/lib:/$(get_libdir):" \
- -e '/^CFLAGS =/{s:=:+= $(CPPFLAGS):;s:-O2 -finline-functions::}' \
+ -e '/^COMMON_CFLAGS =/{s:=:= $(CPPFLAGS):;s:-O2 -finline-functions -fno-strict-aliasing -g:-fno-strict-aliasing:}' \
-e "s:pkg-config:${PKG_CONFIG}:" \
Makefile || die
export MAKEOPTS+=" V=1 AR=${AR} CC=${CC} HAVE_GTK2=$(usex gtk) HAVE_LLVM=$(usex llvm) HAVE_LIBXML=$(usex xml)"
+ default
}
src_compile() {