================================ libemf:source=1.0.4-1 cvc rdiff libemf -1 /weasel.rpath.org@wgl:3-devel/1.0.4-1 ================================ 1.0.4-1 Filip Brcic (brcha@xxxxxxxxxxxx) Thu Jun 10 13:35:26 2010 libemf 1.0.4 libEMF-1.0.4.tar.gz: new libemf-1.0.4-amd64-alpha.patch: new --- /dev/null +++ libemf-1.0.4-amd64-alpha.patch @@ -0,0 +95 @@ +--- a/include/libEMF/wine/winbase.h ++++ b/include/libEMF/wine/winbase.h +@@ -1802,6 +1802,7 @@ LONG WINAPI InterlockedIncrement(PLONG); + 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 @@ static inline PVOID WINAPI InterlockedExchangePointer( PVOID *dest, PVOID val ) + { + return (PVOID)InterlockedExchange( (PLONG)dest, (LONG)val ); + } ++#endif + + #ifdef __WINE__ + #define GetCurrentProcess() ((HANDLE)0xffffffff) +--- a/include/libEMF/wine/winnt.h ++++ b/include/libEMF/wine/winnt.h +@@ -29,10 +29,14 @@ + + /* 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 +@@ -222,8 +226,13 @@ typedef unsigned short USHORT, *PUSHORT, *LPUSHORT; + 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 VOID *PVOID, *LPVOID; + 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,8 +665,13 @@ typedef CONTEXT86 CONTEXT; + + #endif /* __i386__ */ + ++#ifdef __x86_64__ ++#define CONTEXT_FULL 1 ++typedef struct _CONTEXT CONTEXT; ++#endif ++ + /* Alpha context definitions */ +-#ifdef _ALPHA_ ++#if defined(__alpha__) + + #define CONTEXT_ALPHA 0x00020000 + +--- a/libemf/libemf.h ++++ b/libemf/libemf.h +@@ -306,6 +306,7 @@ namespace EMF { + 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 @@ namespace EMF { + fread( &long_, sizeof(LONG), 1, fp_ ); + return *this; + } ++#endif + /*! + * Output a (long) int to the stream (swabbed). + * \param int_ (long) int to output. libemf.recipe: new --- /dev/null +++ libemf.recipe @@ -0,0 +53 @@ +# +# Copyright (c) 2010 Weasel GNU/Linux [Filip Brcic (brcha@xxxxxxxxxxxx)] +# Distributed under the terms of the GNU General Public License v3 +# + +class Libemf(AutoPackageRecipe): + name = 'libemf' + version = '1.0.4' + + buildRequires = [ + 'libstdc++:devel', 'gcc-c++:runtime', + 'autoconf-wrapper:runtime', 'autoconf25:runtime', + 'automake-wrapper:runtime', 'automake110:runtime', + 'libtool:runtime', 'libtool:devel', 'm4:runtime', + ] + + shortDesc = 'Library implementation of ECMA-234 API for the generation of enhanced metafiles' + longDesc = """ +libEMF is a C/C++ library which provides a drawing toolkit based on +ECMA-234. The general purpose of this library is to create vector +graphics files on POSIX systems which can be imported into +StarOffice/OpenOffice. The Enhanced MetaFile (EMF) is one of the two +color vector graphics format which is "vectorially" understood by +SO/OO. (SO/OO can import Encapsulated PostScript files, but will only +display it if it has a bitmap preview image. SO/OO can also import a +DXF file, but as near as I can tell, this is only +monochrome. OpenOffice now has an XML based file format; in the +future, use of this format will probably supplant this library.) The +EMF format also has the additional advantage that it can be "broken" +into its constituent components and edited like any other SO/OO +graphics object. +""" + url = 'http://libemf.sourceforge.net/' + licenses = [ 'LGPL-2.1', 'GPL-2' ] + categories = [ 'Media/Libraries' ] + + def unpack(r): + r.macros.archive_name = r.name.replace('emf', 'EMF') + r.addArchive('mirror://sourceforge/libemf/') + + r.addPatch('libemf-1.0.4-amd64-alpha.patch') + + r.Environment('WANT_AUTOCONF', '2.5') + r.Environment('WANT_AUTOMAKE', '1.10') + r.Autoreconf() + + def configure(r): + r.Configure( + ' --enable-editing' + ) + + def policy(r): + r.Doc('doc/html') Committed by: brcha