Fri Sep 10 13:10:58 2021 UTC ()
qemu: Patch out silly insistence on being compiled with GCC 7.5.0


(nia)
diff -r1.286 -r1.287 pkgsrc/emulators/qemu/Makefile
diff -r0 -r1.34 pkgsrc/emulators/qemu/patches/patch-configure

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

--- pkgsrc/emulators/qemu/Makefile 2021/09/08 21:05:01 1.286
+++ pkgsrc/emulators/qemu/Makefile 2021/09/10 13:10:58 1.287
@@ -1,35 +1,38 @@ @@ -1,35 +1,38 @@
1# $NetBSD: Makefile,v 1.286 2021/09/08 21:05:01 nia Exp $ 1# $NetBSD: Makefile,v 1.287 2021/09/10 13:10:58 nia Exp $
2 2
3DISTNAME= qemu-6.1.0 3DISTNAME= qemu-6.1.0
4PKGNAME= ${DISTNAME:S/-rc/rc/} 4PKGNAME= ${DISTNAME:S/-rc/rc/}
5PKGREVISION= 2 5PKGREVISION= 2
6CATEGORIES= emulators 6CATEGORIES= emulators
7MASTER_SITES= https://download.qemu.org/ 7MASTER_SITES= https://download.qemu.org/
8EXTRACT_SUFX= .tar.xz 8EXTRACT_SUFX= .tar.xz
9 9
10MAINTAINER= pkgsrc-users@NetBSD.org 10MAINTAINER= pkgsrc-users@NetBSD.org
11HOMEPAGE= http://www.qemu-project.org/ 11HOMEPAGE= http://www.qemu-project.org/
12COMMENT= CPU emulator using dynamic translation 12COMMENT= CPU emulator using dynamic translation
13LICENSE= gnu-gpl-v2 AND gnu-lgpl-v2.1 AND mit AND modified-bsd 13LICENSE= gnu-gpl-v2 AND gnu-lgpl-v2.1 AND mit AND modified-bsd
14 14
15TOOL_DEPENDS+= ninja-build-[0-9]*:../../devel/ninja-build 15TOOL_DEPENDS+= ninja-build-[0-9]*:../../devel/ninja-build
16 16
17USE_CURSES= resize_term wide 17USE_CURSES= resize_term wide
18USE_LANGUAGES+= c c++ 18USE_LANGUAGES+= c c++
19USE_TOOLS+= bison flex makeinfo perl:build pod2man pkg-config 19USE_TOOLS+= bison flex makeinfo perl:build pod2man pkg-config
20UNLIMIT_RESOURCES= datasize 20UNLIMIT_RESOURCES= datasize
21HAS_CONFIGURE= yes 21HAS_CONFIGURE= yes
22 22
 23# https://github.com/qemu/qemu/commit/56208a0d473c6db263cc333c787ca48b502d72ab
 24GCC_REQD+= 7
 25
23PYTHON_VERSIONED_DEPENDENCIES= sphinx:tool 26PYTHON_VERSIONED_DEPENDENCIES= sphinx:tool
24BUILD_DEPENDS+= ${PYPKGPREFIX}-sphinx-rtd-theme>=0.4.3:../../textproc/py-sphinx-rtd-theme 27BUILD_DEPENDS+= ${PYPKGPREFIX}-sphinx-rtd-theme>=0.4.3:../../textproc/py-sphinx-rtd-theme
25 28
26SUBST_CLASSES+= sphinx-build 29SUBST_CLASSES+= sphinx-build
27SUBST_STAGE.sphinx-build= pre-configure 30SUBST_STAGE.sphinx-build= pre-configure
28SUBST_MESSAGE.sphinx-build= Fix hardcoded sphinx-build 31SUBST_MESSAGE.sphinx-build= Fix hardcoded sphinx-build
29SUBST_FILES.sphinx-build+= configure 32SUBST_FILES.sphinx-build+= configure
30SUBST_FILES.sphinx-build+= docs/meson.build 33SUBST_FILES.sphinx-build+= docs/meson.build
31SUBST_FILES.sphinx-build+= roms/skiboot/doc/Makefile 34SUBST_FILES.sphinx-build+= roms/skiboot/doc/Makefile
32SUBST_FILES.sphinx-build+= roms/u-boot/doc/Makefile 35SUBST_FILES.sphinx-build+= roms/u-boot/doc/Makefile
33SUBST_SED.sphinx-build+= -e 's/sphinx-build/sphinx-build-${PYVERSSUFFIX}/g' 36SUBST_SED.sphinx-build+= -e 's/sphinx-build/sphinx-build-${PYVERSSUFFIX}/g'
34 37
35.include "options.mk" 38.include "options.mk"

File Added: pkgsrc/emulators/qemu/patches/Attic/patch-configure
$NetBSD: patch-configure,v 1.34 2021/09/10 13:10:58 nia Exp $

Allow the compiler from NetBSD 9.0.

Requiring a minor version of GCC makes no sense, and indeed,
the requirement seems to be 7.5.0 because "Ubuntu has that
version"...

https://github.com/qemu/qemu/commit/56208a0d473c6db263cc333c787ca48b502d72ab

--- configure.orig	2021-08-24 17:35:40.000000000 +0000
+++ configure
@@ -2099,7 +2099,7 @@ cat > $TMPC << EOF
 #  endif
 # endif
 #elif defined(__GNUC__) && defined(__GNUC_MINOR__)
-# if __GNUC__ < 7 || (__GNUC__ == 7 && __GNUC_MINOR__ < 5)
+# if __GNUC__ < 7
 #  error You need at least GCC v7.5.0 to compile QEMU
 # endif
 #else