Add Surge
I am quite proud of this ebuild. It has USE flags, and I even bothered fixing the QA warnings. Doing things properly is an achievement for me.
This commit is contained in:
parent
3d843271b7
commit
184b80786e
5
media-plugins/surge/Manifest
Normal file
5
media-plugins/surge/Manifest
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
AUX fix_stack.patch 1025 BLAKE2B b4e4c0e447b6ae3718989c4d78352c9f52be47eb96a581f2e36e0ba5a28deccfc83d6675a92a87aa2a53a869944bbd0ad32fe1515032a394fdab5e5b188c0c4d SHA512 d61faf474a51795d8b6e079761bdc8d2e92c0544aff22b94d32e6ae78ff9cbe0f5888a002baa6a26cd46dc7b5321a41eb873dc8c3356e7dbf1abb8040819048e
|
||||||
|
AUX prevent_stripping.patch 360 BLAKE2B b9947395d93fd84fbb14cd747cdeb6cd58977370c16cc3c466087c709de55bccf1abe939e0cb300912ec046ed050d75d87353b8296b2d9db689a88ba98fc9ef3 SHA512 490fefb7cb01d1cb8df5681ccfb88d64dd6bfe820ec28e2a4ce5dc15ece1621958489b5557187d19bbdd25fc351a3519a78b7953b96ef2b04092cc472d17e040
|
||||||
|
EBUILD surge-1.7.1.ebuild 1433 BLAKE2B 606337b7523f265bb8e1761b0f5412504039829e85f6b73d27636cdb9fc635ff6f0eaca58b5c7a0dc18afb93670bdb8ca9b97f3bcfd882087427e6fe11761927 SHA512 e49dff489fc6e6149632e562400d72843f28b62c80afe7f520c7b035b8268cf5928f09ff9af24514020b4df5b13738c9334c6d5990b6bf56a4a6f93b3101bafc
|
||||||
|
EBUILD surge-9999.ebuild 1433 BLAKE2B 606337b7523f265bb8e1761b0f5412504039829e85f6b73d27636cdb9fc635ff6f0eaca58b5c7a0dc18afb93670bdb8ca9b97f3bcfd882087427e6fe11761927 SHA512 e49dff489fc6e6149632e562400d72843f28b62c80afe7f520c7b035b8268cf5928f09ff9af24514020b4df5b13738c9334c6d5990b6bf56a4a6f93b3101bafc
|
||||||
|
MISC metadata.xml 431 BLAKE2B a53e4c18eaa79e40fe8cd5d48342bfd0101cba6452172cc26ca73ce5c2afda392c5e9f7307169ddf50251abb63c20cd05233893ff4ef37796a282bd8196be7de SHA512 1e85ea9fe4950408fc9816c3101fb7f2cde4362fe5c929e6591b59ec06d04ada04a0943b5fde234781017b338ca21849bf3d4f6f988d7d6aad49bee8a937840d
|
34
media-plugins/surge/files/fix_stack.patch
Normal file
34
media-plugins/surge/files/fix_stack.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
Fix GNU stack management
|
||||||
|
|
||||||
|
This patch indicates to GCC that an executable stack is not necessary, since
|
||||||
|
these files are only responsible for storing assets as far as I know. If Surge
|
||||||
|
doesn't build with the correct stack settings, it might not run on machines
|
||||||
|
with hardware stack protection. See the link below for more information.
|
||||||
|
|
||||||
|
https://wiki.gentoo.org/wiki/Hardened/GNU_stack_quickstart
|
||||||
|
|
||||||
|
Patch by Ryan Fox
|
||||||
|
|
||||||
|
--- a/scripts/linux/emit-vector-piggy.py
|
||||||
|
+++ b/scripts/linux/emit-vector-piggy.py
|
||||||
|
@@ -73,6 +73,10 @@ header_file.write(u""" {NULL, 0}
|
||||||
|
};
|
||||||
|
""")
|
||||||
|
|
||||||
|
+source_file.write("""#if defined(__linux__) && defined(__ELF__)
|
||||||
|
+.section .note.GNU-stack,"",%progbits
|
||||||
|
+#endif""")
|
||||||
|
+
|
||||||
|
|
||||||
|
def save_if_modified(path, contents):
|
||||||
|
try:
|
||||||
|
--- a/src/linux/ConfigurationXml.S
|
||||||
|
+++ b/src/linux/ConfigurationXml.S
|
||||||
|
@@ -8,3 +8,7 @@ configurationXmlEnd:
|
||||||
|
.type configurationXmlNullTerminator, @object
|
||||||
|
configurationXmlNullTerminator:
|
||||||
|
.int 0
|
||||||
|
+
|
||||||
|
+#if defined(__linux__) && defined(__ELF__)
|
||||||
|
+.section .note.GNU-stack,"",%progbits
|
||||||
|
+#endif
|
13
media-plugins/surge/files/prevent_stripping.patch
Normal file
13
media-plugins/surge/files/prevent_stripping.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
Prevent stripping of VST3 on Gentoo
|
||||||
|
|
||||||
|
This patch felt like the most proper way to remove the QA warnings, haha.
|
||||||
|
|
||||||
|
Patch by Ryan Fox
|
||||||
|
|
||||||
|
--- a/scripts/linux/package-vst3.sh
|
||||||
|
+++ b/scripts/linux/package-vst3.sh
|
||||||
|
@@ -17,4 +17,3 @@ fi
|
||||||
|
VST_SO_DIR="$BUNDLE_DIR/Contents/${ARCH}-linux"
|
||||||
|
mkdir -p "$VST_SO_DIR"
|
||||||
|
cp $1 "$VST_SO_DIR"/Surge.so
|
||||||
|
-strip -s "$VST_SO_DIR"/Surge.so
|
13
media-plugins/surge/metadata.xml
Normal file
13
media-plugins/surge/metadata.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||||
|
<pkgmetadata>
|
||||||
|
<maintainer type="person">
|
||||||
|
<email>flewkey@2a03.party</email>
|
||||||
|
<name>Ryan Fox</name>
|
||||||
|
</maintainer>
|
||||||
|
<use>
|
||||||
|
<flag name="lv2">Enable building of LV2 plugin</flag>
|
||||||
|
<flag name="vst3">Enable building of VST3 plugin</flag>
|
||||||
|
<flag name="headless">Enable building of headless test component</flag>
|
||||||
|
</use>
|
||||||
|
</pkgmetadata>
|
56
media-plugins/surge/surge-1.7.1.ebuild
Normal file
56
media-plugins/surge/surge-1.7.1.ebuild
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
# Copyright 2020 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
inherit git-r3 cmake
|
||||||
|
|
||||||
|
EGIT_REPO_URI="https://github.com/surge-synthesizer/surge.git"
|
||||||
|
|
||||||
|
if [[ ${PV} != *9999* ]]; then
|
||||||
|
EGIT_COMMIT="release_${PV}" # The alternative is gluing together six tarballs
|
||||||
|
KEYWORDS="~amd64"
|
||||||
|
fi
|
||||||
|
|
||||||
|
DESCRIPTION="Open source synthesizer plug-in"
|
||||||
|
HOMEPAGE="https://surge-synthesizer.github.io/"
|
||||||
|
LICENSE="GPL-3"
|
||||||
|
SLOT="0"
|
||||||
|
IUSE="+lv2 +vst3 headless" # The VST2 SDK is only available to licensed developers
|
||||||
|
|
||||||
|
DEPEND="
|
||||||
|
x11-libs/cairo
|
||||||
|
x11-libs/libxcb
|
||||||
|
x11-libs/libxkbcommon[X]
|
||||||
|
x11-libs/xcb-util-cursor
|
||||||
|
x11-libs/xcb-util-keysyms
|
||||||
|
"
|
||||||
|
RDEPEND="${DEPEND}"
|
||||||
|
BDEPEND=""
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}/fix_stack.patch"
|
||||||
|
"${FILESDIR}/prevent_stripping.patch"
|
||||||
|
)
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
use lv2 && cmake_build Surge-LV2-Packaged
|
||||||
|
use vst3 && cmake_build Surge-VST3-Packaged
|
||||||
|
use headless && cmake_build surge-headless
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
dodir /usr/share
|
||||||
|
cp -r "${S}/resources/data" "${D}/usr/share/surge" || die "Failed to install"
|
||||||
|
if use lv2; then
|
||||||
|
dodir /usr/$(get_libdir)/lv2
|
||||||
|
cp -r "${BUILD_DIR}/surge_products/Surge.lv2" "${D}/usr/$(get_libdir)/lv2" || die "Failed to install"
|
||||||
|
fi
|
||||||
|
if use vst3; then
|
||||||
|
dodir /usr/$(get_libdir)/vst3
|
||||||
|
cp -r "${BUILD_DIR}/surge_products/Surge.vst3" "${D}/usr/$(get_libdir)/vst3" || die "Failed to install"
|
||||||
|
fi
|
||||||
|
if use headless; then
|
||||||
|
dodir /usr/bin
|
||||||
|
dobin "${BUILD_DIR}/surge-headless"
|
||||||
|
fi
|
||||||
|
}
|
56
media-plugins/surge/surge-9999.ebuild
Normal file
56
media-plugins/surge/surge-9999.ebuild
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
# Copyright 2020 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=7
|
||||||
|
|
||||||
|
inherit git-r3 cmake
|
||||||
|
|
||||||
|
EGIT_REPO_URI="https://github.com/surge-synthesizer/surge.git"
|
||||||
|
|
||||||
|
if [[ ${PV} != *9999* ]]; then
|
||||||
|
EGIT_COMMIT="release_${PV}" # The alternative is gluing together six tarballs
|
||||||
|
KEYWORDS="~amd64"
|
||||||
|
fi
|
||||||
|
|
||||||
|
DESCRIPTION="Open source synthesizer plug-in"
|
||||||
|
HOMEPAGE="https://surge-synthesizer.github.io/"
|
||||||
|
LICENSE="GPL-3"
|
||||||
|
SLOT="0"
|
||||||
|
IUSE="+lv2 +vst3 headless" # The VST2 SDK is only available to licensed developers
|
||||||
|
|
||||||
|
DEPEND="
|
||||||
|
x11-libs/cairo
|
||||||
|
x11-libs/libxcb
|
||||||
|
x11-libs/libxkbcommon[X]
|
||||||
|
x11-libs/xcb-util-cursor
|
||||||
|
x11-libs/xcb-util-keysyms
|
||||||
|
"
|
||||||
|
RDEPEND="${DEPEND}"
|
||||||
|
BDEPEND=""
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}/fix_stack.patch"
|
||||||
|
"${FILESDIR}/prevent_stripping.patch"
|
||||||
|
)
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
use lv2 && cmake_build Surge-LV2-Packaged
|
||||||
|
use vst3 && cmake_build Surge-VST3-Packaged
|
||||||
|
use headless && cmake_build surge-headless
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
dodir /usr/share
|
||||||
|
cp -r "${S}/resources/data" "${D}/usr/share/surge" || die "Failed to install"
|
||||||
|
if use lv2; then
|
||||||
|
dodir /usr/$(get_libdir)/lv2
|
||||||
|
cp -r "${BUILD_DIR}/surge_products/Surge.lv2" "${D}/usr/$(get_libdir)/lv2" || die "Failed to install"
|
||||||
|
fi
|
||||||
|
if use vst3; then
|
||||||
|
dodir /usr/$(get_libdir)/vst3
|
||||||
|
cp -r "${BUILD_DIR}/surge_products/Surge.vst3" "${D}/usr/$(get_libdir)/vst3" || die "Failed to install"
|
||||||
|
fi
|
||||||
|
if use headless; then
|
||||||
|
dodir /usr/bin
|
||||||
|
dobin "${BUILD_DIR}/surge-headless"
|
||||||
|
fi
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user