Gentoo Archives: gentoo-commits

From: Amy Liffey <amynka@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-geosciences/mapnik/, sci-geosciences/mapnik/files/
Date: Thu, 02 Nov 2017 19:09:23
Message-Id: 1509649614.aa58770021c587f3a16b4bb9dbb6621dc9da4be6.amynka@gentoo
1 commit: aa58770021c587f3a16b4bb9dbb6621dc9da4be6
2 Author: Amy Liffey <amynka <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 2 19:04:06 2017 +0000
4 Commit: Amy Liffey <amynka <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 2 19:06:54 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa587700
7
8 sci-geosciences/mapnik: fix icu and libs
9
10 Submitted-by: calimeroteknik <AT> free.fr
11
12 Closes:https://bugs.gentoo.org/618674
13 Closes:https://bugs.gentoo.org/630948
14
15 Package-Manager: Portage-2.3.8, Repoman-2.3.1
16
17 .../mapnik-3.0.9-harbuzz_sharper-upstream.patch | 25 +++++
18 .../files/mapnik-3.0.9-unicode-upstream.patch | 11 +++
19 sci-geosciences/mapnik/mapnik-3.0.9-r1.ebuild | 107 +++++++++++++++++++++
20 3 files changed, 143 insertions(+)
21
22 diff --git a/sci-geosciences/mapnik/files/mapnik-3.0.9-harbuzz_sharper-upstream.patch b/sci-geosciences/mapnik/files/mapnik-3.0.9-harbuzz_sharper-upstream.patch
23 new file mode 100644
24 index 00000000000..cb81f526568
25 --- /dev/null
26 +++ b/sci-geosciences/mapnik/files/mapnik-3.0.9-harbuzz_sharper-upstream.patch
27 @@ -0,0 +1,25 @@
28 +--- a/include/mapnik/text/harfbuzz_shaper.hpp 2017-10-31 17:45:30.737250086 +0100
29 ++++ b/include/mapnik/text/harfbuzz_shaper.hpp 2017-10-31 17:46:56.002247847 +0100
30 +@@ -39,10 +39,11 @@
31 + // harfbuzz
32 + #include <harfbuzz/hb.h>
33 + #include <harfbuzz/hb-ft.h>
34 +-
35 ++#include <unicode/uvernum.h>
36 + // icu
37 + #include <unicode/uscript.h>
38 +
39 ++
40 + namespace mapnik
41 + {
42 +
43 +@@ -55,7 +56,8 @@
44 + static inline const uint16_t * uchar_to_utf16(const UChar* src)
45 + {
46 + static_assert(sizeof(UChar) == sizeof(uint16_t),"UChar is eq size to uint16_t");
47 +-#if defined(_MSC_VER)
48 ++#if defined(_MSC_VER) || (U_ICU_VERSION_MAJOR_NUM >= 59)
49 ++ // ^^ http://site.icu-project.org/download/59#TOC-ICU4C-char16_t1
50 + return reinterpret_cast<const uint16_t *>(src);
51 + #else
52 + return src;
53
54 diff --git a/sci-geosciences/mapnik/files/mapnik-3.0.9-unicode-upstream.patch b/sci-geosciences/mapnik/files/mapnik-3.0.9-unicode-upstream.patch
55 new file mode 100644
56 index 00000000000..0233eb4e3fd
57 --- /dev/null
58 +++ b/sci-geosciences/mapnik/files/mapnik-3.0.9-unicode-upstream.patch
59 @@ -0,0 +1,11 @@
60 +--- a/include/mapnik/unicode.hpp 2017-10-31 17:53:23.507237672 +0100
61 ++++ b/include/mapnik/unicode.hpp 2017-10-31 17:53:47.096237053 +0100
62 +@@ -31,6 +31,8 @@
63 + // std
64 + #include <cstdint>
65 + #include <string>
66 ++// icu
67 ++#include <unicode/unistr.h>
68 +
69 + struct UConverter;
70 +
71
72 diff --git a/sci-geosciences/mapnik/mapnik-3.0.9-r1.ebuild b/sci-geosciences/mapnik/mapnik-3.0.9-r1.ebuild
73 new file mode 100644
74 index 00000000000..bcaadad2a45
75 --- /dev/null
76 +++ b/sci-geosciences/mapnik/mapnik-3.0.9-r1.ebuild
77 @@ -0,0 +1,107 @@
78 +# Copyright 1999-2017 Gentoo Foundation
79 +# Distributed under the terms of the GNU General Public License v2
80 +
81 +EAPI=6
82 +
83 +inherit eutils scons-utils toolchain-funcs
84 +
85 +DESCRIPTION="A Free Toolkit for developing mapping applications"
86 +HOMEPAGE="http://www.mapnik.org/"
87 +SRC_URI="https://github.com/mapnik/mapnik/archive/v${PV}.tar.gz -> ${P}.tar.gz"
88 +
89 +LICENSE="LGPL-3"
90 +SLOT="0"
91 +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
92 +IUSE="cairo debug doc gdal postgres sqlite"
93 +
94 +RDEPEND="
95 + >=dev-libs/boost-1.48[threads]
96 + dev-libs/icu:=
97 + sys-libs/zlib
98 + media-libs/freetype
99 + media-libs/harfbuzz
100 + dev-libs/libxml2
101 + media-libs/libpng:0=
102 + media-libs/tiff:0=
103 + virtual/jpeg:0=
104 + media-libs/libwebp
105 + sci-libs/proj
106 + media-fonts/dejavu
107 + x11-libs/agg[truetype]
108 + cairo? (
109 + x11-libs/cairo
110 + dev-cpp/cairomm
111 + )
112 + postgres? ( >=dev-db/postgresql-8.3:* )
113 + gdal? ( sci-libs/gdal )
114 + sqlite? ( dev-db/sqlite:3 )"
115 +DEPEND="${RDEPEND}"
116 +
117 +PATCHES=(
118 + "${FILESDIR}/${PN}-2.2.0-configure-only-once.patch"
119 + "${FILESDIR}/${PN}-2.2.0-dont-run-ldconfig.patch"
120 + "${FILESDIR}/${PN}-2.2.0-scons.patch"
121 + "${FILESDIR}/${P}-harbuzz_sharper-upstream.patch" # upstream patches ported from
122 + "${FILESDIR}/${P}-unicode-upstream.patch" # https://github.com/mapnik/mapnik/commit/9e58c890430db6f0b6f1f7a1690877c9d913d92a
123 +)
124 +
125 +src_prepare() {
126 + default
127 +
128 + # do not version epidoc data
129 + sed -i \
130 + -e 's:-`mapnik-config --version`::g' \
131 + utils/epydoc_config/build_epydoc.sh || die
132 +
133 + # force user flags, optimization level
134 + sed -i -e "s:\-O%s:%s:" \
135 + -i -e "s:env\['OPTIMIZATION'\]:'${CXXFLAGS}':" \
136 + SConstruct || die
137 +}
138 +
139 +src_configure() {
140 + local PLUGINS=shape,csv,raster,geojson
141 + use gdal && PLUGINS+=,gdal,ogr
142 + use postgres && PLUGINS+=,postgis
143 + use sqlite && PLUGINS+=,sqlite
144 +
145 + MYSCONS=(
146 + "CC=$(tc-getCC)"
147 + "CXX=$(tc-getCXX)"
148 + "INPUT_PLUGINS=${PLUGINS}"
149 + "PREFIX=/usr"
150 + "DESTDIR=${D}"
151 + "XMLPARSER=libxml2"
152 + "LINKING=shared"
153 + "RUNTIME_LINK=shared"
154 + "PROJ_INCLUDES=/usr/include"
155 + "PROJ_LIBS=/usr/$(get_libdir)"
156 + "LIBDIR_SCHEMA=$(get_libdir)"
157 + "SYSTEM_FONTS=/usr/share/fonts"
158 + CAIRO="$(usex cairo 1 0)"
159 + DEBUG="$(usex debug 1 0)"
160 + XML_DEBUG="$(usex debug 1 0)"
161 + DEMO="$(usex doc 1 0)"
162 + SAMPLE_INPUT_PLUGINS="$(usex doc 1 0)"
163 + "CUSTOM_LDFLAGS=${LDFLAGS}"
164 + "CUSTOM_LDFLAGS+=-L${ED}/usr/$(get_libdir)"
165 + )
166 + escons "${MYSCONS[@]}" configure
167 +}
168 +
169 +src_compile() {
170 + escons "${MYSCONS[@]}"
171 +}
172 +
173 +src_install() {
174 + escons "${MYSCONS[@]}" DESTDIR="${D}" install
175 +
176 + dodoc AUTHORS.md README.md CHANGELOG.md
177 +}
178 +
179 +pkg_postinst() {
180 + elog ""
181 + elog "See the home page or wiki (https://github.com/mapnik/mapnik/wiki) for more info"
182 + elog "or the installed examples for the default mapnik ogcserver config."
183 + elog ""
184 +}