diff options
author | Danilo Bargen | 2021-11-04 23:00:03 +0100 |
---|---|---|
committer | Danilo Bargen | 2021-11-04 23:31:11 +0100 |
commit | 16e86587fed69916e3c97e36e8e5c32ad7c17e3e (patch) | |
tree | f283ea349e030be2d5c58a2e0a9c1313a064586d | |
parent | a408b531f7dabd0299d15f1c5c3b21384b552321 (diff) | |
download | aur-16e86587fed69916e3c97e36e8e5c32ad7c17e3e.tar.gz |
Unbundle external libraries
- fontobene-qt5
- muparser
- polyclipping
- quazip
-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 |