Lines 29-35
Link Here
|
29 |
gnutls? ( net-libs/gnutls ) |
29 |
gnutls? ( net-libs/gnutls ) |
30 |
alsa? ( media-libs/alsa-lib )" |
30 |
alsa? ( media-libs/alsa-lib )" |
31 |
|
31 |
|
32 |
S="${WORKDIR}/${P/-softmmu/}" |
32 |
S=${WORKDIR}/${P/-softmmu/} |
33 |
|
33 |
|
34 |
pkg_setup() { |
34 |
pkg_setup() { |
35 |
if [ "$(gcc-major-version)" == "4" ]; then |
35 |
if [ "$(gcc-major-version)" == "4" ]; then |
Lines 61-68
Link Here
|
61 |
} |
61 |
} |
62 |
|
62 |
|
63 |
src_compile() { |
63 |
src_compile() { |
64 |
#Let the application set its cflags |
64 |
if use x86 ; then |
65 |
unset CFLAGS |
65 |
# Force -march=pentium-mmx or lower. Fixes bug #212351. |
|
|
66 |
local march |
67 |
march=$(echo "${CFLAGS}" | sed 's:^.*-march=\([[:alnum:]-]\+\)\([[:blank:]].*\)\?$:\1:p;d') |
68 |
case ${march} in |
69 |
i386|i486|i586|pentium) ;; |
70 |
*) # Either march is not enough low or not exists at all |
71 |
case ${CHOST} in |
72 |
i486-*-*) march=i486 ;; |
73 |
i586-*-*) march=i586 ;; |
74 |
*) march=pentium-mmx ;; |
75 |
esac ;; |
76 |
esac |
77 |
#Let the application set its cflags |
78 |
unset CFLAGS |
79 |
append-flags -march=${march} |
80 |
else |
81 |
#Let the application set its cflags |
82 |
unset CFLAGS |
83 |
fi |
66 |
|
84 |
|
67 |
# Switch off hardened tech |
85 |
# Switch off hardened tech |
68 |
filter-flags -fpie -fstack-protector |
86 |
filter-flags -fpie -fstack-protector |
Lines 80-85
Link Here
|
80 |
if ! use sdl ; then |
98 |
if ! use sdl ; then |
81 |
myconf="$myconf --disable-sdl --disable-gfx-check" |
99 |
myconf="$myconf --disable-sdl --disable-gfx-check" |
82 |
fi |
100 |
fi |
|
|
101 |
# econf does not work |
83 |
./configure \ |
102 |
./configure \ |
84 |
--prefix=/usr \ |
103 |
--prefix=/usr \ |
85 |
--enable-adlib \ |
104 |
--enable-adlib \ |
Lines 90-100
Link Here
|
90 |
${myconf} \ |
109 |
${myconf} \ |
91 |
|| die "could not configure" |
110 |
|| die "could not configure" |
92 |
|
111 |
|
93 |
emake || die "make failed" |
112 |
emake OS_CFLAGS="${CFLAGS}" || die "make failed" |
94 |
} |
113 |
} |
95 |
|
114 |
|
96 |
src_install() { |
115 |
src_install() { |
97 |
make install \ |
116 |
emake install \ |
98 |
prefix="${D}/usr" \ |
117 |
prefix="${D}/usr" \ |
99 |
bindir="${D}/usr/bin" \ |
118 |
bindir="${D}/usr/bin" \ |
100 |
datadir="${D}/usr/share/qemu" \ |
119 |
datadir="${D}/usr/share/qemu" \ |