void-packages/srcpkgs/ted/template
Đoàn Trần Công Danh 8be8d5056c ted: fix datadir on cross
2020-05-17 18:20:27 +07:00

34 lines
1 KiB
Bash

# Template file for 'ted'
pkgname=ted
version=2.23
revision=3
wrksrc=Ted-${version}
build_style=gnu-configure
hostmakedepends="pkg-config tar"
makedepends="zlib-devel pcre-devel libX11-devel libxmp-devel tiff-devel
libpng-devel libjpeg-turbo-devel gtk+-devel libpaper-devel"
short_desc="Easy rich text processor"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://nllgg.nl/Ted/"
distfiles="http://ftp.nluug.nl/pub/editors/ted/ted-${version}.src.tar.gz"
checksum=3fa992c2bc96af3ca788ef941cb5314f4a1d843202efd0201b8b4ee9adbf316c
post_patch() {
vsed -i -e '/YOU MUST BE ROOT/ s/id -u /echo 0 /' tedPackage/configure
vsed -i -e 's/@LIBTIFF_LIBS@/-ltiff/g' \
-e 's/@LIBPAPER_LIBS@/-lpaper/g' \
Ted/makefile.in
}
do_configure() {
# replace all newlines with tabs
export CONFIGURE_OPTIONS="${configure_args//
/ } --datadir=/usr/share"
vsed -i -e '/^CONFIGURE_OPTIONS[ ]*=/ s/=/ += /' Makefile
make $(sed -n '/^[-a-zA-Z0-9_]*\/[Mm]akefile:/ s/:.*//p' Makefile)
}
do_build() {
make $makejobs compile.shared
}