```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.-][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
37 lines
1.5 KiB
Bash
37 lines
1.5 KiB
Bash
# Template file for 'Fritzing'
|
|
pkgname=Fritzing
|
|
version=0.9.3b
|
|
revision=5
|
|
_partshash=359eb1933622e4c4fa456ad043543681984a4d64 # 2018-03-14
|
|
wrksrc="fritzing-app-${version}"
|
|
build_style=qmake
|
|
hostmakedepends="qt5-qmake qt5-host-tools"
|
|
makedepends="qt5-devel qt5-serialport-devel qt5-svg-devel boost-devel libgit2-devel"
|
|
depends="qt5-plugin-sqlite"
|
|
short_desc="Software for electronics prototyping"
|
|
maintainer="Steve Prybylski <sa.prybylx@gmail.com>"
|
|
license="GPL-3.0-or-later, CC-BY-SA-3.0"
|
|
homepage="http://fritzing.org"
|
|
distfiles="https://github.com/${pkgname}/${pkgname}-app/archive/${version}.tar.gz>fritzing-app-${version}.tar.gz
|
|
https://github.com/${pkgname}/${pkgname}-parts/archive/${_partshash}.tar.gz>fritzing-parts-${_partshash}.tar.gz"
|
|
checksum="2475a95aad2c1536eef3fdb72665c5c16590644b45bd110a0cde223c916625b8
|
|
2d5882f0180d04c582ef418fd286bf1d04142409d316a4cd5c9ce3e2d91434dd"
|
|
|
|
post_extract() {
|
|
# looks for libgit2 and boost in the source tree
|
|
# make it use the system libraries
|
|
sed -i -e "s|\(LIBGIT2INCLUDE =\) ../libgit2/include|\1 ${XBPS_CROSS_BASE}/usr/include|" \
|
|
-e "s|\(LIBGIT2LIB = \)../libgit2/build|\1 ${XBPS_CROSS_BASE}/usr/lib|" \
|
|
phoenix.pro
|
|
|
|
sed -i -e "/error/d" \
|
|
-e "s/\(BOOSTINFO =\).*/\1/" \
|
|
pri/utils.pri
|
|
}
|
|
|
|
post_install() {
|
|
mv ${XBPS_BUILDDIR}/fritzing-parts-$_partshash/ ${DESTDIR}/usr/share/fritzing/parts
|
|
mv ${DESTDIR}/usr/bin/Fritzing{,-bin}
|
|
vbin ${FILESDIR}/Fritzing
|
|
sed -i -e "s;^Icon=.*;Icon=fritzing;" ${DESTDIR}/usr/share/applications/fritzing.desktop
|
|
}
|