This commit is contained in:
parent
c573fe9cd8
commit
6d068daeb9
38
joe-3.5-fix_locale.patch
Normal file
38
joe-3.5-fix_locale.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
--- utf8.c
|
||||||
|
+++ utf8.c
|
||||||
|
@@ -340,10 +340,24 @@ struct charmap *locale_map;
|
||||||
|
struct charmap *locale_map_non_utf8;
|
||||||
|
/* Old, non-utf8 version of locale */
|
||||||
|
|
||||||
|
+static void get_language(void)
|
||||||
|
+{
|
||||||
|
+ char *s;
|
||||||
|
+ if((s = getenv("LC_ALL")) == NULL)
|
||||||
|
+ if((s = getenv("LC_MESSAGES")) == NULL)
|
||||||
|
+ s = getenv("LANG");
|
||||||
|
+
|
||||||
|
+ s = (s != NULL) ? zdup(s) : USTR "ascii";
|
||||||
|
+ locale_lang = s;
|
||||||
|
+ return;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
void joe_locale()
|
||||||
|
{
|
||||||
|
unsigned char *s, *t, *u;
|
||||||
|
|
||||||
|
+ get_language();
|
||||||
|
+
|
||||||
|
s=(unsigned char *)getenv("LC_ALL");
|
||||||
|
if (!s) {
|
||||||
|
s=(unsigned char *)getenv("LC_CTYPE");
|
||||||
|
@@ -362,8 +376,6 @@ void joe_locale()
|
||||||
|
if ((t=zrchr(s,'.')))
|
||||||
|
*t = 0;
|
||||||
|
|
||||||
|
- locale_lang = s;
|
||||||
|
-
|
||||||
|
#ifdef HAVE_SETLOCALE
|
||||||
|
setlocale(LC_ALL,(char *)s);
|
||||||
|
non_utf8_codeset = zdup((unsigned char *)nl_langinfo(CODESET));
|
||||||
|
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Jun 23 20:39:15 CEST 2007 - pth@suse.de
|
||||||
|
|
||||||
|
- Add a germen translation by Jan Engelhardt that doesn't break hotkeys.
|
||||||
|
- Patch by Jan Engelhardt to fix handling of locale categories.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Apr 2 09:36:05 CEST 2007 - cthiel@suse.de
|
Mon Apr 2 09:36:05 CEST 2007 - cthiel@suse.de
|
||||||
|
|
||||||
|
11
joe.spec
11
joe.spec
@ -16,15 +16,17 @@ License: GNU General Public License (GPL)
|
|||||||
Group: Productivity/Editors/Other
|
Group: Productivity/Editors/Other
|
||||||
Autoreqprov: on
|
Autoreqprov: on
|
||||||
Version: 3.5
|
Version: 3.5
|
||||||
Release: 31
|
Release: 47
|
||||||
Summary: A Text Editor
|
Summary: A Text Editor
|
||||||
URL: http://sourceforge.net/projects/joe-editor
|
URL: http://sourceforge.net/projects/joe-editor
|
||||||
Source: joe-%{version}.tar.bz2
|
Source: joe-%{version}.tar.bz2
|
||||||
Source1: spec.jsf
|
Source1: spec.jsf
|
||||||
|
Source2: de.po
|
||||||
Patch: joe-3.1.patch
|
Patch: joe-3.1.patch
|
||||||
Patch1: joe-3.0-rc.patch
|
Patch1: joe-3.0-rc.patch
|
||||||
Patch2: joe-3.1-ia64.patch
|
Patch2: joe-3.1-ia64.patch
|
||||||
Patch3: joe-3.3-warnings.patch
|
Patch3: joe-3.3-warnings.patch
|
||||||
|
Patch4: joe-3.5-fix_locale.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -62,11 +64,13 @@ Authors:
|
|||||||
Marek 'Marx' Grac <xgrac@fi.muni.cz>
|
Marek 'Marx' Grac <xgrac@fi.muni.cz>
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup
|
%setup -q
|
||||||
%patch
|
%patch
|
||||||
%patch1
|
%patch1
|
||||||
%patch2
|
%patch2
|
||||||
%patch3
|
%patch3
|
||||||
|
%patch4
|
||||||
|
cp %{S:2} po/
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wall -W -Wno-unused"
|
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wall -W -Wno-unused"
|
||||||
@ -101,6 +105,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Jun 23 2007 - pth@suse.de
|
||||||
|
- Add a germen translation by Jan Engelhardt that doesn't break hotkeys.
|
||||||
|
- Patch by Jan Engelhardt to fix handling of locale categories.
|
||||||
* Mon Apr 02 2007 - cthiel@suse.de
|
* Mon Apr 02 2007 - cthiel@suse.de
|
||||||
- added BuildRequires: ncurses-devel
|
- added BuildRequires: ncurses-devel
|
||||||
* Sat Jul 22 2006 - cthiel@suse.de
|
* Sat Jul 22 2006 - cthiel@suse.de
|
||||||
|
Loading…
Reference in New Issue
Block a user