# Copyright 2023-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit desktop xdg DESCRIPTION="Digital audio workstation" HOMEPAGE="https://www.reaper.fm" WDL_COMMIT="255d37def10f67baba0faadf284a0b860e9c8256" SRC_URI=" amd64? ( https://www.reaper.fm/files/$(ver_cut 1).x/reaper$(ver_cut 1)$(printf %02d $(( 10#$(ver_cut 2) )))_linux_x86_64.tar.xz ) x86? ( https://www.reaper.fm/files/$(ver_cut 1).x/reaper$(ver_cut 1)$(printf %02d $(( 10#$(ver_cut 2) )))_linux_i686.tar.xz ) arm64? ( https://www.reaper.fm/files/$(ver_cut 1).x/reaper$(ver_cut 1)$(printf %02d $(( 10#$(ver_cut 2) )))_linux_aarch64.tar.xz ) arm? ( https://www.reaper.fm/files/$(ver_cut 1).x/reaper$(ver_cut 1)$(printf %02d $(( 10#$(ver_cut 2) )))_linux_armv7l.tar.xz ) https://github.com/justinfrankel/WDL/archive/${WDL_COMMIT}.tar.gz -> WDL-${WDL_COMMIT}.tar.gz " LICENSE="Cockos" SLOT="0" KEYWORDS="~amd64 ~arm ~arm64 ~x86" RESTRICT="mirror" IUSE="+jack pulseaudio mp3 ffmpeg" RDEPEND=" ${DEPEND} media-libs/alsa-lib media-libs/libglvnd jack? ( virtual/jack ) pulseaudio? ( media-libs/libpulse ) mp3? ( media-sound/lame ) ffmpeg? ( media-video/ffmpeg ) " DEPEND=" x11-libs/gtk+:3[X] x11-libs/libX11 x11-libs/libXi media-libs/fontconfig media-libs/freetype " S="${WORKDIR}" src_prepare() { default cd "WDL-${WDL_COMMIT}" || die eapply "${FILESDIR}"/libSwell-makefile-cflags.patch } src_compile() { emake -C "WDL-${WDL_COMMIT}/WDL/swell" \ PRELOAD_GDK=1 } QA_PREBUILT="*/*.so */reaper */reaper_host_*" src_install() { cd "reaper_linux_"* || die mv -fv "../WDL-${WDL_COMMIT}/WDL/swell/libSwell.so" REAPER/ || die ./install-reaper.sh --install "${D}"/opt || die rm -f "${D}"/opt/REAPER/uninstall-reaper.sh dosym ../../opt/REAPER/reaper /usr/bin/reaper # The following is pulled out of install-reaper.sh to match desktop.eclass. cd REAPER || die newicon -s 256 Resources/main.png cockos-reaper.png doicon -s 256 Resources/cockos-reaper-backup.png doicon -s 256 Resources/cockos-reaper-document.png doicon -s 256 Resources/cockos-reaper-theme.png doicon -s 256 Resources/cockos-reaper-peak.png doicon -s 256 Resources/cockos-reaper-template.png doicon -s 256 Resources/cockos-reaper-template2.png cat > cockos-reaper.desktop <<-EOF [Desktop Entry] Encoding=UTF-8 Type=Application Name=REAPER Comment=REAPER Categories=Audio;Video;AudioVideo;AudioVideoEditing;Recorder; Exec="/usr/bin/reaper" %F Icon=cockos-reaper MimeType=application/x-reaper-project;application/x-reaper-project-backup;application/x-reaper-theme StartupWMClass=REAPER EOF domenu cockos-reaper.desktop cat > application-x-reaper.xml <<-EOF REAPER project REAPER project backup REAPER configuration REAPER fx chain REAPER track template REAPER theme REAPER undo REAPER undo backup REAPER peak file REAPER proxy EOF insopts -m 0644 insinto /usr/share/mime doins application-x-reaper.xml }