Merge pull request #2421 from pullmoll/rmlint

New package: rmlint-2.2.0
This commit is contained in:
Andrea Brancaleoni 2015-08-31 22:16:01 +02:00
commit 69f2b76be3
2 changed files with 64 additions and 0 deletions

View file

@ -0,0 +1,35 @@
Insert a check for the musl-fts library which will be used
for *-musl architectures.
--- SConstruct 2015-05-10 01:34:58.000000000 +0200
+++ SConstruct 2015-08-31 11:32:23.251480056 +0200
@@ -286,6 +286,19 @@
context.Result(rc)
return rc
+def check_musl_fts(context):
+ rc = 1
+ if tests.CheckHeader(context, 'fts.h'):
+ rc = 0
+
+ if tests.CheckLib(context, ['fts']):
+ rc = 0
+
+ conf.env['HAVE_FTS_H'] = rc
+ context.did_show_result = True
+ context.Result(rc)
+ return rc
+
def create_uninstall_target(env, path):
env.Command("uninstall-" + path, path, [
@@ -448,7 +461,8 @@
'check_bigfiles': check_bigfiles,
'check_c11': check_c11,
'check_gettext': check_gettext,
- 'check_sqlite3': check_sqlite3
+ 'check_sqlite3': check_sqlite3,
+ 'check_musl_fts': check_musl_fts
})
if not conf.CheckCC():

29
srcpkgs/rmlint/template Normal file
View file

@ -0,0 +1,29 @@
# Template file for 'rmlint'
pkgname=rmlint
version=2.2.0
revision=1
hostmakedepends="git scons pkg-config"
makedepends="glib-devel libblkid-devel elfutils-devel json-glib-devel"
short_desc="Extremely fast tool to remove duplicates"
maintainer="Andrea Brancaleoni <miwaxe@gmail.com>"
license="GPL-3"
homepage="http://rmlint.rtfd.org/"
distfiles="https://github.com/sahib/$pkgname/archive/v$version.tar.gz"
checksum=b684aa73ec80423e1cc5e9cee9ae466f0ed0c6a2e5a88482a07d3306465ee6f1
case "$XBPS_TARGET_MACHINE" in
*-musl) makedepends+=" musl-fts"
esac
pre_configure() {
case "$XBPS_TARGET_MACHINE" in
*-musl) # Add musl-fts to the libs
sed -i SConstruct -e "/conf\.check_sqlite3()/a conf.check_musl_fts()"
esac
}
do_install() {
sed -i '/native/d' SConstruct
scons CC="$CC" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" install --prefix=${DESTDIR}/usr
vlicense COPYING
}