1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 inherit eutils toolchain-funcs flag-o-matic multilib prefix
7 DESCRIPTION="Return the canonicalized absolute pathname"
8 HOMEPAGE="http://packages.debian.org/unstable/utils/realpath"
10 mirror://debian/pool/main/r/${PN}/${PN}_${PV}.tar.gz
11 nls? ( mirror://debian/pool/main/r/${PN}/${PN}_${PV}_i386.deb )"
15 KEYWORDS="~alpha amd64 arm hppa ~ia64 m68k ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
18 RDEPEND="!sys-freebsd/freebsd-bin
19 nls? ( virtual/libintl )"
21 nls? ( sys-devel/gettext )
22 elibc_mintlib? ( virtual/libiconv )"
25 unpack ${PN}_${PV}.tar.gz
28 # Unpack the .deb file, in order to get the preprocessed man page
29 # translations. This way we avoid a dependency on app-text/po4a.
32 unpack ${PN}_${PV}_i386.deb
38 use nls || epatch "${FILESDIR}"/${PN}-1.16-nonls.patch
39 epatch "${FILESDIR}"/${PN}-1.17-build.patch
40 epatch "${FILESDIR}"/${PN}-1.14-no-po4a.patch
41 epatch "${FILESDIR}"/${PN}-1.15-prefix.patch
47 use nls && use !elibc_glibc && append-libs -lintl
48 [[ ${CHOST} == *-mint* ]] && append-libs "-liconv"
51 for subdir in src man $(usex nls po ''); do
52 emake MAKE_VERBOSE=yes VERSION="${PV}" -C ${subdir}
57 emake VERSION="${PV}" SUBDIRS="src man $(usex nls po '')" \
58 DESTDIR="${D}" install
59 newdoc debian/changelog ChangeLog.debian
63 for dir in "${WORKDIR}"/deb/usr/share/man/*; do
64 [ -f "${dir}"/man1/realpath.1 ] || continue
65 newman "${dir}"/man1/realpath.1 realpath.${dir##*/}.1