summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-02-21 03:36:45 +0000
committerMike Frysinger <vapier@gentoo.org>2006-02-21 03:36:45 +0000
commitfb07e41d786e1d3be24c7766ba7ee50a6b931787 (patch)
tree267c264c604f9e61c1969370f90afebeff1835a1 /sys-apps/setarch
parentfix patch #123565 by Steve Cole (diff)
downloadgentoo-2-fb07e41d786e1d3be24c7766ba7ee50a6b931787.tar.gz
gentoo-2-fb07e41d786e1d3be24c7766ba7ee50a6b931787.tar.bz2
gentoo-2-fb07e41d786e1d3be24c7766ba7ee50a6b931787.zip
initial import #123526
(Portage version: 2.1_pre4-r1)
Diffstat (limited to 'sys-apps/setarch')
-rw-r--r--sys-apps/setarch/ChangeLog8
-rw-r--r--sys-apps/setarch/Manifest6
-rw-r--r--sys-apps/setarch/files/Makefile24
-rw-r--r--sys-apps/setarch/files/digest-setarch-1.83
-rw-r--r--sys-apps/setarch/files/setarch-1.8-better-error.patch11
-rw-r--r--sys-apps/setarch/files/setarch-1.8-links.patch37
-rw-r--r--sys-apps/setarch/files/setarch-1.8-linux-headers.patch11
-rw-r--r--sys-apps/setarch/files/setarch-1.8-mips.patch15
-rw-r--r--sys-apps/setarch/files/setarch-1.8-sparc.patch10
-rw-r--r--sys-apps/setarch/metadata.xml5
-rw-r--r--sys-apps/setarch/setarch-1.8.ebuild34
11 files changed, 164 insertions, 0 deletions
diff --git a/sys-apps/setarch/ChangeLog b/sys-apps/setarch/ChangeLog
new file mode 100644
index 000000000000..e61bca93a5c4
--- /dev/null
+++ b/sys-apps/setarch/ChangeLog
@@ -0,0 +1,8 @@
+# ChangeLog for sys-apps/setarch
+# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/setarch/ChangeLog,v 1.1 2006/02/21 03:36:45 vapier Exp $
+
+*setarch-1.8 (20 Feb 2006)
+
+ 20 Feb 2006; Mike Frysinger <vapier@gentoo.org> :
+ Initial import. Ebuild submitted by me #123526.
diff --git a/sys-apps/setarch/Manifest b/sys-apps/setarch/Manifest
new file mode 100644
index 000000000000..73a767284d74
--- /dev/null
+++ b/sys-apps/setarch/Manifest
@@ -0,0 +1,6 @@
+MD5 1c6befb6674e6ac7b3771995ab0db5ab files/digest-setarch-1.8 229
+RMD160 c3967542255864b979b31b975c713eeb547d9631 files/digest-setarch-1.8 229
+SHA256 f5b26a1ddf0b29a7364ee6db51e2ada256143fe70990fca163d2562c3dad52a8 files/digest-setarch-1.8 229
+MD5 83ed8baa4d76e75bc42286f9f514d537 setarch-1.8.ebuild 644
+RMD160 58e01ade1980c093638b5b31286aec3cfd421b0a setarch-1.8.ebuild 644
+SHA256 e6b41e1ec2c9e5de4bc869882da02ce49921a0563c72e8ecded3aa316f526189 setarch-1.8.ebuild 644
diff --git a/sys-apps/setarch/files/Makefile b/sys-apps/setarch/files/Makefile
new file mode 100644
index 000000000000..ba22b66b4a9a
--- /dev/null
+++ b/sys-apps/setarch/files/Makefile
@@ -0,0 +1,24 @@
+bindir = /bin
+mandir = /usr/share/man
+
+RM = rm -f
+LN_S = ln -s
+
+all: setarch links
+
+setarch.i: setarch.c
+ $(CC) $(CFLAGS) -E $< -o $@
+links: setarch.i Makefile
+ LC_ALL=C sed -n '/{PER_LINUX.* ,$$/{s:[^"]*, ::;s:,.*::;s:"::g;p}' $< > links
+
+install: setarch
+ mkdir -p $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man8
+ install -m755 setarch $(DESTDIR)$(bindir)
+ install -m644 setarch.8 $(DESTDIR)$(mandir)/man8
+ for x in `cat links` ; do \
+ $(LN_S) setarch $(DESTDIR)$(bindir)/$$x || exit 1 ; \
+ $(LN_S) setarch.8 $(DESTDIR)$(mandir)/man8/$$x || exit 1 ; \
+ done
+
+clean:
+ $(RM) setarch setarch.i links
diff --git a/sys-apps/setarch/files/digest-setarch-1.8 b/sys-apps/setarch/files/digest-setarch-1.8
new file mode 100644
index 000000000000..fcb1b75be2cb
--- /dev/null
+++ b/sys-apps/setarch/files/digest-setarch-1.8
@@ -0,0 +1,3 @@
+MD5 dda9d220e6934dd0a9c1e3faf0829a00 setarch-1.8.tar.gz 3443
+RMD160 e46869dbe219bd88636aeba45ef949c596b793b5 setarch-1.8.tar.gz 3443
+SHA256 02dac29db52fcaab543b267e518a0144241c234aab315ca699c6c7554c281521 setarch-1.8.tar.gz 3443
diff --git a/sys-apps/setarch/files/setarch-1.8-better-error.patch b/sys-apps/setarch/files/setarch-1.8-better-error.patch
new file mode 100644
index 000000000000..d7fbb84dab1e
--- /dev/null
+++ b/sys-apps/setarch/files/setarch-1.8-better-error.patch
@@ -0,0 +1,11 @@
+--- setarch.c
++++ setarch.c
+@@ -112,7 +112,7 @@
+ && strcmp(un.machine, "i686")
+ && strcmp(un.machine, "athlon")))
+ {
+- fprintf(stderr, "Don't know how to set arch to %s\n", pers);
++ fprintf(stderr, "Unable to set arch to %s\n", pers);
+ exit(1);
+ }
+ }
diff --git a/sys-apps/setarch/files/setarch-1.8-links.patch b/sys-apps/setarch/files/setarch-1.8-links.patch
new file mode 100644
index 000000000000..5c47fd705fee
--- /dev/null
+++ b/sys-apps/setarch/files/setarch-1.8-links.patch
@@ -0,0 +1,37 @@
+--- setarch.c
++++ setarch.c
+@@ -46,17 +46,17 @@
+ int perval;
+ char *target_arch, *result_arch;
+ } transitions[] = {
+- {PER_LINUX32, "linux32", NULL},
+- {PER_LINUX, "linux64", NULL},
++ {PER_LINUX32, "linux32", NULL} ,
++ {PER_LINUX, "linux64", NULL} ,
+ #if defined(__mips__)
+- {PER_LINUX32, "mips32", "mips"},
++ {PER_LINUX32, "mips32", "mips"} ,
+ {PER_LINUX32, "mips", "mips"},
+- {PER_LINUX, "mips64", "mips64"},
++ {PER_LINUX, "mips64", "mips64"} ,
+ #endif
+ #if defined(__powerpc__) || defined(__powerpc64__)
+- {PER_LINUX32, "ppc32", "ppc"},
++ {PER_LINUX32, "ppc32", "ppc"} ,
+ {PER_LINUX32, "ppc", "ppc"},
+- {PER_LINUX, "ppc64", "ppc64"},
++ {PER_LINUX, "ppc64", "ppc64"} ,
+ {PER_LINUX, "ppc64pseries", "ppc64"},
+ {PER_LINUX, "ppc64iseries", "ppc64"},
+ #endif
+@@ -79,8 +79,8 @@
+ #endif
+ #if defined(__sparc64__) || defined(__sparc__)
+ {PER_LINUX32, "sparc", "sparc"},
+- {PER_LINUX32, "sparc32", "sparc"},
+- {PER_LINUX, "sparc64", "sparc64"},
++ {PER_LINUX32, "sparc32", "sparc"} ,
++ {PER_LINUX, "sparc64", "sparc64"} ,
+ #endif
+ {-1, NULL, NULL}
+ };
diff --git a/sys-apps/setarch/files/setarch-1.8-linux-headers.patch b/sys-apps/setarch/files/setarch-1.8-linux-headers.patch
new file mode 100644
index 000000000000..809041872332
--- /dev/null
+++ b/sys-apps/setarch/files/setarch-1.8-linux-headers.patch
@@ -0,0 +1,11 @@
+--- setarch.c
++++ setarch.c
+@@ -8,7 +8,7 @@
+ /* */
+
+ #include <syscall.h>
+-#include <linux/personality.h>
++#include <sys/personality.h>
+ #include <unistd.h>
+ #include <stdio.h>
+ #include <string.h>
diff --git a/sys-apps/setarch/files/setarch-1.8-mips.patch b/sys-apps/setarch/files/setarch-1.8-mips.patch
new file mode 100644
index 000000000000..cbbd4eab6953
--- /dev/null
+++ b/sys-apps/setarch/files/setarch-1.8-mips.patch
@@ -0,0 +1,15 @@
+--- setarch.c
++++ setarch.c
+@@ -47,6 +47,12 @@
+ char *target_arch, *result_arch;
+ } transitions[] = {
+ {PER_LINUX32, "linux32", NULL},
++ {PER_LINUX, "linux64", NULL},
++#if defined(__mips__)
++ {PER_LINUX32, "mips32", "mips"},
++ {PER_LINUX32, "mips", "mips"},
++ {PER_LINUX, "mips64", "mips64"},
++#endif
+ #if defined(__powerpc__) || defined(__powerpc64__)
+ {PER_LINUX32, "ppc32", "ppc"},
+ {PER_LINUX32, "ppc", "ppc"},
diff --git a/sys-apps/setarch/files/setarch-1.8-sparc.patch b/sys-apps/setarch/files/setarch-1.8-sparc.patch
new file mode 100644
index 000000000000..85bfd16619b1
--- /dev/null
+++ b/sys-apps/setarch/files/setarch-1.8-sparc.patch
@@ -0,0 +1,10 @@
+--- setarch.c
++++ setarch.c
+@@ -79,6 +79,7 @@
+ #endif
+ #if defined(__sparc64__) || defined(__sparc__)
+ {PER_LINUX32, "sparc", "sparc"},
++ {PER_LINUX32, "sparc32", "sparc"},
+ {PER_LINUX, "sparc64", "sparc64"},
+ #endif
+ {-1, NULL, NULL}
diff --git a/sys-apps/setarch/metadata.xml b/sys-apps/setarch/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/sys-apps/setarch/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>
diff --git a/sys-apps/setarch/setarch-1.8.ebuild b/sys-apps/setarch/setarch-1.8.ebuild
new file mode 100644
index 000000000000..2848b7a45e8e
--- /dev/null
+++ b/sys-apps/setarch/setarch-1.8.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/setarch/setarch-1.8.ebuild,v 1.1 2006/02/21 03:36:45 vapier Exp $
+
+inherit eutils
+
+DESCRIPTION="change reported architecture in new program environment and set personality flags"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE=""
+
+RDEPEND="!sys-apps/linux32
+ !sys-devel/mips32
+ !sys-devel/sparc32
+ !sys-devel/ppc32"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ cp "${FILESDIR}"/Makefile . || die
+ epatch "${FILESDIR}"/${P}-linux-headers.patch
+ epatch "${FILESDIR}"/${P}-mips.patch
+ epatch "${FILESDIR}"/${P}-sparc.patch
+ epatch "${FILESDIR}"/${P}-better-error.patch
+ epatch "${FILESDIR}"/${P}-links.patch
+}
+
+src_install() {
+ make install DESTDIR="${D}" || die
+}