forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
app-text/dos2unix: Bump to version 7.3.5
Package-Manager: Portage-2.3.6, Repoman-2.3.2
- Loading branch information
Lars Wendler
committed
Jul 5, 2017
1 parent
80ef2a1
commit 49f8120
Showing
2 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
DIST dos2unix-7.3.4.tar.gz 640991 SHA256 8ccda7bbc5a2f903dafd95900abb5bf5e77a769b572ef25150fde4056c5f30c5 SHA512 29958a2c702acc112b10f3fcb43fbff3b860c6d1f725c153af9a52dc20736755604f77bec37299dc88923a9e9b2ad73b994e9bc6f42f2757fe1819dd9873d710 WHIRLPOOL 46c771c63572d0d0301db5bde4734297df037654cbc71e5a8f93003fbf503399ec5026bc53fea3b3b10e346e2b59d24bdcd6d9139342354cdb1b8a6e240deaeb | ||
DIST dos2unix-7.3.5.tar.gz 662133 SHA256 a72caa2fb5cb739403315472fe522eda41aabab2a02ad6f5589639330af262e5 SHA512 beafefa715d894ec51bd808b18485bcf413f93b888203486e659f7e30b922b32b2f1da2305ef9ae85e54085ba3819bd512957bb872b529fe4728000cec7d3e58 WHIRLPOOL e1cda793c7e9a2b0f0000c61f5c4b9a48db37d41020af14e253b838768e81b0e94ea7a0666be712f79f89b05e5a6f72a1bf8516a01822f5da39062cc0bedf01f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# Copyright 1999-2017 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=6 | ||
|
||
PLOCALES="da de eo es fr hu ja nb nl pl pt_BR ru sr sv uk vi zh_CN zh_TW" | ||
|
||
inherit l10n toolchain-funcs | ||
|
||
DESCRIPTION="Convert DOS or MAC text files to UNIX format or vice versa" | ||
HOMEPAGE="http://www.xs4all.nl/~waterlan/dos2unix.html https://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 test" | ||
|
||
RDEPEND=" | ||
!app-text/hd2u | ||
virtual/libintl" | ||
|
||
DEPEND=" | ||
${RDEPEND} | ||
nls? ( sys-devel/gettext ) | ||
test? ( virtual/perl-Test-Simple ) | ||
dev-lang/perl" | ||
|
||
handle_locales() { | ||
# Make sure locale list is kept up-to-date. | ||
local detected sorted | ||
detected=$(echo $(printf '%s\n' */*.po | sed -e 's:.*/::' -e 's:.po$::' | sort -u)) | ||
sorted=$(echo $(printf '%s\n' ${PLOCALES} | sort -u)) | ||
if [[ ${sorted} != "${detected}" ]] ; then | ||
eerror "The ebuild needs to be kept in sync." | ||
eerror "PLOCALES: ${sorted}" | ||
eerror "po*/*.po: ${detected}" | ||
die "sync PLOCALES" | ||
fi | ||
|
||
# Deal with selective install of locales. | ||
rm_loc() { rm po*/$1.po || die; } | ||
l10n_for_each_disabled_locale_do rm_loc | ||
} | ||
|
||
src_prepare() { | ||
default | ||
|
||
handle_locales | ||
|
||
sed \ | ||
-e '/^LDFLAGS/s|=|+=|' \ | ||
-e '/CFLAGS_OS \+=/d' \ | ||
-e '/LDFLAGS_EXTRA \+=/d' \ | ||
-e "/^CFLAGS/s|-O2|${CFLAGS}|" \ | ||
-i Makefile || die | ||
|
||
if use debug ; then | ||
sed -e "/^DEBUG/s:0:1:" \ | ||
-e "/EXTRA_CFLAGS +=/s:-g::" \ | ||
-i Makefile || die | ||
fi | ||
|
||
tc-export CC | ||
} | ||
|
||
lintl() { | ||
# same logic as from virtual/libintl | ||
use !elibc_glibc && use !elibc_uclibc && use !elibc_musl && echo "-lintl" | ||
} | ||
|
||
src_compile() { | ||
emake prefix="${EPREFIX}/usr" \ | ||
$(usex nls "LDFLAGS_EXTRA=$(lintl)" "ENABLE_NLS=") | ||
} | ||
|
||
src_install() { | ||
emake DESTDIR="${D}" prefix="${EPREFIX}/usr" \ | ||
$(usex nls "" "ENABLE_NLS=") install | ||
} |