app-text/lektra - 0.7.5 (gentoo-zh)

Search

Install

Install this version:

emerge -a =app-text/lektra-0.7.5

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =app-text/lektra-0.7.5

Or alternatively:

emerge --autounmask-write -a =app-text/lektra-0.7.5

Package Information

Description:
High-performance PDF reader that prioritizes screen space and control
Homepage:
https://github.com/dheerajshenoy/lektra
License:
AGPL-3 synctex? ( MIT )

Ebuild Details

Version EAPI Keywords Slot
0.7.5 8 ~amd64 0
View Raw Ebuild
# Copyright 2025-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake xdg

MUPDF_PV="1.27.2"
SYNCTEX_COMMIT="917617707955cde0c2fae127130d9d3129303cbc"

DESCRIPTION="High-performance PDF reader that prioritizes screen space and control"
HOMEPAGE="https://github.com/dheerajshenoy/lektra"
SRC_URI="
	https://github.com/dheerajshenoy/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
	https://mupdf.com/downloads/archive/mupdf-${MUPDF_PV}-source.tar.gz
	synctex? (
		https://github.com/jlaurens/synctex/archive/${SYNCTEX_COMMIT}.tar.gz
			-> ${PN}-synctex-${SYNCTEX_COMMIT}.tar.gz
	)
"

# lektra is AGPL-3; the bundled synctex parser is MIT.
LICENSE="AGPL-3 synctex? ( MIT )"
SLOT="0"
KEYWORDS="~amd64"
IUSE="synctex"

# mupdf and, with synctex, the synctex parser are git submodules absent
# from the release tarball; both are vendored via SRC_URI. mupdf is built
# by the project's ExternalProject step through its own Makefile.
DEPEND="
	dev-qt/qtbase:6[concurrent,gui,network,opengl,widgets]
	dev-qt/qtsvg:6
	virtual/zlib
"
RDEPEND="${DEPEND}"
BDEPEND="
	dev-build/cmake
	dev-qt/qttools:6[linguist]
"

src_prepare() {
	# The release tarball ships empty thirdparty/mupdf and thirdparty/synctex
	# submodule directories; populate them from the vendored sources.
	rmdir "${S}/thirdparty/mupdf" || die
	mv "${WORKDIR}/mupdf-${MUPDF_PV}-source" "${S}/thirdparty/mupdf" || die

	if use synctex; then
		rmdir "${S}/thirdparty/synctex" || die
		mv "${WORKDIR}/synctex-${SYNCTEX_COMMIT}" "${S}/thirdparty/synctex" || die
	fi

	# CMake 4 dropped compatibility with cmake_minimum_required() < 3.5.
	# mupdf's bundled thirdparty CMake projects (zlib, freetype, freeglut,
	# curl, ...) declare older minimums. They build through mupdf's Makefile,
	# not CMake, but cmake.eclass still scans the tree and, on finding them,
	# applies a policy workaround that trips the overlay elog gate as a QA
	# notice. Raise every bundled minimum so the scan finds none.
	find "${S}/thirdparty/mupdf" -name CMakeLists.txt -exec sed -i -E \
		-e 's/^(\s*cmake_minimum_required\s*\(\s*VERSION\s+)[0-9.]+/\13.15/I' {} + || die

	cmake_src_prepare
}

src_configure() {
	local mycmakeargs=(
		-DWITH_SYNCTEX=$(usex synctex ON OFF)
		-DWITH_LUA=OFF
	)
	cmake_src_configure
}

src_install() {
	cmake_src_install

	# Upstream installs docs to /usr/share/doc/lektra,
	# but Gentoo requires /usr/share/doc/${PF}.
	if [[ -d "${ED}/usr/share/doc/${PN}" && "${PN}" != "${PF}" ]]; then
		mv "${ED}/usr/share/doc/${PN}"/* "${ED}/usr/share/doc/${PF}/" || die
		rmdir "${ED}/usr/share/doc/${PN}" || die
	fi
}

USE Flags

Manage flags for this package: euse -i <flag> -p app-text/lektra | euse -E <flag> -p app-text/lektra | euse -D <flag> -p app-text/lektra

Global/Standard Flags

Inherited Eclasses

xdg

Dependencies

DEPEND

	dev-qt/qtbase:6[concurrent,gui,network,opengl,widgets]
	dev-qt/qtsvg:6
	virtual/zlib

RDEPEND

	dev-qt/qtbase:6[concurrent,gui,network,opengl,widgets]
	dev-qt/qtsvg:6
	virtual/zlib

BDEPEND

	dev-build/cmake
	dev-qt/qttools:6[linguist]

Manifest for 0.7.5

Type File Size Source URLs
DIST lektra-0.7.5.tar.gz 42936563 bytes https://github.com/dheerajshenoy/lektra/archive/refs/tags/v0.7.5.tar.gz
DIST lektra-synctex-917617707955cde0c2fae127130d9d3129303cbc.tar.gz 7284576 bytes https://github.com/jlaurens/synctex/archive/917617707955cde0c2fae127130d9d3129303cbc.tar.gz
DIST mupdf-1.27.2-source.tar.gz 66968384 bytes https://mupdf.com/downloads/archive/mupdf-1.27.2-source.tar.gz