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 1diff -r1.161 -r1.162 pkgsrc/emulators/qemu/Makefile
(kamil)
@@ -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 | |||
3 | DISTNAME= qemu-2.8.0 | 3 | DISTNAME= qemu-2.8.0 | |
4 | PKGREVISION= 1 | |||
4 | CATEGORIES= emulators | 5 | CATEGORIES= emulators | |
5 | MASTER_SITES= http://wiki.qemu.org/download/ | 6 | MASTER_SITES= http://wiki.qemu.org/download/ | |
6 | EXTRACT_SUFX= .tar.bz2 | 7 | EXTRACT_SUFX= .tar.bz2 | |
7 | 8 | |||
8 | MAINTAINER= pkgsrc-users@NetBSD.org | 9 | MAINTAINER= pkgsrc-users@NetBSD.org | |
9 | HOMEPAGE= http://www.qemu.org/ | 10 | HOMEPAGE= http://www.qemu.org/ | |
10 | COMMENT= CPU emulator using dynamic translation | 11 | COMMENT= CPU emulator using dynamic translation | |
11 | LICENSE= gnu-gpl-v2 AND gnu-lgpl-v2.1 AND mit AND modified-bsd | 12 | LICENSE= gnu-gpl-v2 AND gnu-lgpl-v2.1 AND mit AND modified-bsd | |
12 | 13 | |||
13 | CONFLICTS+= qemu-bin-[0-9]* | 14 | CONFLICTS+= qemu-bin-[0-9]* | |
14 | NOT_FOR_PLATFORM+= NetBSD-1.[0-6]*-* | 15 | NOT_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. | |
16 | NOT_FOR_PLATFORM+= NetBSD-5*-* | 17 | NOT_FOR_PLATFORM+= NetBSD-5*-* | |
17 | 18 | |||
18 | USE_TOOLS+= bison gmake makeinfo perl:build pkg-config | 19 | USE_TOOLS+= bison gmake makeinfo perl:build pkg-config | |
19 | USE_NCURSES= yes # requires resize_term() | 20 | FAKE_NCURSES= yes | |
20 | UNLIMIT_RESOURCES= datasize | 21 | UNLIMIT_RESOURCES= datasize | |
21 | HAS_CONFIGURE= yes | 22 | HAS_CONFIGURE= yes | |
22 | 23 | |||
23 | BUILD_DEPENDS+= texi2html-[0-9]*:../../textproc/texi2html | 24 | BUILD_DEPENDS+= texi2html-[0-9]*:../../textproc/texi2html | |
24 | 25 | |||
25 | SUBST_CLASSES+= prefix | 26 | SUBST_CLASSES+= prefix | |
26 | SUBST_STAGE.prefix= pre-configure | 27 | SUBST_STAGE.prefix= pre-configure | |
27 | SUBST_MESSAGE.prefix= Setting PREFIX | 28 | SUBST_MESSAGE.prefix= Setting PREFIX | |
28 | SUBST_FILES.prefix+= configure | 29 | SUBST_FILES.prefix+= configure | |
29 | SUBST_VARS.prefix+= PREFIX | 30 | SUBST_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} | |
126 | PLIST.${_var_}= YES | 127 | PLIST.${_var_}= YES | |
127 | .endfor | 128 | .endfor | |
128 | 129 | |||
129 | post-install: | 130 | post-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" |
@@ -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 | |||
3 | SHA1 (qemu-2.8.0.tar.bz2) = a5602f2ddb51d61b4c0e618b779fdb0dbdc9cc1f | 3 | SHA1 (qemu-2.8.0.tar.bz2) = a5602f2ddb51d61b4c0e618b779fdb0dbdc9cc1f | |
4 | RMD160 (qemu-2.8.0.tar.bz2) = da1e640443a15f36a242fe803c65a39f85b06fcc | 4 | RMD160 (qemu-2.8.0.tar.bz2) = da1e640443a15f36a242fe803c65a39f85b06fcc | |
5 | SHA512 (qemu-2.8.0.tar.bz2) = 50f2988d822388ba9fd1bf5dbe68359033ed7432d7f0f9790299f32f63faa6dc72979256b5632ba572d47ee3e74ed40e3e8e331dc6303ec1599f1b4367cb78c2 | 5 | SHA512 (qemu-2.8.0.tar.bz2) = 50f2988d822388ba9fd1bf5dbe68359033ed7432d7f0f9790299f32f63faa6dc72979256b5632ba572d47ee3e74ed40e3e8e331dc6303ec1599f1b4367cb78c2 | |
6 | Size (qemu-2.8.0.tar.bz2) = 28368517 bytes | 6 | Size (qemu-2.8.0.tar.bz2) = 28368517 bytes | |
7 | SHA1 (patch-Makefile.objs) = f40deeed5482a24369e898411bb611be418dc3ca | 7 | SHA1 (patch-Makefile.objs) = f40deeed5482a24369e898411bb611be418dc3ca | |
8 | SHA1 (patch-configure) = dba5399fb674f0848111c3fecb65462a6829444a | 8 | SHA1 (patch-configure) = 5c2911c1375a2f8916f84f68d4ba9a799b7624cb | |
9 | SHA1 (patch-default-configs_pci.mak) = 2162550a68de514c8fe9e255df88f8a0a07ee6c7 | 9 | SHA1 (patch-default-configs_pci.mak) = 2162550a68de514c8fe9e255df88f8a0a07ee6c7 | |
10 | SHA1 (patch-ef) = 98a1de2fd48638886b5d16f6a61dc72910e98b41 | 10 | SHA1 (patch-ef) = 98a1de2fd48638886b5d16f6a61dc72910e98b41 | |
11 | SHA1 (patch-et) = e9b850ac5985cbe934b541acbfdb330cce421d50 | 11 | SHA1 (patch-et) = e9b850ac5985cbe934b541acbfdb330cce421d50 | |
12 | SHA1 (patch-hw_display_omap__dss.c) = 6b13242f28e32346bc70548c216c578d98fd3420 | 12 | SHA1 (patch-hw_display_omap__dss.c) = 6b13242f28e32346bc70548c216c578d98fd3420 | |
13 | SHA1 (patch-hw_misc_ivshmem.c) = c1fdc8111286f2c760512189db4a854bfc6129d0 | 13 | SHA1 (patch-hw_misc_ivshmem.c) = c1fdc8111286f2c760512189db4a854bfc6129d0 | |
14 | SHA1 (patch-hw_net_etraxfs__eth.c) = e5dd1661d60dbcd27b332403e0843500ba9544bc | 14 | SHA1 (patch-hw_net_etraxfs__eth.c) = e5dd1661d60dbcd27b332403e0843500ba9544bc | |
15 | SHA1 (patch-hw_net_xilinx__axienet.c) = ebcd2676d64ce6f31e4a8c976d4fdf530ad5e8b7 | 15 | SHA1 (patch-hw_net_xilinx__axienet.c) = ebcd2676d64ce6f31e4a8c976d4fdf530ad5e8b7 | |
16 | SHA1 (patch-hw_ppc_mac__newworld.c) = 5131bb6edf8b0acf6e7ed3b6bc7be962dc71eca6 | 16 | SHA1 (patch-hw_ppc_mac__newworld.c) = 5131bb6edf8b0acf6e7ed3b6bc7be962dc71eca6 | |
17 | SHA1 (patch-hw_ppc_mac__oldworld.c) = b71667ab281dc23c9d971dc8754eeefc879bd1d7 | 17 | SHA1 (patch-hw_ppc_mac__oldworld.c) = b71667ab281dc23c9d971dc8754eeefc879bd1d7 | |
18 | SHA1 (patch-memory.c) = 9f94de7799ef80931fb1de572e5603894f3fb328 | 18 | SHA1 (patch-memory.c) = 9f94de7799ef80931fb1de572e5603894f3fb328 | |
19 | SHA1 (patch-scripts_qemu-binfmt-conf.sh) = a59c227e5891efe201eb2b8af15fb0832a1b20d0 | 19 | SHA1 (patch-scripts_qemu-binfmt-conf.sh) = a59c227e5891efe201eb2b8af15fb0832a1b20d0 | |
20 | SHA1 (patch-slirp_tcp__subr.c) = f011c9dc58282e61b26017547a9884f30a6e6154 | 20 | SHA1 (patch-slirp_tcp__subr.c) = f011c9dc58282e61b26017547a9884f30a6e6154 | |
21 | SHA1 (patch-tests_Makefile.include) = 42345d697cb2e324dccf1d68bd8d61e8001c6162 | 21 | SHA1 (patch-tests_Makefile.include) = 42345d697cb2e324dccf1d68bd8d61e8001c6162 |
@@ -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 | |||
3 | Don't use gld on SunOS | 3 | Don't use gld on SunOS | |
4 | add check for shm_open | 4 | add check for shm_open | |
5 | avoid bad substitution | 5 | avoid 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 |