qemu: Fix building. Add patch to disable code that removed in recent mingw-w64.
This commit is contained in:
18
mingw-w64-qemu/001-time-functions.patch
Normal file
18
mingw-w64-qemu/001-time-functions.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
--- qemu-2.1.2/include/sysemu/os-win32.h.orig 2014-10-28 10:55:39.691000000 +0300
|
||||
+++ qemu-2.1.2/include/sysemu/os-win32.h 2014-10-28 10:56:00.439000000 +0300
|
||||
@@ -75,6 +75,7 @@
|
||||
/* Declaration of ffs() is missing in MinGW's strings.h. */
|
||||
int ffs(int i);
|
||||
|
||||
+#ifndef __MINGW64_VERSION_MAJOR
|
||||
/* Missing POSIX functions. Don't use MinGW-w64 macros. */
|
||||
#undef gmtime_r
|
||||
struct tm *gmtime_r(const time_t *timep, struct tm *result);
|
||||
@@ -82,6 +83,7 @@
|
||||
struct tm *localtime_r(const time_t *timep, struct tm *result);
|
||||
|
||||
char *strtok_r(char *str, const char *delim, char **saveptr);
|
||||
+#endif
|
||||
|
||||
static inline void os_setup_signal_handling(void) {}
|
||||
static inline void os_daemonize(void) {}
|
||||
@@ -11,18 +11,30 @@ arch=('any')
|
||||
license=('GPL2' 'LGPL2')
|
||||
url="http://qemu.org"
|
||||
makedepends=('perl' 'python2' 'bison')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-libjpeg" "${MINGW_PACKAGE_PREFIX}-libpng" "${MINGW_PACKAGE_PREFIX}-libssh2"
|
||||
"${MINGW_PACKAGE_PREFIX}-SDL2" "${MINGW_PACKAGE_PREFIX}-curl" "${MINGW_PACKAGE_PREFIX}-openssl")
|
||||
source=(http://wiki.qemu.org/download/${_realname}-${pkgver}.tar.bz2)
|
||||
md5sums=('SKIP')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-curl"
|
||||
"${MINGW_PACKAGE_PREFIX}-libjpeg"
|
||||
"${MINGW_PACKAGE_PREFIX}-libpng"
|
||||
"${MINGW_PACKAGE_PREFIX}-libssh2"
|
||||
#"${MINGW_PACKAGE_PREFIX}-libusb"
|
||||
"${MINGW_PACKAGE_PREFIX}-lzo2"
|
||||
"${MINGW_PACKAGE_PREFIX}-openssl"
|
||||
"${MINGW_PACKAGE_PREFIX}-snappy"
|
||||
"${MINGW_PACKAGE_PREFIX}-SDL2")
|
||||
source=(http://wiki.qemu.org/download/${_realname}-${pkgver}.tar.bz2
|
||||
001-time-functions.patch)
|
||||
md5sums=('0ff197c4ed4b695620bc4734e77c888f'
|
||||
'455e088562ac76945feb9252baa1a9fd')
|
||||
options=('!strip' 'debug')
|
||||
|
||||
_pkgfqn="${_realname}-${pkgver}"
|
||||
noextract=(${_pkgfqn}.tar.bz2)
|
||||
prepare() {
|
||||
cd $startdir/
|
||||
cd $startdir/
|
||||
[ -d ${srcdir}/${_pkgfqn} ] && rm -rf ${srcdir}/${_pkgfqn}
|
||||
tar -xjf ${startdir}/${_pkgfqn}.tar.bz2 -C $srcdir || true
|
||||
|
||||
cd ${srcdir}/${_pkgfqn}
|
||||
patch -p1 -i ${srcdir}/001-time-functions.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
@@ -41,17 +53,22 @@ build() {
|
||||
${srcdir}/${_realname}-${pkgver}/configure \
|
||||
--prefix=${MINGW_PREFIX} \
|
||||
--host-cc=$CC \
|
||||
--python=/usr/bin/python2 \
|
||||
--python=${MINGW_PREFIX}/bin/python2 \
|
||||
--datadir=${MINGW_PREFIX}/etc/qemu \
|
||||
--mandir=${MINGW_PREFIX}/share/qemu \
|
||||
--bindir=${MINGW_PREFIX}/bin \
|
||||
--libdir=${MINGW_PREFIX}/lib \
|
||||
--sysconfdir=${MINGW_PREFIX}/etc/qemu \
|
||||
--enable-libssh2 \
|
||||
--enable-lzo \
|
||||
--enable-snappy \
|
||||
--disable-docs \
|
||||
--disable-gtk \
|
||||
--disable-xen \
|
||||
--enable-libssh2 \
|
||||
--disable-smartcard-nss \
|
||||
--disable-vnc-sasl \
|
||||
--disable-kvm \
|
||||
--disable-libusb \
|
||||
--disable-bluez \
|
||||
--disable-spice \
|
||||
--target-list=x86_64-softmmu,arm-softmmu,i386-softmmu \
|
||||
|
||||
Reference in New Issue
Block a user