diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2010-11-14 09:56:48 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2010-11-14 09:56:48 +0000 |
commit | 26485554d92f1a5bc20b97dd360f545ee76b0cb7 (patch) | |
tree | 0a7d9ae4f7226005b13e4d5483b38239be59bb49 /app-text | |
parent | New snapshot. (diff) | |
download | gentoo-2-26485554d92f1a5bc20b97dd360f545ee76b0cb7.tar.gz gentoo-2-26485554d92f1a5bc20b97dd360f545ee76b0cb7.tar.bz2 gentoo-2-26485554d92f1a5bc20b97dd360f545ee76b0cb7.zip |
Fix limitation of -D_FORTIFY_SOURCE=2 wrt #321407 by Diego Elio Pettenò.
(Portage version: 2.2.0_alpha4/cvs/Linux x86_64)
Diffstat (limited to 'app-text')
-rw-r--r-- | app-text/htmldoc/ChangeLog | 8 | ||||
-rw-r--r-- | app-text/htmldoc/files/htmldoc-fortify-fail.patch | 21 | ||||
-rw-r--r-- | app-text/htmldoc/htmldoc-1.8.27-r2.ebuild | 61 |
3 files changed, 89 insertions, 1 deletions
diff --git a/app-text/htmldoc/ChangeLog b/app-text/htmldoc/ChangeLog index 0503cbd6e051..1ec48e1e5b26 100644 --- a/app-text/htmldoc/ChangeLog +++ b/app-text/htmldoc/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-text/htmldoc # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/htmldoc/ChangeLog,v 1.56 2010/11/07 21:15:51 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/htmldoc/ChangeLog,v 1.57 2010/11/14 09:56:48 ssuominen Exp $ + +*htmldoc-1.8.27-r2 (14 Nov 2010) + + 14 Nov 2010; Samuli Suominen <ssuominen@gentoo.org> + +htmldoc-1.8.27-r2.ebuild, +files/htmldoc-fortify-fail.patch: + Fix limitation of -D_FORTIFY_SOURCE=2 wrt #321407 by Diego Elio Pettenò. 07 Nov 2010; Samuli Suominen <ssuominen@gentoo.org> htmldoc-1.8.27-r1.ebuild: diff --git a/app-text/htmldoc/files/htmldoc-fortify-fail.patch b/app-text/htmldoc/files/htmldoc-fortify-fail.patch new file mode 100644 index 000000000000..32ec8873567f --- /dev/null +++ b/app-text/htmldoc/files/htmldoc-fortify-fail.patch @@ -0,0 +1,21 @@ +diff -ur htmldoc-1.8.27~/htmldoc/ps-pdf.cxx htmldoc-1.8.27/htmldoc/ps-pdf.cxx +--- htmldoc-1.8.27~/htmldoc/ps-pdf.cxx 2009-08-13 19:32:21.846860508 -0400 ++++ htmldoc-1.8.27/htmldoc/ps-pdf.cxx 2009-08-13 19:40:29.185857503 -0400 +@@ -8619,7 +8619,7 @@ + return (NULL); + } + // Safe because buffer is allocated... +- strcpy((char *)r->data.text.buffer, (char *)data); ++ memcpy((char *)r->data.text.buffer, (char *)data, strlen((char *)data)); + get_color(_htmlTextColor, r->data.text.rgb); + break; + case RENDER_IMAGE : +@@ -8640,7 +8640,7 @@ + return (NULL); + } + // Safe because buffer is allocated... +- strcpy((char *)r->data.link, (char *)data); ++ memcpy((char *)r->data.link, (char *)data, strlen((char *)data)); + break; + } + diff --git a/app-text/htmldoc/htmldoc-1.8.27-r2.ebuild b/app-text/htmldoc/htmldoc-1.8.27-r2.ebuild new file mode 100644 index 000000000000..8902c4086894 --- /dev/null +++ b/app-text/htmldoc/htmldoc-1.8.27-r2.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-text/htmldoc/htmldoc-1.8.27-r2.ebuild,v 1.1 2010/11/14 09:56:48 ssuominen Exp $ + +inherit eutils + +DESCRIPTION="Convert HTML pages into a PDF document" +SRC_URI="mirror://easysw/htmldoc/${PV}/${P}-source.tar.bz2" +HOMEPAGE="http://www.easysw.com/htmldoc/" + +IUSE="fltk ssl" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" + +DEPEND="virtual/jpeg + >=media-libs/libpng-1.4 + fltk? ( >=x11-libs/fltk-1.0.11 ) + ssl? ( >=dev-libs/openssl-0.9.6e )" +RDEPEND="${DEPEND}" + +# this needs to be figured out, since htmldoc looks for all three libs +# right now there's no virtual/ssl +# +# --enable-openssl use OpenSSL for SSL/TLS support, default=yes +# --enable-gnutls use GNU TLS for SSL/TLS support, default=yes +# --enable-cdsassl use CDSA for SSL/TLS support, default=yes + +src_unpack() { + unpack ${A} + cd "${S}" + # make sure not to use the libs htmldoc ships with + mkdir foo ; mv jpeg foo/ ; mv png foo/ ; mv zlib foo/ + + epatch "${FILESDIR}"/${PN}-sscanf-overflows.patch \ + "${FILESDIR}"/${PN}-fortify-fail.patch + + sed -i "s:^#define DOCUMENTATION \"\$prefix/share/doc/htmldoc\":#define DOCUMENTATION \"\$prefix/share/doc/${PF}/html\":" \ + configure +} + +src_compile() { + local myconf="$(use_enable ssl openssl) $(use_with fltk gui)" + + econf ${myconf} || die "econf failed" + + # Add missing -lfltk_images to LIBS + use fltk && sed -i 's:-lfltk :-lfltk -lfltk_images :g' Makedefs + + emake || die "make failed" +} + +src_install() { + einstall bindir="${D}/usr/bin" || die "einstall failed" + + # Minor cleanups + mv "${D}/usr/share/doc/htmldoc" "${D}/usr/share/doc/${PF}" + dodir /usr/share/doc/${PF}/html + mv "${D}"/usr/share/doc/${PF}/*.html "${D}/usr/share/doc/${PF}/html" +} |