summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Yao <ryao@gentoo.org>2012-06-17 23:21:19 +0000
committerRichard Yao <ryao@gentoo.org>2012-06-17 23:21:19 +0000
commit98487e128d5ba546d948494a523f6c61acd9b910 (patch)
treebd70e79565eb01e46af5778b4213fc765ad174eb /sys-freebsd
parentAdded compatibility with previous versions on include install (diff)
downloadgentoo-2-98487e128d5ba546d948494a523f6c61acd9b910.tar.gz
gentoo-2-98487e128d5ba546d948494a523f6c61acd9b910.tar.bz2
gentoo-2-98487e128d5ba546d948494a523f6c61acd9b910.zip
New ebuild: /usr/bin wrapper scripts for FreeBSD script compatibility
(Portage version: 2.1.10.49/cvs/Linux x86_64)
Diffstat (limited to 'sys-freebsd')
-rw-r--r--sys-freebsd/ubin-wrappers/ChangeLog10
-rw-r--r--sys-freebsd/ubin-wrappers/Manifest3
-rwxr-xr-xsys-freebsd/ubin-wrappers/files/dowrap33
-rw-r--r--sys-freebsd/ubin-wrappers/metadata.xml8
-rw-r--r--sys-freebsd/ubin-wrappers/ubin-wrappers-0.ebuild29
5 files changed, 83 insertions, 0 deletions
diff --git a/sys-freebsd/ubin-wrappers/ChangeLog b/sys-freebsd/ubin-wrappers/ChangeLog
new file mode 100644
index 000000000000..cfb2aad8315e
--- /dev/null
+++ b/sys-freebsd/ubin-wrappers/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for sys-freebsd/ubin-wrappers
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/ubin-wrappers/ChangeLog,v 1.1 2012/06/17 23:21:19 ryao Exp $
+
+*ubin-wrappers-0 (17 Jun 2012)
+
+ 17 Jun 2012; Richard Yao <ryao@gentoo.org> +files/dowrap, +metadata.xml,
+ +ubin-wrappers-0.ebuild:
+ New ebuild: /usr/bin wrapper scripts for FreeBSD script compatibility
+
diff --git a/sys-freebsd/ubin-wrappers/Manifest b/sys-freebsd/ubin-wrappers/Manifest
new file mode 100644
index 000000000000..47f2ab21e861
--- /dev/null
+++ b/sys-freebsd/ubin-wrappers/Manifest
@@ -0,0 +1,3 @@
+AUX dowrap 897 RMD160 1cc22f77ee12e204d67efe2d716341cd947e2be4 SHA1 6f716da78455b6f6dccfdbac3cbf7ac3041e93f8 SHA256 e2cfcbd7098723c5aebca9d9d80de8ad54ec2f71a66481114586f4a5a6593ea2
+EBUILD ubin-wrappers-0.ebuild 672 RMD160 dffd17edc97c27f65b6ff46c13b0e8079d74c250 SHA1 52388c6ca386148f1d4df8e414e42663a5f5abcb SHA256 95b9b7f9ff971bafebe7885680d0bdd902aba8dd55f7c9c1616d51dc2f48539a
+MISC metadata.xml 228 RMD160 7f4566d402fa232a1d2bb22589d7fe8cc72a241c SHA1 9a2f59b4e342ac0f1e064255f59b0bdec32ab1a9 SHA256 a317cd066ed83c5b5acf9d49869cb2f153499bb90cee389334bee9781534f5e8
diff --git a/sys-freebsd/ubin-wrappers/files/dowrap b/sys-freebsd/ubin-wrappers/files/dowrap
new file mode 100755
index 000000000000..be8d016ad894
--- /dev/null
+++ b/sys-freebsd/ubin-wrappers/files/dowrap
@@ -0,0 +1,33 @@
+#!/bin/bash
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+
+
+if [[ $# -lt 1 ]] ; then
+ helpers_die "${0##*/}: at least one argument needed"
+ exit 1
+fi
+
+if [[ ! -d ${ED}${DESTTREE} ]] ; then
+ install -d "${ED}${DESTTREE}" || { helpers_die "${0##*/}: failed to install ${ED}${DESTTREE}"; exit 2; }
+fi
+
+ret=0
+
+for x in "$@" ; do
+ if [[ -e ${x} ]] ; then
+ echo "#!/bin/sh" > "${ED}${DESTTREE}/$(basename ${x})"
+ echo "exec ${x} "'${1:+"$@"}' >> "${ED}${DESTTREE}/$(basename ${x})"
+ chmod 0755 "${ED}${DESTTREE}/$(basename ${x})"
+ chown ${PORTAGE_INST_UID:-0}:${PORTAGE_INST_GID:-0} "${ED}${DESTTREE}/$(basename ${x})"
+ else
+ echo "!!! ${0##*/}: $x does not exist" 1>&2
+ false
+ fi
+ ((ret|=$?))
+done
+
+[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
+exit ${ret}
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..0676bba9e69e
--- /dev/null
+++ b/sys-freebsd/ubin-wrappers/ubin-wrappers-0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/ubin-wrappers/ubin-wrappers-0.ebuild,v 1.1 2012/06/17 23:21:19 ryao Exp $
+
+EAPI=4
+
+DESCRIPTION="/usr/bin wrapper scripts for FreeBSD script compatibility"
+HOMEPAGE="http://www.gentoo.org"
+SRC_URI=""
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="userland_BSD userland_GNU"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"
+
+src_install()
+{
+
+ into /usr/bin
+ "${FILESDIR}/dowrap" "${EPREFIX}/bin/"{bunzip2,bzcat,cpio,egrep,fgrep,grep,gunzip,gzip,zcat}
+ use userland_BSD && "${FILESDIR}/dowrap" "${EPREFIX}/bin/sort"
+ use userland_GNU && "${FILESDIR}/dowrap" "${EPREFIX}/bin/"{fuser,sed,uncompress}
+
+}