diff --git a/sci-misc/praat/Manifest b/sci-misc/praat/Manifest new file mode 100644 index 0000000000..36898f92b9 --- /dev/null +++ b/sci-misc/praat/Manifest @@ -0,0 +1 @@ +DIST praat-7.0.02.tar.gz 160884351 BLAKE2B 04c980fd373e52b7d59a9bff11570e96ddea8eb380edab650568a2813df3932b7258100cd39818d4fcb2ced11370c5cfb38f520f1dad92630c24d931aa8d7ced SHA512 5bcb472f6f28199e90488b784c69ff98b0d2d2ec734be2bd008a1151f41b5b839ebc05766cdd80746786ec4b7781c48c830404d99df8248163145719a399c450 diff --git a/sci-misc/praat/metadata.xml b/sci-misc/praat/metadata.xml new file mode 100644 index 0000000000..e3eadfdb90 --- /dev/null +++ b/sci-misc/praat/metadata.xml @@ -0,0 +1,14 @@ + + + + + me@dblsaiko.net + Katalin Rebhan + + + Without USE=gtk, build with minimal graphics support using x11-libs/pango + + + praat/praat.github.io + + diff --git a/sci-misc/praat/praat-7.0.02.ebuild b/sci-misc/praat/praat-7.0.02.ebuild new file mode 100644 index 0000000000..4353a47222 --- /dev/null +++ b/sci-misc/praat/praat-7.0.02.ebuild @@ -0,0 +1,86 @@ +# 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. +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_compile() { + local audio_cflags audio_ldflags gfx + + gfx=barren + use pango && gfx=nogui + use gtk && gfx=gtk # any value will do + + # The audio backend selection in the makefile is not as granular as I would + # like 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 \ + PREFIX="${EPREFIX}/usr" \ + 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() { + emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install +} + +pkg_postinst() { + xdg_pkg_postinst +} + +pkg_postrm() { + xdg_pkg_postrm +}