sessreg: fix gcc6 issue with cpp output
This fix is taken from the Linux From Scratch description.
This commit is contained in:
parent
621d9021ff
commit
be95164875
1 changed files with 2 additions and 16 deletions
|
@ -21,24 +21,10 @@ case "$XBPS_TARGET_MACHINE" in
|
|||
;;
|
||||
esac
|
||||
|
||||
post_configure() {
|
||||
pre_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
|
||||
sed -e 's/\$(CPP) \$(DEFS)/$(CPP) -P $(DEFS)/' -i man/Makefile.in
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue