Sun Jan 8 02:26:47 2017 UTC ()
Add support in qemu for native NetBSD curses(3)

curses_version() is ncurses specific function available only in ncurses and
used just in configure.

Bump revision to 1


(kamil)
diff -r1.161 -r1.162 pkgsrc/emulators/qemu/Makefile
diff -r1.119 -r1.120 pkgsrc/emulators/qemu/distinfo
diff -r1.15 -r1.16 pkgsrc/emulators/qemu/patches/patch-configure

cvs diff -r1.161 -r1.162 pkgsrc/emulators/qemu/Makefile (expand / switch to unified diff)

--- pkgsrc/emulators/qemu/Makefile 2017/01/01 14:43:38 1.161
+++ pkgsrc/emulators/qemu/Makefile 2017/01/08 02:26:47 1.162
@@ -1,32 +1,33 @@ @@ -1,32 +1,33 @@
1# $NetBSD: Makefile,v 1.161 2017/01/01 14:43:38 wiz Exp $ 1# $NetBSD: Makefile,v 1.162 2017/01/08 02:26:47 kamil Exp $
2 2
3DISTNAME= qemu-2.8.0 3DISTNAME= qemu-2.8.0
 4PKGREVISION= 1
4CATEGORIES= emulators 5CATEGORIES= emulators
5MASTER_SITES= http://wiki.qemu.org/download/ 6MASTER_SITES= http://wiki.qemu.org/download/
6EXTRACT_SUFX= .tar.bz2 7EXTRACT_SUFX= .tar.bz2
7 8
8MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
9HOMEPAGE= http://www.qemu.org/ 10HOMEPAGE= http://www.qemu.org/
10COMMENT= CPU emulator using dynamic translation 11COMMENT= CPU emulator using dynamic translation
11LICENSE= gnu-gpl-v2 AND gnu-lgpl-v2.1 AND mit AND modified-bsd 12LICENSE= gnu-gpl-v2 AND gnu-lgpl-v2.1 AND mit AND modified-bsd
12 13
13CONFLICTS+= qemu-bin-[0-9]* 14CONFLICTS+= qemu-bin-[0-9]*
14NOT_FOR_PLATFORM+= NetBSD-1.[0-6]*-* 15NOT_FOR_PLATFORM+= NetBSD-1.[0-6]*-*
15# qemu 1 does not work on NetBSD-5; see http://gnats.netbsd.org/46565. 16# qemu 1 does not work on NetBSD-5; see http://gnats.netbsd.org/46565.
16NOT_FOR_PLATFORM+= NetBSD-5*-* 17NOT_FOR_PLATFORM+= NetBSD-5*-*
17 18
18USE_TOOLS+= bison gmake makeinfo perl:build pkg-config 19USE_TOOLS+= bison gmake makeinfo perl:build pkg-config
19USE_NCURSES= yes # requires resize_term() 20FAKE_NCURSES= yes
20UNLIMIT_RESOURCES= datasize 21UNLIMIT_RESOURCES= datasize
21HAS_CONFIGURE= yes 22HAS_CONFIGURE= yes
22 23
23BUILD_DEPENDS+= texi2html-[0-9]*:../../textproc/texi2html 24BUILD_DEPENDS+= texi2html-[0-9]*:../../textproc/texi2html
24 25
25SUBST_CLASSES+= prefix 26SUBST_CLASSES+= prefix
26SUBST_STAGE.prefix= pre-configure 27SUBST_STAGE.prefix= pre-configure
27SUBST_MESSAGE.prefix= Setting PREFIX 28SUBST_MESSAGE.prefix= Setting PREFIX
28SUBST_FILES.prefix+= configure 29SUBST_FILES.prefix+= configure
29SUBST_VARS.prefix+= PREFIX 30SUBST_VARS.prefix+= PREFIX
30 31
31.include "options.mk" 32.include "options.mk"
32 33
@@ -125,20 +126,20 @@ PLIST_VARS+= ${UE_ARCHS} nbd ivshmem @@ -125,20 +126,20 @@ PLIST_VARS+= ${UE_ARCHS} nbd ivshmem
125.for _var_ in ${USER_EMUL} 126.for _var_ in ${USER_EMUL}
126PLIST.${_var_}= YES 127PLIST.${_var_}= YES
127.endfor 128.endfor
128 129
129post-install: 130post-install:
130 ${INSTALL_DATA} ${FILESDIR}/Makefile.multinode-NetBSD \ 131 ${INSTALL_DATA} ${FILESDIR}/Makefile.multinode-NetBSD \
131 ${DESTDIR}${PREFIX}/share/doc/qemu/ 132 ${DESTDIR}${PREFIX}/share/doc/qemu/
132 133
133# On Darwin, qemu uses Cocoa and CoreAudio 134# On Darwin, qemu uses Cocoa and CoreAudio
134.if empty(OPSYS:MDarwin) 135.if empty(OPSYS:MDarwin)
135.include "../../mk/oss.buildlink3.mk" 136.include "../../mk/oss.buildlink3.mk"
136.endif 137.endif
137.include "../../devel/glib2/buildlink3.mk" 138.include "../../devel/glib2/buildlink3.mk"
138.include "../../devel/ncursesw/buildlink3.mk" 
139.include "../../devel/zlib/buildlink3.mk" 139.include "../../devel/zlib/buildlink3.mk"
140.include "../../lang/python/extension.mk" 140.include "../../lang/python/extension.mk"
141.include "../../security/libgcrypt/buildlink3.mk" 141.include "../../security/libgcrypt/buildlink3.mk"
142.include "../../x11/pixman/buildlink3.mk" 142.include "../../x11/pixman/buildlink3.mk"
 143.include "../../mk/curses.buildlink3.mk"
143.include "../../mk/pthread.buildlink3.mk" 144.include "../../mk/pthread.buildlink3.mk"
144.include "../../mk/bsd.pkg.mk" 145.include "../../mk/bsd.pkg.mk"

cvs diff -r1.119 -r1.120 pkgsrc/emulators/qemu/distinfo (expand / switch to unified diff)

--- pkgsrc/emulators/qemu/distinfo 2016/12/30 10:00:16 1.119
+++ pkgsrc/emulators/qemu/distinfo 2017/01/08 02:26:47 1.120
@@ -1,21 +1,21 @@ @@ -1,21 +1,21 @@
1$NetBSD: distinfo,v 1.119 2016/12/30 10:00:16 ryoon Exp $ 1$NetBSD: distinfo,v 1.120 2017/01/08 02:26:47 kamil Exp $
2 2
3SHA1 (qemu-2.8.0.tar.bz2) = a5602f2ddb51d61b4c0e618b779fdb0dbdc9cc1f 3SHA1 (qemu-2.8.0.tar.bz2) = a5602f2ddb51d61b4c0e618b779fdb0dbdc9cc1f
4RMD160 (qemu-2.8.0.tar.bz2) = da1e640443a15f36a242fe803c65a39f85b06fcc 4RMD160 (qemu-2.8.0.tar.bz2) = da1e640443a15f36a242fe803c65a39f85b06fcc
5SHA512 (qemu-2.8.0.tar.bz2) = 50f2988d822388ba9fd1bf5dbe68359033ed7432d7f0f9790299f32f63faa6dc72979256b5632ba572d47ee3e74ed40e3e8e331dc6303ec1599f1b4367cb78c2 5SHA512 (qemu-2.8.0.tar.bz2) = 50f2988d822388ba9fd1bf5dbe68359033ed7432d7f0f9790299f32f63faa6dc72979256b5632ba572d47ee3e74ed40e3e8e331dc6303ec1599f1b4367cb78c2
6Size (qemu-2.8.0.tar.bz2) = 28368517 bytes 6Size (qemu-2.8.0.tar.bz2) = 28368517 bytes
7SHA1 (patch-Makefile.objs) = f40deeed5482a24369e898411bb611be418dc3ca 7SHA1 (patch-Makefile.objs) = f40deeed5482a24369e898411bb611be418dc3ca
8SHA1 (patch-configure) = dba5399fb674f0848111c3fecb65462a6829444a 8SHA1 (patch-configure) = 5c2911c1375a2f8916f84f68d4ba9a799b7624cb
9SHA1 (patch-default-configs_pci.mak) = 2162550a68de514c8fe9e255df88f8a0a07ee6c7 9SHA1 (patch-default-configs_pci.mak) = 2162550a68de514c8fe9e255df88f8a0a07ee6c7
10SHA1 (patch-ef) = 98a1de2fd48638886b5d16f6a61dc72910e98b41 10SHA1 (patch-ef) = 98a1de2fd48638886b5d16f6a61dc72910e98b41
11SHA1 (patch-et) = e9b850ac5985cbe934b541acbfdb330cce421d50 11SHA1 (patch-et) = e9b850ac5985cbe934b541acbfdb330cce421d50
12SHA1 (patch-hw_display_omap__dss.c) = 6b13242f28e32346bc70548c216c578d98fd3420 12SHA1 (patch-hw_display_omap__dss.c) = 6b13242f28e32346bc70548c216c578d98fd3420
13SHA1 (patch-hw_misc_ivshmem.c) = c1fdc8111286f2c760512189db4a854bfc6129d0 13SHA1 (patch-hw_misc_ivshmem.c) = c1fdc8111286f2c760512189db4a854bfc6129d0
14SHA1 (patch-hw_net_etraxfs__eth.c) = e5dd1661d60dbcd27b332403e0843500ba9544bc 14SHA1 (patch-hw_net_etraxfs__eth.c) = e5dd1661d60dbcd27b332403e0843500ba9544bc
15SHA1 (patch-hw_net_xilinx__axienet.c) = ebcd2676d64ce6f31e4a8c976d4fdf530ad5e8b7 15SHA1 (patch-hw_net_xilinx__axienet.c) = ebcd2676d64ce6f31e4a8c976d4fdf530ad5e8b7
16SHA1 (patch-hw_ppc_mac__newworld.c) = 5131bb6edf8b0acf6e7ed3b6bc7be962dc71eca6 16SHA1 (patch-hw_ppc_mac__newworld.c) = 5131bb6edf8b0acf6e7ed3b6bc7be962dc71eca6
17SHA1 (patch-hw_ppc_mac__oldworld.c) = b71667ab281dc23c9d971dc8754eeefc879bd1d7 17SHA1 (patch-hw_ppc_mac__oldworld.c) = b71667ab281dc23c9d971dc8754eeefc879bd1d7
18SHA1 (patch-memory.c) = 9f94de7799ef80931fb1de572e5603894f3fb328 18SHA1 (patch-memory.c) = 9f94de7799ef80931fb1de572e5603894f3fb328
19SHA1 (patch-scripts_qemu-binfmt-conf.sh) = a59c227e5891efe201eb2b8af15fb0832a1b20d0 19SHA1 (patch-scripts_qemu-binfmt-conf.sh) = a59c227e5891efe201eb2b8af15fb0832a1b20d0
20SHA1 (patch-slirp_tcp__subr.c) = f011c9dc58282e61b26017547a9884f30a6e6154 20SHA1 (patch-slirp_tcp__subr.c) = f011c9dc58282e61b26017547a9884f30a6e6154
21SHA1 (patch-tests_Makefile.include) = 42345d697cb2e324dccf1d68bd8d61e8001c6162 21SHA1 (patch-tests_Makefile.include) = 42345d697cb2e324dccf1d68bd8d61e8001c6162

