void-packages/srcpkgs/lightzone/template
Đoàn Trần Công Danh 861ac185a6 srcpkgs/l*: 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

60 lines
1.8 KiB
Bash

# Template file for 'lightzone'
pkgname=lightzone
version=4.2.2
revision=1
_ivy_version=2.4.0
wrksrc=LightZone-${version}
hostmakedepends="automake git openjdk11 apache-ant javahelp2 rsync pkg-config"
makedepends="libgomp-devel lcms2-devel libjpeg-turbo-devel tiff-devel libX11-devel lensfun-devel"
depends="openjdk11 javahelp2 liblzma tiff"
short_desc="Professional-level digital darkroom and photo editor"
maintainer="Orphaned <orphan@voidlinux.org>"
license="BSD-3-Clause"
homepage="http://www.lightzoneproject.org/"
distfiles="https://github.com/ktgw0316/LightZone/archive/${version}.tar.gz>${pkgname}-${version}.tar.gz
https://repo1.maven.org/maven2/org/apache/ivy/ivy/${_ivy_version}/ivy-${_ivy_version}.jar"
checksum="9106bbafe4cad6e398c0d83555e51a0e8ed550f1f3a9989ffdc047aba1150e8c
ce81cb234406b093b5b8de9f6f5b2a50ed0824d6a235891353e8d3e941a53970"
skip_extraction="ivy-${_ivy_version}.jar"
# JNI binaries are not PIE
nopie=yes
replaces="lightzone-bin>=0"
do_build() {
mkdir -p lightcrafts/lib
ln -sf $XBPS_SRCDISTDIR/${pkgname}-${version}/ivy-${_ivy_version}.jar \
lightcrafts/lib/ivy.jar
# Fix for cross building
vsed -i lightcrafts/jnisrc/tiff/GNUmakefile \
-e "s;\./configure;& --host=${XBPS_MACHINE%-musl};"
. /etc/profile.d/10_openjdk11.sh
cd linux
TARGET=${XBPS_TARGET_MACHINE%-musl} ant jar
}
do_install() {
vbin linux/products/lightzone
vmkdir usr/share
cp -pHR linux/icons ${DESTDIR}/usr/share
vinstall linux/products/lightzone.desktop 644 usr/share/applications
# Install shared libraries
for f in linux/products/*.so; do
vinstall $f 755 usr/lib/lightzone
done
# Install helpers
for f in LightZone-forkd dcraw_lz; do
vinstall linux/products/$f 755 usr/lib/lightzone
done
# Install jars
for f in linux/products/*.jar; do
vinstall $f 644 usr/share/java/lightzone
done
vlicense COPYING
}