libemf stable port information

Package: libemf
Version: 1.0.4
Revision: 1
GCC: 4.0
Maintainer: None
License: LGPL2+
Description: ECMA-234 library
Source: mirror:sourceforge:%n/libEMF-%v.tar.gz
Source-MD5: 23effe03c1b2eeb5229f14e461204198
BuildDependsOnly: true
Depends: %N-shlibs (= %v-%r)
BuildDepends: autoconf2.6, automake1.11, libtool2, fink (>= 0.24.12)
PatchFile: %n.patch
PatchFile-MD5: b62848824e66dcc0035535051698f349
ConfigureParams: --disable-dependency-tracking --disable-static
CompileScript: <<
autoreconf -f -i
./configure %c
make
<<
InfoTest: TestScript: make check || exit 2
InstallScript: <<
make install DESTDIR=%d
<<
DocFiles: COPYING AUTHORS ChangeLog README NEWS
Splitoff: <<
Package: %N-shlibs
Files: lib/libEMF.1*.dylib
Description: Shared libraries for libemf
Shlibs: %p/lib/libEMF.1.dylib 2.0.0 %n (>= 1.0.2-11)
DocFiles: COPYING.LIB
License: LGPL2+
<<
Splitoff2: <<
Package: %N-bin
Depends: %N-shlibs (= %v-%r)
Files: bin/*
Description: Binary utilities for libemf
DocFiles: COPYING
License: GPL2+
<<
DescPackaging: <<
Originally packaged by Peter O'Gorman.
<<
DescPort: <<
The token for PowerPC machines is __ppc__ not __PPC__
Included patch from Fedora to build on x86_64 (and alpha, not that
we care). --danielj
<<
DescDetail: <<
libEMF is a library for generating Enhanced Metafiles on systems which
don't natively support the ECMA-234 Graphics Device Interface
(GDI). The library is intended to be used as a driver for other
graphics programs such as Grace or gnuplot. Therefore, it implements a
very limited subset of the GDI.
<<
Homepage: http://libemf.sourceforge.net

libemf stable port .patch

diff -ru libEMF-1.0.4.orig/include/libEMF/wine/winbase.h libEMF-1.0.4/include/libEMF/wine/winbase.h
--- libEMF-1.0.4.orig/include/libEMF/wine/winbase.h 2009-08-12 10:15:39.000000000 -0400
+++ libEMF-1.0.4/include/libEMF/wine/winbase.h 2010-01-24 15:53:28.000000000 -0500
@@ -1802,6 +1802,7 @@
VOID WINAPI SetLastError(DWORD);
#endif /* __i386__ && __GNUC__ */

+#if 0
/* FIXME: should handle platforms where sizeof(void*) != sizeof(long) */
static inline PVOID WINAPI InterlockedCompareExchangePointer( PVOID *dest, PVOID xchg, PVOID compare )
{
@@ -1812,6 +1813,7 @@
{
return (PVOID)InterlockedExchange( (PLONG)dest, (LONG)val );
}
+#endif

#ifdef __WINE__
#define GetCurrentProcess() ((HANDLE)0xffffffff)
diff -ru libEMF-1.0.4.orig/include/libEMF/wine/winnt.h libEMF-1.0.4/include/libEMF/wine/winnt.h
--- libEMF-1.0.4.orig/include/libEMF/wine/winnt.h 2009-08-12 10:15:39.000000000 -0400
+++ libEMF-1.0.4/include/libEMF/wine/winnt.h 2010-01-24 15:53:44.000000000 -0500
@@ -29,15 +29,19 @@

/* Architecture dependent settings. */
/* These are hardcoded to avoid dependencies on config.h in Winelib apps. */
-#if defined(__i386__)
+#if defined(__i386__) || defined(__x86_64__)
# 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
# undef ALLOW_UNALIGNED_ACCESS
-#elif defined(__PPC__)
+#elif defined(__ppc__)
# define WORDS_BIGENDIAN
# define BITFIELDS_BIGENDIAN
# undef ALLOW_UNALIGNED_ACCESS
@@ -222,8 +226,13 @@
typedef unsigned short WORD, *PWORD, *LPWORD;
typedef int INT, *PINT, *LPINT;
typedef unsigned int UINT, *PUINT, *LPUINT;
+#if defined(_LP64) || defined(__alpha__)
+typedef unsigned int DWORD, *PDWORD, *LPDWORD;
+typedef unsigned int ULONG, *PULONG, *LPULONG;
+#else
typedef unsigned long DWORD, *PDWORD, *LPDWORD;
typedef unsigned long ULONG, *PULONG, *LPULONG;
+#endif
typedef float FLOAT, *PFLOAT, *LPFLOAT;
typedef double DOUBLE, *PDOUBLE, *LPDOUBLE;
typedef double DATE;
@@ -263,7 +272,11 @@
typedef BYTE BOOLEAN, *PBOOLEAN;
typedef char CHAR, *PCHAR;
typedef short SHORT, *PSHORT;
+#if defined(_LP64) || defined(__alpha__)
+typedef int LONG, *PLONG, *LPLONG;
+#else
typedef long LONG, *PLONG, *LPLONG;
+#endif

/* Some systems might have wchar_t, but we really need 16 bit characters */
#ifndef WINE_WCHAR_DEFINED
@@ -652,6 +665,11 @@

#endif /* __i386__ */

+#ifdef __x86_64__
+#define CONTEXT_FULL 1
+typedef struct _CONTEXT CONTEXT;
+#endif
+
/* Alpha context definitions */
#ifdef _ALPHA_

@@ -846,7 +864,7 @@
#endif /* _MIPS_ */

/* PowerPC context definitions */
-#ifdef __PPC__
+#ifdef __ppc__

#define CONTEXT_CONTROL 0x0001
#define CONTEXT_FLOATING_POINT 0x0002
@@ -967,7 +985,7 @@
DWORD Parameter7;
} STACK_FRAME_HEADER,*PSTACK_FRAME_HEADER;

-#endif /* __PPC__ */
+#endif /* __ppc__ */

#ifdef __sparc__

@@ -1165,7 +1183,7 @@

#endif /* __sparc__ */

-#ifdef __PPC__
+#ifdef __ppc__

/* FIXME: use getcontext() to retrieve full context */
#define _GET_CONTEXT \
@@ -1190,7 +1208,7 @@
void WINAPI name ( t1 a1, t2 a2, t3 a3, t4 a4 ) \
{ _GET_CONTEXT; fn( a1, a2, a3, a4, &context ); }

-#endif /* __PPC__ */
+#endif /* __ppc__ */


#ifndef DEFINE_REGS_ENTRYPOINT_0
diff -ru libEMF-1.0.4.orig/libemf/libemf.h libEMF-1.0.4/libemf/libemf.h
--- libEMF-1.0.4.orig/libemf/libemf.h 2009-10-02 07:59:54.000000000 -0400
+++ libEMF-1.0.4/libemf/libemf.h 2010-01-24 15:53:28.000000000 -0500
@@ -306,6 +306,7 @@
fread( &word, sizeof(INT16), 1, fp_ );
return *this;
}
+#if !(defined(_LP64) || defined(__alpha__))
/*!
* Output a double word (long) to the stream (swabbed).
* \param word word (long) to output.
@@ -374,6 +375,7 @@
fread( &long_, sizeof(LONG), 1, fp_ );
return *this;
}
+#endif
/*!
* Output a (long) int to the stream (swabbed).
* \param int_ (long) int to output.

libemf _unstable_ port .patch