summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Januszewski <spock@gentoo.org>2005-01-16 13:57:27 +0000
committerMichael Januszewski <spock@gentoo.org>2005-01-16 13:57:27 +0000
commit43a9fa01ec9746adc011067556e59b9ccecc90f8 (patch)
treed2fe1aeeb004b26fdf3f4a3329112b7062fec861 /media-gfx
parentFix bug #78208. (diff)
downloadgentoo-2-43a9fa01ec9746adc011067556e59b9ccecc90f8.tar.gz
gentoo-2-43a9fa01ec9746adc011067556e59b9ccecc90f8.tar.bz2
gentoo-2-43a9fa01ec9746adc011067556e59b9ccecc90f8.zip
Added hardened compilation fixes from bug #71193.
(Portage version: 2.0.51-r13)
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/splashutils/ChangeLog6
-rw-r--r--media-gfx/splashutils/splashutils-0.9_rc1.ebuild22
2 files changed, 24 insertions, 4 deletions
diff --git a/media-gfx/splashutils/ChangeLog b/media-gfx/splashutils/ChangeLog
index 12300e233d2c..c54131a3615b 100644
--- a/media-gfx/splashutils/ChangeLog
+++ b/media-gfx/splashutils/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for media-gfx/splashutils
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/splashutils/ChangeLog,v 1.13 2005/01/12 00:02:40 spock Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/splashutils/ChangeLog,v 1.14 2005/01/16 13:57:27 spock Exp $
+
+ 16 Jan 2005; Michal Januszewski <spock@gentoo.org>
+ splashutils-0.9_rc1.ebuild:
+ Added hardened compilation fixes from bug #71193.
12 Jan 2005; Michal Januszewski <spock@gentoo.org>
splashutils-0.9_rc1.ebuild:
diff --git a/media-gfx/splashutils/splashutils-0.9_rc1.ebuild b/media-gfx/splashutils/splashutils-0.9_rc1.ebuild
index 7d7175a101ca..73e060185554 100644
--- a/media-gfx/splashutils/splashutils-0.9_rc1.ebuild
+++ b/media-gfx/splashutils/splashutils-0.9_rc1.ebuild
@@ -1,9 +1,10 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/splashutils/splashutils-0.9_rc1.ebuild,v 1.3 2005/01/12 00:02:40 spock Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/splashutils/splashutils-0.9_rc1.ebuild,v 1.4 2005/01/16 13:57:27 spock Exp $
MISCSPLASH="miscsplashutils-0.1.2"
GENTOOSPLASH="splashutils-gentoo-0.1.3"
+KLIBC_VERSION="0.179"
DESCRIPTION="Framebuffer splash utilities."
HOMEPAGE="http://dev.gentoo.org/~spock/"
@@ -16,7 +17,7 @@ SRC_URI="mirror://gentoo/${P/_/-}.tar.bz2
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86 ~amd64 ~ppc"
-IUSE=""
+IUSE="hardened"
RDEPEND=">=media-libs/freetype-2
media-libs/libpng
media-libs/jpeg
@@ -29,6 +30,15 @@ S="${WORKDIR}/${P/_/-}"
SM="${WORKDIR}/${MISCSPLASH}"
SG="${WORKDIR}/${GENTOOSPLASH}"
+pkg_setup() {
+ if use hardened; then
+ ewarn "Due to problems with klibc, it is currently impossible to compile splashutils"
+ ewarn "with 'hardened' GCC flags. As a workaround, the package will be compiled with"
+ ewarn "-fno-stack-protector. Hardened GCC features will not be used while building"
+ ewarn "the fbsplash kernel helper."
+ fi
+}
+
src_unpack() {
unpack ${A}
ln -s /usr/src/linux ${S}/linux
@@ -52,9 +62,15 @@ src_unpack() {
else
t2=$(readlink ${KBUILD_OUTPUT_PREFIX}/${t/linux-}/include/asm)
ln -s /usr/src/linux/include/${t2} ${T}/asm
- sed -e "s@#CHANGEME#@${T}/@" -i ${S}/libs/klibc-0.179/klibc/makeerrlist.pl
+ sed -e "s@#CHANGEME#@${T}/@" -i ${S}/libs/klibc-${KLIBC_VERSION}/klibc/makeerrlist.pl
fi
fi
+
+ # this should make this version of splashutils compile with hardened systems
+ if use hardened; then
+ sed -e 's@K_CFLAGS =@K_CFLAGS = -fno-stack-protector@' -i ${S}/Makefile
+ sed -e 's@CFLAGS =@CFLAGS = -fno-stack-protector@' -i ${S}/libs/klibc-${KLIBC_VERSION}/klibc/MCONFIG
+ fi
}
src_compile() {