commit:     59c4a9155d29fa7b69acfd685138ca924bcb4259
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Oct  4 13:59:39 2024 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Nov  8 16:19:01 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59c4a915

app-editors/texworks: add 0.6.9

Closes: https://bugs.gentoo.org/936636
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 app-editors/texworks/Manifest                      |  1 +
 .../files/texworks-0.6.9-cmake_lua_version.patch   | 11 ++++
 app-editors/texworks/texworks-0.6.9.ebuild         | 73 ++++++++++++++++++++++
 3 files changed, 85 insertions(+)

diff --git a/app-editors/texworks/Manifest b/app-editors/texworks/Manifest
index a5b724486bf8..6a58610ebf78 100644
--- a/app-editors/texworks/Manifest
+++ b/app-editors/texworks/Manifest
@@ -1 +1,2 @@
 DIST texworks-0.6.8.tar.gz 12486607 BLAKE2B 
a7de78adc0746c57b721a400a704d3912574933604e01124a99f5a60ba377ba66ce8d57f5f0a87e336de715d981146db6b8ae61a78c744b385c698fcdad2f7fe
 SHA512 
23164f9ab2f611a705b533f4c435891f1279d1e0e0de2d7f947864f8919a6513cb696881dc1dcf93345471599f113d264ced57cbd2dceae343b9dde46ee80482
+DIST texworks-0.6.9.tar.gz 12505487 BLAKE2B 
7d1fbce67a666a7b99e093dab2e034d96a847e67a8f3c0015e34f2691d5d306bb398b1b8ddaecf8003a339a0c2e7fe946097438e0db81932f0cca597225d905c
 SHA512 
54677205e7767f377fa66be6b2c43bec2d3c3981ea1a24eb11f45608c1cb3ddc98852c43611680273601eb8e8ae4a6095c9b9a9338ee69ef0475a43f2191551e

diff --git a/app-editors/texworks/files/texworks-0.6.9-cmake_lua_version.patch 
b/app-editors/texworks/files/texworks-0.6.9-cmake_lua_version.patch
new file mode 100644
index 000000000000..4a36b892cf51
--- /dev/null
+++ b/app-editors/texworks/files/texworks-0.6.9-cmake_lua_version.patch
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -297,7 +297,7 @@
+ # -------------------------------
+ 
+ IF ( WITH_LUA )
+-  find_package(TwxLua)
++  find_package(Lua ${LUA_VERSION} EXACT REQUIRED)
+ ENDIF()
+ 
+ IF ( WITH_PYTHON )

diff --git a/app-editors/texworks/texworks-0.6.9.ebuild 
b/app-editors/texworks/texworks-0.6.9.ebuild
new file mode 100644
index 000000000000..7d3052c208f1
--- /dev/null
+++ b/app-editors/texworks/texworks-0.6.9.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{1..3} )
+PYTHON_COMPAT=( python3_{10..13} )
+CMAKE_REMOVE_MODULES_LIST=( FindLua )
+inherit lua-single python-single-r1 cmake xdg
+
+DESCRIPTION="Simple interface for working with TeX documents"
+HOMEPAGE="https://tug.org/texworks/";
+SRC_URI="https://github.com/TeXworks/texworks/archive/release-${PV}.tar.gz -> 
${P}.tar.gz"
+S="${WORKDIR}"/${PN}-release-${PV}
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~riscv ~x86"
+IUSE="lua python test"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="
+       lua? ( ${LUA_REQUIRED_USE} )
+       python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+RDEPEND="
+       app-text/hunspell:=
+       app-text/poppler[qt6(-)]
+       dev-qt/qt5compat:6
+       dev-qt/qtbase:6[concurrent,dbus,gui,widgets]
+       dev-qt/qttools:6[designer]
+       sys-libs/zlib
+       lua? ( ${LUA_DEPS} )
+       python? ( ${PYTHON_DEPS} )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       dev-qt/qttools:6[linguist]
+       virtual/pkgconfig
+"
+
+PATCHES=( "${FILESDIR}"/${P}-cmake_lua_version.patch )
+
+pkg_setup() {
+       use lua && lua-single_pkg_setup
+
+       python-single-r1_pkg_setup
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -Wno-dev
+               -DPREFER_BUNDLED_SYNCTEX=ON
+               -DQT_DEFAULT_MAJOR_VERSION=6
+               -DTeXworks_PLUGIN_DIR="/usr/$(get_libdir)/texworks"
+               -DTeXworks_DOCS_DIR="/share/doc/${PF}"
+               -DQTPDF_VIEWER=ON
+               -DBUILD_SHARED_PLUGINS=ON
+               -DWITH_LUA=$(usex lua)
+               -DWITH_PYTHON=$(usex python)
+               -DWITH_TESTS=$(usex test)
+       )
+
+       use lua && mycmakeargs+=( -DLUA_VERSION="$(lua_get_version)" )
+
+       cmake_src_configure
+}
+
+src_test() {
+       local -x QT_QPA_PLATFORM=offscreen
+       cmake_src_test
+}

Reply via email to