# URL: http://qt-project.org/
# Packager: pierre at nutyx dot org, tnut at nutyx dot org, fanch at nutyx dot org
# Depends on:gstreamer1-plugins-base libwebp xorg-libxcomposite libxslt gstreamer1-plugins-good gperf python ruby qt5

description="Classes for a WebKit2 based implementation and a new QML API"
name=qt5-webkit
release=1
_version=${version/-/}
_name=qtwebkit-opensource-src-${_version}
_namefqn="${name/5-/}-opensource-src-${_version}"

source=(http://download.qt-project.org/community_releases/${_version%.*}/${_version}/${_name}.tar.xz)

build() {
source setqt5
cd ${_namefqn}
syncqt.pl-qt5 -version $version Source/sync.profile
cd ..
mkdir build
cd build
qmake ../${_namefqn}
make
make INSTALL_ROOT="$PKG" install

# Drop QMAKE_PRL_BUILD_DIR because reference the build dir
find "$PKG/usr/lib" -type f -name '*.prl' \
    -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
}
devel() {
cd $PKG
bsdtar -cf \
$PKGMK_PACKAGE_DIR/$name.devel${PKGMK_BUILDVER}any.${PKGMK_PACKAGE_EXT} \
usr/include \
usr/lib/pkgconfig \
usr/mkspecs \
usr/lib/cmake
rm -r usr/{include,mkspecs,lib/pkgconfig,lib/cmake}
}
