void-packages/srcpkgs/qscintilla-qt5/template

66 lines
1.8 KiB
Bash

# Template file for 'qscintilla-qt5'
# XXX keep in sync with python3-pyqt5-qscintilla
pkgname=qscintilla-qt5
version=2.14.1
revision=1
build_wrksrc=src
build_style=qmake
hostmakedepends="qt5-qmake qt5-host-tools"
makedepends="qt5-devel qt5-tools-devel"
short_desc="Qt5 port of Neil Hodgson's Scintilla C++ editor class"
maintainer="Pierre Allegraud <pierre.allegraud@crans.org>"
license="GPL-3.0-only"
homepage="https://www.riverbankcomputing.com/software/qscintilla/intro"
distfiles="https://www.riverbankcomputing.com/static/Downloads/QScintilla/${version}/QScintilla_src-${version}.tar.gz"
checksum=dfe13c6acc9d85dfcba76ccc8061e71a223957a6c02f3c343b30a9d43a4cdd4d
post_configure() {
local _qt_arch
local qmake_args
if [ "$CROSS_BUILD" ]; then
case $XBPS_TARGET_MACHINE in
i686*) _qt_arch=i386;;
x86_64*) _qt_arch=x86_64;;
aarch64*) _qt_arch=arm64;;
arm*) _qt_arch=arm;;
mips*) _qt_arch=mips;;
ppc64*) _qt_arch=power64;;
ppc*) _qt_arch=power;;
esac
qmake_args="-qtconf ${wrksrc}/qt.conf
PKG_CONFIG_EXECUTABLE=${XBPS_WRAPPERDIR}/${PKG_CONFIG}"
fi
cd ../designer
/usr/lib/qt5/bin/qmake \
${qmake_args} \
PREFIX=/usr \
QT_INSTALL_PREFIX=/usr \
LIB=/usr/lib \
QMAKE_CC=$CC QMAKE_CXX=$CXX \
QMAKE_LINK=$CXX QMAKE_LINK_C=$CC \
QMAKE_CFLAGS="${CFLAGS} -I$wrksrc/src" \
QMAKE_CXXFLAGS="${CXXFLAGS} -I$wrksrc/src" \
QMAKE_LFLAGS="${LDFLAGS}" \
${_qt_arch:+"QT_TARGET_ARCH=$_qt_arch"} \
CONFIG+=no_qt_rpath
}
post_build() {
make -C ../designer ${makejobs} CC="$CC" CXX="$CXX" LINK="$CXX"
}
post_install() {
make -C ../designer STRIP=true PREFIX=/usr DESTDIR=${DESTDIR} \
INSTALL_ROOT=${DESTDIR} install
}
qscintilla-qt5-devel_package() {
short_desc+=" - development files"
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
vmove usr/lib/qt5/mkspecs
}
}