From 8bb09d805c9b74d0ceb72f5281dff74cc667f0bc Mon Sep 17 00:00:00 2001 From: Benson Leung Date: Tue, 18 Oct 2011 16:38:07 -0700 Subject: [PATCH] Upgraded the slang Portage package Upgraded sys-libs/slang to version 2.2.2 on amd64 BUG=chromium-os:21232 TEST=sudo emerge sys-libs/slang sudo emerge dev-libs/newt sudo emerge perf sudo perf record -a sudo perf report Ensure that the text ui works. Change-Id: I9b7629b2b5269f1be225d832af5bc0ddc0be0dd6 Reviewed-on: http://gerrit.chromium.org/gerrit/10272 Tested-by: Benson Leung Reviewed-by: Sonny Rao --- .../slang/files/slang-2.1.2-slsh-libs.patch | 12 ++++ .../slang/files/slang-2.1.3-uclibc.patch | 12 ++++ .../slang/files/slang-2.2.3-slsh-libs.patch | 11 ++++ .../sys-libs/slang/slang-2.2.2.ebuild | 65 +++++++++++++++++++ 4 files changed, 100 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/slang/files/slang-2.1.2-slsh-libs.patch create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/slang/files/slang-2.1.3-uclibc.patch create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/slang/files/slang-2.2.3-slsh-libs.patch create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/slang/slang-2.2.2.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/slang/files/slang-2.1.2-slsh-libs.patch b/sdk_container/src/third_party/portage-stable/sys-libs/slang/files/slang-2.1.2-slsh-libs.patch new file mode 100644 index 0000000000..da9c3ecfaa --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/slang/files/slang-2.1.2-slsh-libs.patch @@ -0,0 +1,12 @@ +diff -Naur slang-2.1.2.orig/slsh/Makefile.in slang-2.1.2/slsh/Makefile.in +--- slang-2.1.2.orig/slsh/Makefile.in 2007-09-09 10:39:18.000000000 +0900 ++++ slang-2.1.2/slsh/Makefile.in 2007-09-19 01:31:41.000000000 +0900 +@@ -74,7 +74,7 @@ + slsh_exe: slsh.o readline.o + $(CC) $(CFLAGS) slsh.o readline.o -o slsh_exe $(LDFLAGS) $(SRC_LIBS) + slsh: slsh.o readline.o +- $(CC) $(CFLAGS) slsh.o readline.o -o slsh $(LDFLAGS) $(INST_LIBS) ++ $(CC) $(CFLAGS) slsh.o readline.o -o slsh $(LDFLAGS) $(SRC_LIBS) + slsh.o: slsh.c slsh.h config.h Makefile + $(CC) -c $(CFLAGS) $(SLANG_SRCINC) $(DEFS) slsh.c + readline.o: readline.c slsh.h config.h Makefile diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/slang/files/slang-2.1.3-uclibc.patch b/sdk_container/src/third_party/portage-stable/sys-libs/slang/files/slang-2.1.3-uclibc.patch new file mode 100644 index 0000000000..d7ed5a8d65 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/slang/files/slang-2.1.3-uclibc.patch @@ -0,0 +1,12 @@ +diff -ur slang-2.1.3.orig/src/slcommon.c slang-2.1.3/src/slcommon.c +--- slang-2.1.3.orig/src/slcommon.c 2007-01-10 18:09:07.000000000 +0200 ++++ slang-2.1.3/src/slcommon.c 2008-03-19 16:09:09.000000000 +0200 +@@ -191,7 +191,7 @@ + return p; + } + +-#if !defined(HAVE_ISSETUGID) && defined(__GLIBC__) && (__GLIBC__ >= 2) ++#if !defined(HAVE_ISSETUGID) && defined(__GLIBC__) && (__GLIBC__ >= 2) && !defined(__UCLIBC__) + extern int __libc_enable_secure; + # define HAVE___LIBC_ENABLE_SECURE 1 + #endif diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/slang/files/slang-2.2.3-slsh-libs.patch b/sdk_container/src/third_party/portage-stable/sys-libs/slang/files/slang-2.2.3-slsh-libs.patch new file mode 100644 index 0000000000..2c999fb184 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/slang/files/slang-2.2.3-slsh-libs.patch @@ -0,0 +1,11 @@ +--- slsh/Makefile.in ++++ slsh/Makefile.in +@@ -80,7 +80,7 @@ + $(OBJDIR)/slsh_exe: $(OBJDIR)/slsh.o $(OBJDIR)/readline.o + $(CC) $(CFLAGS) $(OBJDIR)/slsh.o $(OBJDIR)/readline.o -o $(OBJDIR)/slsh_exe $(LDFLAGS) $(SRC_LIBS) + $(OBJDIR)/slsh: $(OBJDIR)/slsh.o $(OBJDIR)/readline.o +- $(CC) $(CFLAGS) $(OBJDIR)/slsh.o $(OBJDIR)/readline.o -o $(OBJDIR)/slsh $(LDFLAGS) $(INST_LIBS) ++ $(CC) $(CFLAGS) $(OBJDIR)/slsh.o $(OBJDIR)/readline.o -o $(OBJDIR)/slsh $(LDFLAGS) $(SRC_LIBS) + $(OBJDIR)/slsh.o: $(OBJDIR) slsh.c slsh.h config.h Makefile + cd $(OBJDIR) && $(CC) -c $(CFLAGS) $(SLANG_SRCINC) $(DEFS) $(SRCDIR)/slsh.c + $(OBJDIR)/readline.o: $(OBJDIR) readline.c slsh.h config.h Makefile diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/slang/slang-2.2.2.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/slang/slang-2.2.2.ebuild new file mode 100644 index 0000000000..a3473f3e66 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/slang/slang-2.2.2.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/slang/slang-2.2.2.ebuild,v 1.9 2010/12/27 12:51:44 ssuominen Exp $ + +EAPI=2 +inherit eutils + +DESCRIPTION="A portable programmer's library designed to allow a developer to create robust portable software" +HOMEPAGE="http://www.jedsoft.org/slang/" +SRC_URI="mirror://slang/v${PV%.*}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd" +IUSE="cjk pcre png readline zlib" + +RDEPEND="sys-libs/ncurses + pcre? ( dev-libs/libpcre ) + png? ( media-libs/libpng ) + cjk? ( dev-libs/oniguruma ) + readline? ( sys-libs/readline ) + zlib? ( sys-libs/zlib )" +DEPEND="${RDEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2.1.2-slsh-libs.patch \ + "${FILESDIR}"/${PN}-2.1.3-uclibc.patch + + sed -i \ + -e '/^TERMCAP=/s:=.*:=:' \ + configure || die +} + +src_configure() { + local myconf + + if use readline; then + myconf+=" --with-readline=gnu" + else + myconf+=" --with-readline=slang" + fi + + econf \ + $(use_with cjk onig) \ + $(use_with pcre) \ + $(use_with png) \ + $(use_with zlib z) \ + ${myconf} +} + +src_compile() { + emake -j1 elf static || die "emake elf static failed" + + cd slsh + emake -j1 slsh || die "emake slsh failed" +} + +src_install() { + emake -j1 DESTDIR="${D}" install-all || die "emake install-all failed" + + rm -rf "${D}"/usr/share/doc/{slang,slsh} + + dodoc NEWS README *.txt doc/{,internal,text}/*.txt + dohtml doc/slangdoc.html slsh/doc/html/*.html +}