Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-office/wps-office/
Date: Mon, 19 Feb 2018 19:31:51
Message-Id: 1519068554.7116062ac8ec90eef86718df6768c794d4daf63d.pacho@gentoo
1 commit: 7116062ac8ec90eef86718df6768c794d4daf63d
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 19 19:22:09 2018 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 19 19:29:14 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7116062a
7
8 app-office/wps-office: Drop some non really needed deps and try to remove bundled qtwebkit as it doesn't look to be really needed and causes issues in some setups (#647950 by Charo del Genio).
9
10 Package-Manager: Portage-2.3.24, Repoman-2.3.6
11
12 .../wps-office-10.1.0.5707_alpha21-r2.ebuild | 134 +++++++++++++++++++++
13 1 file changed, 134 insertions(+)
14
15 diff --git a/app-office/wps-office/wps-office-10.1.0.5707_alpha21-r2.ebuild b/app-office/wps-office/wps-office-10.1.0.5707_alpha21-r2.ebuild
16 new file mode 100644
17 index 00000000000..e2d25752dda
18 --- /dev/null
19 +++ b/app-office/wps-office/wps-office-10.1.0.5707_alpha21-r2.ebuild
20 @@ -0,0 +1,134 @@
21 +# Copyright 1999-2018 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=6
25 +inherit font gnome2-utils unpacker versionator xdg
26 +
27 +MY_PV="$(get_version_component_range 1-4)"
28 +MY_V="$(get_version_component_range 5)"
29 +
30 +if [ -z "$(get_version_component_range 6)" ]; then
31 + MY_SP=""
32 +else
33 + MY_SP="$(get_version_component_range 6)"
34 +fi
35 +
36 +case ${PV} in
37 + *_alpha*)
38 + MY_BRANCH=${MY_V/alpha/a}
39 + ;;
40 + *_beta*)
41 + MY_BRANCH=${MY_V/beta/b}
42 + ;;
43 + *)
44 + die "Invalid value for \${PV}: ${PV}"
45 + ;;
46 +esac
47 +MY_VV=${MY_PV}~${MY_BRANCH}${MY_SP}
48 +
49 +DESCRIPTION="WPS Office is an office productivity suite"
50 +HOMEPAGE="http://linux.wps.cn/ http://wps-community.org/"
51 +
52 +KEYWORDS="~amd64 ~x86"
53 +
54 +SRC_URI="
55 + x86? ( http://kdl.cc.ksosoft.com/wps-community/download/${MY_BRANCH}/${PN}_${MY_VV}_i386.deb )
56 + amd64? ( http://kdl.cc.ksosoft.com/wps-community/download/${MY_BRANCH}/${PN}_${MY_VV}_amd64.deb )
57 +"
58 +
59 +SLOT="0"
60 +RESTRICT="strip mirror" # mirror as explained at bug #547372
61 +LICENSE="WPS-EULA"
62 +IUSE="+sharedfonts"
63 +
64 +# Deps got from this (listed in order):
65 +# rpm -qpR wps-office-10.1.0.5707-1.a21.x86_64.rpm
66 +# ldd /opt/kingsoft/wps-office/office6/wps
67 +# ldd /opt/kingsoft/wps-office/office6/wpp
68 +RDEPEND="
69 + x11-libs/libICE
70 + x11-libs/libSM
71 + x11-libs/libX11
72 + x11-libs/libXext
73 + x11-libs/libXrender
74 + x11-libs/libxcb
75 + media-libs/fontconfig:1.0
76 + media-libs/freetype:2
77 + dev-libs/glib:2
78 + sys-libs/zlib:0
79 + net-print/cups
80 + media-libs/libpng:1.2
81 + virtual/glu
82 +
83 + dev-libs/libpcre:3
84 + dev-libs/libffi
85 + media-sound/pulseaudio
86 + app-arch/bzip2:0
87 + media-libs/libpng:0
88 + dev-libs/expat
89 + sys-apps/util-linux
90 + dev-libs/libbsd
91 + x11-libs/libXau
92 + x11-libs/libXdmcp
93 + sys-apps/dbus
94 + x11-libs/libXtst
95 + sys-apps/tcp-wrappers
96 + media-libs/libsndfile
97 + net-libs/libasyncns
98 + dev-libs/libgcrypt:0
99 + app-arch/xz-utils
100 + app-arch/lz4
101 + sys-libs/libcap
102 + media-libs/flac
103 + media-libs/libogg
104 + media-libs/libvorbis
105 + dev-libs/libgpg-error
106 + sys-apps/attr
107 +"
108 +DEPEND=""
109 +
110 +S="${WORKDIR}"
111 +
112 +src_prepare() {
113 + default
114 + # We need to drop qtwebkit bundled lib completely because it causes
115 + # crashes in *some* setups (https://bugs.gentoo.org/647950)
116 + rm -f "${S}"/opt/kingsoft/wps-office/office6/libQtWebKit* || die
117 +}
118 +
119 +src_install() {
120 + exeinto /usr/bin
121 + exeopts -m0755
122 + doexe "${S}"/usr/bin/wps
123 + doexe "${S}"/usr/bin/wpp
124 + doexe "${S}"/usr/bin/et
125 +
126 + if ! use sharedfonts; then
127 + insinto /opt/kingsoft/wps-office/office6/fonts
128 + doins -r "${S}"/usr/share/fonts/wps-office/*
129 + rm -rf "${S}"/usr/share/fonts || die
130 + fi
131 +
132 + insinto /usr
133 + doins -r "${S}"/usr/share
134 +
135 + insinto /
136 + doins -r "${S}"/opt
137 + fperms 0755 /opt/kingsoft/wps-office/office6/{wps,wpp,et}
138 +}
139 +
140 +pkg_preinst() {
141 + xdg_pkg_preinst
142 + gnome2_icon_savelist
143 +}
144 +
145 +pkg_postinst() {
146 + use sharedfonts && font_pkg_postinst
147 + xdg_pkg_postinst
148 + gnome2_icon_cache_update
149 +}
150 +
151 +pkg_postrm() {
152 + xdg_pkg_postrm
153 + gnome2_icon_cache_update
154 +}