source: rtems-source-builder/source-builder/config/qemu-1-1.cfg @ 18cea20

4.104.114.95
Last change on this file since 18cea20 was 18cea20, checked in by Chris Johns <chrisj@…>, on 06/05/15 at 07:00:58

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

Check is the VDE development package is installed and if it is
enabled support.

  • Property mode set to 100644
File size: 1.9 KB
Line 
1#
2# QEMU 1.x.x Version 1.
3#
4# This configuration file configure's, make's and install's QEMU.
5#
6
7%if %{release} == %{nil}
8%define release 1
9%endif
10
11Name:      qemu-%{qemu_version}-%{_host}-%{release}
12Summary:   Qemu is a simulator of various processors.
13Version:   %{qemu_version}
14Release:   %{release}
15URL:       http://www.qemu.org/
16BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
17
18#
19# Source
20#
21%source set qemu http://wiki.qemu-project.org/download/qemu-%{qemu_version}.tar.bz2
22
23#
24# Prepare the source code.
25#
26%prep
27  build_top=$(pwd)
28
29  source_dir_qemu="qemu-%{qemu_version}"
30  %source setup qemu -q -n qemu-%{qemu_version}
31  %patch setup qemu -p1
32
33  cd ${build_top}
34
35%build
36  build_top=$(pwd)
37
38  %{build_directory}
39
40  mkdir -p ${build_dir}
41  cd ${build_dir}
42
43  %if %{pkgconfig check vdeplug}
44    VDE_CONFIG="--enable-vde"
45    VDE_CFLAGS="%{pkgconfig cflags vdeplug}"
46    VDE_LDFLAGS="%{pkgconfig ldflags vdeplug} %{pkgconfig libs vdeplug}"
47  %endif
48
49  %{host_build_flags}
50
51  if test "%{_build}" != "%{_host}" ; then
52    CROSS_PREFIX_OPTION="--cross-prefix=%{_host}-"
53  fi
54
55  SYSROOT=$SB_TMPPREFIX
56
57  #
58  # The --extra-cflags and --extra-ldflags do not work as expected.
59  #
60  PKG_CONFIG_PATH=$SYSROOT/lib/pkgconfig \
61  PKG_CONFIG_BUILD_TOP_DIR=$SB_TMPROOT \
62  %{_ld_library_path}=$SYSROOT/lib \
63  LDFLAGS="-Wl,-rpath -Wl,/$SB_PREFIX_CLEAN/lib ${VDE_LDFLAGS}" \
64  CFLAGS="${CFLAGS} ${VDE_CFLAGS}" \
65  ../${source_dir_qemu}/configure \
66    --prefix=%{_prefix} \
67    ${CROSS_PREFIX_OPTION} \
68    --make=%{__make} \
69    ${VDE_CONFIG} \
70    --disable-werror \
71    --disable-tools \
72    --disable-pie \
73    --disable-vnc \
74    --disable-sdl \
75    --disable-gtk \
76    --disable-opengl \
77    --disable-netmap
78
79  %{_ld_library_path}=$SYSROOT/lib \
80  %{__make} %{?_smp_mflags} all
81
82  cd ${build_top}
83
84%install
85  build_top=$(pwd)
86
87  %{__rmdir} $SB_BUILD_ROOT
88
89  cd ${build_dir}
90  %{_ld_library_path}=$SYSROOT/lib \
91  %{__make} DESTDIR=$SB_BUILD_ROOT install
92  cd ${build_top}
Note: See TracBrowser for help on using the repository browser.