summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorvsibille2022-03-03 19:12:50 -0500
committervsibille2022-03-03 19:12:50 -0500
commitc409e3ce79c5df7bd713a190f4d2aa31a8dee2d7 (patch)
tree7830ca8ad6db5977ca3a503f0d179c761eb1a0dd /PKGBUILD
downloadaur-c409e3ce79c5df7bd713a190f4d2aa31a8dee2d7.tar.gz
Build MAC's SDK with native and optimisation flags
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD36
1 files changed, 36 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2ced363be05e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Dakeryas <mrdakeryas at gmail dot com>
+pkgname=mac-optimised
+pkgver=7.38
+pkgrel=1
+pkgdesc="Monkey's Audio library and command line APE converter with optimised build flags (from SDK)"
+arch=('i686' 'x86_64')
+url="https://monkeysaudio.com/developers.html"
+license=("Monkey's Audio License Agreementt")
+provides=('mac')
+conflicts=('mac')
+makedepends=('gcc' 'make')
+source=("https://monkeysaudio.com/files/MAC_SDK_${pkgver//.}.zip")
+md5sums=('SKIP')
+
+
+_project_path() {
+ echo "$srcdir/Source/Projects/NonWindows"
+}
+
+_mac_cmd_object() {
+ echo "$(awk '/CMDOBJECTS\s+=/{print $NF}' $(_project_path)/Makefile)"
+}
+
+build() {
+ cd $(_project_path)
+ export prefix=/usr
+ export CXXFLAGS="${CXXFLAGS} -O3 -march=native"
+ make
+}
+
+package() {
+ cd $(_project_path)
+ export LDFLAGS="${LDFLAGS} -Wl,-rpath,\\$\$ORIGIN/../lib"
+ touch $(_mac_cmd_object)
+ make DESTDIR="$pkgdir/" install
+}