diff options
author | Noah | 2020-03-31 14:09:16 -0500 |
---|---|---|
committer | Noah | 2020-03-31 14:10:32 -0500 |
commit | 80c4b291bc07ac57561b098e79c9601cb0b0b5d2 (patch) | |
tree | e2ce511f070b867a7406e8187052a0cd44d3ddf4 | |
download | aur-80c4b291bc07ac57561b098e79c9601cb0b0b5d2.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 34 | ||||
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | PKGBUILD | 80 | ||||
-rw-r--r-- | ndless.patch | 121 |
4 files changed, 244 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..1c150f805805 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,34 @@ +pkgbase = ndless-sdk-git + pkgver = r451.edaa723 + pkgrel = 1 + url = https://github.com/ndless-nspire/Ndless + arch = x86_64 + license = MPL-1.1 + makedepends = git + depends = git + depends = gcc + depends = binutils + depends = gmp + depends = mpfr + depends = libmpc + depends = zlib + depends = boost + depends = wget + provides = ndless-sdk + conflicts = ndless-sdk + options = !strip + source = ndless::git+https://github.com/ndless-nspire/Ndless + source = ndless.patch + source = nspire-io::git+https://github.com/Vogtinator/nspire-io.git + source = zlib::git+https://github.com/madler/zlib.git + source = git://git.sv.nongnu.org/freetype/freetype2.git + source = luna::git+https://github.com/ndless-nspire/luna.git + md5sums = SKIP + md5sums = 85b0d2361dcb73ea6401972534c8a54d + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + +pkgname = ndless-sdk-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..0506689cbab3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +src/ +pkg/ +*.tar.gz + +ndless/ +nspire-io/ +zlib/ +freetype2/ +luna/ diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..6b1b2659ece9 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,80 @@ +# Maintainer: Noah (coolreader18) +pkgname=ndless-sdk-git pkgver=r451.edaa723 +pkgrel=1 +pkgdesc="" +arch=(x86_64) +url="https://github.com/ndless-nspire/Ndless" +license=('MPL-1.1') +groups=() +depends=(git gcc binutils gmp mpfr libmpc zlib boost wget) +makedepends=('git') +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") +replaces=() +backup=() +options=('!strip') +install= +source=('ndless::git+https://github.com/ndless-nspire/Ndless' ndless.patch) +noextract=() +md5sums=('SKIP' + '85b0d2361dcb73ea6401972534c8a54d' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP') + +# Submodules +source+=(nspire-io::git+https://github.com/Vogtinator/nspire-io.git) +source+=(zlib::git+https://github.com/madler/zlib.git) +source+=(git://git.sv.nongnu.org/freetype/freetype2.git) +source+=(luna::git+https://github.com/ndless-nspire/luna.git) + +# Please refer to the 'USING VCS SOURCES' section of the PKGBUILD man page for +# a description of each element in the source array. + +pkgver() { + cd "$srcdir/ndless" +# Git, no tags available + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "$srcdir/ndless" + git submodule init + git config submodule.nspire-io.url "$srcdir/nspire-io" + git config submodule.zlib.url "$srcdir/zlib" + git config submodule.freetype2.url "$srcdir/freetype2" + git config submodule."ndless-sdk/tools/luna".url "$srcdir/luna" + git clean -f + patch --forward --strip=1 --input="$srcdir"/ndless.patch +} + +build() { + cd "$srcdir"/ndless/ndless-sdk + pushd toolchain + unset CFLAGS CPPFLAGS + echo -e "\033[1mBuilding Ndless C toolchain, expect this to take a while\033[0m" + sleep 2 + ./build_toolchain.sh + popd + git submodule init && git submodule update + export PATH="$PWD/toolchain/install/bin:$PWD/bin:$PATH" + make +} + +package() { + cd "$srcdir/ndless/ndless-sdk" + local sdkdir="$pkgdir"/usr/share/ndless-sdk + mkdir -p "$sdkdir" + cp -r toolchain/install/* "$sdkdir" + for dir in bin lib include system; do + mkdir -p "$sdkdir/$dir" + cp -r ./"$dir"/* "$sdkdir/$dir" + done + cp --remove-destination tools/zehn_loader/zehn_loader*.tns "$sdkdir"/lib + mkdir -p "$pkgdir"/usr/bin + cd "$pkgdir"/usr/bin + for exe in ../share/ndless-sdk/bin/*; do + [[ -x $exe ]] && ln -s "$exe" . + done +} diff --git a/ndless.patch b/ndless.patch new file mode 100644 index 000000000000..b0c57f9681fc --- /dev/null +++ b/ndless.patch @@ -0,0 +1,121 @@ +diff --git a/ndless-sdk/bin/arm-none-eabi-ld.gold b/ndless-sdk/bin/arm-none-eabi-ld.gold +index 54cec85..5a56985 100755 +--- a/ndless-sdk/bin/arm-none-eabi-ld.gold ++++ b/ndless-sdk/bin/arm-none-eabi-ld.gold +@@ -7,8 +7,8 @@ DIRNAME="$(dirname "$0")" + + # DIRNAME may not be in the toolchain directory if this script was symlinked. + # try to find the symlink target +-which readlink >/dev/null 2>&1 && readlink "$0" >/dev/null 2>&1 && { +- DIRNAME="$(dirname "$(readlink "$0")")" ++which readlink >/dev/null 2>&1 && readlink -- "$0" >/dev/null 2>&1 && { ++ DIRNAME="$(dirname "$(readlink -f -- "$0")")" + } + + # Cygwin owns a dedicated command to find the symlink target +diff --git a/ndless-sdk/bin/make-prg b/ndless-sdk/bin/make-prg +index 7fa29c6..44beacd 100755 +--- a/ndless-sdk/bin/make-prg ++++ b/ndless-sdk/bin/make-prg +@@ -6,8 +6,8 @@ DIRNAME="$(dirname "$0")" + + # DIRNAME may not be in the toolchain directory if this script was symlinked. + # try to find the symlink target +-which readlink >/dev/null 2>&1 && readlink "$0" >/dev/null 2>&1 && { +- DIRNAME="$(dirname "$(readlink "$0")")" ++which readlink >/dev/null 2>&1 && readlink -- "$0" >/dev/null 2>&1 && { ++ DIRNAME="$(dirname "$(readlink -f -- "$0")")" + } + + # Cygwin owns a dedicated command to find the symlink target +@@ -15,8 +15,6 @@ if [ "$UNAME" = "cygwin" ]; then + DIRNAME="$(cygpath --path --windows "$DIRNAME")" + fi + +-MAKEFLAGS= make -C "${DIRNAME}/../tools/zehn_loader" -s all +- + # Validate the Zehn file + genzehn --info --input "$1" >/dev/null || exit 1 # genzehn prints an error for us + +@@ -24,4 +22,4 @@ genzehn --info --input "$1" >/dev/null || exit 1 # genzehn prints an error for u + COMPRESSED= + genzehn --info --input "$1" | grep compressed >/dev/null && COMPRESSED="_compressed" + +-cat "${DIRNAME}/../tools/zehn_loader/zehn_loader${COMPRESSED}.tns" "$1" > "$2" ++cat "${DIRNAME}/../lib/zehn_loader${COMPRESSED}.tns" "$1" > "$2" +diff --git a/ndless-sdk/bin/nspire-as b/ndless-sdk/bin/nspire-as +index cb37341..4516b3b 100755 +--- a/ndless-sdk/bin/nspire-as ++++ b/ndless-sdk/bin/nspire-as +@@ -5,8 +5,8 @@ UNAME="$(uname -s | tr A-Z a-z)" + DIRNAME="$(dirname "$0")" + # DIRNAME may not be in the toolchain directory if this script was symlinked. + # try to find the symlink target +-which readlink >/dev/null 2>&1 && readlink "$0" >/dev/null 2>&1 && { +- SYMLINK="$(readlink "$0")" ++which readlink >/dev/null 2>&1 && readlink -- "$0" >/dev/null 2>&1 && { ++ SYMLINK="$(readlink -f -- "$0")" + + # On MacOS X, the readlink command hasn't the same behavior than the others operating systems based on Unix. + if [ "$UNAME" = "darwin" ]; then +diff --git a/ndless-sdk/bin/nspire-g++ b/ndless-sdk/bin/nspire-g++ +index 2beabf7..c4650c9 100755 +--- a/ndless-sdk/bin/nspire-g++ ++++ b/ndless-sdk/bin/nspire-g++ +@@ -6,8 +6,8 @@ DIRNAME="$(dirname "$0")" + + # DIRNAME may not be in the toolchain directory if this script was symlinked. + # try to find the symlink target +-which readlink >/dev/null 2>&1 && readlink "$0" >/dev/null 2>&1 && { +- DIRNAME="$(dirname "$(readlink "$0")")" ++which readlink >/dev/null 2>&1 && readlink -- "$0" >/dev/null 2>&1 && { ++ DIRNAME="$(dirname "$(readlink -f -- "$0")")" + } + + if [ "$UNAME" = "cygwin" ]; then +diff --git a/ndless-sdk/bin/nspire-gcc b/ndless-sdk/bin/nspire-gcc +index 381beac..d6dd72c 100755 +--- a/ndless-sdk/bin/nspire-gcc ++++ b/ndless-sdk/bin/nspire-gcc +@@ -6,8 +6,8 @@ DIRNAME="$(dirname "$0")" + + # DIRNAME may not be in the toolchain directory if this script was symlinked. + # try to find the symlink target +-which readlink >/dev/null 2>&1 && readlink "$0" >/dev/null 2>&1 && { +- DIRNAME="$(dirname "$(readlink "$0")")" ++which readlink >/dev/null 2>&1 && readlink -- "$0" >/dev/null 2>&1 && { ++ DIRNAME="$(dirname "$(readlink -f -- "$0")")" + } + + if [ "$UNAME" = "cygwin" ]; then +diff --git a/ndless-sdk/bin/nspire-tools b/ndless-sdk/bin/nspire-tools +index d023a0d..03d826c 100755 +--- a/ndless-sdk/bin/nspire-tools ++++ b/ndless-sdk/bin/nspire-tools +@@ -12,8 +12,8 @@ DIRNAME="$(dirname "$0")" + + # DIRNAME may not be in the toolchain directory if this script was symlinked. + # try to find the symlink target +-which readlink >/dev/null 2>&1 && readlink "$0" >/dev/null 2>&1 && { +- SYMLINK="$(readlink "$0")" ++which readlink >/dev/null 2>&1 && readlink -- "$0" >/dev/null 2>&1 && { ++ SYMLINK="$(readlink -f -- "$0")" + + # On MacOS X, the readlink command hasn't the same behavior than the others operating systems based on Unix. + if [ "$UNAME" == "darwin" ]; then +diff --git a/ndless-sdk/lib/zehn_loader.tns b/ndless-sdk/lib/zehn_loader.tns +new file mode 120000 +index 0000000..64c36ae +--- /dev/null ++++ b/ndless-sdk/lib/zehn_loader.tns +@@ -0,0 +1 @@ ++../tools/zehn_loader/zehn_loader.tns +\ No newline at end of file +diff --git a/ndless-sdk/lib/zehn_loader_compressed.tns b/ndless-sdk/lib/zehn_loader_compressed.tns +new file mode 120000 +index 0000000..55c4a8c +--- /dev/null ++++ b/ndless-sdk/lib/zehn_loader_compressed.tns +@@ -0,0 +1 @@ ++../tools/zehn_loader/zehn_loader_compressed.tns +\ No newline at end of file |