diff options
author | Samuli Suominen <drac@gentoo.org> | 2008-04-28 21:22:21 +0000 |
---|---|---|
committer | Samuli Suominen <drac@gentoo.org> | 2008-04-28 21:22:21 +0000 |
commit | 1194611e480ab9c931d0e8ac35aec729327f9361 (patch) | |
tree | db0f5f4a41565c05ee6163dabc9c7f955ee5b77f /app-admin/xstow | |
parent | Fix ChangeLog syntax. (diff) | |
download | gentoo-2-1194611e480ab9c931d0e8ac35aec729327f9361.tar.gz gentoo-2-1194611e480ab9c931d0e8ac35aec729327f9361.tar.bz2 gentoo-2-1194611e480ab9c931d0e8ac35aec729327f9361.zip |
Fix building with GCC 4.3 wrt #219633, thanks to Peter Alfredsen. Also fix USE ncurses handling and pass --without-curses instead of --without-ncurses to configure.
(Portage version: 2.1.5_rc6)
Diffstat (limited to 'app-admin/xstow')
-rw-r--r-- | app-admin/xstow/ChangeLog | 10 | ||||
-rw-r--r-- | app-admin/xstow/files/xstow-0.4.6-configure-ncurses.diff | 82 | ||||
-rw-r--r-- | app-admin/xstow/files/xstow-0.5.1-gcc43.patch | 67 | ||||
-rw-r--r-- | app-admin/xstow/xstow-0.5.1.ebuild | 24 |
4 files changed, 90 insertions, 93 deletions
diff --git a/app-admin/xstow/ChangeLog b/app-admin/xstow/ChangeLog index f0271819881a..b66006774408 100644 --- a/app-admin/xstow/ChangeLog +++ b/app-admin/xstow/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-admin/xstow -# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/xstow/ChangeLog,v 1.9 2007/02/21 19:49:52 peper Exp $ +# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/xstow/ChangeLog,v 1.10 2008/04/28 21:22:20 drac Exp $ + + 28 Apr 2008; Samuli Suominen <drac@gentoo.org> + +files/xstow-0.5.1-gcc43.patch, xstow-0.5.1.ebuild: + Fix building with GCC 4.3 wrt #219633, thanks to Peter Alfredsen. Also fix + USE ncurses handling and pass --without-curses instead of + --without-ncurses to configure. 21 Feb 2007; Piotr Jaroszyński <peper@gentoo.org> ChangeLog: Transition to Manifest2. diff --git a/app-admin/xstow/files/xstow-0.4.6-configure-ncurses.diff b/app-admin/xstow/files/xstow-0.4.6-configure-ncurses.diff deleted file mode 100644 index 11ae4ad30858..000000000000 --- a/app-admin/xstow/files/xstow-0.4.6-configure-ncurses.diff +++ /dev/null @@ -1,82 +0,0 @@ ---- xstow-0.4.6/configure 2002-12-06 08:12:57.000000000 -0500 -+++ xstow-0.4.6-new/configure 2003-03-03 16:50:00.000000000 -0500 -@@ -4180,70 +4180,6 @@ - if test $ac_cv_header_curses_h = yes; then - - # test which libraray to use -- echo "$as_me:4183: checking for initscr in -lcurses" >&5 --echo $ECHO_N "checking for initscr in -lcurses... $ECHO_C" >&6 --if test "${ac_cv_lib_curses_initscr+set}" = set; then -- echo $ECHO_N "(cached) $ECHO_C" >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lcurses $LIBS" --cat >conftest.$ac_ext <<_ACEOF --#line 4191 "configure" --#include "confdefs.h" -- --/* Override any gcc2 internal prototype to avoid an error. */ --#ifdef __cplusplus --extern "C" --#endif --/* We use char because int might match the return type of a gcc2 -- builtin and then its argument prototype would still apply. */ --char initscr (); --int --main () --{ --initscr (); -- ; -- return 0; --} --_ACEOF --rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:4210: \"$ac_link\"") >&5 -- (eval $ac_link) 2>&5 -- ac_status=$? -- echo "$as_me:4213: \$? = $ac_status" >&5 -- (exit $ac_status); } && -- { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:4216: \"$ac_try\"") >&5 -- (eval $ac_try) 2>&5 -- ac_status=$? -- echo "$as_me:4219: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- ac_cv_lib_curses_initscr=yes --else -- echo "$as_me: failed program was:" >&5 --cat conftest.$ac_ext >&5 --ac_cv_lib_curses_initscr=no --fi --rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --echo "$as_me:4230: result: $ac_cv_lib_curses_initscr" >&5 --echo "${ECHO_T}$ac_cv_lib_curses_initscr" >&6 --if test $ac_cv_lib_curses_initscr = yes; then -- -- support_curses=1 -- LDFLAGS_DYNAMIC="$LDFLAGS -lcurses" -- --cat >>confdefs.h <<\EOF --#define HAVE_CURSES_H 1 --EOF -- --else -- support_curses=0 --fi -- -- if test $support_curses -eq 0; then -- - echo "$as_me:4247: checking for initscr in -lncurses" >&5 - echo $ECHO_N "checking for initscr in -lncurses... $ECHO_C" >&6 - if test "${ac_cv_lib_ncurses_initscr+set}" = set; then -@@ -4306,8 +4242,6 @@ - support_curses=0 - fi - -- fi -- - else - - support_curses=0 diff --git a/app-admin/xstow/files/xstow-0.5.1-gcc43.patch b/app-admin/xstow/files/xstow-0.5.1-gcc43.patch new file mode 100644 index 000000000000..ded9e32cc577 --- /dev/null +++ b/app-admin/xstow/files/xstow-0.5.1-gcc43.patch @@ -0,0 +1,67 @@ +--- xstow-0.5.1.orig/src/format.h ++++ xstow-0.5.1/src/format.h +@@ -648,17 +648,17 @@ + + switch( num_of_args ) + { +- case 1: n = std::snprintf( buffer, buffer_size, format.c_str(), ++ case 1: n = snprintf( buffer, buffer_size, format.c_str(), + D( a ) ); break; +- case 2: n = std::snprintf( buffer, buffer_size, format.c_str(), ++ case 2: n = snprintf( buffer, buffer_size, format.c_str(), + D( a ), D( b ) ); break; +- case 3: n = std::snprintf( buffer, buffer_size, format.c_str(), ++ case 3: n = snprintf( buffer, buffer_size, format.c_str(), + D( a ), D( b ), D( c ) ); break; +- case 4: n = std::snprintf( buffer, buffer_size, format.c_str(), ++ case 4: n = snprintf( buffer, buffer_size, format.c_str(), + D( a ), D( b ), D( c ), D( d ) ); break; +- case 5: n = std::snprintf( buffer, buffer_size, format.c_str(), ++ case 5: n = snprintf( buffer, buffer_size, format.c_str(), + D( a ), D( b ), D( c ), D( d ), D( e ) ); break; +- case 6: n = std::snprintf( buffer, buffer_size, format.c_str(), ++ case 6: n = snprintf( buffer, buffer_size, format.c_str(), + D( a ), D( b ), D( c ), D( d ), D( e ), D( f ) ); break; + } + +--- xstow-0.5.1.orig/src/main.cpp ++++ xstow-0.5.1/src/main.cpp +@@ -1,3 +1,4 @@ ++#include <cstdlib> + #include <iostream> + + #include "local_config.h" +--- xstow-0.5.1.orig/src/cppdir.cpp ++++ xstow-0.5.1/src/cppdir.cpp +@@ -1,6 +1,8 @@ + #include "cppdir.h" + #include "debug.h" + ++#include <cstdlib> ++ + #define OUT(level) DEBUG_OUT( level, MODULE_CPPDIR) + + extern "C" { +--- xstow-0.5.1.orig/src/setup.cpp ++++ xstow-0.5.1/src/setup.cpp +@@ -5,6 +5,8 @@ + #include "debug.h" + #include "nignore.h" + ++#include <cstdlib> ++ + #undef OUT + + #define OUT( level ) DEBUG_OUT( level, MODULE_SETUP ) +--- xstow-0.5.1.orig/src/tree.cpp ++++ xstow-0.5.1/src/tree.cpp +@@ -26,6 +26,7 @@ + + + #include <algorithm> ++#include <cstring> + + #define OUT(level) DEBUG_OUT(level, MODULE_TREE) + + + diff --git a/app-admin/xstow/xstow-0.5.1.ebuild b/app-admin/xstow/xstow-0.5.1.ebuild index a395dc977e54..e48ce1c62137 100644 --- a/app-admin/xstow/xstow-0.5.1.ebuild +++ b/app-admin/xstow/xstow-0.5.1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2006 Gentoo Foundation +# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/xstow/xstow-0.5.1.ebuild,v 1.3 2006/08/01 04:35:31 tsunam Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/xstow/xstow-0.5.1.ebuild,v 1.4 2008/04/28 21:22:20 drac Exp $ inherit eutils @@ -10,18 +10,24 @@ SRC_URI="mirror://sourceforge/xstow/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" -KEYWORDS="~ppc x86" +KEYWORDS="~amd64 ~ppc x86" IUSE="ncurses" -DEPEND="virtual/libc - ncurses? ( sys-libs/ncurses )" +DEPEND="ncurses? ( sys-libs/ncurses )" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-gcc43.patch +} src_compile() { - econf `use_with ncurses` || die - emake || die + econf --disable-dependency-tracking $(use_with ncurses curses) + emake || die "emake failed." } src_install() { - dodoc README AUTHORS NEWS README TODO ChangeLog - make DESTDIR=${D} PACKAGE=${P} install || die + emake DESTDIR="${D}" docdir="/usr/share/doc/${PF}/html" \ + install || die "emake install failed." + dodoc AUTHORS ChangeLog NEWS README TODO } |