emulators/qemu: Unbreak in 11+ [1]

- Fix ncurses build uses to use base version and remove from CONFIGURE_ARGS
  for OPTIONS usage [2]

PR:		212057 [1] 211973 [2]
Submitted by:	mat [1]	ilavsky.martin@gmail.com [2]
This commit is contained in:
Muhammad Moinur Rahman 2016-08-27 17:15:50 +00:00
parent 181deb7458
commit 49298d0d19
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=420986
2 changed files with 31 additions and 2 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= qemu
PORTVERSION= 2.6.1
PORTREVISION= 1
CATEGORIES= emulators
MASTER_SITES= http://wiki.qemu.org/download/
DIST_SUBDIR= qemu/${PORTVERSION}
@ -61,7 +62,7 @@ PCAP_EXTRA_PATCHES= ${FILESDIR}/pcap-patch ${FILESDIR}/pcap-patch-net_net.c
STATIC_LINK_CONFIGURE_ON= --static
STATIC_LINK_PREVENTS= GTK2 X11
STATIC_LINK_PREVENTS_MSG= X11 ui cannot be built static
NCURSES_USES= ncurses
NCURSES_USES= ncurses:base
SAMBA_RUN_DEPENDS= ${LOCALBASE}/sbin/smbd:net/samba36
DOCS_BUILD_DEPENDS= texi2html:textproc/texi2html
DOCS_USES= makeinfo
@ -72,7 +73,7 @@ PORTDOCS= docs qemu-doc.html qemu-tech.html qmp-commands.txt
WITHOUT_CPU_CFLAGS=yes #to avoid problems with register allocation
CFLAGS:= ${CFLAGS:C/-fno-tree-vrp//}
CONFIGURE_ARGS+=--localstatedir=/var --extra-ldflags=-L\"${LOCALBASE}/lib\" \
--disable-libssh2 --enable-debug --enable-curses \
--disable-libssh2 --enable-debug \
--prefix=${PREFIX} --cc=${CC} --enable-docs --disable-kvm \
--disable-linux-user --disable-linux-aio --disable-xen \
--smbd=${LOCALBASE}/sbin/smbd --enable-debug-info --python=${PYTHON_CMD} \

View File

@ -0,0 +1,28 @@
--- include/qemu/atomic.h.orig 2016-06-02 18:20:47 UTC
+++ include/qemu/atomic.h
@@ -136,10 +136,12 @@
/* Provide shorter names for GCC atomic builtins, return old value */
#define atomic_fetch_inc(ptr) __atomic_fetch_add(ptr, 1, __ATOMIC_SEQ_CST)
#define atomic_fetch_dec(ptr) __atomic_fetch_sub(ptr, 1, __ATOMIC_SEQ_CST)
+#ifndef __cplusplus
#define atomic_fetch_add(ptr, n) __atomic_fetch_add(ptr, n, __ATOMIC_SEQ_CST)
#define atomic_fetch_sub(ptr, n) __atomic_fetch_sub(ptr, n, __ATOMIC_SEQ_CST)
#define atomic_fetch_and(ptr, n) __atomic_fetch_and(ptr, n, __ATOMIC_SEQ_CST)
#define atomic_fetch_or(ptr, n) __atomic_fetch_or(ptr, n, __ATOMIC_SEQ_CST)
+#endif
/* And even shorter names that return void. */
#define atomic_inc(ptr) ((void) __atomic_fetch_add(ptr, 1, __ATOMIC_SEQ_CST))
@@ -330,10 +332,12 @@
/* Provide shorter names for GCC atomic builtins. */
#define atomic_fetch_inc(ptr) __sync_fetch_and_add(ptr, 1)
#define atomic_fetch_dec(ptr) __sync_fetch_and_add(ptr, -1)
+#ifndef __cplusplus
#define atomic_fetch_add __sync_fetch_and_add
#define atomic_fetch_sub __sync_fetch_and_sub
#define atomic_fetch_and __sync_fetch_and_and
#define atomic_fetch_or __sync_fetch_and_or
+#endif
#define atomic_cmpxchg __sync_val_compare_and_swap
/* And even shorter names that return void. */