summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-08-31 06:14:21 +0100
committerSam James <sam@gentoo.org>2023-08-31 06:26:29 +0100
commit4a963ead17c5cc864e06d131687a7be5ae6012aa (patch)
tree10c338d6e9daab87e6fb2c5678b99b37a3625cdd /app-text/dos2unix
parentnet-vpn/tor: add 0.4.8.5 (diff)
downloadgentoo-4a963ead17c5cc864e06d131687a7be5ae6012aa.tar.gz
gentoo-4a963ead17c5cc864e06d131687a7be5ae6012aa.tar.bz2
gentoo-4a963ead17c5cc864e06d131687a7be5ae6012aa.zip
app-text/dos2unix: add 7.5.1
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-text/dos2unix')
-rw-r--r--app-text/dos2unix/Manifest1
-rw-r--r--app-text/dos2unix/dos2unix-7.5.1.ebuild90
2 files changed, 91 insertions, 0 deletions
diff --git a/app-text/dos2unix/Manifest b/app-text/dos2unix/Manifest
index d9806ba221af..c3777c9a88a1 100644
--- a/app-text/dos2unix/Manifest
+++ b/app-text/dos2unix/Manifest
@@ -1 +1,2 @@
DIST dos2unix-7.5.0.tar.gz 957576 BLAKE2B 5a674d61c9f911a2cb9c20c363fdc0e0affd3b6f26531d37a231aedb5e6a7428116b139d4af12ee32f4107f78ea079fb7a8d008c9630375f4afbc2afa0afb39f SHA512 914cbc3255045b1b87ad702c70844b059f9435ccfe636dc67514f092090b86a9f271789fcde28a9ead4d94a869fb92e334aa115d3cfe24133338260ad2233763
+DIST dos2unix-7.5.1.tar.gz 959228 BLAKE2B 4f4a334a295b702d0540e58a0a86dcf091583d6c2b64f6de9bea883dfe0d70bfa05e8e5b9c8fb867bfd5e66b2eba562da1ca45c60f97bac67bdb275d66de0fe0 SHA512 733d163fff4effdf8acb382abec9bcd23f594fa17502e9dde2f24d3326aeb7653eee353bef812090ab8dc055136d236b40c2f778deea4ac026c2eed471e763b5
diff --git a/app-text/dos2unix/dos2unix-7.5.1.ebuild b/app-text/dos2unix/dos2unix-7.5.1.ebuild
new file mode 100644
index 000000000000..747b4bdd6b6f
--- /dev/null
+++ b/app-text/dos2unix/dos2unix-7.5.1.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PLOCALES="ca da de eo es fr fur hu ja ka ko nb nl pl pt_BR ro ru sr sv uk vi zh_CN zh_TW"
+
+inherit plocale toolchain-funcs
+
+DESCRIPTION="Convert DOS or MAC text files to UNIX format or vice versa"
+HOMEPAGE="https://www.xs4all.nl/~waterlan/dos2unix.html https://sourceforge.net/projects/dos2unix/"
+SRC_URI="
+ https://www.xs4all.nl/~waterlan/${PN}/${P/_/-}.tar.gz
+ mirror://sourceforge/${PN}/${P/_/-}.tar.gz
+"
+S="${WORKDIR}/${P/_/-}"
+
+LICENSE="BSD-2"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || \
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+IUSE="debug nls test"
+
+RDEPEND="
+ !app-text/hd2u
+ virtual/libintl"
+
+DEPEND="
+ ${RDEPEND}
+ test? ( virtual/perl-Test-Simple )
+"
+BDEPEND="
+ dev-lang/perl
+ nls? ( sys-devel/gettext )
+"
+
+RESTRICT="!test? ( test )"
+
+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; }
+ plocale_for_each_disabled_locale 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_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
+}