Gentoo Archives: gentoo-commits

From: "Miroslav Šulc" <fordfrog@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-office/scribus/
Date: Mon, 24 Jan 2022 10:31:44
Message-Id: 1643020298.513b45f5b4bbe01dcf27331e5634161be1c90771.fordfrog@gentoo
1 commit: 513b45f5b4bbe01dcf27331e5634161be1c90771
2 Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 24 10:31:27 2022 +0000
4 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 24 10:31:38 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=513b45f5
7
8 app-office/scribus: bump to 1.5.8
9
10 Package-Manager: Portage-3.0.30, Repoman-3.0.3
11 Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
12
13 app-office/scribus/Manifest | 1 +
14 app-office/scribus/scribus-1.5.8.ebuild | 159 ++++++++++++++++++++++++++++++++
15 2 files changed, 160 insertions(+)
16
17 diff --git a/app-office/scribus/Manifest b/app-office/scribus/Manifest
18 index 1ef4d5a62e03..0844d8a46097 100644
19 --- a/app-office/scribus/Manifest
20 +++ b/app-office/scribus/Manifest
21 @@ -1 +1,2 @@
22 DIST scribus-1.5.7.tar.xz 74490040 BLAKE2B 80ecc25f506ad3bdd3b03362b6616f1f7394b7f2794349cdf60089a7e5d39e861883a7e1b3a949667b2eb41b0b383bd8536de8a0feff4980305ef52f85eb0d05 SHA512 0c8cd42b9d3d26e24d4e0f6638b6c72bab2c2c3aa7e7195efb222391a0c0e671633e32afb08ec35b6ab5123793983de5d413aa7607b51adac3725dc8a83bfb01
23 +DIST scribus-1.5.8.tar.xz 74543476 BLAKE2B 6eacf3089db88b673bd146a9727af4faa4e64901b332dbe08e6c62c912212bfd0e9e2003796df51621ee7d66262388ecfc3bed057a22d1d7fb1740e77fe50686 SHA512 eb46be0165eeb0d8974aa744fc8ffac321b206ca0015da39bb2f50d9fd4a5e28300a49ada0f963b4e0cf9a3301dc746ffba74f359f5e76d308d80b71ee669c2d
24
25 diff --git a/app-office/scribus/scribus-1.5.8.ebuild b/app-office/scribus/scribus-1.5.8.ebuild
26 new file mode 100644
27 index 000000000000..472e6c130552
28 --- /dev/null
29 +++ b/app-office/scribus/scribus-1.5.8.ebuild
30 @@ -0,0 +1,159 @@
31 +# Copyright 1999-2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +PYTHON_COMPAT=( python3_{8..10} )
37 +PYTHON_REQ_USE="tk?"
38 +inherit cmake desktop flag-o-matic python-single-r1 xdg
39 +
40 +DESCRIPTION="Desktop publishing (DTP) and layout program"
41 +HOMEPAGE="https://www.scribus.net/"
42 +SRC_URI="https://pilotfiber.dl.sourceforge.net/project/${PN}/${PN}-devel/${PV}/${P}.tar.xz"
43 +
44 +LICENSE="GPL-2"
45 +SLOT="0"
46 +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
47 +IUSE="+boost debug examples graphicsmagick hunspell +minimal osg +pdf scripts +templates tk"
48 +
49 +REQUIRED_USE="${PYTHON_REQUIRED_USE}
50 + tk? ( scripts )"
51 +
52 +# osg
53 +# couple of third_party libs bundled
54 +DEPEND="${PYTHON_DEPS}
55 + app-text/libmspub
56 + app-text/libqxp
57 + app-text/poppler:=
58 + dev-libs/hyphen
59 + dev-libs/icu:0=
60 + dev-libs/librevenge
61 + dev-libs/libxml2
62 + dev-qt/qtcore:5
63 + dev-qt/qtgui:5[-gles2-only]
64 + dev-qt/qtnetwork:5
65 + dev-qt/qtopengl:5
66 + dev-qt/qtprintsupport:5
67 + dev-qt/qtwidgets:5
68 + dev-qt/qtxml:5
69 + media-libs/fontconfig
70 + media-libs/freetype:2
71 + media-libs/harfbuzz:0=[icu]
72 + media-libs/lcms:2
73 + media-libs/libcdr
74 + media-libs/libfreehand
75 + media-libs/libpagemaker
76 + media-libs/libpng:0=
77 + media-libs/libvisio
78 + media-libs/libzmf
79 + media-libs/tiff:0
80 + net-print/cups
81 + sys-libs/zlib[minizip]
82 + virtual/jpeg:0=
83 + x11-libs/cairo[X,svg]
84 + boost? ( dev-libs/boost:= )
85 + graphicsmagick? ( media-gfx/graphicsmagick:= )
86 + hunspell? ( app-text/hunspell:= )
87 + osg? ( dev-games/openscenegraph:= )
88 + pdf? ( app-text/podofo:0= )
89 + scripts? (
90 + $(python_gen_cond_dep '
91 + dev-python/pillow[tk?,${PYTHON_USEDEP}]
92 + ')
93 + )
94 +"
95 +RDEPEND="${DEPEND}
96 + app-text/ghostscript-gpl
97 +"
98 +BDEPEND="
99 + dev-qt/linguist-tools:5
100 + virtual/pkgconfig
101 +"
102 +
103 +PATCHES=(
104 + # non(?)-upstreamable
105 + "${FILESDIR}"/${PN}-1.5.3-fpic.patch
106 + "${FILESDIR}"/${PN}-1.5.6-docdir.patch
107 + "${FILESDIR}"/${PN}-1.5.8-findhyphen-1.patch
108 + "${FILESDIR}"/${PN}-1.5.6-findhyphen.patch
109 +)
110 +
111 +CMAKE_BUILD_TYPE="Release"
112 +
113 +S="${WORKDIR}/${P}"
114 +
115 +src_prepare() {
116 + cmake_src_prepare
117 +
118 + rm -r codegen/cheetah scribus/third_party/hyphen || die
119 +
120 + sed \
121 + -e "/^\s*unzip\.[ch]/d" \
122 + -e "/^\s*ioapi\.[ch]/d" \
123 + -i scribus/CMakeLists.txt Scribus.pro || die
124 + rm scribus/ioapi.[ch] || die
125 +
126 + sed \
127 + -e 's:\(${CMAKE_INSTALL_PREFIX}\):./\1:g' \
128 + -i resources/templates/CMakeLists.txt || die
129 +
130 + sed \
131 + -e "/^add_subdirectory(ui\/qml)/s/^/#DONT/" \
132 + -i scribus/CMakeLists.txt || die # nothing but a bogus Hello World test
133 +}
134 +
135 +src_configure() {
136 + # bug #550818
137 + append-cppflags -DHAVE_MEMRCHR
138 +
139 + local mycmakeargs=(
140 + -DHAVE_PYTHON=ON
141 + -DWANT_DISTROBUILD=ON
142 + -DWANT_CPP17=ON
143 + -DDOCDIR="${EPREFIX}"/usr/share/doc/${PF}/
144 + -DPython3_EXECUTABLE="${PYTHON}"
145 + -DWITH_BOOST=$(usex boost)
146 + -DWANT_DEBUG=$(usex debug)
147 + -DWANT_NOEXAMPLES=$(usex !examples)
148 + -DWANT_GRAPHICSMAGICK=$(usex graphicsmagick)
149 + -DWANT_HUNSPELL=$(usex hunspell)
150 + -DWANT_HEADERINSTALL=$(usex !minimal)
151 + -DWANT_NOOSG=$(usex !osg)
152 + -DWITH_PODOFO=$(usex pdf)
153 + -DWANT_NOTEMPLATES=$(usex !templates)
154 + )
155 + cmake_src_configure
156 +}
157 +
158 +src_install() {
159 + cmake_src_install
160 +
161 + if ! use tk; then
162 + rm "${ED}"/usr/share/scribus/scripts/{FontSample,CalendarWizard}.py || die
163 + fi
164 + if use scripts; then
165 + python_fix_shebang "${ED}"/usr/share/scribus/scripts
166 + python_optimize "${ED}"/usr/share/scribus/scripts
167 + else
168 + rm "${ED}"/usr/share/scribus/scripts/*.py || die
169 + fi
170 +
171 + mv "${ED}"/usr/share/doc/${PF}/{en,html} || die
172 + ln -sf html "${ED}"/usr/share/doc/${PF}/en || die
173 +
174 + # These files are parsed to populate the help/about window.
175 + cat >> "${T}"/COPYING <<- EOF || die
176 + ${PN} is licensed under the "${LICENSE}".
177 + Please visit https://www.gnu.org/licenses/gpl-2.0.html for the complete license text.
178 + EOF
179 + dodoc "${T}"/COPYING
180 + docompress -x /usr/share/doc/${PF}/en /usr/share/doc/${PF}/{AUTHORS,TRANSLATION,LINKS,COPYING}
181 +
182 + local size
183 + for size in 16 32 128 256 512; do
184 + newicon -s $size resources/iconsets/artwork/icon_${size}x${size}.png scribus.png
185 + done
186 + newicon -s 64 resources/iconsets/artwork/icon_32x32@××.png scribus.png
187 + doicon resources/iconsets/*/scribus.png
188 + domenu scribus.desktop
189 +}