summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Kursawe <phosphan@gentoo.org>2008-04-23 10:54:11 +0000
committerPatrick Kursawe <phosphan@gentoo.org>2008-04-23 10:54:11 +0000
commitbb00c519ca9908f5f7e9e296a051a6c3103177d1 (patch)
tree9b02da6b7dcc476783dac4c71259ac7e5541360e /media-libs/libemf
parentx86 stable wrt #208908 (diff)
downloadgentoo-2-bb00c519ca9908f5f7e9e296a051a6c3103177d1.tar.gz
gentoo-2-bb00c519ca9908f5f7e9e296a051a6c3103177d1.tar.bz2
gentoo-2-bb00c519ca9908f5f7e9e296a051a6c3103177d1.zip
Fixing compilation for gcc 4.3, see bug #218531
(Portage version: 2.1.4.4)
Diffstat (limited to 'media-libs/libemf')
-rw-r--r--media-libs/libemf/ChangeLog9
-rw-r--r--media-libs/libemf/files/libEMF-1.0-amd64.patch66
-rw-r--r--media-libs/libemf/files/libEMF-1.0-gcc3.patch75
-rw-r--r--media-libs/libemf/files/libemf-1.0.3-gcc4.3.patch10
-rw-r--r--media-libs/libemf/libemf-1.0.3.ebuild10
-rw-r--r--media-libs/libemf/libemf-1.0.ebuild36
6 files changed, 25 insertions, 181 deletions
diff --git a/media-libs/libemf/ChangeLog b/media-libs/libemf/ChangeLog
index 42ea123fbff4..57d3c48382da 100644
--- a/media-libs/libemf/ChangeLog
+++ b/media-libs/libemf/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for media-libs/libemf
-# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/libemf/ChangeLog,v 1.23 2007/02/18 12:31:11 nixnut Exp $
+# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libemf/ChangeLog,v 1.24 2008/04/23 10:54:10 phosphan Exp $
+
+ 23 Apr 2008; Patrick Kursawe <phosphan@gentoo.org>
+ +files/libemf-1.0.3-gcc4.3.patch, -files/libEMF-1.0-amd64.patch,
+ -files/libEMF-1.0-gcc3.patch, -libemf-1.0.ebuild, libemf-1.0.3.ebuild:
+ Fixing compilation for gcc 4.3, see bug #218531
18 Feb 2007; nixnut <nixnut@gentoo.org> libemf-1.0.3.ebuild:
Stable on ppc wrt bug 160141
diff --git a/media-libs/libemf/files/libEMF-1.0-amd64.patch b/media-libs/libemf/files/libEMF-1.0-amd64.patch
deleted file mode 100644
index f3279568baa1..000000000000
--- a/media-libs/libemf/files/libEMF-1.0-amd64.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-diff -dur libEMF-1.0.orig/include/wine/winnt.h libEMF-1.0/include/wine/winnt.h
---- libEMF-1.0.orig/include/wine/winnt.h 2002-01-29 05:31:53.000000000 +0100
-+++ libEMF-1.0/include/wine/winnt.h 2004-01-22 14:22:35.382239593 +0100
-@@ -45,6 +45,10 @@
- # undef WORDS_BIGENDIAN
- # undef BITFIELDS_BIGENDIAN
- # undef ALLOW_UNALIGNED_ACCESS
-+#elif defined(__x86_64__)
-+# undef WORDS_BIGENDIAN
-+# undef BITFIELDS_BIGENDIAN
-+# define ALLOW_UNALIGNED_ACCESS
- #elif !defined(RC_INVOKED)
- # error Unknown CPU architecture!
- #endif
-@@ -211,7 +215,7 @@
- typedef unsigned short WORD, *PWORD, *LPWORD;
- typedef int INT, *PINT, *LPINT;
- typedef unsigned int UINT, *PUINT, *LPUINT;
--#if !defined(__alpha__)
-+#if !defined(__alpha__) && !defined(__x86_64__)
- typedef unsigned long DWORD, *PDWORD, *LPDWORD;
- typedef unsigned long ULONG, *PULONG, *LPULONG;
- #else /* defined( __alpha__ ) */
-@@ -257,7 +261,7 @@
- typedef BYTE BOOLEAN, *PBOOLEAN;
- typedef char CHAR, *PCHAR;
- typedef short SHORT, *PSHORT;
--#if !defined(__alpha__)
-+#if !defined(__alpha__) && !defined(__x86_64__)
- typedef long LONG, *PLONG, *LPLONG;
- #else /* defined( __alpha__ ) */
- typedef int LONG, *PLONG, *LPLONG;
-@@ -1045,6 +1049,11 @@
-
- #endif /* __sparc__ */
-
-+#if defined(__x86_64__)
-+#define CONTEXT_FULL 1
-+typedef struct _CONTEXT CONTEXT;
-+#endif
-+
- #if !defined(CONTEXT_FULL) && !defined(RC_INVOKED)
- #error You need to define a CONTEXT for your CPU
- #endif
-diff -dur libEMF-1.0.orig/libemf/libemf.h libEMF-1.0/libemf/libemf.h
---- libEMF-1.0.orig/libemf/libemf.h 2002-01-29 05:54:27.000000000 +0100
-+++ libEMF-1.0/libemf/libemf.h 2004-01-22 14:23:14.315813724 +0100
-@@ -332,7 +332,7 @@
- fread( &dword, sizeof(DWORD), 1, fp_ );
- return *this;
- }
--#if !defined(__alpha__)
-+#if !defined(__alpha__) && !defined(__x86_64__)
- /*!
- * Output a long int to the stream (swabbed).
- * \param long long int to output.
-@@ -402,7 +402,7 @@
- fread( &int_, sizeof(INT), 1, fp_ );
- return *this;
- }
--#if !defined(__alpha__)
-+#if !defined(__alpha__) && !defined(__x86_64__)
- /*!
- * Output a (long) unsigned int to the stream (swabbed).
- * \param uint (long) unsigned int to output.
-Only in libEMF-1.0/libemf: libemf.h~
diff --git a/media-libs/libemf/files/libEMF-1.0-gcc3.patch b/media-libs/libemf/files/libEMF-1.0-gcc3.patch
deleted file mode 100644
index 05def36322c0..000000000000
--- a/media-libs/libemf/files/libEMF-1.0-gcc3.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-diff -ru libEMF-1.0/libemf/libemf.cpp libEMF-1.0-new/libemf/libemf.cpp
---- libEMF-1.0/libemf/libemf.cpp 2002-01-29 04:37:54.000000000 +0100
-+++ libEMF-1.0-new/libemf/libemf.cpp 2002-11-20 19:03:37.000000000 +0100
-@@ -48,7 +48,7 @@
- be32 = !be16;
-
- if ( be32 != be16 ) {
-- cerr << "endian-ness not consistent between short's and int's!" << endl;
-+ std::cerr << "endian-ness not consistent between short's and int's!" << std::endl;
- ::abort();
- }
-
-@@ -849,7 +849,7 @@
- if ( dc->fp ) {
-
- std::for_each( dc->records.begin(), dc->records.end(),
-- std::bind2nd( std::mem_fun1( &EMF::METARECORD::serialize ),
-+ std::bind2nd( mem_fun1( &EMF::METARECORD::serialize ),
- dc->ds ) );
- fclose( dc->fp );
-
-@@ -896,7 +896,7 @@
- if ( dc->fp ) {
-
- std::for_each( dc->records.begin(), dc->records.end(),
-- std::bind2nd( std::mem_fun1( &EMF::METARECORD::serialize ),
-+ std::bind2nd( mem_fun1( &EMF::METARECORD::serialize ),
- dc->ds ) );
- }
-
-@@ -1032,7 +1032,7 @@
- if ( feof( fp ) ) break;
-
- if ( emr.nSize == 0 ) {
-- cerr << "GetEnhMetaFileW error: record size == 0. cannot continue" << endl;
-+ std::cerr << "GetEnhMetaFileW error: record size == 0. cannot continue" << std::endl;
- fclose( fp );
- return 0;
- }
-@@ -1050,8 +1050,8 @@
- dc->appendRecord( record );
- }
- else
-- cerr << "GetEnhMetaFileW warning: read unknown record type " << emr.iType
-- << " of size " << emr.nSize << endl;
-+ std::cerr << "GetEnhMetaFileW warning: read unknown record type " << emr.iType
-+ << " of size " << emr.nSize << std::endl;
-
- // Regardless, position ourselves at the next record.
- fseek( fp, next_position, SEEK_SET );
-@@ -1108,7 +1108,7 @@
- if ( dc == 0 ) return;
-
- std::for_each( dc->records.begin(), dc->records.end(),
-- std::mem_fun( &EMF::METARECORD::edit ) );
-+ mem_fun( &EMF::METARECORD::edit ) );
- #endif /* ENABLE_EDITING */
- }
-
-diff -ru libEMF-1.0.orig/libemf/libemf.h libEMF-1.0/libemf/libemf.h
---- libEMF-1.0.orig/libemf/libemf.h 2002-01-29 05:54:27.000000000 +0100
-+++ libEMF-1.0/libemf/libemf.h 2002-11-20 19:08:00.000000000 +0100
-@@ -21,10 +21,12 @@
- #ifndef _LIBEMF_H
- #define _LIBEMF_H 1
-
-+#include <iostream>
- #include <cmath>
- #include <vector>
- #include <map>
- #include <functional>
-+#include <backward/function.h>
- #include <algorithm>
-
- #include <config.h>
diff --git a/media-libs/libemf/files/libemf-1.0.3-gcc4.3.patch b/media-libs/libemf/files/libemf-1.0.3-gcc4.3.patch
new file mode 100644
index 000000000000..7dc4f6a3474e
--- /dev/null
+++ b/media-libs/libemf/files/libemf-1.0.3-gcc4.3.patch
@@ -0,0 +1,10 @@
+--- libemf/libemf.cpp
++++ libemf/libemf.cpp
+@@ -19,6 +19,7 @@
+ *
+ */
+ #include <iostream>
++#include <climits>
+
+ #include "libemf.h"
+
diff --git a/media-libs/libemf/libemf-1.0.3.ebuild b/media-libs/libemf/libemf-1.0.3.ebuild
index d7da6b7b6c72..21fa09a6d943 100644
--- a/media-libs/libemf/libemf-1.0.3.ebuild
+++ b/media-libs/libemf/libemf-1.0.3.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/libemf/libemf-1.0.3.ebuild,v 1.10 2007/02/18 12:31:11 nixnut Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libemf/libemf-1.0.3.ebuild,v 1.11 2008/04/23 10:54:10 phosphan Exp $
inherit eutils
@@ -18,6 +18,12 @@ DEPEND=""
S=${WORKDIR}/${MY_P}
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/libemf-1.0.3-gcc4.3.patch
+}
+
src_compile() {
econf --enable-editing || die
emake || die
diff --git a/media-libs/libemf/libemf-1.0.ebuild b/media-libs/libemf/libemf-1.0.ebuild
deleted file mode 100644
index f0763b9195d1..000000000000
--- a/media-libs/libemf/libemf-1.0.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2006 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/libemf/libemf-1.0.ebuild,v 1.17 2006/04/13 19:25:03 chutzpah Exp $
-
-inherit eutils
-
-MY_P="${P/emf/EMF}"
-DESCRIPTION="Library implementation of ECMA-234 API for the generation of enhanced metafiles."
-HOMEPAGE="http://libemf.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
-
-LICENSE="LGPL-2.1 GPL-2"
-SLOT="0"
-KEYWORDS="ppc ppc64 sparc x86"
-IUSE=""
-
-DEPEND=""
-
-S=${WORKDIR}/${MY_P}
-
-src_unpack() {
- unpack ${A}
- epatch ${FILESDIR}/${MY_P}-gcc3.patch
- epatch ${FILESDIR}/${MY_P}-amd64.patch
-}
-
-src_compile() {
- econf --enable-editing || die
- emake || die
-}
-
-src_install() {
- make DESTDIR=${D} install || die
- dohtml doc/html/*
- dodoc README NEWS AUTHORS ChangeLog
-}