Matt Carberry cf9d27ee38 Fixes qemu build error.
Since 1.5 qemu defaults to gtk. Since then, the install command triggers
the use of xgettext and msgmerge, both of which are unable to find the
libgettextsrc library without passing LD_LIBRARY_PATH.
2014-09-08 08:49:03 +10:00

79 lines
1.5 KiB
INI

#
# QEMU 1.x.x Version 1.
#
# This configuration file configure's, make's and install's QEMU.
#
%if %{release} == %{nil}
%define release 1
%endif
Name: qemu-%{qemu_version}-%{_host}-%{release}
Summary: Qemu is a simulator of various processors.
Version: %{qemu_version}
Release: %{release}
URL: http://www.qemu.org/
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source
#
%source set qemu http://wiki.qemu-project.org/download/qemu-%{qemu_version}.tar.bz2
#
# Prepare the source code.
#
%prep
build_top=$(pwd)
source_dir_qemu="qemu-%{qemu_version}"
%source setup qemu -q -n qemu-%{qemu_version}
%patch setup qemu -p1
cd ${build_top}
%build
build_top=$(pwd)
%{build_directory}
mkdir -p ${build_dir}
cd ${build_dir}
%{host_build_flags}
if test "%{_build}" != "%{_host}" ; then
CROSS_PREFIX_OPTION="--cross-prefix=%{_host}-"
fi
SYSROOT=$SB_TMPPREFIX
PKG_CONFIG_PATH=$SYSROOT/lib/pkgconfig \
PKG_CONFIG_BUILD_TOP_DIR=$SB_TMPROOT \
%{_ld_library_path}=$SYSROOT/lib \
LDFLAGS="-Wl,-rpath -Wl,/$SB_PREFIX_CLEAN/lib" \
../${source_dir_qemu}/configure \
--prefix=%{_prefix} \
${CROSS_PREFIX_OPTION} \
--make=%{__make} \
--disable-werror \
--disable-tools \
--disable-pie \
--disable-vnc \
--disable-netmap
%{_ld_library_path}=$SYSROOT/lib \
%{__make} %{?_smp_mflags} all
cd ${build_top}
%install
build_top=$(pwd)
%{__rmdir} $SB_BUILD_ROOT
cd ${build_dir}
%{_ld_library_path}=$SYSROOT/lib \
%{__make} DESTDIR=$SB_BUILD_ROOT install
cd ${build_top}