Skip to content

Commit

Permalink
sys-fs/xfsdump: respect user $LINGUAS #561664
Browse files Browse the repository at this point in the history
  • Loading branch information
vapier committed Apr 8, 2016
1 parent 32b41cf commit 66fdb77
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
32 changes: 32 additions & 0 deletions sys-fs/xfsdump/files/xfsdump-3.1.6-linguas.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From e12813b9d0883e02cc121ea503f4bff5fb67e9ef Mon Sep 17 00:00:00 2001
From: Mike Frysinger <[email protected]>
Date: Fri, 8 Apr 2016 16:41:31 -0400
Subject: [PATCH xfsdump] po: respect LINGUAS build setting

It is common gettext practice to limit the translations a particular
package will include by setting the LINGUAS environment variable.

Signed-off-by: Mike Frysinger <[email protected]>
---
po/Makefile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/po/Makefile b/po/Makefile
index 6d40324..48a19c1 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -6,7 +6,10 @@ TOPDIR = ..
include $(TOPDIR)/include/builddefs

POTHEAD = $(PKG_NAME).pot
-LINGUAS = de pl
+# If the user has requested a specific set of translations, only build those.
+SUPPORTED_LINGUAS = $(patsubst %.po,%,$(wildcard *.po))
+LINGUAS ?= $(SUPPORTED_LINGUAS)
+LINGUAS := $(filter $(SUPPORTED_LINGUAS),$(LINGUAS))
LSRCFILES = $(LINGUAS:%=%.po)
LDIRT = $(POTHEAD)

--
2.7.4

1 change: 1 addition & 0 deletions sys-fs/xfsdump/xfsdump-3.1.6.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ src_prepare() {
|| die
epatch "${FILESDIR}"/${PN}-3.0.5-prompt-overflow.patch #335115
epatch "${FILESDIR}"/${PN}-3.0.4-no-symlink.patch #311881
epatch "${FILESDIR}"/${PN}-3.1.6-linguas.patch #561664
}

src_configure() {
Expand Down

0 comments on commit 66fdb77

Please sign in to comment.