Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 9988 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-1 / +32 lines)
Line  Link Here
0
-- ebuild.sh.orig
0
++ ebuild.sh
Lines 960-965 Link Here
960
	export PWORKDIR="$WORKDIR"
960
	export PWORKDIR="$WORKDIR"
961
	src_install
961
	src_install
962
	#|| abort_install "fail"
962
	#|| abort_install "fail"
963
	remove_language_files
963
	prepall
964
	prepall
964
	cd "${D}"
965
	cd "${D}"
965
966
Lines 1460-1465 Link Here
1460
	PATH="${stripped_path}"
1461
	PATH="${stripped_path}"
1461
}
1462
}
1462
1463
1464
remove_language_files() {
1465
	local keepdir
1466
1467
	if useq !nls; then
1468
		LINGUAS=en
1469
	elif [[ -z "${LINGUAS}" ]]; then
1470
		return
1471
	fi
1472
	echo ">>> Removing unwanted language files"
1473
1474
	save_IFS
1475
	IFS=':'
1476
	for langparentdir in ${MANPATH} /usr/share/locale; do
1477
		IFS=$' \t\n'
1478
		if pushd "${D}/${langparentdir}" >/dev/null 2>&1; then
1479
			for langdir in */; do
1480
				keepdir=0
1481
				for lang in ${LINGUAS} man*; do
1482
					[[ "${langdir#${lang}[_/]}" != "${langdir}" ]] &&
1483
						keepdir=1
1484
				done
1485
				[[ $keepdir == 0 ]] &&
1486
					rm -fr $langdir
1487
			done
1488
			popd >/dev/null 2>&1
1489
		fi
1490
	done
1491
	restore_IFS
1492
}
1493
1463
# === === === === === === === === === === === === === === === === === ===
1494
# === === === === === === === === === === === === === === === === === ===
1464
# === === === === === functions end, main part begins === === === === ===
1495
# === === === === === functions end, main part begins === === === === ===
1465
# === === === === === functions end, main part begins === === === === ===
1496
# === === === === === functions end, main part begins === === === === ===

Return to bug 9988