devel/qemu: Add support to build VDE if installed.

Check is the VDE development package is installed and if it is
enabled support.
This commit is contained in:
Chris Johns 2015-06-05 17:00:58 +10:00
parent 68f803861e
commit 18cea20a12

View File

@ -40,6 +40,12 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
mkdir -p ${build_dir}
cd ${build_dir}
%if %{pkgconfig check vdeplug}
VDE_CONFIG="--enable-vde"
VDE_CFLAGS="%{pkgconfig cflags vdeplug}"
VDE_LDFLAGS="%{pkgconfig ldflags vdeplug} %{pkgconfig libs vdeplug}"
%endif
%{host_build_flags}
if test "%{_build}" != "%{_host}" ; then
@ -48,18 +54,26 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
SYSROOT=$SB_TMPPREFIX
#
# The --extra-cflags and --extra-ldflags do not work as expected.
#
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" \
LDFLAGS="-Wl,-rpath -Wl,/$SB_PREFIX_CLEAN/lib ${VDE_LDFLAGS}" \
CFLAGS="${CFLAGS} ${VDE_CFLAGS}" \
../${source_dir_qemu}/configure \
--prefix=%{_prefix} \
${CROSS_PREFIX_OPTION} \
--make=%{__make} \
${VDE_CONFIG} \
--disable-werror \
--disable-tools \
--disable-pie \
--disable-vnc \
--disable-sdl \
--disable-gtk \
--disable-opengl \
--disable-netmap
%{_ld_library_path}=$SYSROOT/lib \