summaryrefslogtreecommitdiff
path: root/sys-apps
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/noxcuse/Manifest1
-rw-r--r--sys-apps/noxcuse/files/0001-Makefile-Fix-install-target-dependencies.patch25
-rw-r--r--sys-apps/noxcuse/files/0002-Makefile-Support-DESTDIR.patch44
-rw-r--r--sys-apps/noxcuse/noxcuse-1.0.ebuild51
4 files changed, 121 insertions, 0 deletions
diff --git a/sys-apps/noxcuse/Manifest b/sys-apps/noxcuse/Manifest
new file mode 100644
index 000000000..9f04bd353
--- /dev/null
+++ b/sys-apps/noxcuse/Manifest
@@ -0,0 +1 @@
+DIST noxcuse-1.0.tar.xz 8160 SHA256 8cf1d228e2ba4a1adfe846fe8b481bf5e0a2246730fec8c07cf533b0a1fd2496 SHA512 dc867418481857ffb3b6c5b1889d814ef9d554f7711666d4de053c747cc7081af9e06fa4c28ef1d91283e0e2c93b13f640e9a334d4c7cee892f00b887394b024 WHIRLPOOL d054a88ef028499cf70f4e26076121f91ed5801f818e0f33a7579f816fea491e9966497b62a34ef107dff76767d2d32c88f1a8b50c00dd88ffbc1a21cccdf0d5
diff --git a/sys-apps/noxcuse/files/0001-Makefile-Fix-install-target-dependencies.patch b/sys-apps/noxcuse/files/0001-Makefile-Fix-install-target-dependencies.patch
new file mode 100644
index 000000000..aaadad827
--- /dev/null
+++ b/sys-apps/noxcuse/files/0001-Makefile-Fix-install-target-dependencies.patch
@@ -0,0 +1,25 @@
+From bbb0e870e5234ed52138c22927bab9dba3c32d3c Mon Sep 17 00:00:00 2001
+From: Andrew Wilcox <AWilcox@Wilcox-Tech.com>
+Date: Sat, 16 Apr 2016 15:03:12 -0500
+Subject: [PATCH 1/2] Makefile: Fix install target dependencies
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index e1ee228..638a354 100644
+--- a/Makefile
++++ b/Makefile
+@@ -20,7 +20,7 @@ clean:
+ bin/%: src/%.c
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+-install: $(patsubst bin/%,$(bindir)/%,$(B)) $(patsubst bin/%,$(usrbindir)/%,$(UB))
++install: $(B:%=$(bindir)/%) $(UB:%=$(usrbindir)/%)
+
+ size: $(ALL)
+ size -t $(ALL)
+--
+2.7.4
+
diff --git a/sys-apps/noxcuse/files/0002-Makefile-Support-DESTDIR.patch b/sys-apps/noxcuse/files/0002-Makefile-Support-DESTDIR.patch
new file mode 100644
index 000000000..47fca9aa6
--- /dev/null
+++ b/sys-apps/noxcuse/files/0002-Makefile-Support-DESTDIR.patch
@@ -0,0 +1,44 @@
+From 29396c114765726c20ac6d1080433803f8f0dc86 Mon Sep 17 00:00:00 2001
+From: Andrew Wilcox <AWilcox@Wilcox-Tech.com>
+Date: Sat, 16 Apr 2016 15:04:48 -0500
+Subject: [PATCH 2/2] Makefile: Support DESTDIR for out-of-root installations
+
+---
+ Makefile | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 638a354..a4572ab 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,6 +1,6 @@
+
+-bindir = /bin
+-usrbindir = /usr/bin
++bindir = $(DESTDIR)/bin
++usrbindir = $(DESTDIR)/usr/bin
+
+ CFLAGS = -D_XOPEN_SOURCE=700 -Os -Wall -Wno-format -Wno-char-subscripts -Wno-unused -Wno-parentheses
+ LDFLAGS =
+@@ -20,11 +20,17 @@ clean:
+ bin/%: src/%.c
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+-install: $(B:%=$(bindir)/%) $(UB:%=$(usrbindir)/%)
++install: $(bindir) $(usrbindir) $(B:%=$(bindir)/%) $(UB:%=$(usrbindir)/%)
+
+ size: $(ALL)
+ size -t $(ALL)
+
++$(bindir):
++ mkdir -p $(bindir)
++
++$(usrbindir):
++ mkdir -p $(usrbindir)
++
+ $(bindir)/%: bin/%
+ install $< $(bindir)
+
+--
+2.7.4
+
diff --git a/sys-apps/noxcuse/noxcuse-1.0.ebuild b/sys-apps/noxcuse/noxcuse-1.0.ebuild
new file mode 100644
index 000000000..20a12b8ec
--- /dev/null
+++ b/sys-apps/noxcuse/noxcuse-1.0.ebuild
@@ -0,0 +1,51 @@
+# Copyright 2015-2016 Adélie Linux Team
+# Distributed under the terms of the NCSA License
+
+EAPI=6
+
+DESCRIPTION="Implementation of SUS/XCU utilities, with a focus on lean code"
+HOMEPAGE="http://git.etalabs.net/cgit/noxcuse/"
+SRC_URI="http://distfiles.foxkit.us/source/noxcuse/noxcuse-1.0.tar.xz"
+
+LICENSE="GPLv2+"
+SLOT="0"
+KEYWORDS="x86 x86_64"
+IUSE_APPS="basename cat dirname false fold grep iconv link pwd strings true wc"
+IUSE=""
+
+for app in ${IUSE_APPS} ; do
+ IUSE="${IUSE} noxcuse_apps_${app}"
+done
+
+# require at least one app
+IUSE_REQUIRED="|| ( ${IUSE} )"
+
+# Add further IUSE here in the future, if necessary.
+#IUSE="${IUSE} "
+
+PATCHES=(
+ "${FILESDIR}/0001-Makefile-Fix-install-target-dependencies.patch"
+ "${FILESDIR}/0002-Makefile-Support-DESTDIR.patch"
+)
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc README TODO
+
+ # Really wish there was a configure for this.
+ use noxcuse_apps_basename || rm ${D}/usr/bin/basename
+ use noxcuse_apps_cat || rm ${D}/bin/cat
+ use noxcuse_apps_dirname || rm ${D}/usr/bin/dirname
+ use noxcuse_apps_false || rm ${D}/bin/false
+ use noxcuse_apps_fold || rm ${D}/usr/bin/fold
+ use noxcuse_apps_grep || rm ${D}/bin/grep
+ use noxcuse_apps_iconv || rm ${D}/usr/bin/iconv
+ use noxcuse_apps_link || rm ${D}/usr/bin/link
+ use noxcuse_apps_pwd || rm ${D}/bin/pwd
+ use noxcuse_apps_strings || rm ${D}/usr/bin/strings
+ use noxcuse_apps_true || rm ${D}/bin/true
+ use noxcuse_apps_wc || rm ${D}/usr/bin/wc
+}