Update to latest upstream (1.0.7)

- Update to latest upstream
- Drop all patches (upstreamed)
- Small packaging cleanups
This commit is contained in:
Dominik Mierzejewski 2012-12-05 18:42:33 +01:00
parent 46cf071149
commit 494be8d46c
8 changed files with 9 additions and 534 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
libEMF-1.0.4.tar.gz
/libEMF-1.0.6.tar.gz
/libEMF-1.0.7.tar.gz

View File

@ -1,32 +0,0 @@
diff -up libEMF-1.0.6/include/libEMF/wine/winnt.h.amd64 libEMF-1.0.6/include/libEMF/wine/winnt.h
--- libEMF-1.0.6/include/libEMF/wine/winnt.h.amd64 2012-05-24 17:52:51.000000000 +0200
+++ libEMF-1.0.6/include/libEMF/wine/winnt.h 2012-09-03 22:49:49.000000000 +0200
@@ -37,6 +37,10 @@
# undef WORDS_BIGENDIAN
# undef BITFIELDS_BIGENDIAN
# define ALLOW_UNALIGNED_ACCESS
+#elif defined(__alpha__)
+# undef WORDS_BIGENDIAN
+# undef BITFIELDS_BIGENDIAN
+# undef ALLOW_UNALIGNED_ACCESS
#elif defined(__sparc__)
# define WORDS_BIGENDIAN
# define BITFIELDS_BIGENDIAN
@@ -238,7 +242,7 @@ typedef unsigned short WORD, *PWO
typedef int INT, *PINT, *LPINT;
typedef unsigned int UINT, *PUINT, *LPUINT;
/* Not sure this is correct. Probably should depend on the compiler, too. */
-#if defined( __x86_64__)
+#if defined( __x86_64__) || defined(__alpha__)
typedef unsigned int DWORD, *PDWORD, *LPDWORD;
typedef unsigned int ULONG, *PULONG, *LPULONG;
#else
@@ -284,7 +288,7 @@ typedef VOID *PVOID, *LPV
typedef BYTE BOOLEAN, *PBOOLEAN;
typedef char CHAR, *PCHAR;
typedef short SHORT, *PSHORT;
-#if defined(__x86_64__)
+#if defined(__x86_64__) || defined(__alpha__)
typedef int LONG, *PLONG, *LPLONG;
#else
typedef long LONG, *PLONG, *LPLONG;

View File

@ -1,83 +0,0 @@
--- libEMF-1.0.4/include/libEMF/wine/winnt.h.orig 2012-05-01 09:36:45.607228307 +0100
+++ libEMF-1.0.4/include/libEMF/wine/winnt.h 2012-05-01 10:27:53.636581246 +0100
@@ -37,6 +37,10 @@
# undef WORDS_BIGENDIAN
# undef BITFIELDS_BIGENDIAN
# undef ALLOW_UNALIGNED_ACCESS
+#elif defined(__arm__)
+# undef WORDS_BIGENDIAN
+# undef BITFIELDS_BIGENDIAN
+# undef ALLOW_UNALIGNED_ACCESS
#elif defined(__sparc__)
# define WORDS_BIGENDIAN
# define BITFIELDS_BIGENDIAN
@@ -1128,6 +1132,69 @@
#endif /* __s390__ */
+#ifdef __arm__
+
+/* These definitions are taken directly from wine
+ * http://source.winehq.org/git/wine.git/blob_plain/HEAD:/include/winnt.h */
+
+/* The following flags control the contents of the CONTEXT structure. */
+
+#define CONTEXT_ARM 0x0200000
+#define CONTEXT_CONTROL (CONTEXT_ARM | 0x00000001)
+#define CONTEXT_INTEGER (CONTEXT_ARM | 0x00000002)
+#define CONTEXT_FLOATING_POINT (CONTEXT_ARM | 0x00000004)
+#define CONTEXT_DEBUG_REGISTERS (CONTEXT_ARM | 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 {
+/* The flags values within this flag control the contents of
+ * a CONTEXT record.
+ *
+ * If the context record is used as an input parameter, then
+ * for each portion of the context record controlled by a flag
+ * whose value is set, it is assumed that that portion of the
+ * context record contains valid context. If the context record
+ * is being used to modify a thread's context, then only that
+ * portion of the threads context will be modified.
+ *
+ * If the context record is used as an IN OUT parameter to capture
+ * the context of a thread, then only those portions of the thread's
+ * context corresponding to set flags will be returned.
+ *
+ * The context record is never used as an OUT only parameter. */
+
+ULONG ContextFlags;
+
+/* This section is specified/returned if the ContextFlags word contains
+ * the flag CONTEXT_INTEGER. */
+ULONG R0;
+ULONG R1;
+ULONG R2;
+ULONG R3;
+ULONG R4;
+ULONG R5;
+ULONG R6;
+ULONG R7;
+ULONG R8;
+ULONG R9;
+ULONG R10;
+ULONG Fp;
+ULONG Ip;
+
+/* These are selected by CONTEXT_CONTROL */
+ULONG Sp;
+ULONG Lr;
+ULONG Pc;
+ULONG Cpsr;
+} CONTEXT;
+
+#endif /* __arm__ */
+
#if !defined(CONTEXT_FULL) && !defined(RC_INVOKED)
#error You need to define a CONTEXT for your CPU
#endif

