Your message dated Thu, 30 Nov 2023 22:24:09 +0000
with message-id <[email protected]>
and subject line Bug#1057140: fixed in libemf 1.0.13-6
has caused the Debian Bug report #1057140,
regarding libemf: FTBFS: error: #error Unknown CPU architecture
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1057140: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057140
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: libemf
Version: 1.0.13-5
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: loong64

Dear maintainers,

The package libemf failed to compile loong64 rootfs environment. The error messages are as follows,
```
...
In file included from ../include/libEMF/wine/windef.h:16,
                 from ../include/libEMF/emf.h:27,
                 from libemf.h:33,
                 from libemf.cpp:24:
../include/libEMF/wine/winnt.h:77:3: error: #error Unknown CPU architecture!
   77 | # error Unknown CPU architecture!
      |   ^~~~~
../include/libEMF/wine/winnt.h:1589:16: warning: extra tokens at end of #ifdef directive
 1589 | #ifdef __riscv && __riscv_xlen==64
      |                ^~
../include/libEMF/wine/winnt.h:1661:2: error: #error You need to define a CONTEXT for your CPU
 1661 | #error You need to define a CONTEXT for your CPU
      |  ^~~~~
...
```

After applying the attached patch, the keyman source package was compiled successfully on my local loong64 rootfs environment.
Please consider the patch I have attached.

thanks,
Dandan Zhang

Description: Add support for loongarch64 
Last-Update: 2023-11-9

--- libemf-1.0.13.orig/include/libEMF/wine/winnt.h
+++ libemf-1.0.13/include/libEMF/wine/winnt.h
@@ -49,6 +49,10 @@
 # undef  WORDS_BIGENDIAN
 # undef  BITFIELDS_BIGENDIAN
 # undef  ALLOW_UNALIGNED_ACCESS
+#elif defined(__loongarch64)
+# undef  WORDS_BIGENDIAN
+# undef  BITFIELDS_BIGENDIAN
+# undef  ALLOW_UNALIGNED_ACCESS
 #elif defined(__sparc__)
 # define WORDS_BIGENDIAN
 # define BITFIELDS_BIGENDIAN
@@ -1024,6 +1028,76 @@ typedef struct _CONTEXT
 
 #endif  /* _ALPHA_ */
 
+#ifdef __loongarch64
+/*
+ * FIXME:
+ *
+ * There is not yet an official CONTEXT structure defined for the
+ * loongarch64 architecture (64-bit LE), so I just made one up.
+ *
+ */
+
+#define CONTEXT_LOONGARCH64             0x4000000
+#define CONTEXT_CONTROL         (CONTEXT_LOONGARCH64 | 0x00000001)
+#define CONTEXT_INTEGER         (CONTEXT_LOONGARCH64 | 0x00000002)
+#define CONTEXT_FLOATING_POINT  (CONTEXT_LOONGARCH64 | 0x00000004)
+#define CONTEXT_DEBUG_REGISTERS (CONTEXT_LOONGARCH64 | 0x00000008)
+
+#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER)
+
+#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 X0;
+    ULONGLONG X1;
+    ULONGLONG X2;
+    ULONGLONG X3;
+    ULONGLONG X4;
+    ULONGLONG X5;
+    ULONGLONG X6;
+    ULONGLONG X7;
+    ULONGLONG X8;
+    ULONGLONG X9;
+    ULONGLONG X10;
+    ULONGLONG X11;
+    ULONGLONG X12;
+    ULONGLONG X13;
+    ULONGLONG X14;
+    ULONGLONG X15;
+    ULONGLONG X16;
+    ULONGLONG X17;
+    ULONGLONG X18;
+    ULONGLONG X19;
+    ULONGLONG X20;
+    ULONGLONG X21;
+    ULONGLONG X22;
+    ULONGLONG X23;
+    ULONGLONG X24;
+    ULONGLONG X25;
+    ULONGLONG X26;
+    ULONGLONG X27;
+    ULONGLONG X28;
+    ULONGLONG X29;
+    ULONGLONG X30;
+    ULONGLONG X31;
+
+    /* These are selected by CONTEXT_CONTROL */
+    ULONGLONG Sp;
+    ULONGLONG Pc;
+    ULONGLONG PState;
+
+    /* These are selected by CONTEXT_FLOATING_POINT */
+    /* FIXME */
+} CONTEXT;
+
+#endif /* __loongarch64 */
+
 /* Mips context definitions */
 #if defined(_MIPS_) || defined(__MIPS__) || defined(__mips__)
 

