summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexei Karpenko2017-12-29 20:46:30 -0800
committerAlexei Karpenko2017-12-29 20:48:22 -0800
commit50f3b9affeb73874c3e81b07a7b4b0fcfedecbaf (patch)
tree0678f4a01faba7bcec3a033d6d070b79266d6d17
downloadaur-50f3b9affeb73874c3e81b07a7b4b0fcfedecbaf.tar.gz
initial checkin
-rw-r--r--.SRCINFO26
-rw-r--r--PKGBUILD43
2 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..0946b62f3a3b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+pkgbase = gcc-xtensa-esp32-elf-git
+ pkgdesc = ESP32 GCC Cross-compiler Toolchain
+ pkgver = 1.22.0.r75.gbaf03c2c
+ pkgrel = 1
+ url = https://esp-idf.readthedocs.io/en/latest/get-started/linux-setup.html
+ arch = x86_64
+ license = Apache
+ makedepends = gcc
+ makedepends = git
+ makedepends = make
+ makedepends = flex
+ makedepends = bison
+ makedepends = gperf
+ depends = glibc
+ depends = python
+ depends = ncurses
+ depends = python2-pyserial
+ provides = gcc-xtensa-esp32-elf
+ conflicts = gcc-xtensa-esp32-elf-bin
+ options = !libtool
+ options = !buildflags
+ source = git+https://github.com/espressif/crosstool-NG.git#branch=xtensa-1.22.x
+ md5sums = SKIP
+
+pkgname = gcc-xtensa-esp32-elf-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2f217a422baa
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Alexei Karpenko <alexei@karpenko.ca>
+pkgname=gcc-xtensa-esp32-elf-git
+_pkgname=crosstool-NG
+pkgver=1.22.0.r75.gbaf03c2c
+pkgrel=1
+pkgdesc='ESP32 GCC Cross-compiler Toolchain'
+arch=(x86_64)
+url='https://esp-idf.readthedocs.io/en/latest/get-started/linux-setup.html'
+license=(Apache)
+depends=(glibc python ncurses python2-pyserial)
+makedepends=(gcc git make flex bison gperf)
+provides=(gcc-xtensa-esp32-elf)
+conflicts=(gcc-xtensa-esp32-elf-bin)
+options=(!libtool !buildflags)
+source=(git+https://github.com/espressif/crosstool-NG.git#branch=xtensa-1.22.x)
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/${_pkgname}"
+ # cutting off 'crosstool.ng.' prefix that present in the git tag
+ git describe --long | sed 's/^crosstool.ng.//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+build() {
+ cd "$srcdir/${_pkgname}"
+
+ echo Building crosstool-ng...
+ ./bootstrap
+ ./configure --enable-local
+ make
+
+ echo Building xtensa-esp32-elf...
+ ./ct-ng xtensa-esp32-elf
+ sed -i 's/^CT_GDB_CROSS_EXTRA_CONFIG_ARRAY.*/CT_GDB_CROSS_EXTRA_CONFIG_ARRAY="--with-guile=guile-2.0"/g' .config
+ ./ct-ng build
+}
+
+package() {
+ cd "$srcdir/${_pkgname}"
+ for file in builds/xtensa-esp32-elf/bin/xtensa-esp32-elf*; do
+ install -m 755 -D -t "$pkgdir/usr/bin" "${file}"
+ done
+}