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

4.11
Last change on this file since 773ab3f 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
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
11#
12# Select Snapshot Macro Maps
13#
14%select qemu-snapshot
15
16#
17# The description.
18#
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#
29%source set qemu http://wiki.qemu-project.org/download/qemu-%{qemu_version}.tar.bz2
30
31#
32# Prepare the source code.
33#
34%prep
35  build_top=$(pwd)
36
37  source_dir_qemu="qemu-%{qemu_version}"
38  %source setup qemu -q -n qemu-%{qemu_version}
39  %patch setup qemu -p1
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
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
57  %{host_build_flags}
58
59  if test "%{_build}" != "%{_host}" ; then
60    CROSS_PREFIX_OPTION="--cross-prefix=%{_host}-"
61  fi
62
63  SYSROOT=$SB_TMPPREFIX
64
65  #
66  # The --extra-cflags and --extra-ldflags do not work as expected.
67  #
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} \
73  PKG_CONFIG_PATH=$SYSROOT/lib/pkgconfig \
74  PKG_CONFIG_BUILD_TOP_DIR=$SB_TMPROOT \
75  %{_ld_library_path}=$SYSROOT/lib \
76  LDFLAGS="-Wl,-rpath -Wl,/$SB_PREFIX_CLEAN/lib ${VDE_LDFLAGS}" \
77  CFLAGS="${CFLAGS} ${VDE_CFLAGS}" \
78  ../${source_dir_qemu}/configure \
79    --prefix=%{_prefix} \
80    ${CROSS_PREFIX_OPTION} \
81    --make=%{__make} \
82    ${VDE_CONFIG} \
83    --disable-smartcard-nss \
84    --disable-werror \
85    --disable-tools \
86    --disable-pie \
87    --disable-vnc \
88    --disable-sdl \
89    --disable-gtk \
90    --disable-opengl \
91    --disable-netmap
92
93  %{_ld_library_path}=$SYSROOT/lib \
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}
104  %{_ld_library_path}=$SYSROOT/lib \
105  %{__make} DESTDIR=$SB_BUILD_ROOT install
106  cd ${build_top}
Note: See TracBrowser for help on using the repository browser.