#!/usr/bin/env beesh

# BEE_VERSION gdb-8.3.1-1

SRCURL[0]="http://ftp.gnu.org/gnu/gdb/gdb-${PKGVERSION}.tar.xz"

# PATCHURL+=()

# build_in_sourcedir


# sourcesubdir_append src

#mee_extract() {
#    bee_extract "${@}"
#}

#mee_patch() {
#    bee_patch "${@}"
#}

mee_configure() {
    bee_configure --with-python=/usr/local/system/python2 \
		CFLAGS="-L/usr/local/system/python2/lib -Wl,-rpath=/usr/local/system/python2/lib" \
		CXXFLAGS="-L/usr/local/system/python2/lib -Wl,-rpath=/usr/local/system/python2/lib"
}

#mee_build() {
#    bee_build
#}

mee_install() {
    bee_install
    rm     ${D}/usr/share/info/{annotate,bfd,stabs}.info
    rm     ${D}/usr/share/info/dir
    rm     ${D}/usr/lib/lib{bfd,opcodes}.{a,la}
    rm -rf ${D}/usr/share/locale
    rm -rf ${D}/usr/include
    rm -rf ${D}/usr/share/gdb/system-gdbinit
}
## by default this may be 'make install DESTDIR="${D}"'