commit: 570aa4c79552ceaa3ee20e02b4e4bd7855bc4d83 Author: Marek Szuba <marecki <AT> gentoo <DOT> org> AuthorDate: Mon Dec 21 23:27:09 2020 +0000 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> CommitDate: Mon Dec 21 23:27:09 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=570aa4c7
app-editors/texworks: migrate to lua-single.eclass The usual CMake find_package(Lua) version dance. Lua compatibility as per the bundled FindLua.cmake. Closes: https://bugs.gentoo.org/752534 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> .../files/texworks-0.6.5-cmake_lua_version.patch | 11 +++ app-editors/texworks/texworks-0.6.5-r100.ebuild | 80 ++++++++++++++++++++++ profiles/package.mask | 1 + 3 files changed, 92 insertions(+) diff --git a/app-editors/texworks/files/texworks-0.6.5-cmake_lua_version.patch b/app-editors/texworks/files/texworks-0.6.5-cmake_lua_version.patch new file mode 100644 index 00000000000..630443d5f11 --- /dev/null +++ b/app-editors/texworks/files/texworks-0.6.5-cmake_lua_version.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -297,7 +297,7 @@ + # ------------------------------- + + IF ( WITH_LUA ) +- FIND_PACKAGE(Lua) ++ FIND_PACKAGE(Lua ${LUA_VERSION} EXACT REQUIRED) + ENDIF() + + IF ( WITH_PYTHON ) diff --git a/app-editors/texworks/texworks-0.6.5-r100.ebuild b/app-editors/texworks/texworks-0.6.5-r100.ebuild new file mode 100644 index 00000000000..f5e98275363 --- /dev/null +++ b/app-editors/texworks/texworks-0.6.5-r100.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +LUA_COMPAT=( lua5-{1..3} ) +PYTHON_COMPAT=( python{3_6,3_7} ) + +inherit lua-single python-single-r1 cmake virtualx xdg-utils + +DESCRIPTION="A simple interface for working with TeX documents" +HOMEPAGE="http://tug.org/texworks/" +SRC_URI="https://github.com/TeXworks/texworks/archive/release-${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="lua python" +REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} ) + python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND="app-text/hunspell:= + app-text/poppler[qt5] + dev-qt/designer:5 + dev-qt/qtcore:5 + dev-qt/qtconcurrent:5 + dev-qt/qtdbus:5 + dev-qt/qtgui:5 + dev-qt/qtscript:5[scripttools] + lua? ( ${LUA_DEPS} ) + python? ( ${PYTHON_DEPS} ) " + +DEPEND="dev-qt/linguist-tools:5 + ${RDEPEND}" + +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/qt5.15-support.patch + "${FILESDIR}"/${PN}-0.6.5-cmake_lua_version.patch +) + +S=${WORKDIR}/${PN}-release-${PV} + +RESTRICT="!test? ( test )" + +CMAKE_REMOVE_MODULES_LIST="FindLua" + +pkg_setup() { + use lua && lua-single_pkg_setup + python-single-r1_pkg_setup +} + +src_configure() { + local mycmakeargs=( + -Wno-dev + -DPREFER_BUNDLED_SYNCTEX=ON + -DWITH_LUA=$(usex lua ON OFF) + -DWITH_PYTHON=$(usex python ON OFF) + -DTeXworks_PLUGIN_DIR="/usr/$(get_libdir)/texworks" + -DTeXworks_DOCS_DIR="/share/doc/${PF}" + -DQTPDF_VIEWER=ON + -DBUILD_SHARED_LIBS=ON + -DBUILD_SHARED_PLUGINS=ON + ) + use lua && mycmakeargs+=( -DLUA_VERSION="$(lua_get_version)" ) + cmake_src_configure +} + +src_test() { + virtx default_src_test +} + +pkg_postinst() { + xdg_desktop_database_update +} + +pkg_postrm() { + xdg_desktop_database_update +} diff --git a/profiles/package.mask b/profiles/package.mask index 1c1c37ef2cb..caec4c46509 100644 --- a/profiles/package.mask +++ b/profiles/package.mask @@ -451,6 +451,7 @@ kde-apps/kdebase-meta:5 >=app-editors/gvim-8.2.0814-r100 >=app-editors/neovim-0.4.4-r100 =app-editors/scite-4.4.4-r10 +>=app-editors/texworks-0.6.5-r100 >=app-editors/vim-8.2.0814-r100 >=app-emulation/libguestfs-1.38.6-r100 >=app-metrics/nginx-lua-prometheus-0.1_pre20170610-r100