cvs diff -r1.15 -r1.16 pkgsrc/emulators/qemu/patches/Attic/patch-configure (expand / switch to unified diff)

--- pkgsrc/emulators/qemu/patches/Attic/patch-configure 2016/12/30 10:00:16 1.15
+++ pkgsrc/emulators/qemu/patches/Attic/patch-configure 2017/01/08 02:26:47 1.16
@@ -1,41 +1,57 @@ @@ -1,41 +1,57 @@
1$NetBSD: patch-configure,v 1.15 2016/12/30 10:00:16 ryoon Exp $ 1$NetBSD: patch-configure,v 1.16 2017/01/08 02:26:47 kamil Exp $
2 2
3Don't use gld on SunOS 3Don't use gld on SunOS
4add check for shm_open 4add check for shm_open
5avoid bad substitution 5avoid bad substitution
6 6
7--- configure.orig 2016-12-20 20:16:44.000000000 +0000 7--- configure.orig 2016-12-20 20:16:44.000000000 +0000
8+++ configure 8+++ configure
9@@ -631,7 +631,6 @@ SunOS) 9@@ -631,7 +631,6 @@ SunOS)
10 solaris="yes" 10 solaris="yes"
11 make="${MAKE-gmake}" 11 make="${MAKE-gmake}"
12 install="${INSTALL-ginstall}" 12 install="${INSTALL-ginstall}"
13- ld="gld" 13- ld="gld"
14 smbd="${SMBD-/usr/sfw/sbin/smbd}" 14 smbd="${SMBD-/usr/sfw/sbin/smbd}"
15 needs_libsunmath="no" 15 needs_libsunmath="no"
16 solarisrev=$(uname -r | cut -f2 -d.) 16 solarisrev=$(uname -r | cut -f2 -d.)
17@@ -2928,8 +2927,8 @@ if test "$curses" != "no" ; then 17@@ -2928,8 +2927,8 @@ if test "$curses" != "no" ; then
18 curses_inc_list="$($pkg_config --cflags ncurses 2>/dev/null):" 18 curses_inc_list="$($pkg_config --cflags ncurses 2>/dev/null):"
19 curses_lib_list="$($pkg_config --libs ncurses 2>/dev/null):-lpdcurses" 19 curses_lib_list="$($pkg_config --libs ncurses 2>/dev/null):-lpdcurses"
20 else 20 else
21- curses_inc_list="$($pkg_config --cflags ncursesw 2>/dev/null):-I/usr/include/ncursesw:" 21- curses_inc_list="$($pkg_config --cflags ncursesw 2>/dev/null):-I/usr/include/ncursesw:"
22- curses_lib_list="$($pkg_config --libs ncursesw 2>/dev/null):-lncursesw:-lcursesw" 22- curses_lib_list="$($pkg_config --libs ncursesw 2>/dev/null):-lncursesw:-lcursesw"
23+ curses_inc_list="$(@PREFIX@/bin/ncursesw6-config --cflags 2>/dev/null):-I/usr/include/ncursesw:" 23+ curses_inc_list="$(@PREFIX@/bin/ncursesw6-config --cflags 2>/dev/null):-I/usr/include/ncursesw:"
24+ curses_lib_list="$(@PREFIX@/bin/ncursesw6-config --libs 2>/dev/null):-lncursesw:-lcursesw" 24+ curses_lib_list="$(@PREFIX@/bin/ncursesw6-config --libs 2>/dev/null):-lncursesw:-lcursesw"
25 fi 25 fi
26 curses_found=no 26 curses_found=no
27 cat > $TMPC << EOF 27 cat > $TMPC << EOF
28@@ -3762,6 +3761,27 @@ if compile_prog "" "" ; then 28@@ -2937,14 +2936,13 @@ if test "$curses" != "no" ; then
 29 #include <curses.h>
 30 #include <wchar.h>
 31 int main(void) {
 32- const char *s = curses_version();
 33 wchar_t wch = L'w';
 34 setlocale(LC_ALL, "");
 35 resize_term(0, 0);
 36 addwstr(L"wide chars\n");
 37 addnwstr(&wch, 1);
 38 add_wch(WACS_DEGREE);
 39- return s != 0;
 40+ return 0;
 41 }
 42 EOF
 43 IFS=:
 44@@ -3762,6 +3760,27 @@ if compile_prog "" "" ; then
