From c8a6c9470bc973290b00373a552cd61b4503db9e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 13 Feb 2017 15:27:04 -0500 Subject: [PATCH] net-libs/libupnp: do not override user CFLAGS --- .../libupnp/files/libupnp-1.6.21-cflags.patch | 30 +++++++++++++++++++ net-libs/libupnp/libupnp-1.6.21.ebuild | 1 + net-libs/libupnp/libupnp-1.8.0.ebuild | 1 + 3 files changed, 32 insertions(+) create mode 100644 net-libs/libupnp/files/libupnp-1.6.21-cflags.patch diff --git a/net-libs/libupnp/files/libupnp-1.6.21-cflags.patch b/net-libs/libupnp/files/libupnp-1.6.21-cflags.patch new file mode 100644 index 000000000000..3eaf66e80413 --- /dev/null +++ b/net-libs/libupnp/files/libupnp-1.6.21-cflags.patch @@ -0,0 +1,30 @@ +don't append flags like -O0/-Os which clobber the user's settings + +--- a/configure.ac ++++ b/configure.ac +@@ -539,25 +539,6 @@ AC_PROG_EGREP + echo "--------------------- Default compilation flags -------------------------------" + echo host is $host + echo host_os is $host_os +-case $host_os in +-freebsd*) +- echo "Using FreeBSD specific compiler settings" +- # Put FreeBSD specific compiler flags here +- ;; +-*) +- echo "Using non-specific system compiler settings" +- if test x"$enable_debug" = xyes; then +- # AC_PROG_CC already sets CFLAGS to "-g -O2" by default, +- # but only if CFLAGS was not previously set. +- #: +- # Use -O0 in debug so that variables do not get optimized out +- AX_CFLAGS_GCC_OPTION([-O0, -g]) +- else +- # add optimise for size +- AX_CFLAGS_GCC_OPTION([-Os]) +- fi +- ;; +-esac + + AX_CFLAGS_WARN_ALL + echo "-------------------------------------------------------------------------------" diff --git a/net-libs/libupnp/libupnp-1.6.21.ebuild b/net-libs/libupnp/libupnp-1.6.21.ebuild index 4e7f7656a072..4342f131eb28 100644 --- a/net-libs/libupnp/libupnp-1.6.21.ebuild +++ b/net-libs/libupnp/libupnp-1.6.21.ebuild @@ -19,6 +19,7 @@ DOCS="NEWS README ChangeLog" PATCHES=( "${FILESDIR}"/${PN}-1.6.19-docs-install.patch + "${FILESDIR}"/${PN}-1.6.21-cflags.patch ) src_prepare() { diff --git a/net-libs/libupnp/libupnp-1.8.0.ebuild b/net-libs/libupnp/libupnp-1.8.0.ebuild index abee901f8441..32baec6ad6fa 100644 --- a/net-libs/libupnp/libupnp-1.8.0.ebuild +++ b/net-libs/libupnp/libupnp-1.8.0.ebuild @@ -19,6 +19,7 @@ DOCS="NEWS README.md ChangeLog" PATCHES=( "${FILESDIR}"/${PN}-1.8.0-docs-install.patch + "${FILESDIR}"/${PN}-1.6.21-cflags.patch ) src_prepare() { -- 2.26.2