app-misc/far2l - 9999 (guru)

Search

Install

Install this version:

emerge -a =app-misc/far2l-9999

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

autounmask =app-misc/far2l-9999

Or alternatively:

emerge --autounmask-write -a =app-misc/far2l-9999

Package Information

Description:
Linux port of FAR Manager v2
Homepage:
https://github.com/elfmz/far2l
License:
GPL-2

Ebuild Details

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

EAPI=8

PYTHON_COMPAT=( python3_{13..15} )

WX_GTK_VER="3.2-gtk3"

inherit cmake optfeature python-single-r1 wxwidgets xdg

DESCRIPTION="Linux port of FAR Manager v2"
HOMEPAGE="https://github.com/elfmz/far2l"

if [[ "${PV}" == "9999" ]] ; then
	inherit git-r3
	EGIT_REPO_URI="https://github.com/elfmz/far2l"
	EGIT_BRANCH="master"
else
	MY_PV="v_${PV/_beta/}"
	MY_P="${PN}-${MY_PV}"
	S="${WORKDIR}/${MY_P}"
	SRC_URI="https://github.com/elfmz/far2l/archive/${MY_PV}.tar.gz"
	KEYWORDS="~amd64"
fi

LICENSE="GPL-2"
SLOT="0"
IUSE="+archive aws +chardet +colorer mtp nfs python rar samba sdl sftp +ssl webdav wxwidgets X"
REQUIRED_USE="
	python? ( ${PYTHON_REQUIRED_USE} )
"
RESTRICT="mirror"

# media-libs/libmtp provides udev rules and plugdev access for MTP devices.
# far2l itself uses the bundled libmtp/libusb.
RDEPEND="
	archive? ( app-arch/libarchive )
	aws? (
		dev-libs/openssl:0=
		net-libs/neon[ssl]
	)
	chardet? ( app-i18n/uchardet )
	colorer? ( dev-libs/libxml2 )
	mtp? ( media-libs/libmtp )
	nfs? ( net-fs/libnfs )
	python? (
		${PYTHON_DEPS}
		$(python_gen_cond_dep '
			dev-python/cffi[${PYTHON_USEDEP}]
		')
	)
	rar? ( app-arch/unrar )
	samba? ( net-fs/samba[client] )
	sdl? (
		media-libs/libsdl2
		media-libs/freetype:2
		media-libs/harfbuzz
		media-libs/fontconfig
	)
	sftp? ( net-libs/libssh[sftp] )
	ssl? ( dev-libs/openssl:0= )
	webdav? ( net-libs/neon )
	wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER} )
	X? (
		x11-libs/libX11
		x11-libs/libXi
	)"

DEPEND="${RDEPEND}"

BDEPEND="
	virtual/pkgconfig
	python? ( ${PYTHON_DEPS} )"

DOCS=( README.md )

pkg_setup() {
	if use wxwidgets; then
		setup-wxwidgets
	fi
	if use python; then
		python-single-r1_pkg_setup
	fi
}

src_prepare() {
	sed -e 's|\${CMAKE_INSTALL_PREFIX}/lib/far2l/Plugins/|\\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/far2l/Plugins/|g' \
		-i CMakeLists.txt || die
	sed -e 's:cmake_minimum_required (VERSION 3\.5\.0):cmake_minimum_required (VERSION 3.10.0):' \
		-i CMakeLists.txt || die
	cmake_src_prepare
}

src_configure() {
	local mycmakeargs=(
		-DMULTIARC="$(usex archive)"
		-DNR_AWS="$(usex aws)"
		-DUSEUCD="$(usex chardet)"
		-DCOLORER="$(usex colorer)"
		-DMTP="$(usex mtp)"
		-DNR_NFS="$(usex nfs)"
		-DPYTHON="$(usex python)"
		-DUNRAR="$(usex rar lib NO)"
		-DNR_SMB="$(usex samba)"
		-DUSESDL="$(usex sdl)"
		-DNR_SFTP="$(usex sftp)"
		-DNR_OPENSSL="$(usex ssl)"
		-DNR_WEBDAV="$(usex webdav)"
		-DUSEWX="$(usex wxwidgets)"
		-DTTYX="$(usex X)"

		-DMUSL="$(usex elibc_musl)"
		-DBUILD_SHARED_LIBS=OFF
	)

	if use mtp; then
		mycmakeargs+=(
			-DMTP_SYSTEM_LIBUSB=OFF
			-DMTP_SYSTEM_LIBMTP=OFF
		)
	fi

	if use X; then
		mycmakeargs+=(
			-DTTYXI=YES
		)
	fi

	cmake_src_configure
}

pkg_postinst() {
	xdg_pkg_postinst
	optfeature "accessing Android devices through the ADB plugin" dev-util/android-tools
	optfeature "privileged file operations through far2l's sudo support" app-admin/sudo
}

USE Flags

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

Global/Standard Flags

archive
Default: Enabled (+)
aws
chardet
Default: Enabled (+)
colorer
Default: Enabled (+)
mtp
nfs
rar
sdl
ssl
Default: Enabled (+)
X

Inherited Eclasses

xdg

Dependencies

DEPEND

	archive? ( app-arch/libarchive )
	aws? (
		dev-libs/openssl:0=
		net-libs/neon[ssl]
	)
	chardet? ( app-i18n/uchardet )
	colorer? ( dev-libs/libxml2 )
	mtp? ( media-libs/libmtp )
	nfs? ( net-fs/libnfs )
	python? (
		${PYTHON_DEPS}
		$(python_gen_cond_dep '
			dev-python/cffi[${PYTHON_USEDEP}]
		')
	)
	rar? ( app-arch/unrar )
	samba? ( net-fs/samba[client] )
	sdl? (
		media-libs/libsdl2
		media-libs/freetype:2
		media-libs/harfbuzz
		media-libs/fontconfig
	)
	sftp? ( net-libs/libssh[sftp] )
	ssl? ( dev-libs/openssl:0= )
	webdav? ( net-libs/neon )
	wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER} )
	X? (
		x11-libs/libX11
		x11-libs/libXi
	)

RDEPEND

	archive? ( app-arch/libarchive )
	aws? (
		dev-libs/openssl:0=
		net-libs/neon[ssl]
	)
	chardet? ( app-i18n/uchardet )
	colorer? ( dev-libs/libxml2 )
	mtp? ( media-libs/libmtp )
	nfs? ( net-fs/libnfs )
	python? (
		${PYTHON_DEPS}
		$(python_gen_cond_dep '
			dev-python/cffi[${PYTHON_USEDEP}]
		')
	)
	rar? ( app-arch/unrar )
	samba? ( net-fs/samba[client] )
	sdl? (
		media-libs/libsdl2
		media-libs/freetype:2
		media-libs/harfbuzz
		media-libs/fontconfig
	)
	sftp? ( net-libs/libssh[sftp] )
	ssl? ( dev-libs/openssl:0= )
	webdav? ( net-libs/neon )
	wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER} )
	X? (
		x11-libs/libX11
		x11-libs/libXi
	)

BDEPEND

	virtual/pkgconfig
	python? (  )