summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarks2020-05-08 00:25:41 +0200
committerDarks2020-05-08 00:29:07 +0200
commitd7ac554a13e53283aee47173f2f3fa8bcd7793fc (patch)
tree5fa53ffb5ec9aec3fc9b1af8d6f0293f4982d9e7
downloadaur-d7ac554a13e53283aee47173f2f3fa8bcd7793fc.tar.gz
Creating package
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD51
3 files changed, 72 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..03f96b61429
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = sh-elf-binutils-casio
+ pkgdesc = GNU binary utilities for the Casio calculators SuperH processors.
+ pkgver = 2.34
+ pkgrel = 1
+ url = https://www.gnu.org/software/binutils/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = zlib
+ depends = flex
+ options = !libtool
+ options = !buildflags
+ source = https://ftp.gnu.org/gnu/binutils/binutils-2.34.tar.bz2
+ sha256sums = 89f010078b6cf69c23c27897d686055ab89b198dddf819efb0a4f2c38a0b36e6
+
+pkgname = sh-elf-binutils-casio
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..018a3de0814
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*
+!PKGBUILD
+!.SRCINFO
+!.gitignore
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..b219c13cdbe
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Darks <l.gatin@protonmail.com>
+
+_target=sh-elf
+pkgname=${_target}-binutils-casio
+pkgver=2.34
+pkgrel=1
+pkgdesc="GNU binary utilities for the Casio calculators SuperH processors."
+arch=(i686 x86_64)
+options=('!libtool' '!buildflags')
+url='https://www.gnu.org/software/binutils/'
+license=(GPL)
+depends=('zlib' 'flex')
+source=(https://ftp.gnu.org/gnu/binutils/binutils-${pkgver}.tar.bz2)
+sha256sums=('89f010078b6cf69c23c27897d686055ab89b198dddf819efb0a4f2c38a0b36e6')
+
+prepare() {
+ cd "${srcdir}/binutils-${pkgver}"
+
+ # ensure a clean build
+ [[ -d binutils-build ]] && rm -rf binutils-build
+ mkdir binutils-build
+}
+
+build() {
+ export CFLAGS="-O2 -pipe -s -fomit-frame-pointer -ffunction-sections -fdata-sections"
+ export CXXFLAGS=$CFLAGS
+ export LDFLAGS="-Wl,--gc-sections"
+
+ cd "${srcdir}/binutils-${pkgver}/binutils-build"
+ ../configure \
+ --prefix=/usr \
+ --target=sh3eb-elf \
+ --with-multilib-list=m3,m4-nofpu \
+ --program-prefix=${_target}- \
+ --disable-nls \
+ --enable-libssp \
+ --enable-lto \
+ --disable-werror
+
+ make configure-host
+ make
+}
+
+package() {
+ cd "${srcdir}/binutils-${pkgver}/binutils-build"
+ echo "Install on ${pkgdir}"
+ make DESTDIR="${pkgdir}" install
+
+ # Remove info documents that conflicts with host version
+ rm -rf "${pkgdir}/usr/share/info"
+}