X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by lists.alpinelinux.org (Postfix) with ESMTP id 1FE355C5227 for ; Tue, 10 Jul 2018 12:55:50 +0000 (GMT) Received: by mail-wr1-f44.google.com with SMTP id m1-v6so1786571wrg.5 for ; Tue, 10 Jul 2018 05:55:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BTvjim3eNJpa0UZkXI1oTxo1iOyDAW87aKtYriKjKtU=; b=YoxcWyTAofz5FcXbBvR08KghPL2vo4nMJZzhUZ0KIupKala2N1dkdE5rzkjlkbLVhN b+kYVAvwkkr5OEY8eIhEl/nm5qDgOueb033fbFyJk3awW5eb3wVn3HYWhrlxYra0elNA FjezlvaigfrD2rYoYCUcUSUMmRNHpunPSuqZJMpIk5bAwRNuDhTgRk3wFKschpo6vOJJ qpKZX4TZdiUiPI1l5TO/z1ZE3+/1+hZYokRQUNz3qDvV9cD0Mc1slqPmwjFSUVr9Y+x8 JiV4XqEStYNCU8DoAbBsXnJOrfRWVlWtTkCLw/AEAJuL5DZSW9bVmzh0A8TG6NSZhJzR WT7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BTvjim3eNJpa0UZkXI1oTxo1iOyDAW87aKtYriKjKtU=; b=eTdURPlcb+G3Ds5ugj384dagQ1vp62WkuXOsyotb0xRxIr3q7NdADAnJhPSmbYw3Es D5HjLa7ONUZ3QD0hlLxnd6nMtJ+HwBgn6s7xKSp3Jf7E+ctqm+dRRNpUvFF5jEy79FTr TSPB/jnd+u81KEmFuAIxwpbq5njzTuGpq8o1EX9fT2XS57tU6tIm0Q7l6dGDUY2MMQof QzMlrOt3dmnyrKKPk6y2Zmma2kFqbACYFeQOF44mfss0yN4jKc+QGlUAS4Ctu9TJq1EO 8iBacURbMw+p8KjrfPskhFtndUMB1H/V2T4udWo3IUTpoyatqn2qllboWQNatgx+xuF5 EGqg== X-Gm-Message-State: APt69E3QqTDJgFO7+2/Ot/XC1ivED7TXpDBTLEgEr030iK7kuQbSiN0P 0c8XYxIiu4x9k4RiyFFfyh/zzFKoQHgPmRPJ+go= X-Google-Smtp-Source: AAOMgpfJv15Rzicfp4RwCx3Ne9JCLyaDa8M2v8vmX8LpkANr8OvgfGda3ZD7xrVgl05up7qz9okscXfi4KiczlQ6+XY= X-Received: by 2002:adf:c78e:: with SMTP id l14-v6mr16968211wrg.230.1531227349338; Tue, 10 Jul 2018 05:55:49 -0700 (PDT) X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 References: <20180710075621.32342-1-marian.buschsieweke@ovgu.de> <20180710075621.32342-2-marian.buschsieweke@ovgu.de> In-Reply-To: <20180710075621.32342-2-marian.buschsieweke@ovgu.de> From: Carlo Landmeter Date: Tue, 10 Jul 2018 14:55:37 +0200 Message-ID: Subject: Re: [alpine-aports] [PATCH 2/2] testing/gdb-embedded: New aport To: marian.buschsieweke@ovgu.de Cc: alpine-aports Content-Type: multipart/alternative; boundary="0000000000003a4f990570a4a6fd" --0000000000003a4f990570a4a6fd Content-Type: text/plain; charset="UTF-8" Hi On Tue, 10 Jul 2018 at 09:56, Marian Buschsieweke < marian.buschsieweke@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 --0000000000003a4f990570a4a6fd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

On T= ue, 10 Jul 2018 at 09:56, Marian Buschsieweke <marian.buschsieweke@ovgu.de> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">The GNU Debugger for embedded targets
https://www.sourceware.org/gdb/

Provides gdb-avr and gdb-arm-none-eabi as subpackages.
---

+pkgver=3D8.0.1
+pkgrel=3D6

Why is this set to 6?
=
=C2=A0
+pkgdesc=3D"The GNU Debugger for embedded targets"
+url=3D"https://www.sourceware.org/gdb/"
+arch=3D"all"
+license=3D"GPL-3.0"
+depends=3D"gdb"
+makedepends=3D"ncurses-dev expat-dev texinfo readline-dev python3-dev=
+=C2=A0 =C2=A0 =C2=A0 =C2=A0zlib-dev autoconf automake libtool linux-header= s perl"
+options=3D"!check"

Why is th= is disabled? If there are no checks mention it.
=C2=A0
+source=3D"https://ftp.gnu.org/gnu/= $_realname/$_realname-$pkgver.tar.xz
+=C2=A0 =C2=A0 =C2=A0 =C2=A0s390x-use-elf-gdb_fpregset_t.patch
+=C2=A0 =C2=A0 =C2=A0 =C2=A0ppc-musl.patch
+=C2=A0 =C2=A0 =C2=A0 =C2=A0ppc-ptregs.patch"
+subpackages=3D"gdb-avr:avr gdb-arm-none-eabi:arm"
+builddir=3D"$srcdir"/$_realname-$pkgver
+
+build () {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0for target in $_targets; do
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0mkdir -p "$src= dir/build/$target"
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cd "$srcdir/bu= ild/$target"
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0_config=3D"

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

<= div>Why not define a -doc subpkg?
=C2=A0
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# use system readli= ne if not cross compiling
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[ "$CBUILD&quo= t; =3D "$CHOST" ] && _config=3D"$_config --with-syst= em-readline"
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# use system zlib i= f not cross compiling
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[ "$CBUILD&quo= t; =3D "$CHOST" ] && _config=3D"$_config --with-syst= em-zlib"

You test twice for the sa= me thing?
=C2=A0
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# avoid generation = of mangled and non-mangled objects on ppc64
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[ "$CARCH"= ; =3D ppc64le ] && _config=3D"$_config --enable-build-with-cxx= =3Dno"
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"$builddir/con= figure" $_config || return 1
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0#(cd opcodes &&= amp; ./configure $_config) || return 1

= cleanup if not needed.
=C2=A0
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0make || return 1

It is no longer needed to=C2=A0explicit= ly return 1.
=C2=A0
+=C2=A0 =C2=A0 =C2=A0 =C2=A0done
+}
+
+package() {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0mkdir -p "$pkgdir"
+}

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


-carlo

=C2=A0
--0000000000003a4f990570a4a6fd-- --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---