Mail archive
alpine-aports

Re: [alpine-aports] [PATCH 2/2] testing/gdb-embedded: New aport

From: Carlo Landmeter <clandmeter_at_gmail.com>
Date: Tue, 10 Jul 2018 14:55:37 +0200

Hi

On Tue, 10 Jul 2018 at 09:56, Marian Buschsieweke <
marian.buschsieweke_at_ovgu.de> wrote:

> The GNU Debugger for embedded targets
> https://www.sourceware.org/gdb/
>
> Provides gdb-avr and gdb-arm-none-eabi as subpackages.
> ---
>
> +pkgver=8.0.1
> +pkgrel=6
>

Why is this set to 6?


> +pkgdesc="The GNU Debugger for embedded targets"
> +url="https://www.sourceware.org/gdb/"
> +arch="all"
> +license="GPL-3.0"
> +depends="gdb"
> +makedepends="ncurses-dev expat-dev texinfo readline-dev python3-dev
> + zlib-dev autoconf automake libtool linux-headers perl"
> +options="!check"
>

Why is this disabled? If there are no checks mention it.


> +source="https://ftp.gnu.org/gnu/$_realname/$_realname-$pkgver.tar.xz
> + s390x-use-elf-gdb_fpregset_t.patch
> + ppc-musl.patch
> + ppc-ptregs.patch"
> +subpackages="gdb-avr:avr gdb-arm-none-eabi:arm"
> +builddir="$srcdir"/$_realname-$pkgver
> +
> +build () {
> + for target in $_targets; do
> + mkdir -p "$srcdir/build/$target"
> + cd "$srcdir/build/$target"
> + _config="
>

define local variables in functions


> + --build=$CBUILD
> + --host=$CHOST
> + --prefix=/usr
> + --bindir=/usr/bin
> + --libexecdir=/usr/lib
> + --libdir=/usr/lib
> + --target=$target
> + --with-build-sysroot=$CBUILDROOT
> + --with-python=/usr/bin/python3
> + --datarootdir=/usr/share
> + --disable-nls
> + --disable-werror
> + --with-system-readline
> + --with-system-zlib
> + --mandir=/deleteme/man
> + --infodir=/deleteme/info
> + --pdfdir=/deleteme/pdf
> + --htmldir=/deleteme/html"
>

Why not define a -doc subpkg?


> +
> + # use system readline if not cross compiling
> + [ "$CBUILD" = "$CHOST" ] && _config="$_config
> --with-system-readline"
> +
> + # use system zlib if not cross compiling
> + [ "$CBUILD" = "$CHOST" ] && _config="$_config
> --with-system-zlib"
>

You test twice for the same thing?


> +
> + # avoid generation of mangled and non-mangled objects on
> ppc64
> + [ "$CARCH" = ppc64le ] && _config="$_config
> --enable-build-with-cxx=no"
> +
> + "$builddir/configure" $_config || return 1
> + #(cd opcodes && ./configure $_config) || return 1
>

cleanup if not needed.


> + make || return 1
>

It is no longer needed to explicitly return 1.


> + done
> +}
> +
> +package() {
> + mkdir -p "$pkgdir"
> +}
>

Your main package does nothing?
Options are, 1 install all subpkgs, 2 make one subpkg primary and depend on
it.


-carlo



---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Tue Jul 10 2018 - 14:55:37 GMT