summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo Bargen2021-11-04 23:00:03 +0100
committerDanilo Bargen2021-11-04 23:31:11 +0100
commit16e86587fed69916e3c97e36e8e5c32ad7c17e3e (patch)
treef283ea349e030be2d5c58a2e0a9c1313a064586d
parenta408b531f7dabd0299d15f1c5c3b21384b552321 (diff)
downloadaur-16e86587fed69916e3c97e36e8e5c32ad7c17e3e.tar.gz
Unbundle external libraries
- fontobene-qt5 - muparser - polyclipping - quazip
-rw-r--r--PKGBUILD34
1 files changed, 32 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 86f31434142c..4408f9384f2f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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