diff --git a/emulators/qemu-user-static-devel/Makefile b/emulators/qemu-user-static-devel/Makefile --- a/emulators/qemu-user-static-devel/Makefile +++ b/emulators/qemu-user-static-devel/Makefile @@ -1,6 +1,5 @@ PORTNAME= qemu -PORTVERSION= 3.1.0 -PORTREVISION= 6 +PORTVERSION= 6.0.91 CATEGORIES= emulators PKGNAMESUFFIX= -user-static-devel DIST_SUBDIR= qemu/${PORTVERSION} @@ -14,31 +13,47 @@ ONLY_FOR_ARCHS= amd64 powerpc powerpc64 CONFLICTS_INSTALL= qemu-user-static-[0-9]* -USES= bison compiler:c11 gmake perl5 pkgconfig python:build +# When static linking we have a build dependency on libglib-2.0.a, otherwise +# we use glib20 in the usual way (shared-lib runtime dependency). +BUILD_DEPENDS= ${LOCALBASE}/lib/libglib-2.0.a:devel/glib20 \ + bash:shells/bash \ + meson>=0.57.1_1:devel/meson + +USES= bison compiler:c11 gmake ninja:build perl5 pkgconfig python:build + USE_GITHUB= yes -GH_TUPLE= qemu-bsd-user:qemu-bsd-user:6ffee39fe2e49944 \ +GH_TUPLE= qemu-bsd-user:qemu-bsd-user:38bb64abdce3606c823ea8f9d1c7e7176fdf20c9 \ qemu:keycodemapdb:10739aa:keycodemapdb/ui/keycodemapdb + HAS_CONFIGURE= yes +CONFIGURE_OUTSOURCE= yes + USE_PERL5= build -MAKE_ENV+= BSD_MAKE="${MAKE}" V=1 USE_RC_SUBR= qemu_user_static SUB_LIST= NAME=qemu_user_static -# When static linking we have a build dependency on libglib-2.0.a, otherwise -# we use glib20 in the usual way (shared-lib runtime dependency). -BUILD_DEPENDS+= ${LOCALBASE}/lib/libglib-2.0.a:devel/glib20 +MAKE_ENV= BSD_MAKE="${MAKE}" V=1 +CONFIGURE_ARGS= --prefix=${PREFIX} --cc=${CC} \ + --localstatedir=/var \ + --extra-ldflags=-L${LOCALBASE}/lib \ + --extra-cflags=-I${LOCALBASE}/include \ + --enable-debug \ + --enable-debug-info \ + --static \ + --python=${PYTHON_CMD} \ + --meson=${LOCALBASE}/bin/meson \ + --disable-docs --disable-tools --disable-system \ + --disable-capstone \ + --extra-cflags=-I${WRKSRC}\ -I${LOCALBASE}/include\ -DPREFIX=\\\"\"${PREFIX}\\\"\" -.include +TEST_TARGET= check -CONFIGURE_ARGS+= --localstatedir=/var -CONFIGURE_ARGS+= --extra-ldflags=-L${LOCALBASE}/lib -CONFIGURE_ARGS+= --extra-cflags=-I${LOCALBASE}/include -CONFIGURE_ARGS+= --disable-libssh2 +.include -QEMU_TARGETS= i386-bsd-user sparc-bsd-user arm-bsd-user mips-bsd-user mipsel-bsd-user ppc-bsd-user +QEMU_TARGETS= i386-bsd-user arm-bsd-user mips-bsd-user mipsel-bsd-user ppc-bsd-user .if ${ARCH} == "amd64" || ${ARCH} == "powerpc64" -QEMU_TARGETS+= x86_64-bsd-user riscv64-bsd-user sparc64-bsd-user mips64-bsd-user mips64el-bsd-user ppc64-bsd-user aarch64-bsd-user +QEMU_TARGETS+= x86_64-bsd-user riscv64-bsd-user mips64-bsd-user ppc64-bsd-user aarch64-bsd-user PLIST_SUB+= 64BIT="" .else PLIST_SUB+= 64BIT="@comment " @@ -49,29 +64,11 @@ CFLAGS:= ${CFLAGS:C/-fno-tree-vrp//} CFLAGS+= -Wno-address-of-packed-member CFLAGS+= -D_WANT_SEMUN -CONFIGURE_ARGS+= --prefix=${PREFIX} --cc=${CC} --enable-docs \ - --disable-linux-user --disable-linux-aio \ - --disable-kvm --disable-xen \ - --smbd=${LOCALBASE}/sbin/smbd \ - --enable-debug \ - --enable-debug-info \ - --static \ - --python=${PYTHON_CMD} \ - --disable-sdl --disable-gtk --disable-vte --disable-gnutls --disable-vnc \ - --disable-curl --disable-opengl --disable-usb-redir --disable-pcap \ - --disable-docs --disable-tools --disable-system --disable-guest-agent \ - --disable-capstone \ - --extra-cflags=-I${WRKSRC}\ -I${LOCALBASE}/include\ -DPREFIX=\\\"\"${PREFIX}\\\"\" QEMU_ARCH= ${ARCH:C/amd64/x86_64/:C/powerpc/ppc/} -MAKE_ARGS+= ARCH=${QEMU_ARCH} +MAKE_ARGS= ARCH=${QEMU_ARCH} post-install: - @${MV} ${STAGEDIR}${PREFIX}/etc/rc.d ${WRKDIR} - @${RM} -r ${STAGEDIR}${PREFIX}/etc - @${MKDIR} ${STAGEDIR}${PREFIX}/etc - @${MV} ${WRKDIR}/rc.d ${STAGEDIR}${PREFIX}/etc - @${RM} -r ${STAGEDIR}${PREFIX}/man @${RM} -r ${STAGEDIR}${DATADIR} @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/qemu-* @(cd ${STAGEDIR}${PREFIX}/bin && \ diff --git a/emulators/qemu-user-static-devel/distinfo b/emulators/qemu-user-static-devel/distinfo --- a/emulators/qemu-user-static-devel/distinfo +++ b/emulators/qemu-user-static-devel/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1620780258 -SHA256 (qemu/3.1.0/qemu-bsd-user-qemu-bsd-user-3.1.0-6ffee39fe2e49944_GH0.tar.gz) = 82231d6e7a0fbf44861e51a3fd472ca316c704c287aa5f85ed4366e7701fa0bf -SIZE (qemu/3.1.0/qemu-bsd-user-qemu-bsd-user-3.1.0-6ffee39fe2e49944_GH0.tar.gz) = 16909652 -SHA256 (qemu/3.1.0/qemu-keycodemapdb-10739aa_GH0.tar.gz) = ae43fb1e2b07b78be88a7882306b6e71383eb77472a35d7d78fed21e345d134a -SIZE (qemu/3.1.0/qemu-keycodemapdb-10739aa_GH0.tar.gz) = 47895 +TIMESTAMP = 1628093294 +SHA256 (qemu/6.0.91/qemu-bsd-user-qemu-bsd-user-6.0.91-38bb64abdce3606c823ea8f9d1c7e7176fdf20c9_GH0.tar.gz) = b304996608addf6823c12ad5c9acae310b39d0c9208353eec6b67bc381555355 +SIZE (qemu/6.0.91/qemu-bsd-user-qemu-bsd-user-6.0.91-38bb64abdce3606c823ea8f9d1c7e7176fdf20c9_GH0.tar.gz) = 31372925 +SHA256 (qemu/6.0.91/qemu-keycodemapdb-10739aa_GH0.tar.gz) = ae43fb1e2b07b78be88a7882306b6e71383eb77472a35d7d78fed21e345d134a +SIZE (qemu/6.0.91/qemu-keycodemapdb-10739aa_GH0.tar.gz) = 47895 diff --git a/emulators/qemu-user-static-devel/files/patch-configure b/emulators/qemu-user-static-devel/files/patch-configure new file mode 100644 --- /dev/null +++ b/emulators/qemu-user-static-devel/files/patch-configure @@ -0,0 +1,22 @@ +--- configure.orig 2021-05-11 21:34:33 UTC ++++ configure +@@ -1964,19 +1964,6 @@ if test -z "$meson"; then + error_exit "Meson not found. Use --meson=/path/to/meson" + fi + fi +-else +- # Meson uses its own Python interpreter to invoke other Python scripts, +- # but the user wants to use the one they specified with --python. +- # +- # We do not want to override the distro Python interpreter (and sometimes +- # cannot: for example in Homebrew /usr/bin/meson is a bash script), so +- # just require --meson=git|internal together with --python. +- if test "$explicit_python" = yes; then +- case "$meson" in +- git | internal) ;; +- *) error_exit "--python requires using QEMU's embedded Meson distribution." ;; +- esac +- fi + fi + + if test "$meson" = git; then diff --git a/emulators/qemu-user-static-devel/files/patch-tests_fp_meson.build b/emulators/qemu-user-static-devel/files/patch-tests_fp_meson.build new file mode 100644 --- /dev/null +++ b/emulators/qemu-user-static-devel/files/patch-tests_fp_meson.build @@ -0,0 +1,15 @@ +Disable "fp" tests since they live in a subrepo and are not fetched during +"make fetch" + +--- tests/fp/meson.build.orig 2021-05-11 21:34:33 UTC ++++ tests/fp/meson.build +@@ -1,8 +1,4 @@ +-# There are namespace pollution issues on Windows, due to osdep.h +-# bringing in Windows headers that define a FLOAT128 type. +-if targetos == 'windows' +- subdir_done() +-endif ++subdir_done() + + fpcflags = [ + # softfloat defines diff --git a/emulators/qemu-user-static-devel/files/qemu_user_static.in b/emulators/qemu-user-static-devel/files/qemu_user_static.in --- a/emulators/qemu-user-static-devel/files/qemu_user_static.in +++ b/emulators/qemu-user-static-devel/files/qemu_user_static.in @@ -131,16 +131,6 @@ else echo "$0: interpreter ${interpreter} not found, cannot register." fi - # register sparc64 interpreter styled 'sparc64' - interpreter=${QEMU_DIR}/${QEMU_PREFIX}sparc64${QEMU_SUFFIX} - if [ -x "${interpreter}" ]; then - ${BINMISCCTL} add sparc64 --interpreter "${interpreter}" \ - --magic "\x7f\x45\x4c\x46\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2b" \ - --mask "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff" \ - --size 20 --set-enabled - else - echo "$0: interpreter ${interpreter} not found, cannot register." - fi } %%NAME%%_stop() @@ -155,7 +145,6 @@ ${BINMISCCTL} remove powerpc ${BINMISCCTL} remove powerpc64 ${BINMISCCTL} remove riscv64 - ${BINMISCCTL} remove sparc64 } run_rc_command "$1" diff --git a/emulators/qemu-user-static-devel/pkg-plist b/emulators/qemu-user-static-devel/pkg-plist --- a/emulators/qemu-user-static-devel/pkg-plist +++ b/emulators/qemu-user-static-devel/pkg-plist @@ -3,11 +3,8 @@ bin/qemu-i386-static bin/qemu-mips-static %%64BIT%%bin/qemu-mips64-static -%%64BIT%%bin/qemu-mips64el-static bin/qemu-mipsel-static bin/qemu-ppc-static %%64BIT%%bin/qemu-ppc64-static %%64BIT%%bin/qemu-riscv64-static -bin/qemu-sparc-static -%%64BIT%%bin/qemu-sparc64-static %%64BIT%%bin/qemu-x86_64-static