void-packages/srcpkgs/i3/template
Đoàn Trần Công Danh 7a7f39d8be i3: move post_patch to pre_configure
- We need the date wrapper for reproducibility.
2021-02-08 06:56:42 +07:00

50 lines
1.6 KiB
Bash

# Template file for 'i3'
pkgname=i3
version=4.19.1
revision=2
build_style=meson
hostmakedepends="pkg-config perl"
makedepends="pcre-devel yajl-devel libxcb-devel libev-devel
pango-devel startup-notification-devel libxkbcommon-devel
xcb-util-keysyms-devel xcb-util-wm-devel xcb-util-cursor-devel
xcb-util-xrm-devel"
depends="perl-AnyEvent-I3"
conf_files="/etc/i3/config /etc/i3/config.keycodes"
short_desc="Improved tiling window manager"
maintainer="Frank Steinborn <steinex@nognu.de>"
license="BSD-3-Clause"
homepage="https://i3wm.org/"
distfiles="${homepage}/downloads/${pkgname}-${version}.tar.xz"
checksum=2284c812fc689e0338d8fe9be0b8d1552e548fc168d165f795b26bf497c22b47
case "$XBPS_TARGET_MACHINE" in
*-musl) makedepends+=" libglob-devel";;
esac
pre_configure() {
# This change must be in pre_configre because:
# - it needs to be done before configure
# - date wrapper is only available from pre-configure
vsed -i "s/-non-git/ ($(date --iso-8601))/" meson.build
case "$XBPS_TARGET_MACHINE" in
*-musl)
vsed -i "/^common_deps/i glob_dep = cc.find_library('glob')" meson.build
vsed -i "/^common_deps/a glob_dep," meson.build
vsed -i '/include/s,glob.h,libglob/glob.h,g' i3bar/src/main.c libi3/resolve_tilde.c
vsed -i '/GLOB_TILDE/s/glob(/g_glob(/g' i3bar/src/main.c libi3/resolve_tilde.c
vsed -i 's/globfree(/g_globfree(/g' i3bar/src/main.c libi3/resolve_tilde.c
;;
esac
}
post_install() {
vlicense LICENSE
vmkdir usr/share/man/man1
install -m644 man/*.1 ${DESTDIR}/usr/share/man/man1
}
i3-devel_package() {
short_desc+=" - development files"
pkg_install() {
vmove usr/include
}
}