commit:     081c84efa6a66f26972ca7f416dcdce255f51e16
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Mon Mar  9 06:32:36 2026 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Mon Mar  9 06:39:19 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=081c84ef

app-text/dos2unix: add 7.5.4

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 app-text/dos2unix/Manifest              |  1 +
 app-text/dos2unix/dos2unix-7.5.4.ebuild | 90 +++++++++++++++++++++++++++++++++
 2 files changed, 91 insertions(+)

diff --git a/app-text/dos2unix/Manifest b/app-text/dos2unix/Manifest
index 700cf89e9149..f186f3f0e675 100644
--- a/app-text/dos2unix/Manifest
+++ b/app-text/dos2unix/Manifest
@@ -1,2 +1,3 @@
 DIST dos2unix-7.5.2.tar.gz 991485 BLAKE2B 
2d88e88960d5deb6531b6eb52f646d0c8f40c361800e2f26632577e9187999599752d30b0c7e4e1f18c0127578311b8be6910e54535c333e092c3ebb70329173
 SHA512 
d76d799435dd248850f72cc50af2144a51e99f04ea83a1447c4edd828625c83f0afba367da51aa83defced4cbf34f3b75387a0821010f7b212225571036efbb2
 DIST dos2unix-7.5.3.tar.gz 955879 BLAKE2B 
22dc8b2a186b0424965edc779eaf2afc246cadf19d73f0b98deea2ecaedf9d0a16de6a34691316035d631a035b39ddef0f2f8223fddf96da651fd363ed49c88f
 SHA512 
c586a3c8b3e800a58cfa66ec9f4f6ea5b2c5d3c5dbcc9e4f22798ddb89d2f29f1eba1b8102fd948be0b978b517b25a9f5f469eda215116a31170f223d46f3394
+DIST dos2unix-7.5.4.tar.gz 956209 BLAKE2B 
5bfd87213521602af7cb0a0bd1809b7920fb08b85c64423ec59e740be7fe249049dd8fdef055fc168b256a720d3044dd643c9c25993bfee73c05730ab956d622
 SHA512 
f1e02c6c7504a995ac2b6d6a1f68133d56a68ea421831c0d7a67d5023d96f28f23d6cf40caee6a5238934e002c1fa3b52dc16b60eceeeb0a8cbc469e0adbe4bf

diff --git a/app-text/dos2unix/dos2unix-7.5.4.ebuild 
b/app-text/dos2unix/dos2unix-7.5.4.ebuild
new file mode 100644
index 000000000000..f5251b9052b9
--- /dev/null
+++ b/app-text/dos2unix/dos2unix-7.5.4.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=9
+
+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
+       https://downloads.sourceforge.net/${PN}/${P/_/-}.tar.gz
+"
+S=${WORKDIR}/${P/_/-}
+
+LICENSE="BSD-2"
+SLOT="0"
+[[ "${PV}" == *_beta* ]] || \
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv 
~s390 ~sparc ~x86 ~x64-macos"
+IUSE="debug nls test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       !app-text/hd2u
+       virtual/libintl
+"
+DEPEND="
+       ${RDEPEND}
+       test? ( virtual/perl-Test-Simple )
+"
+BDEPEND="
+       dev-lang/perl
+       nls? ( sys-devel/gettext )
+       test? ( elibc_musl? ( sys-apps/musl-locales ) )
+"
+
+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
+}

Reply via email to