gentoo-audio / audio-overlay

Gentoo overlay for music production
https://gentoo-audio.github.io/audio-overlay
GNU General Public License v2.0
41 stars 22 forks source link

Add surge? #298

Open simonvanderveldt opened 4 years ago

simonvanderveldt commented 4 years ago

Looks like a pretty nice synth :) https://surge-synthesizer.github.io/ https://github.com/surge-synthesizer/surge

Gooberpatrol66 commented 4 years ago

Here's my ebuild:

# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=7

inherit eutils git-r3

DESCRIPTION="Surge is an open source digital synthesizer"
HOMEPAGE="https://surge-synthesizer.github.io//"
EGIT_REPO_URI="https://github.com/surge-synthesizer/surge.git"
EGIT_COMMIT="v${PV}"
LICENSE="GPL3"
SLOT="0"
KEYWORDS="amd64"
DEPEND="x11-libs/cairo
        x11-libs/libxkbcommon
        x11-libs/libxcb"
RDEPEND=${DEPEND}
PATCHES=("${FILESDIR}"/install.patch)

src_compile() {
    ${S}/build-linux.sh build
}

src_install() {
    dodir /usr/lib/vst
    dodir /usr/lib/vst3
    dodir /usr/lib/lv2
    dodir /usr/bin
    dodir /usr/share/surge
    vst2_dest_path="${D}/usr/lib/vst" vst3_dest_path="${D}/usr/lib/vst3" lv2_dest_path="${D}/usr/lib/lv2" headless_dest_path="${D}/usr/bin" data_path="${D}/usr/share/surge" ${S}/build-linux.sh install
}

install.patch:

diff --git a/build-linux.sh b/build-linux.sh
index e545441b..be0600c4 100755
--- a/build-linux.sh
+++ b/build-linux.sh
@@ -251,11 +251,11 @@ if [[ ! -z "$option_local" ]]; then
     headless_dest_path="$HOME/bin"
     data_path="$HOME/.local/share/surge"
 else
-    vst2_dest_path="/usr/lib/vst"
-    vst3_dest_path="/usr/lib/vst3"
-    lv2_dest_path="/usr/lib/lv2"
-    headless_dest_path="/usr/bin"
-    data_path="/usr/share/surge"
+    : ${vst2_dest_path:="/usr/lib/vst"}
+    : ${vst3_dest_path:="/usr/lib/vst3"}
+    : ${lv2_dest_path:="/usr/lib/lv2"}
+    : ${headless_dest_path:="/usr/bin"}
+    : ${data_path:="/usr/share/surge"}
 fi

 case $1 in
Lucretia commented 3 years ago

Change the commit to read:

EGIT_COMMIT="release_${PV}"

for 1.8.1.