From 0a9c4559799732aedba522e943262460772084f3 Mon Sep 17 00:00:00 2001 From: Neal Becker Date: Oct 06 2010 12:39:14 +0000 Subject: add patch mercurial-i18n.patch for locale --- diff --git a/mercurial-i18n.patch b/mercurial-i18n.patch new file mode 100644 index 0000000..b99beb8 --- /dev/null +++ b/mercurial-i18n.patch @@ -0,0 +1,19 @@ +*** /tmp/ediff2864wKI 2010-10-06 08:30:42.639138469 -0400 +--- mercurial/i18n.py 2010-10-06 08:29:26.720138409 -0400 +*************** +*** 15,21 **** + module = __file__ + + base = os.path.dirname(module) +! for dir in ('.', '..'): + localedir = os.path.join(base, dir, 'locale') + if os.path.isdir(localedir): + break +--- 15,21 ---- + module = __file__ + + base = os.path.dirname(module) +! for dir in ('.', '..', '/usr/share'): + localedir = os.path.join(base, dir, 'locale') + if os.path.isdir(localedir): + break diff --git a/mercurial.spec b/mercurial.spec index eaaaa10..2bc9ed6 100644 --- a/mercurial.spec +++ b/mercurial.spec @@ -9,8 +9,7 @@ Group: Development/Tools URL: http://www.selenic.com/mercurial/ Source0: http://www.selenic.com/mercurial/release/%{name}-%{version}.tar.gz Source1: mercurial-site-start.el -# temporary fix for filemerge bug -#Patch0: mercurial-mergetools.hgrc.patch +Patch0: mercurial-i18n.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: python python-devel BuildRequires: emacs emacs-el pkgconfig gettext @@ -77,7 +76,7 @@ documentation. %prep %setup -q -#%patch0 -p1 +%patch0 -p0 %build make all @@ -130,6 +129,8 @@ install -m 644 hgk.rc $RPM_BUILD_ROOT/%{_sysconfdir}/mercurial/hgrc.d install -m 644 contrib/mergetools.hgrc $RPM_BUILD_ROOT%{_sysconfdir}/mercurial/hgrc.d/mergetools.rc mv $RPM_BUILD_ROOT%{python_sitearch}/mercurial/locale $RPM_BUILD_ROOT%{_datadir}/locale +rm -rf $RPM_BUILD_ROOT%{python_sitearch}/mercurial/locale + %find_lang hg