diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 110 |
1 files changed, 79 insertions, 31 deletions
@@ -6,49 +6,97 @@ # https://github.com/michaellass/AUR pkgname=fritzing -pkgver=0.9.3b -pkgrel=4 -partsrev=667a5360e53e8951e5ca6c952ae928f7077a9d5e + +# We drop the "b" at the end of the version number. It probably means beta +# while there is also "d" for development versions. This would not be correctly +# parsed by `pkgver` anyway (d > b), so let's leave out the b suffix entirely. +pkgver=1.0.2 +pkgrel=2 + +# Tag version can be obtained from github release page. Sometimes this is the +# version number itself, sometimes some CD-magicnumber thing. There can be +# multiple CD-magicnumberthings for the same version number so it's a bit of a +# guess what corresponds to the latest official release. +#_tagver=0.9.8 + +# This is probably closest to what has been released as 1.0.1. +_gitrev=dbdbe34c843677df721c7b3fc3e32c0f737e7e95 + +# Parts come from a different respository and are not versioned anymore since +# 2016. Sometimes we can get the revision by downloading the release build, +# unpacking it and using `git show` on the resources/parts folder. Nowadays the +# release build seems to be hidden behind a paywall. Then we need to guess +# based on the master branch of the fritzing-parts repository and the date when +# the release archive was created. +_partsrev=015626e6cafb1fc7831c2e536d97ca2275a83d32 + pkgdesc='PCB layout prototyping application' -arch=('i686' 'x86_64') +arch=('aarch64' 'i686' 'x86_64') url=http://fritzing.org license=(GPL3) -makedepends=('boost') -depends=('desktop-file-utils' 'java-environment' 'libgit2' 'python2' 'qt5-serialport' 'qt5-svg' 'shared-mime-info') -source=(https://github.com/fritzing/fritzing-app/archive/${pkgver}.tar.gz - parts-${partsrev}.tar.gz::https://codeload.github.com/fritzing/fritzing-parts/tar.gz/${partsrev} - 0001-Squashed-commit-of-the-following.patch - fritzing.desktop.patch - fritzing.xml) -sha256sums=('2475a95aad2c1536eef3fdb72665c5c16590644b45bd110a0cde223c916625b8' - 'c6f9c5275a569e86c0cadb85844120e8f79ca79bea004b00916af78772969d76' - 'e142b7443d03c644d06a4741dcc64eef7077a86b42b4461f10ee8b1f59e4775c' - 'e48994c9d4191675ca8c53c64d99effc704bb10b67f253eb9f05b0c188805baa' - '9aa55c4a27025b40a1573b3b09a59f48709dfa5ac637ef6a059fd8157d20192b') +install=fritzing.install +makedepends=('boost' 'git' 'qt6-tools') +depends=('libgit2' 'polyclipping' 'qt6-serialport' 'qt6-svg' 'quazip-qt6' 'ngspice') +source=("git+https://github.com/fritzing/fritzing-app.git#commit=${_gitrev}" + "git+https://github.com/fritzing/fritzing-parts.git#commit=${_partsrev}" + svgpp-1.3.0.tar.gz::https://github.com/svgpp/svgpp/archive/refs/tags/v1.3.0.tar.gz + 0001-Quick-Dirty-patch-to-allow-finding-quazip-qt6-on-Arc.patch + 0002-Quick-Dirty-patch-to-allow-finding-ngspice-on-Arch-L.patch + 0003-Quick-Dirty-patch-to-allow-finding-Clipper1-on-Arch-.patch) +sha256sums=('SKIP' + 'SKIP' + 'cb14e9de41994e3451aaee61d8284848bfccc7f9a5bf1873a76f199ff0c20b74' + 'a16a8831d97459646e3042e94cd1157ce2315eb9d6e74278260592d97dc1affe' + 'd793c9e655723d04c2c84c65cb0eb3d75f1cd569666768367a02de0a4247f078' + '6b83951f075b1e34a8328da468d0d063e724b1cb33db9d4a450f004a3bbdcfda') prepare() { - mkdir -p "$srcdir"/fritzing-app-${pkgver}/parts - mv "$srcdir"/fritzing-parts-${partsrev}/* "$srcdir"/fritzing-app-${pkgver}/parts + cd "${srcdir}"/fritzing-app + + # Allow use of newer Qt versions + git revert -n 1bf5a03f27b7401631baaedb1ceb9c313a5ffe3d + git revert -n 20eeb4c2f95f3de669e90a1f3fa2ac49cdcc33ac + sed -i 's/RECOMMENDED_QT_VERSION = 6.4.3/RECOMMENDED_QT_VERSION = 6.5.3/g' "${srcdir}"/fritzing-app/phoenix.pro + + # Allow finding quazip-qt6 on Arch Linux + patch -p1 < "${srcdir}/0001-Quick-Dirty-patch-to-allow-finding-quazip-qt6-on-Arc.patch" - cd "$srcdir"/fritzing-app-${pkgver} - patch -p1 < "$srcdir"/0001-Squashed-commit-of-the-following.patch - patch -p0 < "$srcdir"/fritzing.desktop.patch + # Allow finding ngspice on Arch Linux + patch -p1 < "${srcdir}/0002-Quick-Dirty-patch-to-allow-finding-ngspice-on-Arch-L.patch" + + # Allow finding Clipper1 on Arch Linux + patch -p1 < "${srcdir}/0003-Quick-Dirty-patch-to-allow-finding-Clipper1-on-Arch-.patch" + + # Dynamically link against system libgit2 + sed -i 's/LIBGIT_STATIC = true/LIBGIT_STATIC = false/' phoenix.pro + + # Disable broken font scaling (#3221) + sed -i 's/Exec=Fritzing/Exec=env QT_AUTO_SCREEN_SCALE_FACTOR=0 Fritzing/' org.fritzing.Fritzing.desktop } build() { - cd "$srcdir"/fritzing-app-${pkgver} - qmake-qt5 + cd "${srcdir}"/fritzing-app + + # build translations + /usr/lib/qt6/lrelease-pro phoenix.pro + + mkdir build && cd build + qmake6 .. make } package() { - cd "$srcdir"/fritzing-app-${pkgver} - make INSTALL_ROOT="$pkgdir" install - - # install partsdb clone script - install -Dm755 "${srcdir}"/fritzing-app-${pkgver}/tools/user_parts_clone.sh "${pkgdir}"/usr/bin/fritzing_clone_parts + cd "${srcdir}"/fritzing-app/build + make INSTALL_ROOT="${pkgdir}" install - # connect .fzz files to fritzing by default - install -Dm644 "${srcdir}/fritzing.xml" "${pkgdir}/usr/share/mime/packages/fritzing.xml" - echo "MimeType=application/x-fritzing;" >> "${pkgdir}/usr/share/applications/fritzing.desktop" + # We want a system-wide installation of the parts library. Following steps are + # derived from tools/linux_release_script/release.sh. However, we drop the .git + # subfolder afterwards as it is not required at runtime. + cp -dr "${srcdir}"/fritzing-parts "${pkgdir}"/usr/share/fritzing/ + "${pkgdir}"/usr/bin/Fritzing \ + -db "${pkgdir}"/usr/share/fritzing/fritzing-parts/parts.db \ + -pp "${pkgdir}"/usr/share/fritzing/fritzing-parts \ + -f "${pkgdir}"/usr/share/fritzing \ + -platform offscreen + rm -rf "${pkgdir}"/usr/share/fritzing/fritzing-parts/.git{,ignore} } |