commit:     c15b70d3630e9075032b310db20890fc9c41def7
Author:     Enno Tensing <tenno <AT> suij <DOT> in>
AuthorDate: Mon Mar 24 18:56:13 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Mar 25 14:56:23 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c15b70d3

app-editors/texworks: Bump version to 0.6.10, switch to Qt6

* Update TeXworks to version 0.6.10
* Switch from Qt5 to Qt6 by setting QT_DEFAULT_MAJOR_VERSION to 6
* Add Gentoo Build ID
* Add MIT License for bundled SyncTeX
* Change GPL-2 to GPL-2+

Bug: https://bugs.gentoo.org/936636
Signed-off-by: Enno Tensing <tenno <AT> suij.in>
Closes: https://github.com/gentoo/gentoo/pull/41220
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 app-editors/texworks/Manifest                      |  1 +
 .../files/texworks-0.6.10-cmake_lua_version.patch  | 13 ++++
 app-editors/texworks/texworks-0.6.10.ebuild        | 77 ++++++++++++++++++++++
 3 files changed, 91 insertions(+)

diff --git a/app-editors/texworks/Manifest b/app-editors/texworks/Manifest
index a5b724486bf8..1476f7f35bca 100644
--- a/app-editors/texworks/Manifest
+++ b/app-editors/texworks/Manifest
@@ -1 +1,2 @@
+DIST texworks-0.6.10.tar.gz 11479436 BLAKE2B 
a6b251068c42d3ff68dfb3e5c69348abc984ace1fa9c25b3b815d22f4294931a67697ebb7abb708709be7333aee90495fdf854dea0b6625963ba35902b6aa7e0
 SHA512 
3f8ec187b8d6dd5f62c84cb93ac6b8d9369a8b53525518c47504fba0d1353af90d02a4b68eb38e8f623dce2f2cceae33b20917be7793f0e058864ccea7a2f8b6
 DIST texworks-0.6.8.tar.gz 12486607 BLAKE2B 
a7de78adc0746c57b721a400a704d3912574933604e01124a99f5a60ba377ba66ce8d57f5f0a87e336de715d981146db6b8ae61a78c744b385c698fcdad2f7fe
 SHA512 
23164f9ab2f611a705b533f4c435891f1279d1e0e0de2d7f947864f8919a6513cb696881dc1dcf93345471599f113d264ced57cbd2dceae343b9dde46ee80482

diff --git a/app-editors/texworks/files/texworks-0.6.10-cmake_lua_version.patch 
b/app-editors/texworks/files/texworks-0.6.10-cmake_lua_version.patch
new file mode 100644
index 000000000000..8fbfae4b5e0c
--- /dev/null
+++ b/app-editors/texworks/files/texworks-0.6.10-cmake_lua_version.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9682c39..43ddca5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -321,7 +321,7 @@ SET(TeXworks_LIBS
+ # -------------------------------
+ 
+ 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.10.ebuild 
b/app-editors/texworks/texworks-0.6.10.ebuild
new file mode 100644
index 000000000000..2ebc16b7962b
--- /dev/null
+++ b/app-editors/texworks/texworks-0.6.10.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{1..4} )
+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+ MIT"
+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,xml]
+       dev-qt/qtdeclarative:6
+       dev-qt/qttools:6[widgets]
+       sys-libs/zlib
+       lua? ( ${LUA_DEPS} )
+       python? ( ${PYTHON_DEPS} )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       dev-qt/qttools:6[linguist]
+       virtual/pkgconfig
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.6.10-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
+               -DWITH_LUA=$(usex lua)
+               -DWITH_PYTHON=$(usex python)
+               -DWITH_TESTS=$(usex test)
+               -DTeXworks_PLUGIN_DIR="/usr/$(get_libdir)/texworks"
+               -DTeXworks_DOCS_DIR="/share/doc/${PF}"
+               -DQTPDF_VIEWER=ON
+               -DBUILD_SHARED_PLUGINS=ON
+               -DQT_DEFAULT_MAJOR_VERSION=6
+               -DTW_BUILD_ID="Gentoo official package"
+       )
+
+       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