From 3da03dd80aeee2fef513962b3fdd9a2b720ec04d Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 27 May 2013 11:25:10 +0200 Subject: [PATCH] gdb: added two pkg options: gdbserver (on) and static (off). --- srcpkgs/gdb/template | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template index b949b0f5ee7..7c14ea9fab3 100644 --- a/srcpkgs/gdb/template +++ b/srcpkgs/gdb/template @@ -1,7 +1,7 @@ # Template file for 'gdb' pkgname=gdb version=7.6 -revision=1 +revision=2 build_style=gnu-configure configure_args="--disable-nls --with-system-readline --with-system-gdbinit=/etc/gdb/gdbinit" @@ -26,6 +26,28 @@ long_desc=" * Change things in your program, so you can experiment with correcting the effects of one bug and go on to learn about another." +# Package build options +build_options="gdbserver static" +desc_option_gdbserver="Enable support for building GDB server" +desc_option_static="Enable support for building GDB statically" + +# Enable gdbserver if !static. +build_options_default="gdbserver" + +if [ "$build_option_gdbserver" ]; then + configure_args+=" --enable-gdbserver=yes" +else + configure_args+=" --enable-gdbserver=no" +fi + +if [ "$build_option_static" ]; then + configure_args+=" CFLAGS=-static" +fi + +if [ "$build_option_gdbserver" -a "$build_option_static" ]; then + msg_error "$pkgver: gdbserver and static options cannot be enabled at the same time!\n" +fi + post_install() { # resolve conflicts with binutils rm -rf ${DESTDIR}/usr/include ${DESTDIR}/usr/lib