--- End Message ---
--- Begin Message ---
Source: libemf
Source-Version: 1.0.13-6
Done: Barak A. Pearlmutter <[email protected]>

We believe that the bug you reported is fixed in the latest version of
libemf, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Barak A. Pearlmutter <[email protected]> (supplier of updated libemf package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 30 Nov 2023 21:48:48 +0000
Source: libemf
Architecture: source
Version: 1.0.13-6
Distribution: unstable
Urgency: medium
Maintainer: Barak A. Pearlmutter <[email protected]>
Changed-By: Barak A. Pearlmutter <[email protected]>
Closes: 1057140
Changes:
 libemf (1.0.13-6) unstable; urgency=medium
 .
   * Patch to support loongarch64 (closes: #1057140) kindly provided by
     Dandan Zhang <[email protected]>
   * Use secure URI in Homepage field.
   * Update standards version to 4.6.2, no changes needed.
Checksums-Sha1:
 f3df5f0605544df93547bc3a7f325951aec9f281 2529 libemf_1.0.13-6.dsc
 a919fedd2d12f383facfd75f3af08d4090573485 31464 libemf_1.0.13-6.debian.tar.xz
 6f96b3ad53a14be206c00a87bd2662e24f9ec0d2 11449 libemf_1.0.13-6_source.buildinfo
Checksums-Sha256:
 51c74a3d0225cf772c14cd30318a51767d0e6822b2b5d93366a8d9941269d139 2529 
libemf_1.0.13-6.dsc
 9ab1dcf03fe09633d34bc4f5fd51f965f38269e9a8afc8f9d3eedc087264343f 31464 
libemf_1.0.13-6.debian.tar.xz
 ca4374014bb0c8751753ca2088b7a10416d8225a20adf0c5cc98c4129beb9503 11449 
libemf_1.0.13-6_source.buildinfo
Files:
 b06562c11172adf7ca35abf3a18d9b71 2529 libs optional libemf_1.0.13-6.dsc
 23bb8af20d8d78807c24a5236986f00f 31464 libs optional 
libemf_1.0.13-6.debian.tar.xz
 ed50e7384f18ca3aabcaf52be85d68c9 11449 libs optional 
libemf_1.0.13-6_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJDBAEBCgAtFiEE+nZaz+JE7Dn2AefCmesepNIze4gFAmVpBS0PHGJhcEBkZWJp
YW4ub3JnAAoJEJnrHqTSM3uI2UAQALgRhYV6la0VfcCKVZfQY65V4j7bZONlziog
vo5VeDyDEJ0t3hfj67tIcrmO/J4U49QE9SJgv/z0059JCdBDNCNgBnJ0/WHTs3Fp
dRETabr5Fb6b64yfdo58QkJ1JXOlRaZ0mWlAf4IqlR92OHbWYU4EFKvggmmKQLix
Tzvk8YVlR9VW04oHZTz1S10rePnqw5/UJ+msojot+HMm9olEtz8SPglhSwB7Umdo
tI4r0nKTA+kq58m2J6IjpS5pjud+93mQSiiopyPexABayqVTquQhmarsSHuC3R/Y
xviujLznxgsLvhhL/Wt44kfxiPv+hEeDniXCA9RlY9tAXdCldQcOhoOd1jf3GMHS
3LuYJ8LgsBGawQTemm96gMA3FZjgsctgA5cP+s/JmEe228fIKEzGOjO/UV8yx1Aw
D93h9AxutiZtq9cWvsUPaOURp7CgqmHTWrI0nAZX3vMA5TH8Y4YzGJCvUvhhFj2c
EXX+gOBcpfPrCdrZZTQYTCjlk2Iiezq40pyrP34CRbw+CxSQeSR5zNCdbri94GRi
5KiXfZlHKRRQJH+IzyYimUgAVfpGSATEvmi2Hv+9SBpcuKEYjfuk3MVs5mcvNB0K
/fuu/nmukFhOUfhQziUfpYW3VE4wcKGF6pEpVekiTy3EGxHBE9a3hWihLYaE5oks
3ihX0rk0
=D98K
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to