vdr-plugin-2.eclass: ls: cannot access /.../po : No such file or directory fixed
authorJoerg Bornkessel <hd_brummy@gentoo.org>
Thu, 23 Jan 2020 17:56:59 +0000 (18:56 +0100)
committerJoerg Bornkessel <hd_brummy@gentoo.org>
Thu, 23 Jan 2020 18:02:26 +0000 (19:02 +0100)
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 <hd_brummy@gentoo.org>
eclass/vdr-plugin-2.eclass

index 5a0792efe933c9d48f0f75526eb71172b7e5140f..67ccb1e6ab11eb72a8a0b60209820f6f89e4e37a 100644 (file)
@@ -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
@@ -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}" \
@@ -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} )
@@ -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 \
@@ -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