SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "codeblocks"

# SliTaz package receipt.

PACKAGE="codeblocks"
VERSION="17.12"
CATEGORY="development"
TAGS="IDE"
SHORT_DESC="An open source, cross platform, free C++ IDE."
MAINTAINER="stefanossofroniou542@gmail.com"
LICENSE="GPL3"
WEB_SITE="http://www.codeblocks.org/"

TARBALL="${PACKAGE}_$VERSION.tar.xz"
WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"

DEPENDS="gamin gcc49-lib-base hunspell wxWidgets"
BUILD_DEPENDS="autoconf automake expat-dev fontconfig-dev gamin-dev gcc49 
    gcc49-lib-base gnome-icon-theme hunspell-dev libboost-dev libtool 
    wxWidgets-dev xorg-libXau-dev xorg-libXdmcp-dev zip"

# What is the latest version available today?
current_version()
{
    wget -O - https://sourceforge.net/projects/codeblocks/files/Sources/ 2>/dev/null | \
    sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
    sed '/scope="row/!d;s|.*/Sources/||;s|/.*||;q'
}

# Rules to configure and make the package.
compile_rules()
{
    # Binutils 2.22 break many packages build without LDFLAGS set correctly.
    export LDFLAGS="$LDFLAGS -Wl,--copy-dt-needed-entries -lstdc++"

    # before 10.05
#    busybox patch -p1 -i $stuff/glib.u

    #    --with-boost=no        does not work
    #    because(?) plugin NassiShneiderman/CParser needs libboost-dev

    ./configure                    \
        CC=gcc-49                \
        CXX=g++-49                \
        --with-boost-libdir=/usr/lib        \
        --with-contrib-plugins="all, -help"    \
        --prefix=/usr                \
        $CONFIGURE_ARGS &&
    make $MAKEFLAGS &&
    make DESTDIR=$DESTDIR install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/usr/lib
    mkdir -p $fs/usr/share

    cp -a $install/usr/include        $fs/usr
    cp -a $install/usr/lib/pkgconfig    $fs/usr/lib
    cp -a $install/usr/lib/*.so*        $fs/usr/lib
    cp -a $install/usr/lib/*.*a        $fs/usr/lib
    cp -a $install/usr/lib/codeblocks    $fs/usr/lib
    cp -a $install/usr/share/codeblocks    $fs/usr/share
    cp -a $install/usr/bin            $fs/usr
    
    # Remove plugin that load fail error on start.
    rm $fs/usr/lib/codeblocks/plugins/libNassiShneiderman.*
}
6047 packages and 209931 files in current database (Wed Jun 26 15:35:30 2024)