diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 34 |
1 files changed, 32 insertions, 2 deletions
@@ -15,12 +15,17 @@ arch=('x86_64' 'i686') url="http://librepcb.org/" license=('GPL') depends=( - 'hicolor-icon-theme' 'qt5-svg' + 'hicolor-icon-theme' + 'muparser' + 'polyclipping' + 'quazip' ) makedepends=( 'cmake' + 'pkg-config' 'qt5-tools' + 'fontobene-qt5' ) source=( "https://download.librepcb.org/releases/${_pkgver}/librepcb-${_pkgver}-source.zip" @@ -34,14 +39,39 @@ validpgpkeys=('D6F9AF572228C5BCD6B538407EF3061F5C8D5E25') build() { cd "${srcdir}/librepcb-${_pkgver}/" + + # Remove unbundled libs from source to ensure they're not used + rm -rf libs/fontobene-qt5/ + rm -rf libs/muparser/ + rm -rf libs/polyclipping/ + rm -rf libs/quazip/ + + # Remove bundled hoedown, it is not needed on Qt >=5.14 + rm -rf libs/hoedown/ + + # Patch muparser include path + sed -i 's/muparser\/include\/muParser.h/muParser.h/' libs/librepcb/common/utils/mathparser.cpp + + # Build mkdir -p build && cd build cmake .. \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX="${pkgdir}/usr" \ - -DLIBREPCB_SHARE=/usr/share/librepcb + -DLIBREPCB_SHARE=/usr/share/librepcb \ + -DUNBUNDLE_FONTOBENE_QT5=1 \ + -DUNBUNDLE_MUPARSER=1 \ + -DUNBUNDLE_POLYCLIPPING=1 \ + -DUNBUNDLE_QUAZIP=1 make } +check() { + cd "${srcdir}/librepcb-${_pkgver}/build/" + + # Run unit tests + ./tests/unittests/librepcb-unittests +} + package() { cd "${srcdir}/librepcb-${_pkgver}/build/" make install |