You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/games-board/pioneers/files/pioneers-15.1-build.patch

68 lines
2.3 KiB

From: Julian Ospald <hasufell@gentoo.org>
Date: Thu Dec 19 21:30:53 UTC 2013
* add --with-help switch
* add --enable-minimal-flags switch
* don't use AM_CFLAGS in configure.ac, it is bad form
--- a/configure.ac
+++ b/configure.ac
@@ -129,21 +129,40 @@
*) pioneers_deprecationChecks=no ;;
esac])
+AC_ARG_ENABLE([minimal-flags],
+ AS_HELP_STRING([--enable-minimal-flags],
+ ["Don't add unneeded flags."]),
+[case "${enableval}" in
+ yes) minimal_flags=yes ;;
+ "") minimal_flags=no ;;
+ *) minimal_flags=no ;;
+esac])
+
+AC_ARG_WITH([help],
+ AS_HELP_STRING([--with-help],
+ [Enable gnome help via scrollkeeper.]),
+[case "${withval}" in
+ yes) with_help=yes ;;
+ "") with_help=yes ;;
+ *) with_help=no ;;
+esac])
+
+
## The warnings are in the same order as in 'man gcc'
-if test "x$GCC" = xyes; then
+if test "x$GCC" = xyes && test "x$minimal_flags" != xyes; then
# Flags from Debian hardening (dpkg-buildflags --get CFLAGS)
- AC_SUBST(AM_CFLAGS, ["$AM_CFLAGS -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security"])
- AC_SUBST(AM_CFLAGS, ["$AM_CFLAGS -D_FORTIFY_SOURCE=2"])
- AC_SUBST(AM_CFLAGS, ["$AM_CFLAGS -pie -fPIE"])
+ CFLAGS="$CFLAGS -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security"
+ CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
+ CFLAGS="$CFLAGS -pie -fPIE"
if test "$pioneers_is_windows_port" = "no"; then
# Flags from Debian hardening (dpkg-buildflags --get LDFLAGS)
- AC_SUBST(AM_LDFLAGS, ["$AM_LDFLAGS -Wl,-z,relro"])
- AC_SUBST(AM_LDFLAGS, ["$AM_LDFLAGS -Wl,-z,now"])
+ LDFLAGS="$LDFLAGS -Wl,-z,relro"
+ LDFLAGS="$LDFLAGS -Wl,-z,now"
fi
- # Only link the directly needed libraries
- AC_SUBST(AM_CFLAGS, ["$AM_CFLAGS -Wl,--as-needed"])
+ # Only link the directly needed libraries
+ LDFLAGS="$LDFLAGS -Wl,--as-needed"
if test "$pioneers_warnings" = yes -o "$pioneers_warnings" = full; then
AC_SUBST(WARNINGS, "-Wall")
@@ -385,7 +404,7 @@
AM_GLIB_GNU_GETTEXT
if test $pioneers_is_mingw_port = yes; then
- AC_SUBST(AM_CFLAGS, "-mms-bitfields $AM_CFLAGS")
+ CFLAGS="-mms-bitfields $CFLAGS"
# No console window for the graphical applications
AC_SUBST(GTK2_LIBS, "$GTK2_LIBS -mwindows")
# Don't use bin, lib and share subdirectories