Skip to content

Commit

Permalink
vdr-plugin-2.eclass: ls: cannot access /.../po : No such file or dire…
Browse files Browse the repository at this point in the history
…ctory fixed

portage complain about this behavior on old media-plugins/vdr-*
they are not converted to gettext language handling.
the small fix will detect and surpress this messsage.
add detailed description for this helper function.
whitespace

Closes:
Signed-off-by: Joerg Bornkessel <[email protected]>
  • Loading branch information
hd-brummy committed Jan 23, 2020
1 parent 1dde58f commit 715ab2b
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions eclass/vdr-plugin-2.eclass
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 1999-2019 Gentoo Authors
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# @ECLASS: vdr-plugin-2.eclass
Expand Down Expand Up @@ -176,7 +176,7 @@ vdr_create_header_checksum_file() {
}

fix_vdr_libsi_include() {
eqawarn "Fixing include of libsi-headers"
eqawarn "Fixing include of libsi-headers"
local f
for f; do
sed -i "${f}" \
Expand Down Expand Up @@ -250,7 +250,8 @@ vdr_gettext_missing() {
}

vdr_detect_po_dir() {
# helper function
# helper function to find the
# DIR ${S}/po or DIR ${S]/_subdir_/po

[[ -f po ]] && local po_dir="${S}"
local po_subdir=( ${S}/${PO_SUBDIR} )
Expand All @@ -270,7 +271,9 @@ vdr_linguas_support() {
vdr_detect_po_dir

for f in ${pofile_dir[*]}; do
PLUGIN_LINGUAS=$( ls ${f}/po --ignore="*.pot" | sed -e "s:.po::g" | cut -d_ -f1 | tr \\\012 ' ' )
if [[ -d ${f}/po ]]; then
PLUGIN_LINGUAS=$( ls ${f}/po --ignore="*.pot" | sed -e "s:.po::g" | cut -d_ -f1 | tr \\\012 ' ' )
fi
einfo "LINGUAS=\"${PLUGIN_LINGUAS}\""

sed -i ${f}/Makefile \
Expand All @@ -282,7 +285,7 @@ vdr_linguas_support() {
}

vdr_i18n() {
# i18n handling was deprecated since >=media-video/vdr-1.5.9,
# i18n handling was deprecated since >=media-video/vdr-1.5.9,
# finally with >=media-video/vdr-1.7.27 it has been dropped entirely and some
# plugins will fail to compile because they're still using the old variant.
# Simply remove the i18n.o object from Makefile (OBJECT) and
Expand Down

0 comments on commit 715ab2b

Please sign in to comment.