Gentoo Archives: gentoo-dev

From: Richard Yao <ryao@×××××××××××××.edu>
To: "gentoo-dev@l.g.o" <gentoo-dev@l.g.o>
Cc: "gentoo-bsd@l.g.o" <gentoo-bsd@l.g.o>
Subject: [gentoo-dev] freebsd.eclass change
Date: Sun, 01 Jul 2012 23:51:54
Message-Id: 4FF0E1EA.9090506@cs.stonybrook.edu
1 I want to add freebsd_get_cpuarch() to freebsd.eclass. This will give us
2 a platform-independent way of generating MACHINE_CPUARCH, which will
3 make building FreeBSD components on other platforms (i.e. Linux and
4 Prefix) easier.
5
6 --- freebsd.eclass.old 2012-07-01 19:15:56.157277000 -0400
7 +++ freebsd.eclass 2012-07-01 19:44:08.093698000 -0400
8 @@ -58,6 +58,24 @@ freebsd_get_bmake() {
9 echo "${bmake}"
10 }
11
12 +freebsd_get_cpuarch() {
13 + local arch=$(uname -m)
14 + case $(uname -m) in
15 + x86_64)
16 + return 'amd64';;
17 + arm*)
18 + return 'arm';;
19 + i?86)
20 + return 'i386';;
21 + ppc*)
22 + return 'powerpc';;
23 + mips*)
24 + return 'mips';;
25 + sparc*)
26 + return 'sparc';;
27 + *)
28 + return arch;
29 + esac
30 +}
31 +
32 freebsd_do_patches() {
33 if [[ ${#PATCHES[@]} -gt 1 ]] ; then
34 for x in "${PATCHES[@]}"; do
35
36 Does anyone have any objections?

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
[gentoo-dev] Re: freebsd.eclass change Richard Yao <ryao@g.o>
Re: [gentoo-dev] freebsd.eclass change Alexis Ballier <aballier@g.o>