summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Sautier <sbraz@gentoo.org>2021-09-09 13:23:38 +0200
committerLouis Sautier <sbraz@gentoo.org>2021-09-09 23:00:28 +0200
commitcb7eb2d9bba3a28ef8c241ab0e6c6a9caf959991 (patch)
tree944c2511386f5eea830812927c022d3940f18de0 /app-misc
parentapp-crypt/eid-mw: remove old 5.0.23 (diff)
downloadgentoo-cb7eb2d9bba3a28ef8c241ab0e6c6a9caf959991.tar.gz
gentoo-cb7eb2d9bba3a28ef8c241ab0e6c6a9caf959991.tar.bz2
gentoo-cb7eb2d9bba3a28ef8c241ab0e6c6a9caf959991.zip
app-misc/rmlint: fix build and tests without native symlinks
Closes: https://bugs.gentoo.org/812197 Signed-off-by: Louis Sautier <sbraz@gentoo.org>
Diffstat (limited to 'app-misc')
-rw-r--r--app-misc/rmlint/files/rmlint-2.10.1-fix-cc.patch40
-rw-r--r--app-misc/rmlint/rmlint-2.10.1.ebuild4
2 files changed, 43 insertions, 1 deletions
diff --git a/app-misc/rmlint/files/rmlint-2.10.1-fix-cc.patch b/app-misc/rmlint/files/rmlint-2.10.1-fix-cc.patch
new file mode 100644
index 000000000000..78aac09ce2a7
--- /dev/null
+++ b/app-misc/rmlint/files/rmlint-2.10.1-fix-cc.patch
@@ -0,0 +1,40 @@
+commit 41056d132ae772b3c050020d68b7daa585e4143c
+Author: Louis Sautier <sautier.louis@gmail.com>
+Date: Thu Sep 9 13:29:37 2021 +0200
+
+ Never hardcode compiler, select it based on CC environment variable
+
+diff --git a/SConstruct b/SConstruct
+index 7e12d413..20b080da 100755
+--- a/SConstruct
++++ b/SConstruct
+@@ -37,8 +37,9 @@ Export('VERSION_MAJOR VERSION_MINOR VERSION_PATCH VERSION_NAME')
+ def check_gcc_version(context):
+ context.Message('Checking for GCC version... ')
+
++ gcc = os.environ.get("CC", "gcc")
+ try:
+- v = subprocess.check_output("printf '%s\n' __GNUC__ | gcc -E -P -", shell=True)
++ v = subprocess.check_output("printf '%s\n' __GNUC__ | {} -E -P -".format(gcc), shell=True)
+ try:
+ v = int(v)
+ context.Result(str(v))
+diff --git a/tests/test_types/test_nonstripped.py b/tests/test_types/test_nonstripped.py
+index a18648c9..d3190d1b 100644
+--- a/tests/test_types/test_nonstripped.py
++++ b/tests/test_types/test_nonstripped.py
+@@ -21,8 +21,12 @@ def create_binary(path, stripped=False):
+ path = path + '.stripped' if stripped else path + '.nonstripped'
+ full_path = os.path.join(TESTDIR_NAME, path)
+
+- command = 'echo \'{src}\' | cc -o {path} {option} -std=c99 -xc -'.format(
+- src=SOURCE, path=full_path, option=('-s' if stripped else '-ggdb3')
++ cc = os.environ.get("CC", "cc")
++ command = 'echo \'{src}\' | {cc} -o {path} {option} -std=c99 -xc -'.format(
++ cc=cc,
++ src=SOURCE,
++ path=full_path,
++ option=('-s' if stripped else '-ggdb3')
+ )
+ subprocess.call(command, shell=True)
+
diff --git a/app-misc/rmlint/rmlint-2.10.1.ebuild b/app-misc/rmlint/rmlint-2.10.1.ebuild
index 11a0d0b2e175..aaa9a53dd04d 100644
--- a/app-misc/rmlint/rmlint-2.10.1.ebuild
+++ b/app-misc/rmlint/rmlint-2.10.1.ebuild
@@ -68,6 +68,8 @@ PATCHES=(
"${FILESDIR}/${PN}-2.10.1-skip-tests.patch"
# https://github.com/sahib/rmlint/pull/523
"${FILESDIR}/${PN}-2.10.1-x86-fix-size.patch"
+ # https://github.com/sahib/rmlint/pull/526
+ "${FILESDIR}/${PN}-2.10.1-fix-cc.patch"
)
src_prepare() {
@@ -82,7 +84,7 @@ src_prepare() {
src_configure() {
# Needed for USE=-native-symlinks
- tc-export CC
+ tc-export AR CC
scons_opts=(
VERBOSE=1
$(use_with doc docs)