From 621d9021ffd6e5d7100543bd821e1a2312876843 Mon Sep 17 00:00:00 2001 From: Juergen Buchmueller Date: Tue, 4 Oct 2016 16:00:02 +0200 Subject: [PATCH] sessreg: fix gcc6 build --- srcpkgs/sessreg/template | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/srcpkgs/sessreg/template b/srcpkgs/sessreg/template index 38e576391e8..75d7112cc25 100644 --- a/srcpkgs/sessreg/template +++ b/srcpkgs/sessreg/template @@ -21,6 +21,27 @@ case "$XBPS_TARGET_MACHINE" in ;; esac +post_configure() { + local _gccver=$(gcc --version | awk '/^gcc \(GCC\)/ { print $3 }') + # + # gcc6 cpp fails to generate filenames.sed from filenames.sed.c + # thus we remove the buuld rule and provide a filenames.sed file + # with the expected output for Void Linux. + # + if [ "${_gccver%%.*}" -gt 5 ]; then + sed -i man/Makefile -e'/filenames.sed: filenames.sed.c/,+4d' + cat > man/filenames.sed << EOF +/__BEGIN_UTMP_ONLY__/,/__END_UTMP_ONLY__/ d +s|__utmp_manpage__|utmpx|g +s|__utmp_file__|"/var/run/utmp"|g +s|__wtmp_manpage__|wtmpx|g +s|__wtmp_file__|"/var/log/wtmp"|g +s|__ttys_file__|"/etc/ttys"|g +s|__lastlog_file__|"/var/log/lastlog"|g +EOF + fi +} + post_install() { vlicense COPYING }