View File

@ -1,12 +0,0 @@
diff -up libEMF-1.0.6/include/libEMF/wine/winnt.h.axp libEMF-1.0.6/include/libEMF/wine/winnt.h
--- libEMF-1.0.6/include/libEMF/wine/winnt.h.axp 2012-09-03 22:50:29.000000000 +0200
+++ libEMF-1.0.6/include/libEMF/wine/winnt.h 2012-09-03 22:52:12.000000000 +0200
@@ -901,7 +901,7 @@ PVOID WINAPI RtlVirtualUnwin
#endif /* __x86_64__ */
/* Alpha context definitions */
-#ifdef _ALPHA_
+#if defined(__alpha__)
#define CONTEXT_ALPHA 0x00020000

View File

@ -1,269 +0,0 @@
diff --git a/include/libEMF/wine/winnt.h b/include/libEMF/wine/winnt.h
index 83109cb..f76c08a 100644
--- a/include/libEMF/wine/winnt.h
+++ b/include/libEMF/wine/winnt.h
@@ -250,7 +250,7 @@ typedef unsigned short WORD, *PWORD, *LPWORD;
typedef int INT, *PINT, *LPINT;
typedef unsigned int UINT, *PUINT, *LPUINT;
/* Not sure this is correct. Probably should depend on the compiler, too. */
-#if defined( __x86_64__) || defined(__alpha__)
+#if defined( __LP64__) || defined(__alpha__)
typedef unsigned int DWORD, *PDWORD, *LPDWORD;
typedef unsigned int ULONG, *PULONG, *LPULONG;
#else
@@ -296,7 +296,7 @@ typedef VOID *PVOID, *LPVOID;
typedef BYTE BOOLEAN, *PBOOLEAN;
typedef char CHAR, *PCHAR;
typedef short SHORT, *PSHORT;
-#if defined(__x86_64__) || defined(__alpha__)
+#if defined(__LP64__) || defined(__alpha__)
typedef int LONG, *PLONG, *LPLONG;
#else
typedef long LONG, *PLONG, *LPLONG;
diff --git a/libemf/libemf.h b/libemf/libemf.h
index a376150..9497b6d 100644
--- a/libemf/libemf.h
+++ b/libemf/libemf.h
@@ -340,7 +340,7 @@ namespace EMF {
fread( &dword, sizeof(DWORD), 1, fp_ );
return *this;
}
-#if !defined( __x86_64__ )
+#if !defined( __LP64__ )
/*!
* Output a long int to the stream (swabbed).
* \param long long int to output.
@@ -410,7 +410,7 @@ namespace EMF {
fread( &int_, sizeof(INT), 1, fp_ );
return *this;
}
-#if !defined(__x86_64__)
+#if !defined(__LP64__)
/*!
* Output a (long) unsigned int to the stream (swabbed).
* \param uint (long) unsigned int to output.
@@ -985,7 +985,7 @@ namespace EMF {
/* Miscellaneous editing routines */
inline void edit_rectl ( const char* tag, const RECTL& rectl )
{
-#if defined(__x86_64__)
+#if defined(__LP64__)
const char* FMT = "\t%s\t: (%d, %d) - (%d, %d)\n";
#else
const char* FMT = "\t%s\t: (%ld, %ld) - (%ld, %ld)\n";
@@ -1005,7 +1005,7 @@ namespace EMF {
inline void edit_color ( const char* tag, const COLORREF& color )
{
-#if defined(__x86_64__)
+#if defined(__LP64__)
const char* FMT = "\t%s\t: R(0x%02x) G(0x%02x) B(0x%02x)\n";
#else
const char* FMT = "\t%s\t: R(0x%02lx) G(0x%02lx) B(0x%02lx)\n";
@@ -1016,7 +1016,7 @@ namespace EMF {
inline void edit_sizel ( const char* tag, const SIZEL& size )
{
-#if defined(__x86_64__)
+#if defined(__LP64__)
const char* FMT = "\t%s\t: (%d, %d)\n";
#else
const char* FMT = "\t%s\t: (%ld, %ld)\n";
@@ -1026,7 +1026,7 @@ namespace EMF {
inline void edit_pointl ( const char* tag, const POINTL& point )
{
-#if defined(__x86_64__)
+#if defined(__LP64__)
const char* FMT = "\t%s\t: (%d, %d)\n";
#else
const char* FMT = "\t%s\t: (%ld, %ld)\n";
@@ -1037,7 +1037,7 @@ namespace EMF {
inline void edit_pointlarray ( const char* tag, const DWORD cptl,
const POINTL* points )
{
-#if defined(__x86_64__)
+#if defined(__LP64__)
const char* FMT0 = "\tcptl%s\t: %d\n";
const char* FMT1 = "%d, %d\n";
const char* FMT2 = "\t\t%s %d, %d\n";
@@ -1102,7 +1102,7 @@ namespace EMF {
inline void edit_brush_style ( const char* tag, DWORD style )
{
-#if defined(__x86_64__)
+#if defined(__LP64__)
const char* FMT = "unknown(%d)";
#else
const char* FMT = "unknown(%ld)";
@@ -1126,7 +1126,7 @@ namespace EMF {
inline void edit_brush_hatch ( const char* tag, DWORD hatch )
{
-#if defined(__x86_64__)
+#if defined(__LP64__)
const char* FMT = "unknown(%d)";
#else
const char* FMT = "unknown(%ld)";
@@ -1473,7 +1473,7 @@ namespace EMF {
*/
void edit ( void ) const
{
-#if defined(__x86_64__)
+#if defined(__LP64__)
const char* FMT0 = "\tiType\t\t\t: %d\n";
const char* FMT1 = "\tnSize\t\t\t: %d\n";
const char* FMT2 = "\tnBytes\t\t\t: %d\n";
@@ -1855,7 +1855,7 @@ namespace EMF {
*/
void edit ( void ) const
{
-#if defined(__x86_64__)
+#if defined(__LP64__)
const char* FMT0 = "\txNum\t: %d\n";
const char* FMT1 = "\txDenom\t: %d\n";
const char* FMT2 = "\tyNum\t: %d\n";
@@ -1993,7 +1993,7 @@ namespace EMF {
*/
void edit ( void ) const
{
-#if defined(__x86_64__)
+#if defined(__LP64__)
const char* FMT0 = "\txNum\t: %d\n";
const char* FMT1 = "\txDenom\t: %d\n";
const char* FMT2 = "\tyNum\t: %d\n";
@@ -2069,7 +2069,7 @@ namespace EMF {
*/
void edit ( void ) const
{
-#if defined(__x86_64__)
+#if defined(__LP64__)
const char* FMT = "unknown(%d)\n";
#else
const char* FMT = "unknown(%ld)\n";
@@ -2196,7 +2196,7 @@ namespace EMF {
*/
void edit ( void ) const
{
-#if defined(__x86_64__)
+#if defined(__LP64__)
const char* FMT = "| unknown bits(0x%x)";
#else
const char* FMT = "| unknown bits(0x%lx)";
@@ -2394,7 +2394,7 @@ namespace EMF {
*/
void edit ( void ) const
{
-#if defined(__x86_64__)
+#if defined(__LP64__)
const char* FMT = "unknown(%d)\n";
#else
const char* FMT = "unknown(%ld)\n";
@@ -2460,7 +2460,7 @@ namespace EMF {
*/
void edit ( void ) const
{
-#if defined(__x86_64__)
+#if defined(__LP64__)
const char* FMT = "unknown(%d)\n";
#else
const char* FMT = "unknown(%ld)\n";
@@ -2527,7 +2527,7 @@ namespace EMF {
*/
void edit ( void ) const
{
-#if defined(__x86_64__)
+#if defined(__LP64__)
const char* FMT = "unknown(%d)\n";
#else
const char* FMT = "unknown(%ld)\n";
@@ -2596,7 +2596,7 @@ namespace EMF {
*/
void edit ( void ) const
{
-#if defined(__x86_64__)
+#if defined(__LP64__)
const char* FMT = "\tihObject\t: 0x%x\n";
#else
const char* FMT = "\tihObject\t: 0x%lx\n";
@@ -2654,7 +2654,7 @@ namespace EMF {
*/
void edit ( void ) const
{
-#if defined(__x86_64__)
+#if defined(__LP64__)
const char* FMT = "\tihObject\t: 0x%x\n";
#else
const char* FMT = "\tihObject\t: 0x%lx\n";
@@ -3580,7 +3580,7 @@ namespace EMF {
*/
void edit ( void ) const
{
-#if defined(__x86_64__)
+#if defined(__LP64__)
const char* FMT0 = "\tnPolys\t\t: %d\n";
const char* FMT1 = "\tcptl\t\t: %d\n";
const char* FMT2 = "%d\n";
@@ -3770,7 +3770,7 @@ namespace EMF {
*/
void edit ( void ) const
{
-#if defined(__x86_64__)
+#if defined(__LP64__)
const char* FMT0 = "\tnPolys\t\t: %d\n";
const char* FMT1 = "\tcptl\t\t: %d\n";
const char* FMT2 = "%d\n";
@@ -4575,7 +4575,7 @@ For pstoedit - this is "fixed" now by estimating dx in pstoedit
*/
void edit ( void ) const
{
-#if defined(__x86_64__)
+#if defined(__LP64__)
const char* FMT0 = "unknown(%d)\n";
const char* FMT1 = "\tptlReference\t: (%d,%d)\n";
const char* FMT2 = "\tnChars\t\t: %d\n";
@@ -4759,7 +4759,7 @@ For pstoedit - this is "fixed" now by estimating dx in pstoedit
*/
void edit ( void ) const
{
-#if defined(__x86_64__)
+#if defined(__LP64__)
const char* FMT0 = "\tihPen\t\t: 0x%x\n";
const char* FMT1 = "\tlopn.lopnWidth\t: %d, %d\n";
#else
@@ -4817,7 +4817,7 @@ For pstoedit - this is "fixed" now by estimating dx in pstoedit
*/
void edit ( void ) const
{
-#if defined(__x86_64__)
+#if defined(__LP64__)
const char* FMT0 = "\tihPen\t\t\t: 0x%x\n";
const char* FMT1 = "\toffBmi\t\t\t: %d\n";
const char* FMT2 = "\tcbBmi\t\t\t: %d\n";
@@ -4891,7 +4891,7 @@ For pstoedit - this is "fixed" now by estimating dx in pstoedit
*/
void edit ( void ) const
{
-#if defined(__x86_64__)
+#if defined(__LP64__)
const char* FMT = "\tihBrush\t\t: 0x%x\n";
#else
const char* FMT = "\tihBrush\t\t: 0x%lx\n";
@@ -4951,7 +4951,7 @@ For pstoedit - this is "fixed" now by estimating dx in pstoedit
*/
void edit ( void ) const
{
-#if defined(__x86_64__)
+#if defined(__LP64__)
const char* FMT0 = "\tihFont\t\t\t: %d\n";
const char* FMT1 = "\tlfHeight\t\t: %d\n";
const char* FMT2 = "\tlfWidth\t\t\t: %d\n";
@@ -5520,7 +5520,7 @@ For pstoedit - this is "fixed" now by estimating dx in pstoedit
*/
void edit ( void ) const
{
-#if defined(__x86_64__)
+#if defined(__LP64__)
const char* FMT = "\tiRelative: %d\n";
#else
const char* FMT = "\tiRelative: %ld\n";

View File

@ -1,113 +0,0 @@
--- libEMF-1.0.3/include/libEMF/wine/winnt.h.s390 2009-06-03 15:25:09.000000000 +0200
+++ libEMF-1.0.3/include/libEMF/wine/winnt.h 2009-06-03 15:36:56.000000000 +0200
@@ -45,6 +45,10 @@
# define WORDS_BIGENDIAN
# define BITFIELDS_BIGENDIAN
# undef ALLOW_UNALIGNED_ACCESS
+#elif defined(__s390__)
+# define WORDS_BIGENDIAN
+# define BITFIELDS_BIGENDIAN
+# undef ALLOW_UNALIGNED_ACCESS
#elif !defined(RC_INVOKED)
# error Unknown CPU architecture!
#endif
@@ -1065,6 +1069,65 @@ typedef struct _CONTEXT
#endif /* __sparc__ */
+#ifdef __s390__
+
+/*
+ * FIXME:
+ *
+ * There is no official CONTEXT structure defined for the S390
+ * architecture, so I just made one up.
+ *
+ * Note that this structure contains only the 'top-level' registers;
+ * the rest of the register window chain is not visible.
+ *
+ * The layout is based on the sparc one.
+ *
+ */
+
+#define CONTEXT_S390C 0x20000000
+
+#define CONTEXT_CONTROL (CONTEXT_S390 | 0x00000001)
+#define CONTEXT_FLOATING_POINT (CONTEXT_S390 | 0x00000002)
+#define CONTEXT_INTEGER (CONTEXT_S390 | 0x00000004)
+
+#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
+
+typedef struct _CONTEXT
+{
+ DWORD ContextFlags;
+
+ /* These are selected by CONTEXT_INTEGER */
+ DWORD r0;
+ DWORD r1;
+ DWORD r2;
+ DWORD r3;
+ DWORD r4;
+ DWORD r5;
+ DWORD r6;
+ DWORD r7;
+ DWORD r8;
+ DWORD r9;
+ DWORD r10;
+ DWORD r11;
+ DWORD r12;
+ DWORD r13;
+ DWORD r14;
+ DWORD r15;
+
+ /* FIXME: this section is fictional (copied from sparc) */
+ DWORD psr;
+ DWORD pc;
+ DWORD npc;
+ DWORD y;
+ DWORD wim;
+ DWORD tbr;
+
+ /* FIXME: floating point registers missing */
+
+} CONTEXT;
+
+#endif /* __s390__ */
+
#if !defined(CONTEXT_FULL) && !defined(RC_INVOKED)
#error You need to define a CONTEXT for your CPU
#endif
@@ -1183,6 +1246,33 @@ typedef CONTEXT *PCONTEXT;
#endif /* __sparc__ */
+#ifdef __s390__
+/* FIXME: use getcontext() to retrieve full context */
+#define _GET_CONTEXT \
+ CONTEXT context; \
+ do { memset(&context, 0, sizeof(CONTEXT)); \
+ context.ContextFlags = CONTEXT_CONTROL; \
+ context.pc = (DWORD)__builtin_return_address(0); \
+ } while (0)
+
+#define DEFINE_REGS_ENTRYPOINT_0( name, fn ) \
+ void WINAPI name ( void ) \
+ { _GET_CONTEXT; fn( &context ); }
+#define DEFINE_REGS_ENTRYPOINT_1( name, fn, t1 ) \
+ void WINAPI name ( t1 a1 ) \
+ { _GET_CONTEXT; fn( a1, &context ); }
+#define DEFINE_REGS_ENTRYPOINT_2( name, fn, t1, t2 ) \
+ void WINAPI name ( t1 a1, t2 a2 ) \
+ { _GET_CONTEXT; fn( a1, a2, &context ); }
+#define DEFINE_REGS_ENTRYPOINT_3( name, fn, t1, t2, t3 ) \
+ void WINAPI name ( t1 a1, t2 a2, t3 a3 ) \
+ { _GET_CONTEXT; fn( a1, a2, a3, &context ); }
+#define DEFINE_REGS_ENTRYPOINT_4( name, fn, t1, t2, t3, t4 ) \
+ void WINAPI name ( t1 a1, t2 a2, t3 a3, t4 a4 ) \
+ { _GET_CONTEXT; fn( a1, a2, a3, a4, &context ); }
+
+#endif /* __s390__ */
+
#ifdef __PPC__
/* FIXME: use getcontext() to retrieve full context */

View File

@ -1,21 +1,13 @@
Summary: A library for generating Enhanced Metafiles
Summary(pl): Biblioteka do generowania plików w formacie Enhanced Metafile
Name: libEMF
Version: 1.0.6
Release: 2%{?dist}
Version: 1.0.7
Release: 1%{?dist}
License: LGPLv2+ and GPLv2+
Group: System Environment/Libraries
URL: http://libemf.sourceforge.net/
Source0: http://downloads.sourceforge.net/project/libemf/libemf/%{version}/libEMF-%{version}.tar.gz
# Source0-md5: a4e91fd8077ce5f540f569e20e8ef7ff
Patch0: %{name}-amd64.patch
Patch1: %{name}-axp.patch
Patch2: %{name}-s390.patch
Patch3: %{name}-arm.patch
Patch4: %{name}-lp64.patch
BuildRequires: libstdc++-devel
BuildRequires: libtool
%description
libEMF is a library for generating Enhanced Metafiles on systems which
@ -46,20 +38,8 @@ Pliki nagłówkowe libEMF.
%prep
%setup -q
%patch0 -p1 -b .amd64
%patch1 -p1 -b .axp
%patch2 -p1 -b .s390
%patch3 -p1 -b .arm
%patch4 -p1 -b .lp64
chmod 0644 libemf/libemf.h
%build
# supplied libtool is broken (no C++ libraries support)
libtoolize --force
aclocal
autoconf
automake
%configure \
--disable-static \
--enable-editing
@ -80,18 +60,21 @@ make check
%postun -p /sbin/ldconfig
%files
%defattr(644,root,root,755)
%doc AUTHORS ChangeLog COPYING COPYING.LIB NEWS README
%attr(755,root,root) %{_bindir}/*
%attr(755,root,root) %{_libdir}/lib*.so.*
%files devel
%defattr(644,root,root,755)
%doc doc/html
%attr(755,root,root) %{_libdir}/lib*.so
%{_includedir}/libEMF
%changelog
* Wed Nov 07 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.0.7-1
- Update to latest upstream
- Drop all patches (upstreamed)
- Small packaging cleanups
* Mon Nov 5 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.0.6-2
- Fixes for non-x86 64bit architectures

View File

@ -1 +1 @@
bce826c7fa3cfbc4cdc258d2bfdd75d4 libEMF-1.0.6.tar.gz
f1011f5cc254aa228be78704fe5f9960 libEMF-1.0.7.tar.gz