Gentoo Archives: gentoo-dev

From: Richard Yao <ryao@g.o>
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] Re: freebsd.eclass change
Date: Mon, 02 Jul 2012 00:23:58
Message-Id: 4FF0E96C.4040301@gentoo.org
In Reply to: [gentoo-dev] freebsd.eclass change by Richard Yao
1 There is a small error in this. It should be 's/return/echo/'.
2
3 On 07/01/2012 07:48 PM, Richard Yao wrote:
4 > I want to add freebsd_get_cpuarch() to freebsd.eclass. This will give us
5 > a platform-independent way of generating MACHINE_CPUARCH, which will
6 > make building FreeBSD components on other platforms (i.e. Linux and
7 > Prefix) easier.
8 >
9 > --- freebsd.eclass.old 2012-07-01 19:15:56.157277000 -0400
10 > +++ freebsd.eclass 2012-07-01 19:44:08.093698000 -0400
11 > @@ -58,6 +58,24 @@ freebsd_get_bmake() {
12 > echo "${bmake}"
13 > }
14 >
15 > +freebsd_get_cpuarch() {
16 > + local arch=$(uname -m)
17 > + case $(uname -m) in
18 > + x86_64)
19 > + return 'amd64';;
20 > + arm*)
21 > + return 'arm';;
22 > + i?86)
23 > + return 'i386';;
24 > + ppc*)
25 > + return 'powerpc';;
26 > + mips*)
27 > + return 'mips';;
28 > + sparc*)
29 > + return 'sparc';;
30 > + *)
31 > + return arch;
32 > + esac
33 > +}
34 > +
35 > freebsd_do_patches() {
36 > if [[ ${#PATCHES[@]} -gt 1 ]] ; then
37 > for x in "${PATCHES[@]}"; do
38 >
39 > Does anyone have any objections?
40 >

Attachments

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

Replies

Subject Author
Re: [gentoo-dev] Re: freebsd.eclass change Sergei Trofimovich <slyfox@g.o>