Compare commits

...

4 Commits
master ... f11

Author SHA1 Message Date
Fedora Release Engineering 65c1dedd22 dist-git conversion 2010-07-28 20:38:39 +00:00
Bill Nottingham 26cd11c578 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:46:55 +00:00
Dan Horák 4fa36c19c8 - add support for s390/s390x 2009-06-03 13:56:30 +00:00
Jesse Keating 413dccaa7d Initialize branch F-11 for libEMF 2009-04-15 07:04:07 +00:00
4 changed files with 119 additions and 22 deletions

View File

View File

@ -1,21 +0,0 @@
# Makefile for source rpm: libEMF
# $Id$
NAME := libEMF
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

113
libEMF-s390.patch Normal file
View File

@ -0,0 +1,113 @@
--- 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

@ -2,7 +2,7 @@ Summary: A library for generating Enhanced Metafiles
Summary(pl): Biblioteka do generowania plików w formacie Enhanced Metafile
Name: libEMF
Version: 1.0.3
Release: 8%{?dist}
Release: 9%{?dist}
License: LGPLv2+ and GPLv2+
Group: System Environment/Libraries
Source0: http://dl.sourceforge.net/pstoedit/%{name}-%{version}.tar.gz
@ -10,6 +10,7 @@ Source0: http://dl.sourceforge.net/pstoedit/%{name}-%{version}.tar.gz
Patch0: %{name}-amd64.patch
Patch1: %{name}-axp.patch
Patch2: %{name}-gcc43.patch
Patch3: %{name}-s390.patch
URL: http://libemf.sourceforge.net/
BuildRequires: libstdc++-devel
BuildRequires: libtool
@ -47,6 +48,7 @@ Pliki nagłówkowe libEMF.
%patch0 -p1 -b .amd64
%patch1 -p1 -b .axp
%patch2 -p1 -b .gcc43
%patch3 -p1 -b .s390
chmod 0644 libemf/libemf.h
%build
@ -92,6 +94,9 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/libEMF
%changelog
* Wed Jun 3 2009 Dan Horak <dan[at]danny.cz> - 1.0.3-9
- add support for s390/s390x
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.3-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild