summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Teibes2018-05-17 23:32:55 +0200
committerCarsten Teibes2018-05-17 23:32:55 +0200
commit40a8d0c296da3441710435eb672d2ae4abe2ea90 (patch)
tree39671fca0bbc5451459367a9d2f66dc9e91ea2ac
downloadaur-40a8d0c296da3441710435eb672d2ae4abe2ea90.tar.gz
[new] devkita64 r9
-rw-r--r--.SRCINFO37
-rw-r--r--PKGBUILD83
-rw-r--r--devkita64.fish2
-rw-r--r--devkita64.install14
-rw-r--r--devkita64.sh2
5 files changed, 138 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..48b64c54918
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,37 @@
+pkgbase = devkita64
+ pkgdesc = AArch64 toolchain for Nintendo Switch homebrew development
+ pkgver = r9
+ pkgrel = 1
+ url = http://devkitpro.org
+ install = devkita64.install
+ arch = x86_64
+ license = GPL
+ depends = flex
+ depends = libmpc
+ depends = python
+ depends = xz
+ noextract = binutils-2.30.tar.bz2
+ noextract = gcc-8.1.0.tar.xz
+ noextract = newlib-3.0.0.tar.gz
+ noextract = gdb-8.0.tar.xz
+ options = !strip
+ options = libtool
+ options = staticlibs
+ options = emptydirs
+ source = https://github.com/devkitPro/buildscripts/releases/download/v20180514/buildscripts-20180514.tar.bz2
+ source = https://github.com/devkitPro/buildscripts/releases/download/sources/binutils-2.30.tar.bz2
+ source = https://github.com/devkitPro/buildscripts/releases/download/sources/gcc-8.1.0.tar.xz
+ source = https://github.com/devkitPro/buildscripts/releases/download/sources/newlib-3.0.0.tar.gz
+ source = https://github.com/devkitPro/buildscripts/releases/download/sources/gdb-8.0.tar.xz
+ source = devkita64.sh
+ source = devkita64.fish
+ sha256sums = c7c11bacfdbcc634d2d70ac17785a0701d5eaaa6753762ca57a918c3841119ac
+ sha256sums = efeade848067e9a03f1918b1da0d37aaffa0b0127a06b5e9236229851d9d0c09
+ sha256sums = 1d1866f992626e61349a1ccd0b8d5253816222cdc13390dcfaa74b093aa2b153
+ sha256sums = c8566335ee74e5fcaeb8595b4ebd0400c4b043d6acb3263ecb1314f8f5501332
+ sha256sums = f6a24ffe4917e67014ef9273eb8b547cb96a13e5ca74895b06d683b391f3f4ee
+ sha256sums = c71d64c68947c25bf48a5141589f107f5d6269e38e37c4bf528f614ff37b8981
+ sha256sums = a068e1d2fbbd07f4f520824d256696244bcf85da7bf2142a1a0fe1bd550490e8
+
+pkgname = devkita64
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..b6b93ad98c6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,83 @@
+# Maintainer: carstene1ns <arch carsten-teibes de> - http://git.io/ctPKG
+
+pkgname=devkita64
+pkgver=r9
+_buildscriptsver=20180514
+_binutilsver=2.30
+_gccver=8.1.0
+_newlibver=3.0.0
+_gdbver=8.0
+pkgrel=1
+pkgdesc="AArch64 toolchain for Nintendo Switch homebrew development"
+arch=('x86_64')
+url="http://devkitpro.org"
+license=('GPL')
+options=(!strip libtool staticlibs emptydirs)
+depends=('flex' 'libmpc' 'python' 'xz')
+install=devkita64.install
+source=("https://github.com/devkitPro/buildscripts/releases/download/v$_buildscriptsver/buildscripts-$_buildscriptsver.tar.bz2"
+ "https://github.com/devkitPro/buildscripts/releases/download/sources/binutils-$_binutilsver.tar.bz2"
+ "https://github.com/devkitPro/buildscripts/releases/download/sources/gcc-$_gccver.tar.xz"
+ "https://github.com/devkitPro/buildscripts/releases/download/sources/newlib-$_newlibver.tar.gz"
+ "https://github.com/devkitPro/buildscripts/releases/download/sources/gdb-$_gdbver.tar.xz"
+ "devkita64.sh"
+ "devkita64.fish")
+sha256sums=('c7c11bacfdbcc634d2d70ac17785a0701d5eaaa6753762ca57a918c3841119ac'
+ 'efeade848067e9a03f1918b1da0d37aaffa0b0127a06b5e9236229851d9d0c09'
+ '1d1866f992626e61349a1ccd0b8d5253816222cdc13390dcfaa74b093aa2b153'
+ 'c8566335ee74e5fcaeb8595b4ebd0400c4b043d6acb3263ecb1314f8f5501332'
+ 'f6a24ffe4917e67014ef9273eb8b547cb96a13e5ca74895b06d683b391f3f4ee'
+ 'c71d64c68947c25bf48a5141589f107f5d6269e38e37c4bf528f614ff37b8981'
+ 'a068e1d2fbbd07f4f520824d256696244bcf85da7bf2142a1a0fe1bd550490e8')
+noextract=("binutils-$_binutilsver.tar.bz2" "gcc-$_gccver.tar.xz"
+ "newlib-$_newlibver.tar.gz" "gdb-$_gdbver.tar.xz")
+
+prepare() {
+ # reset build dir and force reinstalling already built tools
+ rm -rf build
+ [ -d buildscripts/.devkitA64 ] && find buildscripts/.devkitA64 \
+ \( -name "installed-*" -o -name "installed" \) -delete
+
+ (cd buildscripts
+ # generate config file for automatic build
+ cat << END > config.sh
+#!bin/sh
+BUILD_DKPRO_PACKAGE=3
+BUILD_DKPRO_INSTALLDIR="$srcdir"/build
+BUILD_DKPRO_SRCDIR="$srcdir"
+BUILD_DKPRO_SKIP_LIBRARIES=1
+BUILD_DKPRO_SKIP_TOOLS=1
+BUILD_DKPRO_AUTOMATED=1
+
+END
+
+ # do not try to download or extract tool packages
+ sed 's/ \$hostarchives/ ""/g' -i build-devkit.sh
+
+ # do not build gdb with guile support (broken)
+ sed '/gdb/,$ s/--disable-werror/& --with-guile=no/' -i dka64/scripts/build-gcc.sh
+
+ # fix search path to use correct tools
+ sed 's|$PATH:$TOOLPATH/$package/bin|$TOOLPATH/$package/bin:$PATH|' -i \
+ build-devkit.sh
+ )
+}
+
+build() {
+ cd buildscripts
+
+ # disable conflicting build flags
+ unset CPPFLAGS
+ ./build-devkit.sh
+}
+
+package() {
+ install -d "$pkgdir"/opt/devkitpro
+ cp -r build/devkitA64 "$pkgdir"/opt/devkitpro
+ # gzip manually, as makepkg only cares for standard directories
+ gzip "$pkgdir"/opt/devkitpro/devkitA64/share/man/man*/*
+ gzip "$pkgdir"/opt/devkitpro/devkitA64/share/info/*
+ # export environment variable
+ install -Dm755 devkita64.sh "$pkgdir"/etc/profile.d/devkita64.sh
+ install -Dm644 devkita64.fish "$pkgdir"/etc/fish/conf.d/devkita64.fish
+}
diff --git a/devkita64.fish b/devkita64.fish
new file mode 100644
index 00000000000..931e308c70b
--- /dev/null
+++ b/devkita64.fish
@@ -0,0 +1,2 @@
+# set needed variable
+set -gx DEVKITPRO /opt/devkitpro
diff --git a/devkita64.install b/devkita64.install
new file mode 100644
index 00000000000..ec742144583
--- /dev/null
+++ b/devkita64.install
@@ -0,0 +1,14 @@
+
+post_install() {
+ echo "To use the toolchain, an environment variable has to be set in your shell."
+ echo "Files setting them for POSIX compatible shells (bash, zsh, ...) and fish are"
+ echo "provided and should be used automatically for shells opened from now on."
+ echo "To use the toolchain right away, use"
+ echo " $ source /etc/profile.d/devkita64.sh # (for POSIX compatible)"
+ echo " $ source /etc/fish/conf.d/devkita64.fish # (for fish shell)"
+ echo "You may add \$DEVKITPRO/devkitA64/bin to your \$PATH for selected shells."
+}
+
+post_upgrade() {
+ post_install
+}
diff --git a/devkita64.sh b/devkita64.sh
new file mode 100644
index 00000000000..e3a17cbe665
--- /dev/null
+++ b/devkita64.sh
@@ -0,0 +1,2 @@
+# set needed variable
+export DEVKITPRO=/opt/devkitpro