mupdf: enable gcc2 support

This commit is contained in:
Sergei Reznikov
2015-03-31 16:33:25 +03:00
parent a76d676485
commit 56e3cfc913
2 changed files with 64 additions and 16 deletions

View File

@@ -17,18 +17,10 @@ SOURCE_DIR="mupdf-$portVersion-source"
CHECKSUM_SHA256="9813ee330950a641364181649ebd369c947adbcea9d41ed953ec5365640ea563"
PATCHES="mupdf-1.6.patchset"
REVISION="1"
ARCHITECTURES="x86 x86_64"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
# x86_gcc2 is fine as primary target architecture as long as we're building
# for a different secondary architecture.
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
else
ARCHITECTURES="$ARCHITECTURES !x86_gcc2"
fi
REVISION="2"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
mupdf$secondaryArchSuffix = $portVersion compat >= 1.1
devel:libmupdf$secondaryArchSuffix = $portVersion compat >= 1.1
@@ -59,7 +51,7 @@ BUILD_PREREQUIRES="
BUILD()
{
make $jobArgs libs
make build=release $jobArgs libs
}
INSTALL()

View File

@@ -1,4 +1,4 @@
From 6635faa7ccc1f60a6b32149263ec0784a81bc858 Mon Sep 17 00:00:00 2001
From 775b47fa707d6f6aea18e6337afc572ee5c18ed6 Mon Sep 17 00:00:00 2001
From: Chris Roberts <cpr420@gmail.com>
Date: Mon, 18 Nov 2013 01:10:58 -0700
Subject: Remove libm and add install-libs target
@@ -52,13 +52,13 @@ index 3777a1c..d53b02e 100644
tarball:
bash scripts/archive.sh
--
1.8.3.4
2.2.2
From 95cc325359ed50e1448721d5b863ca0cfd098886 Mon Sep 17 00:00:00 2001
From 26b16cd599ff64153508e30925ef55368dcf0ec3 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Wed, 24 Sep 2014 13:25:59 +0200
Subject: Add Haiku support.
Subject: Add Haiku support
diff --git a/Makerules b/Makerules
@@ -94,5 +94,61 @@ index 75573da..c6588be 100644
else ifeq "$(OS)" "Linux"
--
1.8.3.4
2.2.2
From 9a1e2d416be441c199f83239ec3fa0e336c4e0b6 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Tue, 31 Mar 2015 16:21:27 +0300
Subject: gcc2 fixes
---
include/mupdf/fitz/system.h | 6 ++++++
scripts/cmapdump.c | 14 ++++++++++++++
2 files changed, 20 insertions(+)
diff --git a/include/mupdf/fitz/system.h b/include/mupdf/fitz/system.h
index 5df0c50..9e56bdb 100644
--- a/include/mupdf/fitz/system.h
+++ b/include/mupdf/fitz/system.h
@@ -61,6 +61,12 @@
#define fz_jmp_buf jmp_buf
#endif
+#ifdef __HAIKU__
+#if __GNUC__ < 3
+#define va_copy __va_copy
+#endif
+#endif
+
#ifdef _MSC_VER /* Microsoft Visual C */
/* MSVC up to VS2012 */
diff --git a/scripts/cmapdump.c b/scripts/cmapdump.c
index 3251c70..50b8893 100644
--- a/scripts/cmapdump.c
+++ b/scripts/cmapdump.c
@@ -19,6 +19,20 @@
#include "../source/fitz/ftoa.c"
#include "../source/fitz/printf.c"
+#ifdef __HAIKU__
+#if __GNUC__ < 3
+#include "../source/fitz/output.c"
+
+unsigned int
+fz_pixmap_size(fz_context *ctx, fz_pixmap * pix)
+{
+ if (pix == NULL)
+ return 0;
+ return sizeof(*pix) + pix->n * pix->w * pix->h;
+}
+#endif
+#endif
+
#include "../source/pdf/pdf-lex.c"
#include "../source/pdf/pdf-cmap.c"
#include "../source/pdf/pdf-cmap-parse.c"
--
2.2.2