sessreg: fix gcc6 issue with cpp output
This fix is taken from the Linux From Scratch description.
This commit is contained in:
@@ -21,24 +21,10 @@ case "$XBPS_TARGET_MACHINE" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
post_configure() {
|
pre_configure() {
|
||||||
local _gccver=$(gcc --version | awk '/^gcc \(GCC\)/ { print $3 }')
|
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
|
if [ "${_gccver%%.*}" -gt 5 ]; then
|
||||||
sed -i man/Makefile -e'/filenames.sed: filenames.sed.c/,+4d'
|
sed -e 's/\$(CPP) \$(DEFS)/$(CPP) -P $(DEFS)/' -i man/Makefile.in
|
||||||
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user