From nobody Fri Nov 11 20:50:24 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4N89ns0GMLz4g1jX; Fri, 11 Nov 2022 20:50:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4N89nr6rVtz4TcT; Fri, 11 Nov 2022 20:50:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668199825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kHWjgqLCKpFW0E2pOH0MDEzCEUqHPep0do9eDtDPxOo=; b=PyRAng5HPetQfWMX80yBflmvjd8Obvjz/eypSItfNUS/gR5EPy9Xkb77ZmVVaO7bH0osvb SAmta1bLgccLnXfDOI+JAWf7EoaP23A4pW/RR5PGl1AIEwHvm5u6wVjsrMMGbqqwvcXMim B+7BxZjzY3uj19gpbb2RblaANQ+3DACrBlTSWaNKAau315Dghq+QBqM+vQBUcG/c6/FoeZ EvFSwYClGQ9CpmJ8BkrtpYitG2T8BzVJDW1jh2OeKP9fVhUF5gdN8GGSRFlijNRGV2zpCM z26vkreEilotSVx95BYnsOIoSBp+xlRjyt/0l6hjZfWAbs9hZRBsArSM+t69Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668199825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kHWjgqLCKpFW0E2pOH0MDEzCEUqHPep0do9eDtDPxOo=; b=N8wuKKs27Yd/NXoVCUwAt8gUMC6Bkq0d096aZjbhjWvYdEZ1Ppsp0A0r+idUYXnPTVyAB6 PHFKF8Gvvv20Xz0i5BzPo9KyicVJcJjX06iozc2I9lZGdMiEtuWc5nyWvO8UF1imLi0VzH ZdGn2wgJsu8Ycy8I6EV2HexoP8Jbc2C8cOSkiPvdd60mF8Iefw9CkxZJlecz9cDSR0McZS wJyWtiIuB93UdjJpGCK4+ibH0209Dd1B39/ybdPi68RqzzghMPFLahnC9Yt1LIwxloSuCc OzPvWhhzpgqSP6gPuD78jq0xjuD2XNOU70HMCC8VX7u+4mD2yetR0k+oi1hALA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668199825; a=rsa-sha256; cv=none; b=Hw+Bxy6LRsUwJcEYpKtmnOzlGpLam3XTrqdBdP9UZCJWFsMI/pHnYk8p5ywVqaYApNJHz+ AcIDkh4gqzIdQfAgznfRxbpRPzynLwlEPZTrCaZ2EPX797EvBOwsj+nfwNY65e+Wgs62oo 0acL2v9US1+cmBkXamGvfgizvV0Vcm6Otxt2I/KZvKzx4BGQoUYHosuz57E3jpUT0kMtMV 5H0kwn7S29pIFEiksmJc1orRhWTG+uZI0OHelA82nTwmyPjdiRO/8onH2d/I88KFlF12P+ Zxm7It2cAy7iZlyfdh2E40/rebYb7dDH8q6PnfJyzjjCJQa0k1/+M+dY0GzAdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4N89nr5lq6zxTN; Fri, 11 Nov 2022 20:50:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2ABKoO79000557; Fri, 11 Nov 2022 20:50:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2ABKoOhl000556; Fri, 11 Nov 2022 20:50:24 GMT (envelope-from git) Date: Fri, 11 Nov 2022 20:50:24 GMT Message-Id: <202211112050.2ABKoOhl000556@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Juraj Lutter Subject: git: 2ff55486c633 - main - graphics/libemf: fix build on riscv64 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: otis X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2ff55486c6332a41e6ce8ebd9fcee56d467a012e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by otis: URL: https://cgit.FreeBSD.org/ports/commit/?id=2ff55486c6332a41e6ce8ebd9fcee56d467a012e commit 2ff55486c6332a41e6ce8ebd9fcee56d467a012e Author: Robert Clausecker AuthorDate: 2022-11-11 20:49:16 +0000 Commit: Juraj Lutter CommitDate: 2022-11-11 20:49:16 +0000 graphics/libemf: fix build on riscv64 Add missing RISC-V specific bits to winnt.h to make the build succeed. These bits are custom written stubs. PR: 267395 Approved by: maintainer timeout --- graphics/libemf/Makefile | 2 - .../libemf/files/patch-include_libEMF_wine_winnt.h | 85 ++++++++++++++++++++++ 2 files changed, 85 insertions(+), 2 deletions(-) diff --git a/graphics/libemf/Makefile b/graphics/libemf/Makefile index 8548082ed7a5..acc1b9079707 100644 --- a/graphics/libemf/Makefile +++ b/graphics/libemf/Makefile @@ -10,8 +10,6 @@ WWW= http://libemf.sourceforge.net/ LICENSE= LGPL21 -BROKEN_riscv64= fails to build: ../include/libEMF/wine/winnt.h:77:3: Unknown CPU architecture - OPTIONS_DEFINE= DOCS USES= cpe libtool diff --git a/graphics/libemf/files/patch-include_libEMF_wine_winnt.h b/graphics/libemf/files/patch-include_libEMF_wine_winnt.h new file mode 100644 index 000000000000..66804ae95911 --- /dev/null +++ b/graphics/libemf/files/patch-include_libEMF_wine_winnt.h @@ -0,0 +1,85 @@ +--- include/libEMF/wine/winnt.h.orig 2022-10-27 16:15:39 UTC ++++ include/libEMF/wine/winnt.h +@@ -69,6 +69,10 @@ + # define WORDS_BIGENDIAN + # define BITFIELDS_BIGENDIAN + # undef ALLOW_UNALIGNED_ACCESS ++#elif defined(__riscv) ++# undef WORDS_BIGENDIAN ++# undef BITFIELDS_BIGENDIAN ++# define ALLOW_UNALIGNED_ACCESS + #elif !defined(RC_INVOKED) + # error Unknown CPU architecture! + #endif +@@ -1581,6 +1585,71 @@ typedef struct _CONTEXT { + } CONTEXT; + + #endif /* __e2k__ */ ++ ++#if __riscv_xlen == 64 ++/* ++ * FIXME: ++ * ++ * There is not yet an official CONTEXT structure defined for ++ * RV64, so I just made one up. ++ * ++ */ ++ ++#define CONTEXT_RV64 0x4000000 ++#define CONTEXT_CONTROL (CONTEXT_RV64 | 0x00000001) ++#define CONTEXT_INTEGER (CONTEXT_RV64 | 0x00000002) ++#define CONTEXT_FLOATING_POINT (CONTEXT_RV64 | 0x00000004) ++ ++#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT) ++ ++#define EXCEPTION_READ_FAULT 0 ++#define EXCEPTION_WRITE_FAULT 1 ++#define EXCEPTION_EXECUTE_FAULT 8 ++ ++typedef struct _CONTEXT { ++ ULONG ContextFlags; ++ ++ /* This section is specified/returned if the ContextFlags word contains ++ the flag CONTEXT_INTEGER. */ ++ ULONGLONG R1; ++ ULONGLONG R2; ++ ULONGLONG R3; ++ ULONGLONG R4; ++ ULONGLONG R5; ++ ULONGLONG R6; ++ ULONGLONG R7; ++ ULONGLONG R8; ++ ULONGLONG R9; ++ ULONGLONG R10; ++ ULONGLONG R12; ++ ULONGLONG R13; ++ ULONGLONG R14; ++ ULONGLONG R15; ++ ULONGLONG R16; ++ ULONGLONG R17; ++ ULONGLONG R18; ++ ULONGLONG R19; ++ ULONGLONG R20; ++ ULONGLONG R21; ++ ULONGLONG R22; ++ ULONGLONG R23; ++ ULONGLONG R24; ++ ULONGLONG R25; ++ ULONGLONG R26; ++ ULONGLONG R27; ++ ULONGLONG R28; ++ ULONGLONG R29; ++ ULONGLONG R30; ++ ULONGLONG R31; ++ ++ /* These are selected by CONTEXT_CONTROL */ ++ ULONGLONG Pc; ++ ++ /* These are selected by CONTEXT_FLOATING_POINT */ ++ ++} CONTEXT; ++ ++#endif /* __riscv */ + + #if !defined(CONTEXT_FULL) && !defined(RC_INVOKED) + #error You need to define a CONTEXT for your CPU