commit: 6c7badd7786ba4a87ea407be061329bfd7904f8b Author: Marek Szuba <marecki <AT> gentoo <DOT> org> AuthorDate: Sun Dec 20 21:20:46 2020 +0000 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> CommitDate: Sun Dec 20 21:25:04 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c7badd7
net-irc/weechat: migrate to lua-single.eclass Both the latest release and the live ebuild. Upstream build scripts use pkg-config to find Lua so there is no need to pass Lua version to cmake + it might support LuaJIT. On the other hand, they only fall back to unversioned module name having enumerated supported versions so some patching is still necessary. Both migrated ebuilds build, test and install fine for all supported Lua implementations. Closes: https://bugs.gentoo.org/752813 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> net-irc/weechat/files/weechat-3.0-cmake_lua_version.patch | 9 +++++++++ .../weechat/{weechat-9999.ebuild => weechat-3.0-r100.ebuild} | 11 +++++++++-- net-irc/weechat/weechat-9999.ebuild | 11 +++++++++-- profiles/package.mask | 1 + 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/net-irc/weechat/files/weechat-3.0-cmake_lua_version.patch b/net-irc/weechat/files/weechat-3.0-cmake_lua_version.patch new file mode 100644 index 00000000000..6ed16efbd06 --- /dev/null +++ b/net-irc/weechat/files/weechat-3.0-cmake_lua_version.patch @@ -0,0 +1,9 @@ +--- a/cmake/FindLua.cmake ++++ b/cmake/FindLua.cmake +@@ -35,5 +35,5 @@ + + find_package(PkgConfig) + if(PKG_CONFIG_FOUND) +- pkg_search_module(LUA 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) ++ pkg_search_module(LUA lua) + endif() diff --git a/net-irc/weechat/weechat-9999.ebuild b/net-irc/weechat/weechat-3.0-r100.ebuild similarity index 94% copy from net-irc/weechat/weechat-9999.ebuild copy to net-irc/weechat/weechat-3.0-r100.ebuild index b33c433ae6d..9612d0567f7 100644 --- a/net-irc/weechat/weechat-9999.ebuild +++ b/net-irc/weechat/weechat-3.0-r100.ebuild @@ -3,9 +3,10 @@ EAPI=7 +LUA_COMPAT=( lua5-{1..4} ) PYTHON_COMPAT=( python3_{7..9} ) -inherit cmake python-single-r1 xdg-utils +inherit cmake lua-single python-single-r1 xdg-utils if [[ ${PV} == "9999" ]] ; then inherit git-r3 @@ -29,6 +30,7 @@ LANGS=" cs de es fr it ja pl ru" IUSE="doc man nls test ${SCRIPT_LANGS} ${PLUGINS} ${INTERFACES} ${NETWORKS}" REQUIRED_USE=" + lua? ( ${LUA_REQUIRED_USE} ) python? ( ${PYTHON_REQUIRED_USE} ) test? ( nls ) " @@ -41,7 +43,7 @@ RDEPEND=" net-misc/curl[ssl] charset? ( virtual/libiconv ) guile? ( >=dev-scheme/guile-2.0 ) - lua? ( dev-lang/lua:0 ) + lua? ( ${LUA_DEPS} ) nls? ( virtual/libintl ) perl? ( dev-lang/perl:= ) php? ( >=dev-lang/php-7.0:*[embed] ) @@ -62,11 +64,16 @@ BDEPEND=" nls? ( >=sys-devel/gettext-0.15 ) " +PATCHES=( + "${FILESDIR}"/${PN}-3.0-cmake_lua_version.patch +) + DOCS="AUTHORS.adoc ChangeLog.adoc Contributing.adoc ReleaseNotes.adoc README.adoc" RESTRICT="!test? ( test )" pkg_setup() { + use lua && lua-single_pkg_setup use python && python-single-r1_pkg_setup } diff --git a/net-irc/weechat/weechat-9999.ebuild b/net-irc/weechat/weechat-9999.ebuild index b33c433ae6d..9612d0567f7 100644 --- a/net-irc/weechat/weechat-9999.ebuild +++ b/net-irc/weechat/weechat-9999.ebuild @@ -3,9 +3,10 @@ EAPI=7 +LUA_COMPAT=( lua5-{1..4} ) PYTHON_COMPAT=( python3_{7..9} ) -inherit cmake python-single-r1 xdg-utils +inherit cmake lua-single python-single-r1 xdg-utils if [[ ${PV} == "9999" ]] ; then inherit git-r3 @@ -29,6 +30,7 @@ LANGS=" cs de es fr it ja pl ru" IUSE="doc man nls test ${SCRIPT_LANGS} ${PLUGINS} ${INTERFACES} ${NETWORKS}" REQUIRED_USE=" + lua? ( ${LUA_REQUIRED_USE} ) python? ( ${PYTHON_REQUIRED_USE} ) test? ( nls ) " @@ -41,7 +43,7 @@ RDEPEND=" net-misc/curl[ssl] charset? ( virtual/libiconv ) guile? ( >=dev-scheme/guile-2.0 ) - lua? ( dev-lang/lua:0 ) + lua? ( ${LUA_DEPS} ) nls? ( virtual/libintl ) perl? ( dev-lang/perl:= ) php? ( >=dev-lang/php-7.0:*[embed] ) @@ -62,11 +64,16 @@ BDEPEND=" nls? ( >=sys-devel/gettext-0.15 ) " +PATCHES=( + "${FILESDIR}"/${PN}-3.0-cmake_lua_version.patch +) + DOCS="AUTHORS.adoc ChangeLog.adoc Contributing.adoc ReleaseNotes.adoc README.adoc" RESTRICT="!test? ( test )" pkg_setup() { + use lua && lua-single_pkg_setup use python && python-single-r1_pkg_setup } diff --git a/profiles/package.mask b/profiles/package.mask index 500d4b6bc3c..dd503e66e96 100644 --- a/profiles/package.mask +++ b/profiles/package.mask @@ -537,6 +537,7 @@ kde-apps/kdebase-meta:5 >=net-analyzer/suricata-6.0.1-r100 >=net-im/prosody-0.11.7-r100 >=net-im/swift-4.0.2-r100 +>=net-irc/weechat-3.0-r100 >=net-libs/axtls-2.1.5-r100 >=net-misc/asterisk-16.14.0-r100 >=net-mail/dovecot-2.3.11.3-r100
