diff options
author | wiz <wiz> | 2012-03-28 15:16:34 +0000 |
---|---|---|
committer | wiz <wiz> | 2012-03-28 15:16:34 +0000 |
commit | cc02ac43b249d29b03c75ae7999bc1e86abe7eb8 (patch) | |
tree | 3f1278f3a1b2dfaadc4df0cf238515d76f6781cd | |
parent | 1848e8af6eb2f231098e2e08dde5a9a90fcc2177 (diff) | |
download | pkgsrc-cc02ac43b249d29b03c75ae7999bc1e86abe7eb8.tar.gz |
Fix build with clang.
-rw-r--r-- | converters/libwpg/distinfo | 3 | ||||
-rw-r--r-- | converters/libwpg/patches/patch-src_lib_WPG2Parser.cpp | 34 | ||||
-rw-r--r-- | converters/libwps/distinfo | 4 | ||||
-rw-r--r-- | converters/libwps/patches/patch-src_lib_WPS8.cpp | 17 |
4 files changed, 52 insertions, 6 deletions
diff --git a/converters/libwpg/distinfo b/converters/libwpg/distinfo index 0dcabcfa9ea..43f9de07f55 100644 --- a/converters/libwpg/distinfo +++ b/converters/libwpg/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.3 2011/02/04 19:56:26 adam Exp $ +$NetBSD: distinfo,v 1.4 2012/03/28 15:16:34 wiz Exp $ SHA1 (libwpg-0.2.0.tar.bz2) = 34a692566bda66488f83c635774d1bd92cee0fdf RMD160 (libwpg-0.2.0.tar.bz2) = 0169a85c75040dd96b03702c5d2cd67dfded6d1f Size (libwpg-0.2.0.tar.bz2) = 326684 bytes +SHA1 (patch-src_lib_WPG2Parser.cpp) = 13d38364aca904afa7a00712c6d89311dcb4b4b0 diff --git a/converters/libwpg/patches/patch-src_lib_WPG2Parser.cpp b/converters/libwpg/patches/patch-src_lib_WPG2Parser.cpp new file mode 100644 index 00000000000..ede8a0014b1 --- /dev/null +++ b/converters/libwpg/patches/patch-src_lib_WPG2Parser.cpp @@ -0,0 +1,34 @@ +$NetBSD: patch-src_lib_WPG2Parser.cpp,v 1.1 2012/03/28 15:16:35 wiz Exp $ + +Fix clang warning +error: operator '?:' has lower precedence than '-'; '-' will be evaluated first [-Werror,-Wparentheses] + +--- src/lib/WPG2Parser.cpp.orig 2010-11-09 08:36:36.000000000 +0000 ++++ src/lib/WPG2Parser.cpp +@@ -783,7 +783,7 @@ void WPG2Parser::handleDPPenForeColor() + unsigned char red = (m_doublePrecision) ? readU16()>>8 : readU8(); + unsigned char green = (m_doublePrecision) ? readU16()>>8 : readU8(); + unsigned char blue = (m_doublePrecision) ? readU16()>>8 : readU8(); +- unsigned char alpha = 0xff - (m_doublePrecision) ? readU16()>>8 : readU8(); ++ unsigned char alpha = (0xff - (m_doublePrecision)) ? readU16()>>8 : readU8(); + + m_style.insert("svg:stroke-color", libwpg::WPGColor(red, green, blue, alpha).getColorString()); + m_style.insert("svg:stroke-opacity", libwpg::WPGColor(red, green, blue, alpha).getOpacity(), WPX_PERCENT); +@@ -1106,7 +1106,7 @@ void WPG2Parser::handleDPBrushForeColor( + unsigned char red = (m_doublePrecision) ? readU16()>>8 : readU8(); + unsigned char green = (m_doublePrecision) ? readU16()>>8 : readU8(); + unsigned char blue = (m_doublePrecision) ? readU16()>>8 : readU8(); +- unsigned char alpha = 0xff - (m_doublePrecision) ? readU16()>>8 : readU8(); ++ unsigned char alpha = (0xff - (m_doublePrecision)) ? readU16()>>8 : readU8(); + WPG_DEBUG_MSG((" Foreground color (RGBA): %d %d %d %d\n", red, green, blue, alpha)); + + m_brushForeColor = libwpg::WPGColor(red, green, blue, alpha); +@@ -1131,7 +1131,7 @@ void WPG2Parser::handleDPBrushForeColor( + unsigned char red = (m_doublePrecision) ? readU16()>>8 : readU8(); + unsigned char green = (m_doublePrecision) ? readU16()>>8 : readU8(); + unsigned char blue = (m_doublePrecision) ? readU16()>>8 : readU8(); +- unsigned char alpha = 0xff - (m_doublePrecision) ? readU16()>>8 : readU8(); ++ unsigned char alpha = (0xff - (m_doublePrecision)) ? readU16()>>8 : readU8(); + libwpg::WPGColor color(red, green, blue, alpha); + colors.push_back(color); + WPG_DEBUG_MSG((" Color #%d (RGBA): %d %d %d %d\n", i+1, red, green, blue, alpha)); diff --git a/converters/libwps/distinfo b/converters/libwps/distinfo index ca6566f612b..82b715a7e11 100644 --- a/converters/libwps/distinfo +++ b/converters/libwps/distinfo @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.5 2012/02/16 18:04:08 hans Exp $ +$NetBSD: distinfo,v 1.6 2012/03/28 15:17:19 wiz Exp $ SHA1 (libwps-0.2.2.tar.bz2) = d8c126cb5601afaaaf14507fc09990f8ca41b301 RMD160 (libwps-0.2.2.tar.bz2) = 72aff204a2a386ade5b7d5a6cede4c75f1929eb5 Size (libwps-0.2.2.tar.bz2) = 295486 bytes SHA1 (patch-aa) = 5dd49b6bcb8c147409aa7192f365e9ab0a459ffb SHA1 (patch-src_lib_WPS4.cpp) = e39061f971199f4efe3e80793ac16aec98ba547c -SHA1 (patch-src_lib_WPS8.cpp) = 63a5124844c8fc08f98f913f3a375570f1083db0 +SHA1 (patch-src_lib_WPS8.cpp) = c3326fb46884fe5b5ba28f4fe75861b0e3ef35a4 diff --git a/converters/libwps/patches/patch-src_lib_WPS8.cpp b/converters/libwps/patches/patch-src_lib_WPS8.cpp index e5d50db3c11..6e363266625 100644 --- a/converters/libwps/patches/patch-src_lib_WPS8.cpp +++ b/converters/libwps/patches/patch-src_lib_WPS8.cpp @@ -1,6 +1,8 @@ -$NetBSD: patch-src_lib_WPS8.cpp,v 1.2 2012/02/16 18:04:08 hans Exp $ +$NetBSD: patch-src_lib_WPS8.cpp,v 1.3 2012/03/28 15:17:19 wiz Exp $ ---- src/lib/WPS8.cpp.orig 2011-02-04 20:04:48.000000000 +0000 +3rd chunk: fix clang error: expression result unused [-Werror,-Wunused-value] + +--- src/lib/WPS8.cpp.orig 2011-05-03 13:00:13.000000000 +0000 +++ src/lib/WPS8.cpp @@ -159,7 +159,7 @@ void WPS8Parser::readStreams(WPXInputStr @@ -20,7 +22,16 @@ $NetBSD: patch-src_lib_WPS8.cpp,v 1.2 2012/02/16 18:04:08 hans Exp $ type = readU32(input); } else input->seek(len-2,WPX_SEEK_CUR); -@@ -251,7 +251,7 @@ void WPS8Parser::appendUTF16LE(WPXInputS +@@ -196,8 +196,6 @@ void WPS8Parser::readNotes(std::vector<W + if (headerIndexTable.end() == pos) + return; + +- pos->second.length; +- + uint32_t unk1; + uint32_t count; + uint32_t boff; +@@ -251,7 +249,7 @@ void WPS8Parser::appendUTF16LE(WPXInputS uint16_t high_surrogate = 0; bool fail = false; uint16_t readVal; |