void-packages/srcpkgs/kid3/template
Đoàn Trần Công Danh dd9d4a1979 srcpkgs/k*: convert patches to -Np1
```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
```
2021-06-20 13:17:29 +07:00

36 lines
1.6 KiB
Bash

# Template file for 'kid3'
pkgname=kid3
version=3.8.6
revision=1
build_style=cmake
configure_args="-DWITH_APPS='CLI;$(vopt_if KDE KDE Qt)'
-DWITH_DOCBOOKDIR=/usr/share/xsl/docbook -DWITH_FLAC=$(vopt_if flac ON OFF)
-DWITH_ID3LIB=$(vopt_if mp3 ON OFF) -DWITH_MP4V2=$(vopt_if mp4 ON OFF)
-DWITH_VORBIS=$(vopt_if vorbis ON OFF) -DWITH_TAGLIB=$(vopt_if taglib ON OFF)
-DWITH_CHROMAPRINT=$(vopt_if chromaprint 'ON -DWITH_FFMPEG=ON' OFF)"
hostmakedepends="pkg-config python3 libxslt $(vopt_if KDE extra-cmake-modules)"
makedepends="qt5-declarative-devel qt5-multimedia-devel qt5-tools-devel docbook-xsl
readline-devel $(vopt_if KDE kio-devel) $(vopt_if vorbis libvorbis-devel)
$(vopt_if mp4 libmp4v2-devel) $(vopt_if chromaprint 'chromaprint-devel ffmpeg-devel')
$(vopt_if mp3 id3lib-devel) $(vopt_if flac libflac-devel) $(vopt_if taglib taglib-devel)"
depends="desktop-file-utils hicolor-icon-theme"
short_desc="MP3, Ogg/Vorbis and FLAC tag editor"
maintainer="SolitudeSF <solitudesf@protonmail.com>"
license="GPL-2.0-only"
homepage="https://kid3.kde.org"
distfiles="${SOURCEFORGE_SITE}/kid3/kid3-${version}.tar.gz"
checksum=71ef8c58227302737ebbed3b7f476f9f48e76ea894952d916dc33d9c08f96e08
build_options="KDE mp3 mp4 flac vorbis taglib chromaprint"
build_options_default="mp3 mp4 flac vorbis taglib chromaprint"
desc_option_KDE="Enable KDE support"
desc_option_chromaprint="Enable FFMPEG chromaprint support"
desc_option_flac="Enable FLAC support"
desc_option_mp3="Enable MP3 support"
desc_option_mp4="Enable MP4 support"
desc_option_taglib="Enable taglib support"
desc_option_vorbis="Enable Vorbis support"
if [ $CROSS_BUILD ]; then
hostmakedepends+=" qt5-qmake qt5-host-tools"
fi