summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-freebsd/ubin-wrappers')
-rw-r--r--sys-freebsd/ubin-wrappers/metadata.xml8
-rw-r--r--sys-freebsd/ubin-wrappers/ubin-wrappers-0.ebuild37
2 files changed, 45 insertions, 0 deletions
diff --git a/sys-freebsd/ubin-wrappers/metadata.xml b/sys-freebsd/ubin-wrappers/metadata.xml
new file mode 100644
index 000000000000..e63e3c3865da
--- /dev/null
+++ b/sys-freebsd/ubin-wrappers/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>ryao@gentoo.org</email>
+ <name>Richard Yao</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-freebsd/ubin-wrappers/ubin-wrappers-0.ebuild b/sys-freebsd/ubin-wrappers/ubin-wrappers-0.ebuild
new file mode 100644
index 000000000000..20d205e7bafe
--- /dev/null
+++ b/sys-freebsd/ubin-wrappers/ubin-wrappers-0.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="/usr/bin wrapper scripts for FreeBSD script compatibility"
+HOMEPAGE="http://www.gentoo.org"
+SRC_URI=""
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="userland_BSD userland_GNU"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"
+
+dowrap() {
+ local x
+ for x do
+ [[ -e ${x} ]] || die "${x} does not exist"
+ newbin - "$(basename "${x}")" <<-EOF
+ #!/bin/sh
+ exec ${x} \${1:+"\$@"}
+ EOF
+ done
+}
+
+src_install() {
+ dowrap \
+ "${EPREFIX}"/bin/{bunzip2,bzcat,cpio,egrep,fgrep,grep,gunzip,gzip,zcat}
+ use userland_BSD && dowrap "${EPREFIX}"/bin/sort
+ use userland_GNU && dowrap "${EPREFIX}"/bin/{fuser,sed,uncompress}
+}