drop app-misc/rmlint
This commit is contained in:
parent
e30aaafb4a
commit
7dc0ad2b91
7 changed files with 0 additions and 488 deletions
|
@ -1,18 +0,0 @@
|
||||||
--- a/SConstruct
|
|
||||||
+++ b/SConstruct
|
|
||||||
@@ -724,7 +724,6 @@ if ARGUMENTS.get('DEBUG') == "1":
|
|
||||||
O_value = ARGUMENTS.get('O', O_DEBUG)
|
|
||||||
else:
|
|
||||||
conf.env.Append(CCFLAGS=['-DG_DISABLE_ASSERT', '-DNDEBUG'])
|
|
||||||
- conf.env.Append(LINKFLAGS=['-s'])
|
|
||||||
O_value = ARGUMENTS.get('O', O_RELEASE)
|
|
||||||
|
|
||||||
if O_value == 'debug':
|
|
||||||
@@ -735,7 +734,6 @@ elif O_value == 'release':
|
|
||||||
cc_O_option = '-O' + O_value
|
|
||||||
|
|
||||||
print("Using compiler optimisation {} (to change, run scons with O=[0|1|2|3|s|fast])".format(cc_O_option))
|
|
||||||
-conf.env.Append(CCFLAGS=[cc_O_option])
|
|
||||||
|
|
||||||
if ARGUMENTS.get('SYMBOLS') == '1':
|
|
||||||
print("Compiling with debugging symbols")
|
|
|
@ -1,40 +0,0 @@
|
||||||
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)
|
|
||||||
|
|
|
@ -1,135 +0,0 @@
|
||||||
--- a/tests/test_options/test_replay.py
|
|
||||||
+++ b/tests/test_options/test_replay.py
|
|
||||||
@@ -69,7 +69,7 @@ def test_replay_match_basename():
|
|
||||||
create_file('xxx', 'test1/b')
|
|
||||||
create_file('xxx', 'test2/a')
|
|
||||||
|
|
||||||
- replay_path = '/tmp/replay.json'
|
|
||||||
+ replay_path = os.path.join(TESTDIR_NAME, 'replay.json')
|
|
||||||
|
|
||||||
head, *data, footer = run_rmlint('-o json:{p}'.format(
|
|
||||||
p=replay_path
|
|
||||||
@@ -104,7 +104,7 @@ def test_replay_hidden():
|
|
||||||
create_file('xxx', 'test/.a')
|
|
||||||
create_file('xxx', 'test/.b')
|
|
||||||
|
|
||||||
- replay_path = '/tmp/replay.json'
|
|
||||||
+ replay_path = os.path.join(TESTDIR_NAME, 'replay.json')
|
|
||||||
|
|
||||||
head, *data, footer = run_rmlint('--hidden -o json:{p}'.format(
|
|
||||||
p=replay_path
|
|
||||||
@@ -130,7 +130,7 @@ def test_replay_must_match_tagged():
|
|
||||||
create_file('xxx', 'test_a/a')
|
|
||||||
create_file('xxx', 'test_b/a')
|
|
||||||
|
|
||||||
- replay_path = '/tmp/replay.json'
|
|
||||||
+ replay_path = os.path.join(TESTDIR_NAME, 'replay.json')
|
|
||||||
|
|
||||||
head, *data, footer = run_rmlint('-o json:{p}'.format(
|
|
||||||
p=replay_path
|
|
||||||
@@ -182,7 +182,7 @@ def test_sorting():
|
|
||||||
(''.join(p) for p in permutations(all_opts, n_terms))
|
|
||||||
)
|
|
||||||
|
|
||||||
- replay_path = '/tmp/replay.json'
|
|
||||||
+ replay_path = os.path.join(TESTDIR_NAME, 'replay.json')
|
|
||||||
|
|
||||||
for combo in combos:
|
|
||||||
combo_str = '-y ' + combo
|
|
||||||
@@ -218,7 +218,7 @@ def test_replay_no_dir():
|
|
||||||
|
|
||||||
try:
|
|
||||||
os.chdir(TESTDIR_NAME)
|
|
||||||
- replay_path = '/tmp/replay.json'
|
|
||||||
+ replay_path = os.path.join(TESTDIR_NAME, 'replay.json')
|
|
||||||
head, *data, footer = run_rmlint(
|
|
||||||
'-o json:{p}'.format(p=replay_path),
|
|
||||||
use_default_dir=False,
|
|
||||||
@@ -242,7 +242,7 @@ def test_replay_unicode_fuckup():
|
|
||||||
create_file('xxx', names[1])
|
|
||||||
create_file('xxx', names[2])
|
|
||||||
|
|
||||||
- replay_path = '/tmp/replay.json'
|
|
||||||
+ replay_path = os.path.join(TESTDIR_NAME, 'replay.json')
|
|
||||||
|
|
||||||
head, *data, footer = run_rmlint('-o json:{p}'.format(p=replay_path))
|
|
||||||
assert len(data) == 3
|
|
||||||
@@ -260,8 +260,8 @@ def test_replay_tagged_order():
|
|
||||||
create_file('xxx', 'b/1')
|
|
||||||
create_file('xxx', 'b/2')
|
|
||||||
|
|
||||||
- replay_path_a = '/tmp/replay-a.json'
|
|
||||||
- replay_path_b = '/tmp/replay-b.json'
|
|
||||||
+ replay_path_a = os.path.join(TESTDIR_NAME, 'replay-a.json')
|
|
||||||
+ replay_path_b = os.path.join(TESTDIR_NAME, 'replay-b.json')
|
|
||||||
|
|
||||||
# Create replay-a.json
|
|
||||||
head, *data, footer = run_rmlint(
|
|
||||||
@@ -326,7 +326,7 @@ def test_replay_duplicate_directory_size():
|
|
||||||
create_file('xxx', 'a/xxx')
|
|
||||||
create_file('xxx', 'b/xxx')
|
|
||||||
|
|
||||||
- replay_path = '/tmp/replay.json'
|
|
||||||
+ replay_path = os.path.join(TESTDIR_NAME, 'replay.json')
|
|
||||||
head, *data, footer = run_rmlint('-o json:{p} -S a'.format(p=replay_path))
|
|
||||||
assert len(data) == 2
|
|
||||||
|
|
||||||
@@ -427,7 +427,7 @@ def test_replay_pack_directories():
|
|
||||||
create_pack_and_unpack_scenario()
|
|
||||||
|
|
||||||
# Do a run without -D and pack it later during --replay.
|
|
||||||
- replay_path = '/tmp/replay.json'
|
|
||||||
+ replay_path = os.path.join(TESTDIR_NAME, 'replay.json')
|
|
||||||
|
|
||||||
head, *data, footer = run_rmlint('-o json:{p} -S ahD'.format(p=replay_path))
|
|
||||||
assert len(data) == 13
|
|
||||||
@@ -449,7 +449,7 @@ def test_replay_unpack_directories():
|
|
||||||
create_pack_and_unpack_scenario()
|
|
||||||
|
|
||||||
# Do a run with -D and pack it later during --replay.
|
|
||||||
- replay_path = '/tmp/replay.json'
|
|
||||||
+ replay_path = os.path.join(TESTDIR_NAME, 'replay.json')
|
|
||||||
head, *data, footer = run_rmlint('-o json:{p} -S ahD -D'.format(p=replay_path))
|
|
||||||
|
|
||||||
assert len(data) == 21
|
|
||||||
--- a/tests/test_options/test_size.py
|
|
||||||
+++ b/tests/test_options/test_size.py
|
|
||||||
@@ -90,7 +90,7 @@ def test_replay_size():
|
|
||||||
create_file('yyy', 'b/yyy')
|
|
||||||
create_testdir('empty_dir')
|
|
||||||
|
|
||||||
- replay_path = '/tmp/replay.json'
|
|
||||||
+ replay_path = os.path.join(TESTDIR_NAME, 'replay.json')
|
|
||||||
head, *data, footer = run_rmlint('-o json:{p}'.format(
|
|
||||||
p=replay_path
|
|
||||||
))
|
|
||||||
--- a/tests/test_options/test_stdin.py
|
|
||||||
+++ b/tests/test_options/test_stdin.py
|
|
||||||
@@ -69,7 +69,6 @@ def test_path_starting_with_dash():
|
|
||||||
os.chdir(TESTDIR_NAME)
|
|
||||||
data = check_output(
|
|
||||||
[cwd + '/rmlint', '-o', 'json', '-S', 'a', '--', subdir],
|
|
||||||
- stderr=STDOUT
|
|
||||||
)
|
|
||||||
finally:
|
|
||||||
os.chdir(cwd)
|
|
||||||
--- a/tests/utils.py
|
|
||||||
+++ b/tests/utils.py
|
|
||||||
@@ -133,7 +133,7 @@ def run_rmlint_once(*args,
|
|
||||||
|
|
||||||
cmd += shlex.split(' '.join(args))
|
|
||||||
if with_json:
|
|
||||||
- cmd += ['-o', 'json:/tmp/out.json', '-c', 'json:oneline']
|
|
||||||
+ cmd += ['-o', 'json:' + os.path.join(TESTDIR_NAME, 'out.json'), '-c', 'json:oneline']
|
|
||||||
|
|
||||||
for idx, output in enumerate(outputs or []):
|
|
||||||
cmd.append('-o')
|
|
||||||
@@ -168,7 +168,7 @@ def run_rmlint_once(*args,
|
|
||||||
return output
|
|
||||||
|
|
||||||
if with_json:
|
|
||||||
- with open('/tmp/out.json', 'r') as f:
|
|
||||||
+ with open(os.path.join(TESTDIR_NAME, 'out.json'), 'r') as f:
|
|
||||||
json_data = json.loads(f.read())
|
|
||||||
else:
|
|
||||||
json_data = []
|
|
|
@ -1,93 +0,0 @@
|
||||||
--- a/SConstruct
|
|
||||||
+++ b/SConstruct
|
|
||||||
@@ -515,7 +515,7 @@ AddOption(
|
|
||||||
action='store', metavar='DIR', help='libdir name (lib or lib64)'
|
|
||||||
)
|
|
||||||
|
|
||||||
-for suffix in ['libelf', 'gettext', 'fiemap', 'blkid', 'json-glib', 'gui']:
|
|
||||||
+for suffix in ['libelf', 'gettext', 'fiemap', 'blkid', 'json-glib', 'gui', 'docs']:
|
|
||||||
AddOption(
|
|
||||||
'--without-' + suffix, action='store_const', default=False, const=False,
|
|
||||||
dest='with_' + suffix
|
|
||||||
@@ -804,7 +804,8 @@ env.Default(library)
|
|
||||||
|
|
||||||
SConscript('tests/SConscript', exports='programs')
|
|
||||||
SConscript('po/SConscript')
|
|
||||||
-SConscript('docs/SConscript')
|
|
||||||
+if GetOption("with_docs"):
|
|
||||||
+ SConscript('docs/SConscript')
|
|
||||||
SConscript('gui/SConscript')
|
|
||||||
|
|
||||||
|
|
||||||
@@ -883,7 +884,6 @@ if 'config' in COMMAND_LINE_TARGETS:
|
|
||||||
Find non-stripped binaries (needs libelf) : {libelf}
|
|
||||||
Optimize using ioctl(FS_IOC_FIEMAP) (needs linux) : {fiemap}
|
|
||||||
Support for SHA512 (needs glib >= 2.31) : {sha512}
|
|
||||||
- Build manpage from docs/rmlint.1.rst : {sphinx}
|
|
||||||
Support for caching checksums in file's xattr : {xattr}
|
|
||||||
Support for reading json caches (needs json-glib) : {json_glib}
|
|
||||||
Checking for proper support of big files >= 4GB : {bigfiles}
|
|
||||||
@@ -898,6 +898,9 @@ if 'config' in COMMAND_LINE_TARGETS:
|
|
||||||
(needs <locale.h> for compile side support) : {locale}
|
|
||||||
(needs msgfmt to compile .po files) : {msgfmt}
|
|
||||||
|
|
||||||
+ Enable GUI : {gui}
|
|
||||||
+ Build docs : {docs}
|
|
||||||
+
|
|
||||||
{grey}The following constants will be used during the build:{end}
|
|
||||||
|
|
||||||
Version information : {version}
|
|
||||||
@@ -925,6 +928,8 @@ Type 'scons' to actually compile rmlint now. Good luck.
|
|
||||||
bigfiles=yesno(env['HAVE_BIGFILES']),
|
|
||||||
bigofft=yesno(env['HAVE_BIG_OFF_T']),
|
|
||||||
bigstat=yesno(env['HAVE_BIG_STAT']),
|
|
||||||
+ gui=yesno(GetOption("with_gui")),
|
|
||||||
+ docs=yesno(GetOption("with_docs")),
|
|
||||||
sphinx=COLORS['green'] + 'yes, using ' + COLORS['end'] + sphinx_bin if sphinx_bin else yesno(sphinx_bin),
|
|
||||||
compiler=env['CC'],
|
|
||||||
prefix=GetOption('prefix'),
|
|
||||||
--- a/gui/setup.py
|
|
||||||
+++ b/gui/setup.py
|
|
||||||
@@ -37,7 +37,7 @@ def get_prefix():
|
|
||||||
PREFIX = get_prefix()
|
|
||||||
|
|
||||||
|
|
||||||
-class PrePlusPostInstall(install):
|
|
||||||
+class PreInstall(install):
|
|
||||||
def run(self):
|
|
||||||
# Compile the resource bundle freshly
|
|
||||||
print('==> Compiling resource bundle')
|
|
||||||
@@ -59,24 +59,6 @@ class PrePlusPostInstall(install):
|
|
||||||
# Run the usual distutils install routine:
|
|
||||||
install.run(self)
|
|
||||||
|
|
||||||
- # Make sure the schema file is updated.
|
|
||||||
- # Otherwise the gui will trace trap.
|
|
||||||
- print('==> Compiling GLib Schema files')
|
|
||||||
-
|
|
||||||
- try:
|
|
||||||
- subprocess.call([
|
|
||||||
- 'glib-compile-schemas',
|
|
||||||
- os.path.join(PREFIX, 'share/glib-2.0/schemas')
|
|
||||||
- ])
|
|
||||||
- except subprocess.CalledProcessError as err:
|
|
||||||
- print('==> Could not update schemas: ', err)
|
|
||||||
- print('==> Please run the following manually:\n')
|
|
||||||
- print(' sudo glib-compile-schemas {prefix}'.format(
|
|
||||||
- prefix=os.path.join(PREFIX, 'share/glib-2.0/schemas')
|
|
||||||
- ))
|
|
||||||
- else:
|
|
||||||
- print('==> OK!')
|
|
||||||
-
|
|
||||||
|
|
||||||
setup(
|
|
||||||
name='Shredder',
|
|
||||||
@@ -88,7 +70,7 @@ setup(
|
|
||||||
url='https://rmlint.rtfd.org',
|
|
||||||
license='GPLv3',
|
|
||||||
platforms='any',
|
|
||||||
- cmdclass={'install': PrePlusPostInstall},
|
|
||||||
+ cmdclass={'install': PreInstall},
|
|
||||||
packages=['shredder', 'shredder.views'],
|
|
||||||
package_data={'': [
|
|
||||||
'resources/*.gresource'
|
|
|
@ -1,35 +0,0 @@
|
||||||
commit 566198730352f2353fd8332794409d7c9edf80e2
|
|
||||||
Author: Louis Sautier <sautier.louis@gmail.com>
|
|
||||||
Date: Wed Sep 8 00:53:28 2021 +0200
|
|
||||||
|
|
||||||
tests: skip man and python2
|
|
||||||
|
|
||||||
Those tests fail respectively when the documentation isn't built and when
|
|
||||||
python2 isn't available (probably specific to Gentoo).
|
|
||||||
|
|
||||||
diff --git a/tests/test_formatters/test_py.py b/tests/test_formatters/test_py.py
|
|
||||||
index 92b17604..28d2dd42 100644
|
|
||||||
--- a/tests/test_formatters/test_py.py
|
|
||||||
+++ b/tests/test_formatters/test_py.py
|
|
||||||
@@ -16,7 +16,7 @@ def _check_interpreter(interpreter):
|
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
-@parameterized(["python2", "python3"])
|
|
||||||
+@parameterized(["python3"])
|
|
||||||
@with_setup(usual_setup_func, usual_teardown_func)
|
|
||||||
def test_paranoia(interpreter):
|
|
||||||
if not _check_interpreter(interpreter):
|
|
||||||
diff --git a/tests/test_options/test_help.py b/tests/test_options/test_help.py
|
|
||||||
index d934724a..60bc40a0 100644
|
|
||||||
--- a/tests/test_options/test_help.py
|
|
||||||
+++ b/tests/test_options/test_help.py
|
|
||||||
@@ -17,7 +17,7 @@ def test_help():
|
|
||||||
|
|
||||||
|
|
||||||
@with_setup(usual_setup_func, usual_teardown_func)
|
|
||||||
-def test_man():
|
|
||||||
+def _test_man():
|
|
||||||
yelp = subprocess.check_output(
|
|
||||||
['./rmlint', '--show-man'], stderr=subprocess.STDOUT
|
|
||||||
).decode('utf-8')
|
|
|
@ -1,30 +0,0 @@
|
||||||
commit 87c53a5cb0ec37412cf9fe748dc90dddc6812733
|
|
||||||
Author: Louis Sautier <sautier.louis@gmail.com>
|
|
||||||
Date: Wed Sep 8 19:39:07 2021 +0200
|
|
||||||
|
|
||||||
Fix max sizes on x86, closes #522
|
|
||||||
|
|
||||||
strtoull returns ULLONG_MAX, not ULONG_MAX.
|
|
||||||
|
|
||||||
diff --git a/lib/cmdline.c b/lib/cmdline.c
|
|
||||||
index 56141d94..36f48c1b 100644
|
|
||||||
--- a/lib/cmdline.c
|
|
||||||
+++ b/lib/cmdline.c
|
|
||||||
@@ -351,7 +351,7 @@ static RmOff rm_cmd_size_string_to_bytes(const char *size_spec, GError **error)
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if(fraction_num == ULONG_MAX && errno == ERANGE) {
|
|
||||||
+ if(fraction_num == ULLONG_MAX && errno == ERANGE) {
|
|
||||||
g_set_error(error, RM_ERROR_QUARK, 0, _("Fraction is too big for uint64"));
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -371,7 +371,7 @@ static RmOff rm_cmd_size_string_to_bytes(const char *size_spec, GError **error)
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if(base_size == ULONG_MAX && errno == ERANGE) {
|
|
||||||
+ if(base_size == ULLONG_MAX && errno == ERANGE) {
|
|
||||||
g_set_error(error, RM_ERROR_QUARK, 0, _("Size is too big for uint64"));
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -1,137 +0,0 @@
|
||||||
# Copyright 1999-2023 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=7
|
|
||||||
|
|
||||||
PYTHON_COMPAT=( python3_{9..11} )
|
|
||||||
|
|
||||||
inherit gnome2-utils python-single-r1 scons-utils toolchain-funcs xdg-utils
|
|
||||||
|
|
||||||
DESCRIPTION="Extremely fast tool to remove duplicates and other lint from your filesystem"
|
|
||||||
HOMEPAGE="https://rmlint.readthedocs.io/"
|
|
||||||
SRC_URI="https://github.com/sahib/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
||||||
|
|
||||||
LICENSE="GPL-3+"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~amd64 ~x86"
|
|
||||||
IUSE="doc gui nls test"
|
|
||||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
|
||||||
RESTRICT="!test? ( test )"
|
|
||||||
|
|
||||||
DEPEND="
|
|
||||||
dev-libs/glib:2
|
|
||||||
dev-libs/json-glib
|
|
||||||
virtual/libelf:0=
|
|
||||||
"
|
|
||||||
RDEPEND="
|
|
||||||
${DEPEND}
|
|
||||||
gui? (
|
|
||||||
${PYTHON_DEPS}
|
|
||||||
x11-libs/gtksourceview:3.0
|
|
||||||
$(python_gen_cond_dep '
|
|
||||||
dev-python/colorlog[${PYTHON_USEDEP}]
|
|
||||||
dev-python/pygobject:3[${PYTHON_USEDEP}]
|
|
||||||
')
|
|
||||||
)
|
|
||||||
"
|
|
||||||
BDEPEND="
|
|
||||||
virtual/pkgconfig
|
|
||||||
doc? (
|
|
||||||
${PYTHON_DEPS}
|
|
||||||
$(python_gen_cond_dep '
|
|
||||||
dev-python/sphinx[${PYTHON_USEDEP}]
|
|
||||||
dev-python/sphinx-bootstrap-theme[${PYTHON_USEDEP}]
|
|
||||||
')
|
|
||||||
)
|
|
||||||
nls? ( sys-devel/gettext )
|
|
||||||
test? (
|
|
||||||
${PYTHON_DEPS}
|
|
||||||
app-shells/dash
|
|
||||||
$(python_gen_cond_dep '
|
|
||||||
dev-python/nose[${PYTHON_USEDEP}]
|
|
||||||
dev-python/parameterized[${PYTHON_USEDEP}]
|
|
||||||
dev-python/psutil[${PYTHON_USEDEP}]
|
|
||||||
dev-python/pyxattr[${PYTHON_USEDEP}]
|
|
||||||
')
|
|
||||||
)
|
|
||||||
"
|
|
||||||
|
|
||||||
DOCS=(CHANGELOG.md README.rst)
|
|
||||||
PATCHES=(
|
|
||||||
# The build system tries to override several CFLAGS
|
|
||||||
"${FILESDIR}/${PN}-2.10.1-cflags.patch"
|
|
||||||
# https://github.com/sahib/rmlint/pull/520
|
|
||||||
"${FILESDIR}/${PN}-2.10.1-scons.patch"
|
|
||||||
# https://github.com/sahib/rmlint/pull/521
|
|
||||||
"${FILESDIR}/${PN}-2.10.1-fix-tests.patch"
|
|
||||||
# Skip problematic tests
|
|
||||||
"${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() {
|
|
||||||
default
|
|
||||||
if use test && use x86; then
|
|
||||||
# Skip part of a test until this is fixed:
|
|
||||||
# https://github.com/sahib/rmlint/issues/522
|
|
||||||
sed -i '/--size 0-18446744073709551615\.1/d' \
|
|
||||||
tests/test_options/test_size.py || die
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
# Needed for USE=-native-symlinks
|
|
||||||
tc-export AR CC
|
|
||||||
scons_opts=(
|
|
||||||
VERBOSE=1
|
|
||||||
$(use_with doc docs)
|
|
||||||
$(use_with gui)
|
|
||||||
$(use_with nls gettext)
|
|
||||||
)
|
|
||||||
escons "${scons_opts[@]}" config
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
escons "${scons_opts[@]}"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
RM_TS_DIR="${T}/tests" nosetests -s -v -a '!slow' || \
|
|
||||||
die "Tests failed"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
escons "${scons_opts[@]}" --prefix="${ED}/usr" --actual-prefix="${EPREFIX}/usr" install
|
|
||||||
|
|
||||||
# https://github.com/sahib/rmlint/pull/525
|
|
||||||
if use doc; then
|
|
||||||
gzip -d "${ED}/usr/share/man/man1/rmlint.1.gz" || die
|
|
||||||
fi
|
|
||||||
if use gui; then
|
|
||||||
python_optimize
|
|
||||||
fi
|
|
||||||
einstalldocs
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_preinst() {
|
|
||||||
if use gui; then
|
|
||||||
gnome2_schemas_savelist
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
if use gui; then
|
|
||||||
gnome2_schemas_update
|
|
||||||
xdg_icon_cache_update
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
if use gui; then
|
|
||||||
gnome2_schemas_update
|
|
||||||
xdg_icon_cache_update
|
|
||||||
fi
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue