upload libpagemaker 0.0.1
Change-Id: I287d4947735b82bb13bb6b18880dca594b17e38b
This commit is contained in:
parent
170109708e
commit
bf2c2ec5d8
5 changed files with 2 additions and 106 deletions
|
@ -114,8 +114,8 @@ export OPENLDAP_TARBALL := 804c6cb5698db30b75ad0ff1c25baefd-openldap-2.4.31.tgz
|
|||
export OPENSSL_MD5SUM := c8dc151a671b9b92ff3e4c118b174972
|
||||
export OPENSSL_TARBALL := openssl-1.0.1i.tar.gz
|
||||
export ORCUS_TARBALL := 7681383be6ce489d84c1c74f4e7f9643-liborcus-0.7.0.tar.bz2
|
||||
export PAGEMAKER_MD5SUM := f4e44d2b3a67b5d5a18dce50366156f4
|
||||
export PAGEMAKER_TARBALL := libpagemaker-0.0.0.tar.bz2
|
||||
export PAGEMAKER_MD5SUM := 3572175bd4e7d134f26b6762d322a1d1
|
||||
export PAGEMAKER_TARBALL := libpagemaker-0.0.1.tar.bz2
|
||||
export PIXMAN_TARBALL := c63f411b3ad147db2bcce1bf262a0e02-pixman-0.24.4.tar.bz2
|
||||
export PNG_MD5SUM := 5266905cef49d1224437465ad4d67fd9
|
||||
export PNG_TARBALL := libpng-1.5.18.tar.gz
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
From ae6e41e1026a2a84641bb42aa7fb89a9a30a9114 Mon Sep 17 00:00:00 2001
|
||||
From: David Tardon <dtardon@redhat.com>
|
||||
Date: Fri, 27 Jun 2014 11:30:38 +0200
|
||||
Subject: [PATCH 1/3] define M_PI if not available
|
||||
|
||||
---
|
||||
src/lib/libpagemaker_utils.h | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/src/lib/libpagemaker_utils.h b/src/lib/libpagemaker_utils.h
|
||||
index fed5f3d..ab070b5 100644
|
||||
--- a/src/lib/libpagemaker_utils.h
|
||||
+++ b/src/lib/libpagemaker_utils.h
|
||||
@@ -10,6 +10,7 @@
|
||||
#ifndef __LIBPAGEMAKER_UTILS_H__
|
||||
#define __LIBPAGEMAKER_UTILS_H__
|
||||
|
||||
+#include <cmath>
|
||||
#include <cstdio>
|
||||
|
||||
#include <string>
|
||||
@@ -19,6 +20,10 @@
|
||||
#include <librevenge-stream/librevenge-stream.h>
|
||||
#include <librevenge/librevenge.h>
|
||||
|
||||
+#ifndef M_PI
|
||||
+#define M_PI 3.14159265358979323846
|
||||
+#endif
|
||||
+
|
||||
#ifdef _MSC_VER
|
||||
|
||||
typedef unsigned char uint8_t;
|
||||
--
|
||||
1.9.3
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
From 7c9cc06fecd69e88428ee5b0cf5a3a3cf40db44b Mon Sep 17 00:00:00 2001
|
||||
From: David Tardon <dtardon@redhat.com>
|
||||
Date: Fri, 27 Jun 2014 11:30:50 +0200
|
||||
Subject: [PATCH 2/3] add missing typedef on windows
|
||||
|
||||
---
|
||||
src/lib/libpagemaker_utils.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/lib/libpagemaker_utils.h b/src/lib/libpagemaker_utils.h
|
||||
index ab070b5..73d2a59 100644
|
||||
--- a/src/lib/libpagemaker_utils.h
|
||||
+++ b/src/lib/libpagemaker_utils.h
|
||||
@@ -27,6 +27,7 @@
|
||||
#ifdef _MSC_VER
|
||||
|
||||
typedef unsigned char uint8_t;
|
||||
+typedef signed char int8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef short int16_t;
|
||||
typedef unsigned uint32_t;
|
||||
--
|
||||
1.9.3
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
From e5700eff3f09a6c0b78663b397c141f677c5b16b Mon Sep 17 00:00:00 2001
|
||||
From: David Tardon <dtardon@redhat.com>
|
||||
Date: Fri, 27 Jun 2014 11:33:09 +0200
|
||||
Subject: [PATCH 3/3] round is not available on windows
|
||||
|
||||
---
|
||||
src/lib/PMDParser.cpp | 7 +++----
|
||||
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/lib/PMDParser.cpp b/src/lib/PMDParser.cpp
|
||||
index 7c9ff2d..736ea1c 100644
|
||||
--- a/src/lib/PMDParser.cpp
|
||||
+++ b/src/lib/PMDParser.cpp
|
||||
@@ -12,7 +12,6 @@
|
||||
#include <cassert>
|
||||
#include <vector>
|
||||
#include <limits>
|
||||
-#include <math.h>
|
||||
#include <librevenge/librevenge.h>
|
||||
#include <boost/optional.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
@@ -608,9 +607,9 @@ void PMDParser::parseColors(const PMDRecordContainer &container)
|
||||
|
||||
uint16_t max = (std::numeric_limits<uint16_t>::max)();
|
||||
|
||||
- red = 255* round((1 - std::min(1.0, (double)cyan/max + (double)black/max)));
|
||||
- green = 255*round((1 - std::min(1.0, (double)magenta/max + (double)black/max)));
|
||||
- blue = 255*round((1 - std::min(1.0, (double)yellow/max + (double)black/max)));
|
||||
+ red = 255* std::floor((1 - std::min(1.0, (double)cyan/max + (double)black/max) + 0.5));
|
||||
+ green = 255*std::floor((1 - std::min(1.0, (double)magenta/max + (double)black/max) + 0.5));
|
||||
+ blue = 255*std::floor((1 - std::min(1.0, (double)yellow/max + (double)black/max) + 0.5));
|
||||
}
|
||||
else if (colorModel == HLS)
|
||||
{ }
|
||||
--
|
||||
1.9.3
|
||||
|
|
@ -11,12 +11,4 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,libpagemaker))
|
|||
|
||||
$(eval $(call gb_UnpackedTarball_set_tarball,libpagemaker,$(PAGEMAKER_TARBALL)))
|
||||
|
||||
$(eval $(call gb_UnpackedTarball_set_patchlevel,libpagemaker,1))
|
||||
|
||||
$(eval $(call gb_UnpackedTarball_add_patches,libpagemaker,\
|
||||
external/libpagemaker/0001-define-M_PI-if-not-available.patch \
|
||||
external/libpagemaker/0002-add-missing-typedef-on-windows.patch \
|
||||
external/libpagemaker/0003-round-is-not-available-on-windows.patch \
|
||||
))
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
|
|
Loading…
Reference in a new issue