29 fallocate_zero_range=yes 45 fallocate_zero_range=yes
30 fi 46 fi
31  47
32+# check for shm_open 48+# check for shm_open
33+shm_open=no 49+shm_open=no
34+cat > $TMPC << EOF 50+cat > $TMPC << EOF
35+#include <sys/types.h> 51+#include <sys/types.h>
36+#include <sys/mman.h> 52+#include <sys/mman.h>
37+#include <fcntl.h> 53+#include <fcntl.h>
38+#include <stddef.h> // for NULL 54+#include <stddef.h> // for NULL
39+ 55+
40+int main(void) 56+int main(void)
41+{ 57+{
@@ -43,48 +59,48 @@ avoid bad substitution @@ -43,48 +59,48 @@ avoid bad substitution
43+ return 0; 59+ return 0;
44+} 60+}
45+EOF 61+EOF
46+if compile_prog "" "" ; then 62+if compile_prog "" "" ; then
47+ shm_open=yes 63+ shm_open=yes
48+elif compile_prog "" "-lrt" ; then 64+elif compile_prog "" "-lrt" ; then
49+ LIBS="$LIBS -lrt" 65+ LIBS="$LIBS -lrt"
50+ shm_open=yes 66+ shm_open=yes
51+fi 67+fi
52+ 68+
53 # check for posix_fallocate 69 # check for posix_fallocate
54 posix_fallocate=no 70 posix_fallocate=no
55 cat > $TMPC << EOF 71 cat > $TMPC << EOF
56@@ -4041,8 +4061,13 @@ fi 72@@ -4041,8 +4060,13 @@ fi
57 cat > $TMPC <<EOF 73 cat > $TMPC <<EOF
58 #include <signal.h> 74 #include <signal.h>
59 #include <time.h> 75 #include <time.h>
60+#include <sys/types.h> 76+#include <sys/types.h>
61+#include <sys/mman.h> 77+#include <sys/mman.h>
62+#include <fcntl.h> 78+#include <fcntl.h>
63+ 79+
64 int main(void) { 80 int main(void) {
65 timer_create(CLOCK_REALTIME, NULL, NULL); 81 timer_create(CLOCK_REALTIME, NULL, NULL);
66+ shm_open(NULL, O_RDWR, 0644); 82+ shm_open(NULL, O_RDWR, 0644);
67 return clock_gettime(CLOCK_REALTIME, NULL); 83 return clock_gettime(CLOCK_REALTIME, NULL);
68 } 84 }
69 EOF 85 EOF
70@@ -4797,7 +4822,9 @@ if test "$want_tools" = "yes" ; then 86@@ -4797,7 +4821,9 @@ if test "$want_tools" = "yes" ; then
71 tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools" 87 tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
72 if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then 88 if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
73 tools="qemu-nbd\$(EXESUF) $tools" 89 tools="qemu-nbd\$(EXESUF) $tools"
74- tools="ivshmem-client\$(EXESUF) ivshmem-server\$(EXESUF) $tools" 90- tools="ivshmem-client\$(EXESUF) ivshmem-server\$(EXESUF) $tools"
75+ if test "$shm_open" = "yes" ; then 91+ if test "$shm_open" = "yes" ; then
76+ tools="ivshmem-client\$(EXESUF) ivshmem-server\$(EXESUF) $tools" 92+ tools="ivshmem-client\$(EXESUF) ivshmem-server\$(EXESUF) $tools"
77+ fi 93+ fi
78 fi 94 fi
79 fi 95 fi
80 if test "$softmmu" = yes ; then 96 if test "$softmmu" = yes ; then
81@@ -5303,6 +5330,9 @@ fi 97@@ -5303,6 +5329,9 @@ fi
82 if test "$fallocate_zero_range" = "yes" ; then 98 if test "$fallocate_zero_range" = "yes" ; then
83 echo "CONFIG_FALLOCATE_ZERO_RANGE=y" >> $config_host_mak 99 echo "CONFIG_FALLOCATE_ZERO_RANGE=y" >> $config_host_mak
84 fi 100 fi
85+if [ "$shm_open" = "yes" ] ; then 101+if [ "$shm_open" = "yes" ] ; then
86+ echo "CONFIG_SHM_OPEN=y" >> $config_host_mak 102+ echo "CONFIG_SHM_OPEN=y" >> $config_host_mak
87+fi 103+fi
88 if test "$posix_fallocate" = "yes" ; then 104 if test "$posix_fallocate" = "yes" ; then
89 echo "CONFIG_POSIX_FALLOCATE=y" >> $config_host_mak 105 echo "CONFIG_POSIX_FALLOCATE=y" >> $config_host_mak
90 fi 106 fi