diff --git a/libEMF.spec b/libEMF.spec new file mode 100644 index 0000000000000000000000000000000000000000..df8b2f7787949d6a9ed2b952e2efad244b0905e5 --- /dev/null +++ b/libEMF.spec @@ -0,0 +1,67 @@ +Name: libEMF +Version: 1.0.9 +Release: 8 +Summary: A library for generating Enhanced Metafiles +License: LGPLv2+ and GPLv2+ +URL: http://libemf.sourceforge.net/ +Source0: https://downloads.sourceforge.net/project/libemf/libemf/%{version}/libemf-%{version}.tar.gz +Patch0000: support-aarch64.patch + +BuildRequires: gcc-c++ + +%description +libEMF is designed to be used as a driver for other programs such as Grace and gunplot +to generate Enhanced Metafiles on systems which don't natively support the ECMA-234 +Graphics Device Interface (GDI). It implements a limited subset of GDI. + +%package devel +Summary: libEMF header files +Requires: libEMF = %{version}-%{release} libstdc++-devel + +%description devel +Development header files for libEMF. + +%package help +Summary: Documentation for libEMF + +%description help +Documentation for libEMF. + +%prep +%autosetup -n libemf-%{version} -p1 + +%build +%configure --disable-static --enable-editing +%make_build + +%install +export CPPROG="cp -p" +%make_install +%delete_la + +%check +make check + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%license COPYING COPYING.LIB +%doc AUTHORS ChangeLog +%{_bindir}/printemf +%{_libdir}/libEMF.so.1* + +%files devel +%{_libdir}/libEMF.so +%{_includedir}/libEMF + +%files help +%doc doc/html/* NEWS README + +%changelog +* Wed Jan 15 2020 qinjian - 1.0.9-8 +- rename patch + +* Sat Dec 14 2019 lihao - 1.0.9-7 +- Package Init + diff --git a/libemf-1.0.9.tar.gz b/libemf-1.0.9.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..bc9348bd5fff9de7f36799485e67d04381c44a10 Binary files /dev/null and b/libemf-1.0.9.tar.gz differ diff --git a/support-aarch64.patch b/support-aarch64.patch new file mode 100644 index 0000000000000000000000000000000000000000..927a2c7d5f3943a6aeecb2313fa4796f9dc770f9 --- /dev/null +++ b/support-aarch64.patch @@ -0,0 +1,92 @@ +--- libEMF-1.0.7/include/libEMF/wine/winnt.h.orig 2014-05-11 09:42:07.438982485 +0100 ++++ libEMF-1.0.7/include/libEMF/wine/winnt.h 2014-05-11 09:42:42.104573014 +0100 +@@ -45,6 +45,10 @@ + # undef WORDS_BIGENDIAN + # undef BITFIELDS_BIGENDIAN + # undef ALLOW_UNALIGNED_ACCESS ++#elif defined(__aarch64__) ++# undef WORDS_BIGENDIAN ++# undef BITFIELDS_BIGENDIAN ++# undef ALLOW_UNALIGNED_ACCESS + #elif defined(__sparc__) + # define WORDS_BIGENDIAN + # define BITFIELDS_BIGENDIAN +@@ -1425,6 +1429,78 @@ + + #endif /* __arm__ */ + ++#ifdef __aarch64__ ++/* ++ * FIXME: ++ * ++ * There is not yet an official CONTEXT structure defined for the AArch64 ++ * architecture, so I just made one up. ++ * ++ */ ++ ++/* These definitions are taken directly from wine ++ * http://source.winehq.org/git/wine.git/blob_plain/HEAD:/include/winnt.h */ ++ ++#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