summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrahmajit Das <brahmajit.xyz@gmail.com>2023-07-23 21:09:44 +0530
committerJoonas Niilola <juippis@gentoo.org>2023-08-14 09:13:25 +0300
commit23b895cb15a8abc0cb5263d3ff18e8ca10d9c25b (patch)
treea92e6939ed0b1c1ae46acc64bcbab819bb0d7aaa
parentsci-libs/libcifpp: remove unused patch(es) (diff)
downloadgentoo-23b895cb15a8abc0cb5263d3ff18e8ca10d9c25b.tar.gz
gentoo-23b895cb15a8abc0cb5263d3ff18e8ca10d9c25b.tar.bz2
gentoo-23b895cb15a8abc0cb5263d3ff18e8ca10d9c25b.zip
app-editors/texworks: Fix call to undeclared function vasprintf
Closes: https://bugs.gentoo.org/882461 Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/32003 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
-rw-r--r--app-editors/texworks/files/texworks-0.6.7-vasprintf-clang16-fix.patch12
-rw-r--r--app-editors/texworks/texworks-0.6.7-r1.ebuild76
2 files changed, 88 insertions, 0 deletions
diff --git a/app-editors/texworks/files/texworks-0.6.7-vasprintf-clang16-fix.patch b/app-editors/texworks/files/texworks-0.6.7-vasprintf-clang16-fix.patch
new file mode 100644
index 000000000000..ce8e9e2daca0
--- /dev/null
+++ b/app-editors/texworks/files/texworks-0.6.7-vasprintf-clang16-fix.patch
@@ -0,0 +1,12 @@
+Bug: https://bugs.gentoo.org/882461
+Reverting commit ccf692bb38c43a38f8e9f755dd48451c6f6ad430
+--- a/modules/synctex/CMakeLists.txt
++++ b/modules/synctex/CMakeLists.txt
+@@ -26,6 +26,4 @@ endif()
+
+ # SyncTeX uses vasprintf which is not in POSIX; thus gcc prints a warning unless
+ # _GNU_SOURCE is defined. Other compilers seem to be fine.
+-if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+- target_compile_definitions(SyncTeX PRIVATE _GNU_SOURCE)
+-endif()
++target_compile_definitions(SyncTeX PRIVATE _GNU_SOURCE)
diff --git a/app-editors/texworks/texworks-0.6.7-r1.ebuild b/app-editors/texworks/texworks-0.6.7-r1.ebuild
new file mode 100644
index 000000000000..c8492a170faa
--- /dev/null
+++ b/app-editors/texworks/texworks-0.6.7-r1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{1..3} )
+PYTHON_COMPAT=( python3_{9..11} )
+CMAKE_REMOVE_MODULES_LIST=( FindLua )
+inherit lua-single python-single-r1 cmake virtualx xdg
+
+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"
+S="${WORKDIR}"/${PN}-release-${PV}
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~riscv ~x86"
+IUSE="lua python"
+RESTRICT="!test? ( test )"
+
+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/qtdeclarative:5
+ dev-qt/qtdbus:5
+ dev-qt/qtgui:5
+ dev-qt/qtscript:5[scripttools]
+ dev-qt/qtwidgets:5
+ sys-libs/zlib
+ lua? ( ${LUA_DEPS} )
+ python? ( ${PYTHON_DEPS} ) "
+DEPEND="${RDEPEND}"
+BDEPEND="dev-qt/linguist-tools:5
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.6.5-cmake_lua_version.patch
+ "${FILESDIR}"/${PN}-0.6.7-vasprintf-clang16-fix.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
+ )
+
+ use lua && mycmakeargs+=( -DLUA_VERSION="$(lua_get_version)" )
+
+ cmake_src_configure
+}
+
+src_test() {
+ virtx cmake_src_test
+}