```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 ```
41 lines
1.5 KiB
Bash
41 lines
1.5 KiB
Bash
# Template file for 'krita'
|
|
pkgname=krita
|
|
version=4.4.5
|
|
revision=1
|
|
build_style=cmake
|
|
configure_args="-Wno-dev -DBUILD_TESTING=OFF"
|
|
hostmakedepends="extra-cmake-modules gettext pkg-config python3
|
|
qt5-qmake qt5-host-tools kcoreaddons python3-PyQt5
|
|
python3-PyQt5-devel"
|
|
makedepends="karchive-devel kconfig-devel kwidgetsaddons-devel kcompletion-devel
|
|
kcoreaddons-devel kguiaddons-devel ki18n-devel kitemmodels-devel kitemviews-devel
|
|
kwindowsystem-devel kio-devel kcrash-devel qt5-svg-devel qt5-multimedia-devel
|
|
boost-devel gsl-devel tiff-devel libjpeg-turbo-devel libraw-devel fftw-devel
|
|
opencolorio-devel eigen exiv2-devel libXi-devel libopenexr-devel libgomp-devel
|
|
poppler-qt5-devel giflib-devel python3-devel python3-PyQt5
|
|
python3-PyQt5-devel quazip-devel libheif-devel seexpr-krita-devel
|
|
libopenjpeg2-devel"
|
|
short_desc="Painting and image editing program"
|
|
maintainer="John <me@johnnynator.dev>"
|
|
license="GPL-3.0-only"
|
|
homepage="https://krita.org/"
|
|
distfiles="${KDE_SITE}/krita/${version}/krita-${version}.tar.gz"
|
|
checksum=4bfd7280870d1060a00d1123d836fc1a5b5bf8a028676679f0268cd5e7fb7568
|
|
python_version=3
|
|
replaces="calligra-krita>=0"
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686*|x86_64*) makedepends+=" vc";;
|
|
esac
|
|
|
|
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
|
makedepends+=" libatomic-devel"
|
|
fi
|
|
|
|
pre_configure() {
|
|
# CMake won't search in those directories because of CMAKE_FIND_ROOT_PATH
|
|
if [ "$CROSS_BUILD" ]; then
|
|
configure_args+=" -D_find_sip_py=$wrksrc/cmake/modules/FindSIP.py"
|
|
configure_args+=" -D_find_pyqt5_py=$wrksrc/cmake/modules/FindPyQt5.py"
|
|
fi
|
|
}
|