Gentoo Archives: gentoo-commits

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-irc/weechat/files/, net-irc/weechat/
Date: Wed, 06 Oct 2021 18:46:34
Message-Id: 1633545903.e0dba3b7606ed433ea2ec2ef7c51b1f4d6b46ffb.gyakovlev@gentoo
1 commit: e0dba3b7606ed433ea2ec2ef7c51b1f4d6b46ffb
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 6 18:43:40 2021 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 6 18:45:03 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0dba3b7
7
8 net-irc/weechat: Bump to weechat-3.3
9
10 Closes: https://bugs.gentoo.org/816240
11 Closes: https://github.com/gentoo/gentoo/pull/22430
12 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
13
14 net-irc/weechat/Manifest | 1 +
15 .../files/weechat-3.3-cmake_lua_version.patch | 9 ++
16 net-irc/weechat/metadata.xml | 1 +
17 net-irc/weechat/weechat-3.3.ebuild | 172 +++++++++++++++++++++
18 4 files changed, 183 insertions(+)
19
20 diff --git a/net-irc/weechat/Manifest b/net-irc/weechat/Manifest
21 index df3c5bab880..cbc6096af90 100644
22 --- a/net-irc/weechat/Manifest
23 +++ b/net-irc/weechat/Manifest
24 @@ -1,2 +1,3 @@
25 DIST weechat-3.1.tar.xz 2230316 BLAKE2B 95ce8c6107351676b64c368484baf2245bd17093c90552339d35d058a3caff7a0c4bb8e7692757bcf8c2d7617621961b5bc118806c5084cc212283d6982bd896 SHA512 1eb3f5a0e4d3f6777970fc60c816e7bc9be5e5cf91b9e072f6c77003f284c7bdbabfae7058cb5083915a2adf7f4c651a9afb8cc8ae17cac950e7f2ef9608ed78
26 DIST weechat-3.2.tar.xz 2261376 BLAKE2B 6f9fcc72b4b36275e056f824a46d8640a45b1d78b9b6f0eaa5327fc2a965f891698982fade86c6d4e96d1f5c472ac4a82d036d478f37989f738f2ccd6e2f7002 SHA512 b4ad5cd6e678795d9093ddfa5aac0d396a7dbf994d04a6b9b083460b1639c851f1b9539cf7b97bd300154871d5df2c29f82fae387c42da840a1c3eb35c4a3660
27 +DIST weechat-3.3.tar.xz 2564280 BLAKE2B 9cb119c2506ff5f9b4844b8016790af34347e300a1217762afc1307191cd0831c2c23e019a024c8161ff2e46607eddf94f94b3db9bd351bc51b7f057ddb375eb SHA512 18bbaa93620185ead64f64833e4c5df6a1cbc49dc6f60362614e955947221b78baaa93a2748f153bbb6f7867c7760f7a8fa8d6d9ed30040ad5e12af127526e13
28
29 diff --git a/net-irc/weechat/files/weechat-3.3-cmake_lua_version.patch b/net-irc/weechat/files/weechat-3.3-cmake_lua_version.patch
30 new file mode 100644
31 index 00000000000..150fb28b680
32 --- /dev/null
33 +++ b/net-irc/weechat/files/weechat-3.3-cmake_lua_version.patch
34 @@ -0,0 +1,9 @@
35 +--- a/cmake/FindLua.cmake
36 ++++ b/cmake/FindLua.cmake
37 +@@ -35,5 +35,5 @@
38 +
39 + find_package(PkgConfig)
40 + if(PKG_CONFIG_FOUND)
41 +- pkg_search_module(LUA lua5.4 lua-5.4 lua54 lua5.3 lua-5.3 lua53 lua5.2 lua-5.2 lua52 lua5.1 lua-5.1 lua51 lua-5.0 lua5.0 lua50 lua)
42 ++ pkg_search_module(LUA lua)
43 + endif()
44
45 diff --git a/net-irc/weechat/metadata.xml b/net-irc/weechat/metadata.xml
46 index 1386bc85427..185437d9ca9 100644
47 --- a/net-irc/weechat/metadata.xml
48 +++ b/net-irc/weechat/metadata.xml
49 @@ -17,6 +17,7 @@
50 <flag name="relay">Enable relay plugin (experimental)</flag>
51 <flag name="scripts">Build infrastructure for scripting</flag>
52 <flag name="trigger">Enable trigger plugin</flag>
53 + <flag name="typing">Enable typing plugin</flag>
54 <flag name="xfer">Enable xfer plugin support</flag>
55 </use>
56 </pkgmetadata>
57
58 diff --git a/net-irc/weechat/weechat-3.3.ebuild b/net-irc/weechat/weechat-3.3.ebuild
59 new file mode 100644
60 index 00000000000..48fd4089957
61 --- /dev/null
62 +++ b/net-irc/weechat/weechat-3.3.ebuild
63 @@ -0,0 +1,172 @@
64 +# Copyright 1999-2021 Gentoo Authors
65 +# Distributed under the terms of the GNU General Public License v2
66 +
67 +EAPI=7
68 +
69 +LUA_COMPAT=( lua5-{1..4} )
70 +PYTHON_COMPAT=( python3_{7..9} )
71 +
72 +inherit cmake lua-single python-single-r1 xdg-utils
73 +
74 +if [[ ${PV} == "9999" ]] ; then
75 + inherit git-r3
76 + EGIT_REPO_URI="https://github.com/weechat/weechat.git"
77 +else
78 + SRC_URI="https://weechat.org/files/src/${P}.tar.xz"
79 + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~x64-macos"
80 +fi
81 +
82 +DESCRIPTION="Portable and multi-interface IRC client"
83 +HOMEPAGE="https://weechat.org/"
84 +
85 +LICENSE="GPL-3"
86 +SLOT="0/${PV}"
87 +
88 +NETWORKS="+irc"
89 +PLUGINS="+alias +buflist +charset +exec +fifo +fset +logger +relay +scripts +spell +trigger +typing +xfer"
90 +# dev-lang/v8 was dropped from Gentoo so we can't enable javascript support
91 +SCRIPT_LANGS="guile lua +perl php +python ruby tcl"
92 +LANGS=" cs de es fr it ja pl ru"
93 +IUSE="doc man nls selinux test ${SCRIPT_LANGS} ${PLUGINS} ${INTERFACES} ${NETWORKS}"
94 +
95 +REQUIRED_USE="
96 + lua? ( ${LUA_REQUIRED_USE} )
97 + python? ( ${PYTHON_REQUIRED_USE} )
98 + test? ( nls )
99 +"
100 +
101 +RDEPEND="
102 + dev-libs/libgcrypt:0=
103 + net-libs/gnutls:=
104 + sys-libs/ncurses:0=
105 + sys-libs/zlib:=
106 + net-misc/curl[ssl]
107 + charset? ( virtual/libiconv )
108 + guile? ( >=dev-scheme/guile-2.0 )
109 + lua? ( ${LUA_DEPS} )
110 + nls? ( virtual/libintl )
111 + perl? ( dev-lang/perl:= )
112 + php? ( >=dev-lang/php-7.0:*[embed] )
113 + python? ( ${PYTHON_DEPS} )
114 + ruby? ( || ( dev-lang/ruby:2.7 dev-lang/ruby:2.6 dev-lang/ruby:2.5 ) )
115 + selinux? ( sec-policy/selinux-irc )
116 + spell? ( app-text/aspell )
117 + tcl? ( >=dev-lang/tcl-8.4.15:0= )
118 +"
119 +
120 +DEPEND="${RDEPEND}
121 + test? ( dev-util/cpputest )
122 +"
123 +
124 +BDEPEND="
125 + virtual/pkgconfig
126 + doc? ( >=dev-ruby/asciidoctor-1.5.4 )
127 + man? ( >=dev-ruby/asciidoctor-1.5.4 )
128 + nls? ( >=sys-devel/gettext-0.15 )
129 +"
130 +
131 +PATCHES=(
132 + "${FILESDIR}"/${PN}-3.3-cmake_lua_version.patch
133 +)
134 +
135 +DOCS="AUTHORS.adoc ChangeLog.adoc Contributing.adoc ReleaseNotes.adoc README.adoc"
136 +
137 +RESTRICT="!test? ( test )"
138 +
139 +pkg_setup() {
140 + use lua && lua-single_pkg_setup
141 + use python && python-single-r1_pkg_setup
142 +}
143 +
144 +src_prepare() {
145 + cmake_src_prepare
146 +
147 + # install only required translations
148 + local i
149 + for i in ${LANGS} ; do
150 + if ! has ${i} ${LINGUAS-${i}} ; then
151 + sed -i \
152 + -e "/${i}.po/d" \
153 + po/CMakeLists.txt || die
154 + fi
155 + done
156 +
157 + # install only required documentation ; en always
158 + for i in $(grep add_subdirectory doc/CMakeLists.txt \
159 + | sed -e 's/.*add_subdirectory(\(..\)).*/\1/' -e '/en/d'); do
160 + if ! has ${i} ${LINGUAS-${i}} ; then
161 + sed -i \
162 + -e '/add_subdirectory('${i}')/d' \
163 + doc/CMakeLists.txt || die
164 + fi
165 + done
166 +
167 + # install docs in correct directory
168 + sed -i "s#\${SHAREDIR}/doc/\${PROJECT_NAME}#\0-${PV}/html#" doc/*/CMakeLists.txt || die
169 +
170 + if [[ ${CHOST} == *-darwin* ]]; then
171 + # fix linking error on Darwin
172 + sed -i "s/+ get_config_var('LINKFORSHARED')//" \
173 + cmake/FindPython.cmake || die
174 + # allow to find the plugins by default
175 + sed -i 's/".so,.dll"/".bundle,.so,.dll"/' \
176 + src/core/wee-config.c || die
177 + fi
178 +}
179 +
180 +src_configure() {
181 + local mycmakeargs=(
182 + -DLIBDIR="${EPREFIX}/usr/$(get_libdir)"
183 + -DENABLE_JAVASCRIPT=OFF
184 + -DENABLE_LARGEFILE=ON
185 + -DENABLE_NCURSES=ON
186 + -DENABLE_ALIAS=$(usex alias)
187 + -DENABLE_BUFLIST=$(usex buflist)
188 + -DENABLE_CHARSET=$(usex charset)
189 + -DENABLE_DOC=$(usex doc)
190 + -DENABLE_EXEC=$(usex exec)
191 + -DENABLE_FIFO=$(usex fifo)
192 + -DENABLE_FSET=$(usex fset)
193 + -DENABLE_GUILE=$(usex guile)
194 + -DENABLE_IRC=$(usex irc)
195 + -DENABLE_LOGGER=$(usex logger)
196 + -DENABLE_LUA=$(usex lua)
197 + -DENABLE_MAN=$(usex man)
198 + -DENABLE_NLS=$(usex nls)
199 + -DENABLE_PERL=$(usex perl)
200 + -DENABLE_PHP=$(usex php)
201 + -DENABLE_PYTHON=$(usex python)
202 + -DENABLE_RELAY=$(usex relay)
203 + -DENABLE_RUBY=$(usex ruby)
204 + -DENABLE_SCRIPT=$(usex scripts)
205 + -DENABLE_SCRIPTS=$(usex scripts)
206 + -DENABLE_SPELL=$(usex spell)
207 + -DENABLE_TCL=$(usex tcl)
208 + -DENABLE_TESTS=$(usex test)
209 + -DENABLE_TRIGGER=$(usex trigger)
210 + -DENABLE_TYPING=$(usex typing)
211 + -DENABLE_XFER=$(usex xfer)
212 + )
213 + cmake_src_configure
214 +}
215 +
216 +src_test() {
217 + if $(locale -a | grep -iq "en_US\.utf.*8"); then
218 + cmake_src_test -V
219 + else
220 + eerror "en_US.UTF-8 locale is required to run ${PN}'s ${FUNCNAME}"
221 + die "required locale missing"
222 + fi
223 +}
224 +
225 +pkg_postinst() {
226 + xdg_desktop_database_update
227 + xdg_icon_cache_update
228 + xdg_mimeinfo_database_update
229 +}
230 +
231 +pkg_postrm() {
232 + xdg_desktop_database_update
233 + xdg_icon_cache_update
234 + xdg_mimeinfo_database_update
235 +}