Prevent mingw-find-lang.sh from clobbering previous find-lang results
This commit is contained in:
parent
404594a9fc
commit
846156c1bd
@ -9,7 +9,7 @@
|
|||||||
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
|
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
|
||||||
|
|
||||||
Name: mingw-filesystem
|
Name: mingw-filesystem
|
||||||
Version: 142
|
Version: 143
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: MinGW cross compiler base filesystem and environment
|
Summary: MinGW cross compiler base filesystem and environment
|
||||||
|
|
||||||
@ -376,6 +376,9 @@ echo ".so man1/pkgconf.1" > %{buildroot}%{_mandir}/man1/x86_64-w64-mingw32ucrt-p
|
|||||||
%dir %{_prefix}/lib/debug/%{_prefix}/x86_64-w64-mingw32ucrt
|
%dir %{_prefix}/lib/debug/%{_prefix}/x86_64-w64-mingw32ucrt
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Dec 09 2022 Sandro Mani <manisandro@gmail.com> - 143-1
|
||||||
|
- Prevent mingw-find-lang.sh from clobbering previous find-lang results
|
||||||
|
|
||||||
* Tue Oct 18 2022 Sandro Mani <manisandro@gmail.com> - 142-1
|
* Tue Oct 18 2022 Sandro Mani <manisandro@gmail.com> - 142-1
|
||||||
- Require mingw-binutils-generic
|
- Require mingw-binutils-generic
|
||||||
|
|
||||||
|
@ -2,16 +2,22 @@
|
|||||||
|
|
||||||
# Wrapper for the %find_lang macro which splits out the various translations in per-target lists
|
# Wrapper for the %find_lang macro which splits out the various translations in per-target lists
|
||||||
|
|
||||||
|
PACKAGE_NAME=$2
|
||||||
|
|
||||||
|
# If previous result from native find-lang exists, filter mingw entries and move it out of the way
|
||||||
|
test -f ${PACKAGE_NAME}.lang && grep -v mingw32 ${PACKAGE_NAME}.lang > ${PACKAGE_NAME}-native.lang
|
||||||
|
|
||||||
/usr/lib/rpm/find-lang.sh $*
|
/usr/lib/rpm/find-lang.sh $*
|
||||||
|
|
||||||
if test $? != 0 ; then
|
if test $? != 0 ; then
|
||||||
|
test -f ${PACKAGE_NAME}-native.lang && mv ${PACKAGE_NAME}-native.lang ${PACKAGE_NAME}.lang
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PACKAGE_NAME=$2
|
|
||||||
targets=`rpm --eval '%{mingw_build_targets}'`
|
targets=`rpm --eval '%{mingw_build_targets}'`
|
||||||
for target in $targets; do
|
for target in $targets; do
|
||||||
prefix=`rpm --eval "%{${target}_prefix}"`
|
prefix=`rpm --eval "%{${target}_prefix}"`
|
||||||
cat $2.lang | grep "$prefix" > ${target}-$PACKAGE_NAME.lang
|
cat ${PACKAGE_NAME}.lang | grep "$prefix" > ${target}-$PACKAGE_NAME.lang
|
||||||
done
|
done
|
||||||
|
|
||||||
exit 0
|
test -f ${PACKAGE_NAME}-native.lang && mv ${PACKAGE_NAME}-native.lang ${PACKAGE_NAME}.lang
|
||||||
|
Loading…
Reference in New Issue
Block a user