SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "libwebkit"

# SliTaz package receipt.

PACKAGE="libwebkit"
VERSION="1.8.3"
CATEGORY="network"
SHORT_DESC="xHTML render library."
MAINTAINER="devel@slitaz.org"
LICENSE="LGPL2"
SOURCE="webkit"
TARBALL="$SOURCE-$VERSION.tar.xz"
WEB_SITE="https://webkitgtk.org"
WGET_URL="$WEB_SITE/releases/$TARBALL"
HOST_ARCH="i486 arm x86_64"

DEPENDS="gtk+ enchant libxslt expat jpeg libpng libxml2 sqlite \
xorg-libICE xorg-libSM xorg-libX11 xorg-libXau xorg-libXcomposite \
xorg-libXcursor xorg-libXdmcp xorg-libXext xorg-libXfixes xorg-libXinerama \
xorg-libXrandr xorg-libXrender xorg-libXt acl xorg-libXdamage libsoup248 \
gcc-lib-base libtasn1 util-linux-uuid glib-networking"
BUILD_DEPENDS="gtk+-dev enchant-dev libxslt-dev jpeg-dev libpng-dev \
glib-dev sqlite-dev gnutls-dev xorg-libXdamage-dev acl-dev libsoup248-dev \
libxml2-dev libxcb-dev xcb-util-dev util-linux-uuid-dev zlib-dev \
libtasn1-dev glib-networking gcc49"

# What is the latest version available today?
current_version()
{
    wget -O - $(dirname $WGET_URL) 2>/dev/null | \
    sed "/$SOURCE-[0-9]/!d;/tar/!d;s|.*$SOURCE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr  | sed q
}

# Handle cross compilation.
case "$ARCH" in
    i?86|x86_64)
        BUILD_DEPENDS="$BUILD_DEPENDS tar gettext m4 bison flex gperf
        autoconf automake gtk-doc libtool" ;;
esac

# Rules to configure and make the package.
compile_rules()
{
    # libwebkit does not like parallel builds.
    #export MAKEFLAGS=$(echo $MAKEFLAGS | sed 's/-j[0-9]*/-j1/')
    # fix Bug84526: webkit-gtk-1.8.0 fails to build with --disable-video
    # Build fix with newer bison 2.6
    if [ ! "$continue" ]; then
        for file_diff in $stuff/*.diff; do
            echo -n "Applying patch $(basename $file_diff)"
            patch -Np1 -i $file_diff > /dev/null
            status
        done
        patch -p0 < $stuff/CodeGeneratorGObject-bug-84526.patch || exit 1
    fi
    # Build fix with newer bison 3
    sed -i 's|%pure_parser|%define api.pure|' Source/WebCore/css/CSSGrammar.y
    sed -i '/\$(AM_V_at)rm -f/d' GNUmakefile* Source/WebCore/GNUmakefile*


    export PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/lib/libsoup248/pkgconfig"
        #        LIBSOUP_LIBS="-L/usr/libsoup248 -lsoup-2.4" \
        #        LIBSOUP_CFLAGS="-I/usr/libsoup248/include/libsoup-2.4" \


    # Adjust API_VERSION to avoid clash with webkitgtk
    patch -p1 < $stuff/libwebkit-version.patch

    # Build
    ./configure \
        CC=gcc-49 \
        CXX=g++-49 \
        --libdir=/usr/lib \
        --enable-introspection=no \
        --enable-video=no \
        --enable-jit=yes \
        --disable-webgl \
        --disable-geolocation \
        --with-unicode-backend=glib \
        --with-gtk=2.0 \
        --disable-gtk-doc \
        $CONFIGURE_ARGS &&
    make -j4 all stamp-po 2>&1 | grep -v Source/WebCore/dom/testing &&
    make -j4 install 2>&1 | \
        grep -Ev '(/usr/share/gtk-doc/html|Documentation/webkitgtk/version.xml)' &&
    cp -a $src/Programs/GtkLauncher $DESTDIR/usr/bin
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/usr/lib
    cp -a $install/usr/lib/*.so* $fs/usr/lib
}
6063 packages and 233209 files in current database (Sat Dec 21 00:00:03 2024)