OBS User unknown 2009-03-24 19:47:02 +00:00 committed by Git OBS Bridge
parent c497ba2899
commit ca3648a036
6 changed files with 200 additions and 71 deletions

86
menus-always-utf8.patch Normal file
View File

@ -0,0 +1,86 @@
diff -ru xemacs-21.5.28.20080401.orig//lwlib/xlwmenu.c xemacs-21.5.28.20080401/lwlib/xlwmenu.c
--- xemacs-21.5.28.20080401.orig//lwlib/xlwmenu.c 2008-04-01 19:40:35.000000000 +0200
+++ xemacs-21.5.28.20080401/lwlib/xlwmenu.c 2009-01-21 18:01:16.000000000 +0100
@@ -332,12 +332,12 @@
#else
# ifdef USE_XFONTSET
XRectangle ri, rl;
- XmbTextExtents (mw->menu.font_set, s, strlen (s), &ri, &rl);
+ Xutf8TextExtents (mw->menu.font_set, s, strlen (s), &ri, &rl);
return rl.width;
# else
#ifdef USE_XFT_MENUBARS
XGlyphInfo glyphinfo;
- XftTextExtents8 (XtDisplay (mw), mw->menu.renderFont, (FcChar8 *) s,
+ XftTextExtentsUtf8 (XtDisplay (mw), mw->menu.renderFont, (FcChar8 *) s,
strlen (s), &glyphinfo);
return glyphinfo.xOff;
#else
@@ -424,11 +424,11 @@
return width;
#else
# ifdef USE_XFONTSET
- XmbTextExtents (mw->menu.font_set, newchars, j, &ri, &rl);
+ Xutf8TextExtents (mw->menu.font_set, newchars, j, &ri, &rl);
return rl.width;
# else /* ! USE_XFONTSET */
#ifdef USE_XFT_MENUBARS
- XftTextExtents8 (XtDisplay (mw), mw->menu.renderFont, (FcChar8 *) newchars,
+ XftTextExtentsUtf8 (XtDisplay (mw), mw->menu.renderFont, (FcChar8 *) newchars,
j, &glyphinfo);
return glyphinfo.xOff;
#else
@@ -758,7 +758,7 @@
{
static XGlyphInfo glyphinfo;
- XftTextExtents8 (dpy,
+ XftTextExtentsUtf8 (dpy,
xft_font,
(FcChar8 *) run, len, &glyphinfo);
return glyphinfo.xOff;
@@ -805,12 +805,12 @@
x_xft_text_width (display, renderFont, string, strlen (string)),
renderFont->ascent + renderFont->descent); /* XXX */
/* draw text */
- XftDrawString8 (xftDraw, color, renderFont, x, y + mw->menu.font_ascent,
+ XftDrawStringUtf8 (xftDraw, color, renderFont, x, y + mw->menu.font_ascent,
(FcChar8 *) string, strlen (string));
XftDrawDestroy (xftDraw);
# else
# ifdef USE_XFONTSET
- XmbDrawString (XtDisplay (mw), window, mw->menu.font_set, gc,
+ Xutf8DrawString (XtDisplay (mw), window, mw->menu.font_set, gc,
x, y + mw->menu.font_ascent, string, strlen (string));
# else
XDrawString (XtDisplay (mw), window, gc,
@@ -866,10 +866,10 @@
if (end <= start)
return 0;
- XmbDrawString (
+ Xutf8DrawString (
XtDisplay (mw), window, mw->menu.font_set, gc,
x, y + mw->menu.font_ascent, &string[start], end - start);
- XmbTextExtents (
+ Xutf8TextExtents (
mw->menu.font_set, &string[start], end - start, &ri, &rl);
return rl.width;
# else
@@ -892,12 +892,12 @@
renderFont, &string[start], end - start),
renderFont->ascent + renderFont->descent); /* XXX */
/* draw text */
- XftDrawString8 (xftDraw, color, renderFont,
+ XftDrawStringUtf8 (xftDraw, color, renderFont,
x, y + mw->menu.font_ascent,
(FcChar8 *) &string[start], end - start);
- XftTextExtents8 (display, renderFont, (FcChar8 *) &string[start],
- end - start, &glyphinfo);
+ XftTextExtentsUtf8 (display, renderFont, (FcChar8 *) &string[start],
+ end - start, &glyphinfo);
/* #### should use parent frame's .xftDraw */
XftDrawDestroy (xftDraw);
xemacs-21.5.28.20080401/lwlibだけに発見: xlwmenu.c.~1~

View File

@ -377,49 +377,56 @@ integrated into XEmacs"
;; it prevents data loss if files containing these characters are read ;; it prevents data loss if files containing these characters are read
;; and saved again. ;; and saved again.
(make-charset 'suse-private ;; This hack is not needed anymore, something similar has been
"Private character set for SUSE" ;; implemented upstream.
'(dimension 2 ;; Keeping this hack enabled causes problems, for example it often
chars 96 ;; causes error messages when trying to attach .pdf files in Gnus.
columns 1 ;; Therefore I comment it out.
final ?R ;; Change this--see docs for make-charset ;; Mon Feb 23 12:20:01 2009 <mike.fabian@gmx.de>
long-name "Private charset for some Unicode char support."
short-name
"Suse-Private"))
(defun suse-list-unsupported-codepoints-range (range) ;; (make-charset 'suse-private
(interactive) ;; "Private character set for SUSE"
(let ((unsupported nil) ;; '(dimension 2
(i (car range)) ;; chars 96
(j (cadr range))) ;; columns 1
(while (<= i j) ;; final ?R ;; Change this--see docs for make-charset
(if (not (unicode-to-char i)) ;; long-name "Private charset for some Unicode char support."
(push i unsupported)) ;; short-name
(setq i (1+ i))) ;; "Suse-Private"))
unsupported)) ;;
;; (defun suse-list-unsupported-codepoints-range (range)
(defun suse-fill-charset (charset codepoint-list) ;; (interactive)
(interactive) ;; (let ((unsupported nil)
(let ((n 0)) ;; (i (car range))
(dolist (codepoint codepoint-list) ;; (j (cadr range)))
(let ((i (mod n 96)) ;; (while (<= i j)
(j (/ n 96))) ;; (if (not (unicode-to-char i))
(if (< j 95) ;; (push i unsupported))
(set-unicode-conversion (make-char charset (+ i #x20) (+ j #x20)) codepoint) ;; (setq i (1+ i)))
(message "charset %s is full" charset)) ;; unsupported))
(setq n (1+ n)))))) ;;
;; (defun suse-fill-charset (charset codepoint-list)
(suse-fill-charset ;; (interactive)
'suse-private ;; (let ((n 0))
(nconc ;; (dolist (codepoint codepoint-list)
(suse-list-unsupported-codepoints-range '(#x0100 #x06FF)) ;; (let ((i (mod n 96))
(suse-list-unsupported-codepoints-range '(#x0900 #x11FF)) ;; (j (/ n 96)))
(suse-list-unsupported-codepoints-range '(#x1E00 #x27FF)) ;; (if (< j 95)
(suse-list-unsupported-codepoints-range '(#x3000 #x33FF)) ;; (set-unicode-conversion (make-char charset (+ i #x20) (+ j #x20)) codepoint)
(suse-list-unsupported-codepoints-range '(#xE800 #xE8FF)) ;; (message "charset %s is full" charset))
(suse-list-unsupported-codepoints-range '(#xF000 #xF0FF)) ;; (setq n (1+ n))))))
(suse-list-unsupported-codepoints-range '(#xFB00 #xFFFF)) ;;
)) ;; (suse-fill-charset
;; 'suse-private
;; (nconc
;; (suse-list-unsupported-codepoints-range '(#x0100 #x06FF))
;; (suse-list-unsupported-codepoints-range '(#x0900 #x11FF))
;; (suse-list-unsupported-codepoints-range '(#x1E00 #x27FF))
;; (suse-list-unsupported-codepoints-range '(#x3000 #x33FF))
;; (suse-list-unsupported-codepoints-range '(#xE800 #xE8FF))
;; (suse-list-unsupported-codepoints-range '(#xF000 #xF0FF))
;; (suse-list-unsupported-codepoints-range '(#xFB00 #xFFFF))
;; ))
(if (and (boundp 'xft-version) (eq window-system 'x)) (if (and (boundp 'xft-version) (eq window-system 'x))
(load "suse-xft-init.el" t t)) (load "suse-xft-init.el" t t))

View File

@ -1,13 +0,0 @@
--- etc/Emacs.ad.appdef 2002-10-31 15:05:40.000000000 +0000
+++ etc/Emacs.ad 2002-12-12 14:25:43.000000000 +0000
@@ -41,6 +41,10 @@
! Note that by default, the pointer foreground and background are the same
! as the default face.
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!! FontSet for menus when you use --with-xfs or --with-xim=xlib.
+XEmacs*fontSet: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso10646-1,-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*
+
! Set the menubar colors. This overrides the default foreground and
! background colors specified above.
*menubar*Foreground: Gray30

21
xemacs-app-defaults.patch Normal file
View File

@ -0,0 +1,21 @@
diff -ru xemacs-21.5.28.20080401.orig//etc/Emacs.ad xemacs-21.5.28.20080401/etc/Emacs.ad
--- xemacs-21.5.28.20080401.orig//etc/Emacs.ad 2008-04-01 19:40:34.000000000 +0200
+++ xemacs-21.5.28.20080401/etc/Emacs.ad 2009-02-23 14:10:15.000000000 +0100
@@ -41,6 +41,17 @@
! Note that by default, the pointer foreground and background are the same
! as the default face.
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! Fonts for Xft:
+XEmacs*Tabs.fcFontName: sans-serif
+XEmacs*menubar.fcFontName: sans-serif
+XEmacs*modeline.attributeFont: sans-serif
+XEmacs*default.attributeFont: sans-serif
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!! FontSet for menus when you use --with-xfs or --with-xim=xlib.
+XEmacs*fontSet: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso10646-1,-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*
+
! Set the menubar colors. This overrides the default foreground and
! background colors specified above.
*menubar*Foreground: Gray30

View File

@ -1,3 +1,21 @@
-------------------------------------------------------------------
Mon Feb 23 12:26:40 CET 2009 - maiku.fabian@gmail.com
- add menus-always-utf8.patch to make the menus work in UTF-8
locales with Xft. The patch is not yet perfect, it doesn't yet
work for the non-Xft case.
- disable the hack in site-start.el to support extra Unicode
characters. Something similar has been implemented upstream
and this hack now causes problems when trying to attach some PDF
files in Gnus.
- mark /etc/skel/.xemacs/init.el as %config.
- remove checks for obsolte suse versions.
- set font resources for Xft in /usr/share/X11/app-defaults/XEmacs:
XEmacs*Tabs.fcFontName: sans-serif
XEmacs*menubar.fcFontName: sans-serif
XEmacs*modeline.attributeFont: sans-serif
XEmacs*default.attributeFont: sans-serif
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jan 20 12:44:59 CET 2009 - mfabian@suse.de Tue Jan 20 12:44:59 CET 2009 - mfabian@suse.de

View File

@ -44,7 +44,7 @@ Requires: xemacs-info xemacs-packages ctags
Conflicts: gnuserv Conflicts: gnuserv
AutoReqProv: on AutoReqProv: on
Version: 21.5.28.20080401 Version: 21.5.28.20080401
Release: 60 Release: 61
Summary: XEmacs Summary: XEmacs
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
# Howto get the cvs tree of XEmacs: # Howto get the cvs tree of XEmacs:
@ -77,7 +77,7 @@ Source6: site-start.el
Source7: skel.init.el Source7: skel.init.el
Patch0: xemacs.patch Patch0: xemacs.patch
# keep in sync with the similar patch to the app-defaults in the main xemacs-packages package: # keep in sync with the similar patch to the app-defaults in the main xemacs-packages package:
Patch3: xemacs-21.4.8-app-defaults.patch Patch3: xemacs-app-defaults.patch
Patch5: xemacs-21.4.4-font-menu.patch Patch5: xemacs-21.4.4-font-menu.patch
Patch13: xemacs-ia64.dif Patch13: xemacs-ia64.dif
Patch14: ndbm.patch Patch14: ndbm.patch
@ -101,6 +101,7 @@ Patch45: fix-defface-custom-modified-face.patch
Patch47: xaw3d-config.patch Patch47: xaw3d-config.patch
Patch48: fix-window-configuration-problem.patch Patch48: fix-window-configuration-problem.patch
Patch49: xemacs-configure.patch Patch49: xemacs-configure.patch
Patch50: menus-always-utf8.patch
Patch292811: bugzilla-292811-make-x-make-font-bold-italic-xft-work.patch Patch292811: bugzilla-292811-make-x-make-font-bold-italic-xft-work.patch
Patch301352: bugzilla-301352-fix-wrong-incrementing-in-macros.patch Patch301352: bugzilla-301352-fix-wrong-incrementing-in-macros.patch
Patch432404: bnc432404-bytecomp.diff Patch432404: bnc432404-bytecomp.diff
@ -171,7 +172,7 @@ Authors:
%prep %prep
%setup -q -n xemacs-%{version} %setup -q -n xemacs-%{version}
%patch3 -p0 -b .appdef %patch3 -p1
#%patch5 -p1 -b .fontmenu # appears to be not needed anymore #%patch5 -p1 -b .fontmenu # appears to be not needed anymore
%patch13 -p1 %patch13 -p1
%patch14 -p1 %patch14 -p1
@ -197,6 +198,7 @@ Authors:
%patch47 %patch47
%patch48 -p1 %patch48 -p1
%patch49 %patch49
%patch50 -p1
%patch292811 -p1 %patch292811 -p1
%patch301352 -p1 %patch301352 -p1
%patch432404 -p1 %patch432404 -p1
@ -209,11 +211,7 @@ find lisp/ etc/ -name '*.elc' | xargs -r rm -f
%define enable_pdump 1 %define enable_pdump 1
%endif %endif
%define enable_dump_in_exec 0 %define enable_dump_in_exec 0
%if %suse_version > 1010
%define enable_xft 0%{?opensuse_bs} %define enable_xft 0%{?opensuse_bs}
%else
%define enable_xft 0
%endif
find . -name CVS -type d | xargs rm -rf find . -name CVS -type d | xargs rm -rf
find . -name .cvsignore -type f | xargs rm -f find . -name .cvsignore -type f | xargs rm -f
chmod -R u+w * chmod -R u+w *
@ -318,7 +316,7 @@ SPECIAL="--enable-database=gdbm,berkdb \
--enable-pdump=no \ --enable-pdump=no \
%endif %endif
%if %enable_xft %if %enable_xft
--with-xft=emacs,tabs,gauges \ --with-xft=emacs,menubars,tabs,gauges \
%endif %endif
" "
# #
@ -351,6 +349,8 @@ MAIL="--enable-clash-detection \
# #
# Mule # Mule
# #
MULE="--enable-mule \
--with-xim=xlib \
# --with-xfs Compile with XFontSet support for bilingual menubar. # --with-xfs Compile with XFontSet support for bilingual menubar.
# Can't use this option with --with-xim=motif or xlib. # Can't use this option with --with-xim=motif or xlib.
# And should have --with-menubars=lucid. # And should have --with-menubars=lucid.
@ -359,10 +359,9 @@ MAIL="--enable-clash-detection \
# and Romanian texts in the menus. It DOES work with # and Romanian texts in the menus. It DOES work with
# --with-xim=xlib, the above comment from './configure --help' # --with-xim=xlib, the above comment from './configure --help'
# seems to be incorrect in that respect.) # seems to be incorrect in that respect.)
# %if ! %enable_xft
MULE="--enable-mule \
--with-xim=xlib \
--with-xfs \ --with-xfs \
%endif
" "
# #
# Compilation # Compilation
@ -508,9 +507,7 @@ rm -rf $RPM_BUILD_ROOT/usr/lib/xemacs/%{version}/*-suse-linux/include/
%post %post
%run_permissions %run_permissions
%verifyscript %verifyscript
%if %suse_version > 920
%verify_permissions -e %{xbindir}/xemacs -e /var/lib/xemacs/lock %verify_permissions -e %{xbindir}/xemacs -e /var/lib/xemacs/lock
%endif
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
@ -518,11 +515,9 @@ rm -rf $RPM_BUILD_ROOT
%files -f xe-list-el-without-elc_xe-list-elc-without-el_xe-list-elc-with-el %files -f xe-list-el-without-elc_xe-list-elc-without-el_xe-list-elc-with-el
%defattr(-,root,root) %defattr(-,root,root)
%dir /etc/skel/.xemacs %dir /etc/skel/.xemacs
/etc/skel/.xemacs/init.el %config /etc/skel/.xemacs/init.el
/usr/share/applications/xemacs.desktop /usr/share/applications/xemacs.desktop
%if %suse_version > 920
/usr/share/pixmaps/xemacs.png /usr/share/pixmaps/xemacs.png
%endif
%{xbindir}/ellcc %{xbindir}/ellcc
%{xbindir}/gnuattach %{xbindir}/gnuattach
%{xbindir}/gnuclient %{xbindir}/gnuclient
@ -603,6 +598,21 @@ rm -rf $RPM_BUILD_ROOT
%dir /usr/share/xemacs/site-packages/lisp/term/ %dir /usr/share/xemacs/site-packages/lisp/term/
%changelog %changelog
* Mon Feb 23 2009 maiku.fabian@gmail.com
- add menus-always-utf8.patch to make the menus work in UTF-8
locales with Xft. The patch is not yet perfect, it doesn't yet
work for the non-Xft case.
- disable the hack in site-start.el to support extra Unicode
characters. Something similar has been implemented upstream
and this hack now causes problems when trying to attach some PDF
files in Gnus.
- mark /etc/skel/.xemacs/init.el as %%config.
- remove checks for obsolte suse versions.
- set font resources for Xft in /usr/share/X11/app-defaults/XEmacs:
XEmacs*Tabs.fcFontName: sans-serif
XEmacs*menubar.fcFontName: sans-serif
XEmacs*modeline.attributeFont: sans-serif
XEmacs*default.attributeFont: sans-serif
* Tue Jan 20 2009 mfabian@suse.de * Tue Jan 20 2009 mfabian@suse.de
- bnc#461244: change menu font set in app-defaults - bnc#461244: change menu font set in app-defaults
to use only -*-helvetica-*. This avoids matching the huge Chinese to use only -*-helvetica-*. This avoids matching the huge Chinese