summaryrefslogtreecommitdiff
path: root/app-office/texmaker/texmaker-6.0.1.ebuild
blob: 7bb4e966a6e87d1d24982b403c638b725644368c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake optfeature xdg

DESCRIPTION="Powerful LaTeX-IDE"
HOMEPAGE="https://xm1math.net/texmaker/"
SRC_URI="https://xm1math.net/texmaker/${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64"
IUSE="webengine"

# dev-qt/qtbase slot op: Qt6::CorePrivate, includes private/qabstractitemmodel_p.h
RDEPEND="
	app-text/hunspell:=
	app-text/texlive-core
	dev-qt/qt5compat:6
	dev-qt/qtbase:6=[concurrent,gui,network,widgets,xml]
	dev-qt/qtdeclarative:6
	virtual/latex-base
	webengine? ( dev-qt/qtwebengine:6[widgets] )
"
DEPEND="${RDEPEND}"
BDEPEND="
	dev-qt/qttools:6[linguist]
	virtual/pkgconfig
"

PATCHES=(
	"${FILESDIR}"/${PN}-6.0.0-unbundle_hunspell_synctex.patch
	"${FILESDIR}"/${PN}-6.0.0-unforce_webengine.patch
	"${FILESDIR}"/${PN}-6.0.0-fix_lto_mismatch.patch
	"${FILESDIR}"/${P}-qt-6.10.patch # downstream, bug #966707
)

src_prepare() {
	# -> app-text/hunspell
	rm -r 3rdparty/hunspell || die
	sed -e '/3rdparty\/hunspell/d' \
		-i CMakeLists.txt || die

	# -> app-text/texlive-core
	rm -r 3rdparty/synctex || die
	sed -e '/3rdparty\/synctex/d' \
		-i CMakeLists.txt || die

	# fix helpdir
	sed -e "s:texmaker/usermanual_:doc/${PF}/html/usermanual_:" \
		-e "s:texmaker/latexhelp.html:doc/${PF}/html/latexhelp.html:" \
		-i src/texmaker.cpp || die

	cmake_src_prepare
}

src_configure() {
	local mycmakeargs=(
		-DINTERNALBROWSER=$(usex webengine)
	)

	cmake_src_configure
}

src_install() {
	local DOCS+=( datas/dictionaries/*README*.txt datas/CHANGELOG.txt AUTHORS )
	local HTML_DOCS=( datas/doc/. )

	cmake_src_install

	# already installed in docdir
	rm "${ED}"/usr/share/${PN}/{*.html,*.png,*.txt,AUTHORS,COPYING} || die
}

pkg_postinst() {
	xdg_pkg_postinst

	optfeature "conversion tools and print support" app-text/ghostscript-gpl
	optfeature "PostScript tools" app-text/psutils
	optfeature "graphic tools" media-libs/netpbm
	optfeature "integration of R code (Sweave)" dev-lang/R
	optfeature "automation" dev-tex/latexmk
	optfeature "XeLaTex engine" dev-texlive/texlive-xetex
	optfeature "the vector graphics language (.asy)" media-gfx/asymptote
}