From 1824261d7a30d18df1491e3ababe94b134f672a0 Mon Sep 17 00:00:00 2001 From: Bernie Thompson Date: Mon, 7 May 2012 18:41:41 -0700 Subject: [PATCH] Add the dos2unix Portage package to portage-stable Add app-text/dos2unix to version 5.3.1 on amd64 in portage-stable. This utility is meant for use within the chroot. BUG=None TEST=Verify dos2unix emerges and runs (sudo emerge dos2unix in chroot) Change-Id: I2bf5b7843db99b3df40b4342f6c80d44c397ae53 Reviewed-on: https://gerrit.chromium.org/gerrit/22071 Reviewed-by: Mike Frysinger Commit-Ready: Bernie Thompson Reviewed-by: Bernie Thompson Tested-by: Bernie Thompson --- .../portage-stable/app-text/dos2unix/Manifest | 1 + .../app-text/dos2unix/dos2unix-5.3.1.ebuild | 55 +++++++++++++++++++ .../files/dos2unix-5.2-makefile.patch | 21 +++++++ .../dos2unix-5.3.1-fix_debug_build.patch | 46 ++++++++++++++++ .../md5-cache/app-text/dos2unix-5.3.1 | 13 +++++ 5 files changed, 136 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/app-text/dos2unix/Manifest create mode 100644 sdk_container/src/third_party/portage-stable/app-text/dos2unix/dos2unix-5.3.1.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/app-text/dos2unix/files/dos2unix-5.2-makefile.patch create mode 100644 sdk_container/src/third_party/portage-stable/app-text/dos2unix/files/dos2unix-5.3.1-fix_debug_build.patch create mode 100644 sdk_container/src/third_party/portage-stable/metadata/md5-cache/app-text/dos2unix-5.3.1 diff --git a/sdk_container/src/third_party/portage-stable/app-text/dos2unix/Manifest b/sdk_container/src/third_party/portage-stable/app-text/dos2unix/Manifest new file mode 100644 index 0000000000..2390af50b4 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/dos2unix/Manifest @@ -0,0 +1 @@ +DIST dos2unix-5.3.1.tar.gz 54967 RMD160 2d97a1e57adcc6f2a2d237615f5963a4d4725fcf SHA1 df924653efb1f97f90c1017cb99d66b5e07ffc13 SHA256 21322fd3ab3a542c36ea72072251610b3075ca2ebca7d1500f8e4810f9e0982f diff --git a/sdk_container/src/third_party/portage-stable/app-text/dos2unix/dos2unix-5.3.1.ebuild b/sdk_container/src/third_party/portage-stable/app-text/dos2unix/dos2unix-5.3.1.ebuild new file mode 100644 index 0000000000..50a5c453ae --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/dos2unix/dos2unix-5.3.1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-text/dos2unix/dos2unix-5.3.1.ebuild,v 1.9 2012/03/03 16:02:04 ranger Exp $ + +EAPI=4 + +inherit eutils toolchain-funcs + +DESCRIPTION="Convert DOS or MAC text files to UNIX format or vice versa" +HOMEPAGE="http://www.xs4all.nl/~waterlan/dos2unix.html http://sourceforge.net/projects/dos2unix/" +SRC_URI=" + http://www.xs4all.nl/~waterlan/${PN}/${P}.tar.gz + mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~sparc64-solaris" +IUSE="debug nls" + +RDEPEND=" + !app-text/hd2u + !app-text/unix2dos + virtual/libintl" +DEPEND=" + ${RDEPEND} + dev-lang/perl" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-5.3.1-fix_debug_build.patch + + sed \ + -e '/^LDFLAGS/s|=|+=|' \ + -e '/^CC/s|=|?=|' \ + -e '/CFLAGS_OS \+=/d' \ + -e '/LDFLAGS_EXTRA \+=/d' \ + -e "/^CFLAGS/s|-O2|${CFLAGS}|" \ + -i "${S}"/Makefile || die + tc-export CC + use debug && sed "/DEBUG/s:0:1:g" -i Makefile +} + +lintl() { + # same logic as from virtual/libintl + use !elibc_glibc && use !elibc_uclibc && echo "-lintl" +} + +src_compile() { + emake prefix="${EPREFIX}/usr" \ + $(use nls && echo "LDFLAGS_EXTRA=$(lintl)" || echo "ENABLE_NLS=") +} + +src_install() { + emake DESTDIR="${D}" prefix="${EPREFIX}/usr" \ + $(use nls || echo "ENABLE_NLS=") install +} diff --git a/sdk_container/src/third_party/portage-stable/app-text/dos2unix/files/dos2unix-5.2-makefile.patch b/sdk_container/src/third_party/portage-stable/app-text/dos2unix/files/dos2unix-5.2-makefile.patch new file mode 100644 index 0000000000..a3dbe2a92c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/dos2unix/files/dos2unix-5.2-makefile.patch @@ -0,0 +1,21 @@ +--- dos2unix-5.2/Makefile ++++ dos2unix-5.2/Makefile +@@ -77,7 +77,7 @@ + MOFILES = $(DOS2UNIX_MOFILES) $(UNIX2DOS_MOFILES) + endif + +-DOCFILES = $(PACKAGE).txt $(PACKAGE).ps $(PACKAGE).pdf $(PACKAGE).htm ++DOCFILES = $(PACKAGE).txt $(PACKAGE).ps $(PACKAGE).htm + INSTALL_OBJS_DOC = README.txt NEWS.txt ChangeLog.txt COPYING.txt TODO.txt BUGS.txt $(DOCFILES) + + #PODFILES = man/man1/dos2unix.pod $(wildcard man/*/man1/dos2unix.pod) +@@ -246,9 +246,6 @@ + %.ps : man/man1/%.1 + groff -man $< -T ps > $@ + +-%.pdf: %.ps +- ps2pdf $< $@ +- + %.htm : man/man1/%.pod + pod2html --title="$(PACKAGE) $(DOS2UNIX_VERSION) - DOS/MAC to UNIX and vice versa text file format converter" $< > $@ + diff --git a/sdk_container/src/third_party/portage-stable/app-text/dos2unix/files/dos2unix-5.3.1-fix_debug_build.patch b/sdk_container/src/third_party/portage-stable/app-text/dos2unix/files/dos2unix-5.3.1-fix_debug_build.patch new file mode 100644 index 0000000000..32e3caa66a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-text/dos2unix/files/dos2unix-5.3.1-fix_debug_build.patch @@ -0,0 +1,46 @@ +--- dos2unix-5.3.1/dos2unix.c ++++ dos2unix-5.3.1/dos2unix.c +@@ -60,8 +60,6 @@ + */ + + +-#define VER_AUTHOR "Erwin Waterlander" +- + /* #define DEBUG 1 */ + + #include "common.h" +--- dos2unix-5.3.1/Makefile ++++ dos2unix-5.3.1/Makefile +@@ -194,9 +194,14 @@ + + EXTRA_CFLAGS = -DVER_REVISION=\"$(DOS2UNIX_VERSION)\" \ + -DVER_DATE=\"$(DOS2UNIX_DATE)\" \ ++ -DVER_AUTHOR=\"$(DOS2UNIX_AUTHOR)\" \ + -DDEBUG=$(DEBUG) \ + $(CFLAGS_OS) + ++ifeq ($(DEBUG), 1) ++ EXTRA_CFLAGS += -g ++endif ++ + ifdef STATIC + EXTRA_CFLAGS += -static + endif +--- dos2unix-5.3.1/unix2dos.c ++++ dos2unix-5.3.1/unix2dos.c +@@ -50,8 +50,6 @@ + */ + + +-#define VER_AUTHOR "Erwin Waterlander" +- + /* #define DEBUG 1 */ + + #include "common.h" +--- dos2unix-5.3.1/version.mk ++++ dos2unix-5.3.1/version.mk +@@ -1,3 +1,4 @@ + DOS2UNIX_VERSION = 5.3.1 + DOS2UNIX_VERSION_SHORT = 531 + DOS2UNIX_DATE = 2011-08-09 ++DOS2UNIX_AUTHOR = 'Erwin Waterlander' diff --git a/sdk_container/src/third_party/portage-stable/metadata/md5-cache/app-text/dos2unix-5.3.1 b/sdk_container/src/third_party/portage-stable/metadata/md5-cache/app-text/dos2unix-5.3.1 new file mode 100644 index 0000000000..f5a9038fd1 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/metadata/md5-cache/app-text/dos2unix-5.3.1 @@ -0,0 +1,13 @@ +DEFINED_PHASES=compile install prepare +DEPEND=!app-text/hd2u !app-text/unix2dos virtual/libintl dev-lang/perl +DESCRIPTION=Convert DOS or MAC text files to UNIX format or vice versa +EAPI=4 +HOMEPAGE=http://www.xs4all.nl/~waterlan/dos2unix.html http://sourceforge.net/projects/dos2unix/ +IUSE=debug nls +KEYWORDS=alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~sparc64-solaris +LICENSE=BSD-2 +RDEPEND=!app-text/hd2u !app-text/unix2dos virtual/libintl +SLOT=0 +SRC_URI=http://www.xs4all.nl/~waterlan/dos2unix/dos2unix-5.3.1.tar.gz mirror://sourceforge/dos2unix/dos2unix-5.3.1.tar.gz +_eclasses_=eutils 33ef77a15337022e05342d2c772a7a5a multilib 5f4ad6cf85e365e8f0c6050ddd21659e portability 0be430f759a631e692678ed796e09f5c toolchain-funcs 6526ac6fc9aedf391efb91fcd75ace68 user 9e552f935106ff0bc92af16da64b4b29 +_md5_=9e833e2549e1ef6349e1e596e81179ac