1 |
commit: 1c9a7b1068756fc7ae6b52febaaf850a481b8ad3 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Oct 1 20:13:17 2019 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Oct 1 23:43:03 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c9a7b10 |
7 |
|
8 |
app-office/scribus: 1.5.5 version bump, EAPI-7 bump |
9 |
|
10 |
Drop L10N hacks |
11 |
Fix build against system dev-libs/hyphen, drop bundled |
12 |
Install bigger icon |
13 |
Set USE +templates by default |
14 |
|
15 |
Closes: https://bugs.gentoo.org/692280 |
16 |
Package-Manager: Portage-2.3.76, Repoman-2.3.17 |
17 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
18 |
|
19 |
app-office/scribus/Manifest | 1 + |
20 |
.../scribus/files/scribus-1.5.5-findhyphen.patch | 70 +++++++++ |
21 |
app-office/scribus/scribus-1.5.5.ebuild | 156 +++++++++++++++++++++ |
22 |
3 files changed, 227 insertions(+) |
23 |
|
24 |
diff --git a/app-office/scribus/Manifest b/app-office/scribus/Manifest |
25 |
index 3734ddc121f..bc1bb961c1a 100644 |
26 |
--- a/app-office/scribus/Manifest |
27 |
+++ b/app-office/scribus/Manifest |
28 |
@@ -1 +1,2 @@ |
29 |
+DIST scribus-1.5.5.tar.xz 73861836 BLAKE2B 1a10878eaba67116d72c20d8ecd8952764c709ad14d575e4eb921b4f8a7c4525b73e6722f610b1cce57c08540f619d6ebd3d32e04b653b310e475026c185561b SHA512 2d62424ad609296df33ced550940fceb4e15133a595a740cc4f4b4ffbc92aa31737336ac7716c2eed20d2866e37f5a9b780a44d86128daa6bbad3ccb58168b50 |
30 |
DIST scribus-1.5.5_pre20190429.tar.gz 85838093 BLAKE2B 4ffdc6356b5a2c7372bf6395847f348e7c56276d39114fa5691b6c7f8345aa89a0efe221adbbf1d431d89208fae53ae211c5298d9406487d46ddf98dd69d8c1a SHA512 1aa76491560848dccbeb17f03ba4ac24d6045881f6f92f31b921cf1a91c051176b835d86e0c46046e73573bf60b330e07945c279c077a7619bf2ee9331ca9324 |
31 |
|
32 |
diff --git a/app-office/scribus/files/scribus-1.5.5-findhyphen.patch b/app-office/scribus/files/scribus-1.5.5-findhyphen.patch |
33 |
new file mode 100644 |
34 |
index 00000000000..13c168c51f5 |
35 |
--- /dev/null |
36 |
+++ b/app-office/scribus/files/scribus-1.5.5-findhyphen.patch |
37 |
@@ -0,0 +1,70 @@ |
38 |
+--- a/CMakeLists.txt 2019-07-31 00:34:43.000000000 +0200 |
39 |
++++ b/CMakeLists.txt 2019-10-02 00:17:34.968355656 +0200 |
40 |
+@@ -954,6 +954,16 @@ |
41 |
+ endif() |
42 |
+ #>>HUNSPELL for Speelling support |
43 |
+ |
44 |
++#<<HYPHEN for Hyphenation support |
45 |
++find_package(HYPHEN) |
46 |
++if(HYPHEN_FOUND) |
47 |
++ message("System Hyphen Found OK") |
48 |
++ set(HAVE_HYPHEN ON) |
49 |
++else() |
50 |
++ message("Hyphen or its developer libraries NOT found - using bundled Hyphen instead") |
51 |
++endif() |
52 |
++#>>HYPHEN for Hyphenation support |
53 |
++ |
54 |
+ #<<PoDoFo for AI PDF import |
55 |
+ option(WITH_PODOFO "Enable support for PDF embedded in AI" ON) |
56 |
+ if (WITH_PODOFO) |
57 |
+--- a/scribus/CMakeLists.txt 2019-10-02 00:25:01.194386515 +0200 |
58 |
++++ b/scribus/CMakeLists.txt 2019-10-02 00:26:23.584392213 +0200 |
59 |
+@@ -1069,7 +1069,9 @@ |
60 |
+ ${SCRIBUS_GMAGICK_SRC} |
61 |
+ ) |
62 |
+ |
63 |
+-if(NOT HAVE_HYPHEN) |
64 |
++if(HAVE_HYPHEN) |
65 |
++ include_directories(${HYPHEN_INCLUDE_DIR}) |
66 |
++else() |
67 |
+ include_directories(third_party/hyphen) |
68 |
+ set(SCRIBUS_SOURCES |
69 |
+ ${SCRIBUS_SOURCES} |
70 |
+@@ -1180,13 +1182,6 @@ |
71 |
+ |
72 |
+ endif() |
73 |
+ |
74 |
+-if(HAVE_HYPHEN) |
75 |
+- target_link_libraries(${EXE_NAME} |
76 |
+- ${HYPHEN_LIBRARY} |
77 |
+- ) |
78 |
+-endif() |
79 |
+- |
80 |
+- |
81 |
+ if(GESTURE_FRAME_PREVIEW) |
82 |
+ message(STATUS "Enable gesture frame preview [experimental]") |
83 |
+ set(GESTURE_FRAME_PREVIEW_SOURCES pageitempreview.cpp) |
84 |
+@@ -1234,6 +1229,12 @@ |
85 |
+ ) |
86 |
+ endif () |
87 |
+ |
88 |
++if(HAVE_HYPHEN) |
89 |
++ target_link_libraries(${EXE_NAME} |
90 |
++ ${HYPHEN_LIBRARY} |
91 |
++ ) |
92 |
++endif() |
93 |
++ |
94 |
+ if(WIN32) |
95 |
+ set_target_properties(${EXE_NAME} |
96 |
+ PROPERTIES |
97 |
+--- a/scribus/hyphenator.h 2019-07-31 00:35:05.000000000 +0200 |
98 |
++++ b/scribus/hyphenator.h 2019-10-02 00:00:42.497285638 +0200 |
99 |
+@@ -13,7 +13,7 @@ |
100 |
+ #include <QSet> |
101 |
+ |
102 |
+ #include "scribusapi.h" |
103 |
+-#include "third_party/hyphen/hyphen.h" |
104 |
++#include <hyphen.h> |
105 |
+ |
106 |
+ class ScribusDoc; |
107 |
+ class ScribusMainWindow; |
108 |
|
109 |
diff --git a/app-office/scribus/scribus-1.5.5.ebuild b/app-office/scribus/scribus-1.5.5.ebuild |
110 |
new file mode 100644 |
111 |
index 00000000000..576abf23fb5 |
112 |
--- /dev/null |
113 |
+++ b/app-office/scribus/scribus-1.5.5.ebuild |
114 |
@@ -0,0 +1,156 @@ |
115 |
+# Copyright 1999-2019 Gentoo Authors |
116 |
+# Distributed under the terms of the GNU General Public License v2 |
117 |
+ |
118 |
+EAPI=7 |
119 |
+ |
120 |
+PYTHON_COMPAT=( python2_7 ) |
121 |
+PYTHON_REQ_USE="tk?" |
122 |
+inherit cmake-utils desktop flag-o-matic python-single-r1 xdg |
123 |
+ |
124 |
+DESCRIPTION="Desktop publishing (DTP) and layout program" |
125 |
+HOMEPAGE="https://www.scribus.net/" |
126 |
+SRC_URI="mirror://sourceforge/project/${PN}/${PN}-devel/${PV}/${P}.tar.xz" |
127 |
+ |
128 |
+LICENSE="GPL-2" |
129 |
+SLOT="0" |
130 |
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86" |
131 |
+IUSE="+boost debug examples graphicsmagick hunspell +minimal osg +pdf scripts +templates tk" |
132 |
+ |
133 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
134 |
+ tk? ( scripts )" |
135 |
+ |
136 |
+# osg |
137 |
+# couple of third_party libs bundled |
138 |
+BDEPEND=" |
139 |
+ dev-qt/linguist-tools:5 |
140 |
+ virtual/pkgconfig |
141 |
+" |
142 |
+DEPEND="${PYTHON_DEPS} |
143 |
+ app-text/libmspub |
144 |
+ app-text/libqxp |
145 |
+ app-text/poppler:= |
146 |
+ dev-libs/hyphen |
147 |
+ >=dev-libs/icu-58.2:0= |
148 |
+ dev-libs/librevenge |
149 |
+ dev-libs/libxml2 |
150 |
+ dev-qt/qtcore:5 |
151 |
+ dev-qt/qtgui:5[-gles2] |
152 |
+ dev-qt/qtnetwork:5 |
153 |
+ dev-qt/qtopengl:5 |
154 |
+ dev-qt/qtprintsupport:5 |
155 |
+ dev-qt/qtwidgets:5 |
156 |
+ dev-qt/qtxml:5 |
157 |
+ media-libs/fontconfig |
158 |
+ media-libs/freetype:2 |
159 |
+ >=media-libs/harfbuzz-0.9.42:0=[icu] |
160 |
+ media-libs/lcms:2 |
161 |
+ media-libs/libcdr |
162 |
+ media-libs/libfreehand |
163 |
+ media-libs/libpagemaker |
164 |
+ media-libs/libpng:0= |
165 |
+ media-libs/libvisio |
166 |
+ media-libs/libzmf |
167 |
+ media-libs/tiff:0 |
168 |
+ net-print/cups |
169 |
+ sys-libs/zlib[minizip] |
170 |
+ virtual/jpeg:0= |
171 |
+ >=x11-libs/cairo-1.10.0[X,svg] |
172 |
+ boost? ( >=dev-libs/boost-1.67:= ) |
173 |
+ hunspell? ( app-text/hunspell:= ) |
174 |
+ graphicsmagick? ( media-gfx/graphicsmagick:= ) |
175 |
+ osg? ( dev-games/openscenegraph:= ) |
176 |
+ pdf? ( app-text/podofo:0= ) |
177 |
+ scripts? ( dev-python/pillow[tk?,${PYTHON_USEDEP}] ) |
178 |
+" |
179 |
+RDEPEND="${DEPEND} |
180 |
+ app-text/ghostscript-gpl |
181 |
+" |
182 |
+ |
183 |
+PATCHES=( |
184 |
+ "${FILESDIR}"/${PN}-1.5.3-fpic.patch |
185 |
+ "${FILESDIR}"/${P}-docdir.patch |
186 |
+ "${FILESDIR}"/${P}-findhyphen.patch |
187 |
+) |
188 |
+ |
189 |
+src_prepare() { |
190 |
+ cmake-utils_src_prepare |
191 |
+ |
192 |
+ rm -r codegen/cheetah scribus/third_party/hyphen || die |
193 |
+ |
194 |
+ cat > cmake/modules/FindZLIB.cmake <<- EOF || die |
195 |
+ find_package(PkgConfig) |
196 |
+ pkg_check_modules(ZLIB minizip zlib) |
197 |
+ SET( ZLIB_LIBRARY \${ZLIB_LIBRARIES} ) |
198 |
+ SET( ZLIB_INCLUDE_DIR \${ZLIB_INCLUDE_DIRS} ) |
199 |
+ MARK_AS_ADVANCED( ZLIB_LIBRARY ZLIB_INCLUDE_DIR ) |
200 |
+ EOF |
201 |
+ sed \ |
202 |
+ -e "/^\s*unzip\.[ch]/d" \ |
203 |
+ -e "/^\s*ioapi\.[ch]/d" \ |
204 |
+ -i scribus/CMakeLists.txt Scribus.pro || die |
205 |
+ rm scribus/ioapi.[ch] || die |
206 |
+ |
207 |
+ sed \ |
208 |
+ -e 's:\(${CMAKE_INSTALL_PREFIX}\):./\1:g' \ |
209 |
+ -i resources/templates/CMakeLists.txt || die |
210 |
+ |
211 |
+ sed \ |
212 |
+ -e "/^add_subdirectory(ui\/qml)/s/^/#DONT/" \ |
213 |
+ -i scribus/CMakeLists.txt || die # nothing but a bogus Hello World test |
214 |
+} |
215 |
+ |
216 |
+src_configure() { |
217 |
+ # bug #550818 |
218 |
+ append-cppflags -DHAVE_MEMRCHR |
219 |
+ |
220 |
+ local mycmakeargs=( |
221 |
+ -DHAVE_PYTHON=ON |
222 |
+ -DPYTHON_INCLUDE_PATH=$(python_get_includedir) |
223 |
+ -DPYTHON_LIBRARY=$(python_get_library_path) |
224 |
+ -DWANT_DISTROBUILD=ON |
225 |
+ -DDOCDIR="${EPREFIX}"/usr/share/doc/${PF}/ |
226 |
+ -DWITH_BOOST=$(usex boost) |
227 |
+ -DWANT_DEBUG=$(usex debug) |
228 |
+ -DWANT_NOEXAMPLES=$(usex !examples) |
229 |
+ -DWANT_GRAPHICSMAGICK=$(usex graphicsmagick) |
230 |
+ -DWANT_HUNSPELL=$(usex hunspell) |
231 |
+ -DWANT_HEADERINSTALL=$(usex !minimal) |
232 |
+ -DWANT_NOOSG=$(usex !osg) |
233 |
+ -DWITH_PODOFO=$(usex pdf) |
234 |
+ -DWANT_NOTEMPLATES=$(usex !templates) |
235 |
+ ) |
236 |
+ cmake-utils_src_configure |
237 |
+} |
238 |
+ |
239 |
+src_install() { |
240 |
+ cmake-utils_src_install |
241 |
+ |
242 |
+ if ! use tk; then |
243 |
+ rm "${ED}"/usr/share/scribus/scripts/{FontSample,CalendarWizard}.py || die |
244 |
+ fi |
245 |
+ if use scripts; then |
246 |
+ python_fix_shebang "${ED}"/usr/share/scribus/scripts |
247 |
+ python_optimize "${ED}"/usr/share/scribus/scripts |
248 |
+ else |
249 |
+ rm "${ED}"/usr/share/scribus/scripts/*.py || die |
250 |
+ fi |
251 |
+ |
252 |
+ mv "${ED}"/usr/share/doc/${PF}/{en,html} || die |
253 |
+ ln -sf html "${ED}"/usr/share/doc/${PF}/en || die |
254 |
+ |
255 |
+ # These files are parsed to populate the help/about window. |
256 |
+ cat >> "${T}"/COPYING <<- EOF || die |
257 |
+ ${PN} is licensed under the "${LICENSE}". |
258 |
+ Please visit https://www.gnu.org/licenses/gpl-2.0.html for the complete license text. |
259 |
+ EOF |
260 |
+ dodoc "${T}"/COPYING |
261 |
+ docompress -x /usr/share/doc/${PF}/en /usr/share/doc/${PF}/{AUTHORS,TRANSLATION,LINKS,COPYING} |
262 |
+ |
263 |
+ local size |
264 |
+ for size in 16 32 128 256 512; do |
265 |
+ newicon -s $size resources/iconsets/artwork/icon_${size}x${size}.png scribus.png |
266 |
+ done |
267 |
+ newicon -s 64 resources/iconsets/artwork/icon_32x32@××.png scribus.png |
268 |
+ doicon resources/iconsets/*/scribus.png |
269 |
+ domenu scribus.desktop |
270 |
+} |