Mail archive
alpine-aports

Re: [alpine-aports] [PATCH 1/3] testing/binutils-cross-embedded: New aport

From: Leonardo Arena <rnalrd_at_gmail.com>
Date: Mon, 15 Oct 2018 08:29:53 +0200

Hi,

On Mon, May 28, 2018 at 6:49 PM Marian Buschsieweke <
marian.buschsieweke_at_ovgu.de> wrote:

> Tools necessary to build programs for embedded targets
> http://www.gnu.org/software/binutils
>
> This package creates binutils-arm-none-eabi, binutils-avr and
> binutils-xtensa-lx106-elf as subpackages.
> ---
> testing/binutils-cross-embedded/APKBUILD | 88 +++++++++++++++++++
> .../binutils-ld-fix-static-linking.patch | 46 ++++++++++
> 2 files changed, 134 insertions(+)
> create mode 100644 testing/binutils-cross-embedded/APKBUILD
> create mode 100644
> testing/binutils-cross-embedded/binutils-ld-fix-static-linking.patch
>
> diff --git a/testing/binutils-cross-embedded/APKBUILD
> b/testing/binutils-cross-embedded/APKBUILD
> new file mode 100644
> index 0000000000..9cc286fd9b
> --- /dev/null
> +++ b/testing/binutils-cross-embedded/APKBUILD
> _at__at_ -0,0 +1,88 @@
> +# Maintainer: Marian Buschsieweke <marian.buschsieweke_at_ovgu.de>
> +# Based on binutils-avr
> +_pkgbase=binutils
> +_targets="arm-none-eabi avr xtensa-lx106-elf"
> +pkgname="$_pkgbase-cross-embedded"
> +pkgver=2.30
> +pkgrel=0
> +pkgdesc="Tools necessary to build programs for embedded targets"
> +url="http://www.gnu.org/software/${_pkgbase}/"
> +makedepends="gettext libtool autoconf automake bison zlib-dev"
> +arch="all"
> +license="GPL2 GPL3+ LGPL2 BSD"
>


License IDs, aren't correct. Please see https://spdx.org/licenses/


+for target in $_targets; do
> + targetnorm="${target//-/_}"
> + subpackages="${_pkgbase}-${target}:${targetnorm} ${subpackages}"
> +done
> +source="http://ftp.gnu.org/gnu/${_pkgbase}/${_pkgbase}-${pkgver}.tar.bz2
> + binutils-ld-fix-static-linking.patch"
> +
> +builddir="$srcdir/${_pkgbase}-$pkgver"
> +_workingdir="$srcdir/${_pkgbase}-build"
> +
> +build() {
> + for target in $_targets; do
> + workingdir="${srcdir}/build-${target}"
> + mkdir "$workingdir"
> + cd "$workingdir"
> + "$builddir"/configure \
> + --target=${target} \
> + --build="$CBUILD" \
> + --host="$CHOST" \
> + --prefix=/usr/ \
> + --bindir=/usr/bin \
> + --infodir=/deleteme/info \
> + --htmldir=/deleteme/html \
> + --pdfdir=/deleteme/pdf \
> + --mandir=/deleteme/man \
> + --disable-nls \
> + --enable-plugins \
> + --enable-interwork \
> + --with-system-zlib \
> + || return 1
>


This can be omitted.



> + make tooldir=/usr
> + done
> +}
> +
> +check() {
> + for target in $_targets; do
> + workingdir="${srcdir}/build-${target}"
> + cd "$workingdir"
> + make check
> + done
> +}
> +
> +package() {
> + mkdir -p "${pkgdir}"
> +}
> +
> +install_subpkg() {
> + workingdir="${srcdir}/build-${target}"
> + cd "$workingdir"
> + make install DESTDIR="$subpkgdir"
> + rm -rf "$subpkgdir"/deleteme
> + for bin in ar as nm objcopy objdump ranlib strip readelf; do
> + rm -f "$subpkgdir"/usr/bin/"$bin"
> + done
> +}
> +
> +arm_none_eabi() {
> + target="${subpkgname#${_pkgbase}-}"
> + pkgdesc="Tools necessary to build programs for ${target}"
> + install_subpkg
> +}
> +
> +avr() {
> + target="${subpkgname#${_pkgbase}-}"
> + pkgdesc="Tools necessary to build programs for platform ${target}"
> + install_subpkg
> +}
> +
> +xtensa_lx106_elf() {
> + target="${subpkgname#${_pkgbase}-}"
> + pkgdesc="Tools necessary to build programs for platform ${target}"
> + install_subpkg
> +}
>
>
Thanks!

/eo



---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Oct 15 2018 - 08:29:53 UTC