From 848cbf3101b8499e47d9ab7cb7b67277798edbbaf8461be727b59a012354e23f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 20 Mar 2013 16:43:41 +0000 Subject: [PATCH] Accepting request 160296 from devel:ARM:AArch64:Factory - aarch64-support.patch: Support for aarch64 OBS-URL: https://build.opensuse.org/request/show/160296 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/libEMF?expand=0&rev=13 --- aarch64-support.patch | 95 +++++++++++++++++++++++++++++++++++++++++++ libEMF.changes | 5 +++ libEMF.spec | 4 +- 3 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 aarch64-support.patch diff --git a/aarch64-support.patch b/aarch64-support.patch new file mode 100644 index 0000000..31f7d84 --- /dev/null +++ b/aarch64-support.patch @@ -0,0 +1,95 @@ +Index: libEMF-1.0.7/include/libEMF/wine/winnt.h +=================================================================== +--- libEMF-1.0.7.orig/include/libEMF/wine/winnt.h ++++ libEMF-1.0.7/include/libEMF/wine/winnt.h +@@ -57,6 +57,10 @@ + # define WORDS_BIGENDIAN + # define BITFIELDS_BIGENDIAN + # undef ALLOW_UNALIGNED_ACCESS ++#elif defined(__aarch64__) ++# undef WORDS_BIGENDIAN ++# undef BITFIELDS_BIGENDIAN ++# undef ALLOW_UNALIGNED_ACCESS + #elif !defined(RC_INVOKED) + # error Unknown CPU architecture! + #endif +@@ -1425,6 +1429,79 @@ ULONG Cpsr; + + #endif /* __arm__ */ + ++#ifdef __aarch64__ ++ ++/* These definitions are taken directly from wine ++ http://source.winehq.org/git/wine.git/blob_plain/HEAD:/include/winnt.h */ ++ ++/* ++ * FIXME: ++ * ++ * There is not yet an official CONTEXT structure defined for the AArch64 ++ * architecture, so I just made one up. ++ * ++ */ ++ ++#define CONTEXT_ARM64 0x2000000 ++#define CONTEXT_CONTROL (CONTEXT_ARM64 | 0x00000001) ++#define CONTEXT_INTEGER (CONTEXT_ARM64 | 0x00000002) ++#define CONTEXT_FLOATING_POINT (CONTEXT_ARM64 | 0x00000004) ++#define CONTEXT_DEBUG_REGISTERS (CONTEXT_ARM64 | 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; ++ ++ /* These are selected by CONTEXT_CONTROL */ ++ ULONGLONG Sp; ++ ULONGLONG Pc; ++ ULONGLONG PState; ++ ++ /* These are selected by CONTEXT_FLOATING_POINT */ ++ /* FIXME */ ++} CONTEXT; ++ ++#endif /* __aarch64__ */ ++ + #if !defined(CONTEXT_FULL) && !defined(RC_INVOKED) + #error You need to define a CONTEXT for your CPU + #endif diff --git a/libEMF.changes b/libEMF.changes index 52244e2..07629ac 100644 --- a/libEMF.changes +++ b/libEMF.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Mar 20 16:30:03 UTC 2013 - schwab@suse.de + +- aarch64-support.patch: Support for aarch64 + ------------------------------------------------------------------- Wed Feb 27 06:20:03 UTC 2013 - coolo@suse.com diff --git a/libEMF.spec b/libEMF.spec index e84d1de..4b2b890 100644 --- a/libEMF.spec +++ b/libEMF.spec @@ -21,13 +21,14 @@ BuildRequires: gcc-c++ Version: 1.0.7 Release: 0 Source: %{name}-%{version}.tar.gz +Patch: aarch64-support.patch Url: http://libemf.sourceforge.net/ BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: Library for Manipulation with Enhanced MetaFile (EMF, ECMA-234) License: LGPL-2.1+ and GPL-2.0+ Group: System/Libraries # taken from includes/wine/winnt.h -ExclusiveArch: alpha %arm %ix86 mips ppc ppc64 sparc s390 s390x x86_64 +ExclusiveArch: alpha %arm aarch64 %ix86 mips ppc ppc64 sparc s390 s390x x86_64 %description LibEMF is a C/C++ library that provides a drawing toolkit based on @@ -90,6 +91,7 @@ SO/OO graphics object. %prep %setup -q +%patch -p1 %build %configure\