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

4.11
Last change on this file since c434884 was c434884, checked in by Chris Johns <chrisj@…>, on 09/21/15 at 23:01:28

Fix pkgconfig for MSYS to allow QEMU to build.

  • Property mode set to 100644
File size: 2.3 KB
RevLine 
[56e8d80]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
[eddfda5]11#
12# Select Snapshot Macro Maps
13#
14%select qemu-snapshot
15
16#
17# The description.
18#
[56e8d80]19Name:      qemu-%{qemu_version}-%{_host}-%{release}
20Summary:   Qemu is a simulator of various processors.
21Version:   %{qemu_version}
22Release:   %{release}
23URL:       http://www.qemu.org/
24BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
25
26#
27# Source
28#
[9a15c40]29%source set qemu http://wiki.qemu-project.org/download/qemu-%{qemu_version}.tar.bz2
[56e8d80]30
31#
32# Prepare the source code.
33#
34%prep
35  build_top=$(pwd)
36
[9a15c40]37  source_dir_qemu="qemu-%{qemu_version}"
38  %source setup qemu -q -n qemu-%{qemu_version}
39  %patch setup qemu -p1
[56e8d80]40
41  cd ${build_top}
42
43%build
44  build_top=$(pwd)
45
46  %{build_directory}
47
48  mkdir -p ${build_dir}
49  cd ${build_dir}
50
[18cea20]51  %if %{pkgconfig check vdeplug}
52    VDE_CONFIG="--enable-vde"
53    VDE_CFLAGS="%{pkgconfig cflags vdeplug}"
54    VDE_LDFLAGS="%{pkgconfig ldflags vdeplug} %{pkgconfig libs vdeplug}"
55  %endif
56
[56e8d80]57  %{host_build_flags}
58
[f3b5490]59  if test "%{_build}" != "%{_host}" ; then
60    CROSS_PREFIX_OPTION="--cross-prefix=%{_host}-"
61  fi
62
[56e8d80]63  SYSROOT=$SB_TMPPREFIX
64
[18cea20]65  #
66  # The --extra-cflags and --extra-ldflags do not work as expected.
67  #
[c434884]68  # Hack warning: MSYS2 does not seem to convert the path to
69  #               a shell path from Windows so we keep them
70  #               separate and handle it in the pkgconfig tool.
71  #
72  PKG_CONFIG_DEFAULT_PATH=${PKG_CONFIG_PATH} \
[f3b5490]73  PKG_CONFIG_PATH=$SYSROOT/lib/pkgconfig \
[f27f7c4]74  PKG_CONFIG_BUILD_TOP_DIR=$SB_TMPROOT \
[56e8d80]75  %{_ld_library_path}=$SYSROOT/lib \
[18cea20]76  LDFLAGS="-Wl,-rpath -Wl,/$SB_PREFIX_CLEAN/lib ${VDE_LDFLAGS}" \
77  CFLAGS="${CFLAGS} ${VDE_CFLAGS}" \
[9a15c40]78  ../${source_dir_qemu}/configure \
[56e8d80]79    --prefix=%{_prefix} \
[f3b5490]80    ${CROSS_PREFIX_OPTION} \
81    --make=%{__make} \
[18cea20]82    ${VDE_CONFIG} \
[436ec88]83    --disable-smartcard-nss \
[7c04790]84    --disable-werror \
[56e8d80]85    --disable-tools \
86    --disable-pie \
[f27f7c4]87    --disable-vnc \
[18cea20]88    --disable-sdl \
89    --disable-gtk \
90    --disable-opengl \
[f27f7c4]91    --disable-netmap
[56e8d80]92
[d9e3dae]93  %{_ld_library_path}=$SYSROOT/lib \
[56e8d80]94  %{__make} %{?_smp_mflags} all
95
96  cd ${build_top}
97
98%install
99  build_top=$(pwd)
100
101  %{__rmdir} $SB_BUILD_ROOT
102
103  cd ${build_dir}
[cf9d27e]104  %{_ld_library_path}=$SYSROOT/lib \
[56e8d80]105  %{__make} DESTDIR=$SB_BUILD_ROOT install
106  cd ${build_top}
Note: See TracBrowser for help on using the repository browser.