sci-misc/praat - 6.4.67-r1 (2xsaiko)

Search

Install

Install this version:

emerge -a =sci-misc/praat-6.4.67-r1

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

autounmask =sci-misc/praat-6.4.67-r1

Or alternatively:

emerge --autounmask-write -a =sci-misc/praat-6.4.67-r1

Package Information

Description:
Doing phonetics by computer
Homepage:
http://www.fon.hum.uva.nl/praat/
License:
GPL-3+

Ebuild Details

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

EAPI=8

inherit desktop xdg toolchain-funcs

DESCRIPTION="Doing phonetics by computer"
HOMEPAGE="http://www.fon.hum.uva.nl/praat/"
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/praat.github.io-${PV}"

LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="+pango +gtk jack alsa +pulseaudio"

# This constraint is pointless, really, but we can't have ?? ( gtk pango )
# since that would always require intervention on a desktop profile and I don't
# want to make +pango silently do nothing when gtk is also on. Cry about it
REQUIRED_USE="
	gtk? ( pango )"

DEPEND="
	jack? ( virtual/jack )
	alsa? ( media-libs/alsa-lib )
	pulseaudio? ( media-libs/libpulse )
	gtk? ( x11-libs/gtk+:3 )
	pango? ( x11-libs/pango )"

RDEPEND="${DEPEND}"

src_prepare() {
	sed -Ei 's/((C|CXX|LD)FLAGS) :=/\1 +=/' Makefile || die

	default
}

src_compile() {
	gfx=barren
	use pango && gfx=nogui
	use gtk && gfx=gtk  # any value will do

	# The audio backend selection in the makefile is really bad so let's just do
	# it ourselves.
	audio_cflags=
	audio_ldflags=

	if use jack; then
		audio_cflags+=" -DJACK $("$(tc-getPKG_CONFIG)" --cflags jack)" || die
		audio_ldflags+=" $("$(tc-getPKG_CONFIG)" --libs jack)" || die
	fi

	if use alsa; then
		audio_cflags+=" -DALSA $("$(tc-getPKG_CONFIG)" --cflags alsa)" || die
		audio_ldflags+=" $("$(tc-getPKG_CONFIG)" --libs alsa)" || die
	fi

	if use pulseaudio; then
		audio_cflags+=" -DHAVE_PULSEAUDIO $("$(tc-getPKG_CONFIG)" --cflags libpulse)" || die
		audio_ldflags+=" $("$(tc-getPKG_CONFIG)" --libs libpulse)" || die
	fi

	emake \
		PRAAT_COMPILER="$(tc-get-compiler-type)" \
		CC="$(tc-getCC)" \
		CXX="$(tc-getCXX)" \
		LINKER_COMMAND="$(tc-getCXX)" \
		AR="$(tc-getAR)" \
		RANLIB="$(tc-getRANLIB)" \
		PKG_CONFIG="$(tc-getPKG_CONFIG)" \
		EXECUTABLE_FILE=praat \
		PRAAT_GRAPHICS="${gfx}" \
		PRAAT_AUDIO=none \
		AUDIO_COMPILER_FLAGS="${audio_cflags}" \
		AUDIO_LINKER_FLAGS="${audio_ldflags}"
}

src_install() {
	dobin praat
	insinto /usr/share/${PN}/test
	doins -r test/*

	if use gtk; then
		cd "${S}/main/"
		newicon -s scalable praat-480.svg praat.svg
		domenu praat.desktop
	fi
}

pkg_postinst() {
	xdg_pkg_postinst
}

pkg_postrm() {
	xdg_pkg_postrm
}

USE Flags

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

Global/Standard Flags

pango
Default: Enabled (+)
gtk
Default: Enabled (+)
pulseaudio
Default: Enabled (+)

Inherited Eclasses

xdg

Dependencies

DEPEND

	jack? ( virtual/jack )
	alsa? ( media-libs/alsa-lib )
	pulseaudio? ( media-libs/libpulse )
	gtk? ( x11-libs/gtk+:3 )
	pango? ( x11-libs/pango )

RDEPEND

	jack? ( virtual/jack )
	alsa? ( media-libs/alsa-lib )
	pulseaudio? ( media-libs/libpulse )
	gtk? ( x11-libs/gtk+:3 )
	pango? ( x11-libs/pango )