void-packages/srcpkgs/OpenCPN/template
Đoàn Trần Công Danh ec4c2d75fa srcpkgs/[A-Z]*: 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

58 lines
2 KiB
Bash

# Template file for 'OpenCPN'
pkgname=OpenCPN
version=5.2.0
revision=2
build_style=cmake
build_helper=cmake-wxWidgets-gtk3
configure_args="-DOCPN_BUNDLE_GSHHS=NONE -DOCPN_BUNDLE_TCDATA=ON
-DOCPN_BUNDLE_DOCS=ON -DOCPN_FORCE_GTK3=ON
-DOCPN_USE_CRASHREPORT=$(vopt_if crashreport ON OFF)
-DOCPN_USE_BUNDLED_LIBS=OFF"
hostmakedepends="gettext pkg-config"
makedepends="gtk+3-devel libcurl-devel portaudio-devel tinyxml-devel
wxWidgets-gtk3-devel $(vopt_if exif 'libexif-devel') glu-devel
$(vopt_if libarchive 'libarchive-devel' 'libunarr-devel') $(vopt_if lzma 'liblzma-devel')"
depends="gpsd hicolor-icon-theme OpenCPN-tcdata-${version}_${revision}
OpenCPN-gshhs-crude"
short_desc="Concise ChartPlotter/Navigator"
maintainer="John <me@johnnynator.dev>"
license="GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.0-or-later, MIT, WxWindows-exception-3.1, JasPer-2.0, BSD-3-Clause, SGI-B-2.0"
homepage="https://opencpn.org/"
distfiles="https://github.com/OpenCPN/OpenCPN/archive/v${version}.tar.gz"
checksum=f6ec38989bc38f5a7f63234c5e0230adeb73f5626b4e3d3dfa680f0c240badc7
build_options="lzma libarchive exif crashreport"
build_options_default="lzma libarchive exif"
desc_option_crashreport="Enable displaying of crashreports"
desc_option_lzma="Enable support for reading compressed charts"
desc_option_exif="Enable reading of exif data of Images"
desc_option_libarchive="Use libarchive instead of bundled unarr"
case $XBPS_TARGET_MACHINE in
*-musl);;
*) build_options_default+=" crashreport";;
esac
CFLAGS="-fcommon"
post_install() {
vlicense libs/glshim/LICENSE LICENSE.glshim
vlicense libs/SQLiteCpp/LICENSE.txt LICENSE.SQLiteCpp
vlicense libs/libtess2/LICENSE.txt LICENSE.libtess
}
OpenCPN-doc_package() {
short_desc+=" - Documentation"
pkg_install() {
vmove usr/share/opencpn/doc
vmove usr/share/opencpn/plugins/chartdldr_pi/data/doc
vmove usr/share/opencpn/CoC-909_2013-InlandECDIS_20170308s.pdf
}
}
OpenCPN-tcdata_package() {
short_desc="World shoreline data for OpenCPN Navigation software"
pkg_install() {
vmove usr/share/opencpn/tcdata
}
}