Compare commits
21 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
f664e78b76 | ||
|
9d5e05eed8 | ||
|
3f2f16ad71 | ||
|
bac4b89d23 | ||
|
d92b503807 | ||
|
15815ec5cf | ||
|
7a98d237bc | ||
|
d80721fafa | ||
|
a92361ba36 | ||
|
f0f69e883d | ||
|
9ac33383fa | ||
|
0ed6ed9851 | ||
|
6268075f43 | ||
|
982fb47a29 | ||
|
cda433c5e3 | ||
|
cc45bcb129 | ||
|
a9aba1d400 | ||
|
d8b3d3575c | ||
|
fa3d95858c | ||
|
b93693e07b | ||
|
da0f823591 |
0
.cvsignore → .gitignore
vendored
0
.cvsignore → .gitignore
vendored
21
Makefile
21
Makefile
@ -1,21 +0,0 @@
|
||||
# Makefile for source rpm: emacs
|
||||
# $Id: Makefile,v 1.1 2004/09/09 04:30:11 cvsdist Exp $
|
||||
NAME := emacs
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attempt a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
21
emacs-23.1-cpp.patch
Normal file
21
emacs-23.1-cpp.patch
Normal file
@ -0,0 +1,21 @@
|
||||
diff -up emacs-23.1/configure.in.cpp emacs-23.1/configure.in
|
||||
--- emacs-23.1/configure.in.cpp 2009-11-30 13:24:53.000000000 +0100
|
||||
+++ emacs-23.1/configure.in 2009-11-30 13:25:45.000000000 +0100
|
||||
@@ -2983,7 +2983,7 @@ echo creating lib-src/Makefile
|
||||
sed -e '1,/start of cpp stuff/d'\
|
||||
-e 's,/\*\*/#\(.*\)$,/* \1 */,' \
|
||||
< Makefile.c > junk.c
|
||||
- $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
|
||||
+ $CPP -P $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
|
||||
sed -e 's/^ / /' -e '/^#/d' -e '/^[ ]*$/d' > junk2.c
|
||||
cat junk1.c junk2.c > Makefile.new
|
||||
rm -f junk.c junk1.c junk2.c
|
||||
@@ -2999,7 +2999,7 @@ echo creating src/Makefile
|
||||
sed -e '1,/start of cpp stuff/d'\
|
||||
-e 's,/\*\*/#\(.*\)$,/* \1 */,' \
|
||||
< Makefile.c > junk.c
|
||||
- $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
|
||||
+ $CPP -P $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
|
||||
sed -e 's/^ / /' -e '/^#/d' -e '/^[ ]*$/d' > junk2.c
|
||||
cat junk1.c junk2.c > Makefile.new
|
||||
rm -f junk.c junk1.c junk2.c
|
45
emacs-23.1-fontdpi.patch
Normal file
45
emacs-23.1-fontdpi.patch
Normal file
@ -0,0 +1,45 @@
|
||||
diff -up emacs-23.1/src/xterm.c.fontdpi emacs-23.1/src/xterm.c
|
||||
--- emacs-23.1/src/xterm.c.fontdpi 2010-01-04 09:11:45.000000000 +0100
|
||||
+++ emacs-23.1/src/xterm.c 2010-01-04 11:50:19.627777180 +0100
|
||||
@@ -10380,17 +10380,31 @@ x_term_init (display_name, xrm_option, r
|
||||
dpyinfo->visual, AllocNone);
|
||||
|
||||
{
|
||||
- int screen_number = XScreenNumberOfScreen (dpyinfo->screen);
|
||||
- double pixels = DisplayHeight (dpyinfo->display, screen_number);
|
||||
- double mm = DisplayHeightMM (dpyinfo->display, screen_number);
|
||||
- /* Mac OS X 10.3's Xserver sometimes reports 0.0mm. */
|
||||
- dpyinfo->resy = (mm < 1) ? 100 : pixels * 25.4 / mm;
|
||||
- pixels = DisplayWidth (dpyinfo->display, screen_number);
|
||||
- mm = DisplayWidthMM (dpyinfo->display, screen_number);
|
||||
- /* Mac OS X 10.3's Xserver sometimes reports 0.0mm. */
|
||||
- dpyinfo->resx = (mm < 1) ? 100 : pixels * 25.4 / mm;
|
||||
+ /* If we are using Xft, check dpi value in X resources.
|
||||
+ It is better we use it as well, since Xft will use it, as will all
|
||||
+ Gnome applications. If our real DPI is smaller or larger than the
|
||||
+ one Xft uses, our font will look smaller or larger than other
|
||||
+ for other applications, even if it is the same font name (monospace-10
|
||||
+ for example). */
|
||||
+ char *v = XGetDefault (dpyinfo->display, "Xft", "dpi");
|
||||
+ double d;
|
||||
+ if (v != NULL && sscanf (v, "%lf", &d) == 1)
|
||||
+ dpyinfo->resy = dpyinfo->resx = d;
|
||||
}
|
||||
|
||||
+ if (dpyinfo->resy < 1)
|
||||
+ {
|
||||
+ int screen_number = XScreenNumberOfScreen (dpyinfo->screen);
|
||||
+ double pixels = DisplayHeight (dpyinfo->display, screen_number);
|
||||
+ double mm = DisplayHeightMM (dpyinfo->display, screen_number);
|
||||
+ /* Mac OS X 10.3's Xserver sometimes reports 0.0mm. */
|
||||
+ dpyinfo->resy = (mm < 1) ? 100 : pixels * 25.4 / mm;
|
||||
+ pixels = DisplayWidth (dpyinfo->display, screen_number);
|
||||
+ mm = DisplayWidthMM (dpyinfo->display, screen_number);
|
||||
+ /* Mac OS X 10.3's Xserver sometimes reports 0.0mm. */
|
||||
+ dpyinfo->resx = (mm < 1) ? 100 : pixels * 25.4 / mm;
|
||||
+ }
|
||||
+
|
||||
dpyinfo->Xatom_wm_protocols
|
||||
= XInternAtom (dpyinfo->display, "WM_PROTOCOLS", False);
|
||||
dpyinfo->Xatom_wm_take_focus
|
||||
|
12
emacs-23.1-hexl-mode.patch
Normal file
12
emacs-23.1-hexl-mode.patch
Normal file
@ -0,0 +1,12 @@
|
||||
=== modified file 'lisp/hexl.el'
|
||||
--- lisp/hexl.el 2010-01-13 08:35:10 +0000
|
||||
+++ lisp/hexl.el 2010-01-14 00:38:04 +0000
|
||||
@@ -779,7 +779,7 @@
|
||||
|
||||
(defun hexl-printable-character (ch)
|
||||
"Return a displayable string for character CH."
|
||||
- (format "%c" (if hexl-iso
|
||||
+ (format "%c" (if (not (equal hexl-iso ""))
|
||||
(if (or (< ch 32) (and (>= ch 127) (< ch 160)))
|
||||
46
|
||||
ch)
|
17
emacs-23.1-hideshow-comment.patch
Normal file
17
emacs-23.1-hideshow-comment.patch
Normal file
@ -0,0 +1,17 @@
|
||||
--- lisp/progmodes/hideshow.el.orig 2010-05-12 18:28:06.543936429 +0200
|
||||
+++ lisp/progmodes/hideshow.el 2010-05-12 18:27:40.212936751 +0200
|
||||
@@ -691,9 +691,11 @@ Return point, or nil if original point w
|
||||
;; look backward for the start of a block that contains the cursor
|
||||
(while (and (re-search-backward hs-block-start-regexp nil t)
|
||||
(not (setq done
|
||||
- (< here (save-excursion
|
||||
- (hs-forward-sexp (match-data t) 1)
|
||||
- (point)))))))
|
||||
+ (and (< here
|
||||
+ (save-excursion
|
||||
+ (hs-forward-sexp (match-data t) 1)
|
||||
+ (point)))
|
||||
+ (eq (hs-inside-comment-p) nil))))))
|
||||
(if done
|
||||
(point)
|
||||
(goto-char here)
|
23
emacs-23.1-indian.patch
Normal file
23
emacs-23.1-indian.patch
Normal file
@ -0,0 +1,23 @@
|
||||
diff -up emacs-23.1/lisp/language/indian.el.indian emacs-23.1/lisp/language/indian.el
|
||||
--- emacs-23.1/lisp/language/indian.el.indian 2009-12-03 13:03:04.000000000 +0100
|
||||
+++ emacs-23.1/lisp/language/indian.el 2009-12-03 13:05:53.000000000 +0100
|
||||
@@ -165,15 +165,15 @@ South Indian language Malayalam is suppo
|
||||
"Regexp matching a composable sequence of Malayalam characters.")
|
||||
|
||||
(let ((script-regexp-alist
|
||||
- `((devanagari . ,devanagari-composable-pattern)
|
||||
+ `((devanagari . "[\x900-\x97F\x200C\x200D]+")
|
||||
(bengali . "[\x980-\x9FF\x200C\x200D]+")
|
||||
(gurmukhi . "[\xA00-\xA7F\x200C\x200D]+")
|
||||
(gujarati . "[\xA80-\xAFF\x200C\x200D]+")
|
||||
(oriya . "[\xB00-\xB7F\x200C\x200D]+")
|
||||
- (tamil . ,tamil-composable-pattern)
|
||||
+ (tamil . "[\xB80-\xBFF\x200C\x200D]+")
|
||||
(telugu . "[\xC00-\xC7F\x200C\x200D]+")
|
||||
- (kannada . ,kannada-composable-pattern)
|
||||
- (malayalam . ,malayalam-composable-pattern))))
|
||||
+ (kannada . "[\xC80-\xCFF\x200C\x200D]+")
|
||||
+ (malayalam . "[\xD00-\xD7F\x200C\x200D]+"))))
|
||||
(map-char-table
|
||||
#'(lambda (key val)
|
||||
(let ((slot (assq val script-regexp-alist)))
|
19
emacs-23.1-memmove.patch
Normal file
19
emacs-23.1-memmove.patch
Normal file
@ -0,0 +1,19 @@
|
||||
diff -up emacs-23.1/lib-src/etags.c.memmove emacs-23.1/lib-src/etags.c
|
||||
--- emacs-23.1/lib-src/etags.c.memmove 2009-06-21 06:37:34.000000000 +0200
|
||||
+++ emacs-23.1/lib-src/etags.c 2009-12-08 17:55:41.442792036 +0100
|
||||
@@ -6695,13 +6695,13 @@ absolute_filename (file, dir)
|
||||
else if (cp[0] != '/')
|
||||
cp = slashp;
|
||||
#endif
|
||||
- strcpy (cp, slashp + 3);
|
||||
+ memmove (cp, slashp + 3, strlen(slashp + 2));
|
||||
slashp = cp;
|
||||
continue;
|
||||
}
|
||||
else if (slashp[2] == '/' || slashp[2] == '\0')
|
||||
{
|
||||
- strcpy (slashp, slashp + 2);
|
||||
+ memmove (slashp, slashp + 2, strlen(slashp + 1));
|
||||
continue;
|
||||
}
|
||||
}
|
100
emacs-23.1-movemail.patch
Normal file
100
emacs-23.1-movemail.patch
Normal file
@ -0,0 +1,100 @@
|
||||
diff -up emacs-23.1/lib-src/movemail.c.movemail emacs-23.1/lib-src/movemail.c
|
||||
--- emacs-23.1/lib-src/movemail.c.movemail 2010-03-31 19:18:05.611899443 +0200
|
||||
+++ emacs-23.1/lib-src/movemail.c 2010-03-31 19:24:29.738754553 +0200
|
||||
@@ -176,7 +176,9 @@ main (argc, argv)
|
||||
int nread;
|
||||
int status;
|
||||
int c, preserve_mail = 0;
|
||||
-
|
||||
+ uid_t real_gid, priv_gid;
|
||||
+ real_gid = getgid();
|
||||
+ priv_gid = getegid();
|
||||
#ifndef MAIL_USE_SYSTEM_LOCK
|
||||
struct stat st;
|
||||
long now;
|
||||
@@ -247,25 +249,6 @@ main (argc, argv)
|
||||
if (*outname == 0)
|
||||
fatal ("Destination file name is empty", 0, 0);
|
||||
|
||||
- /* Check access to output file. */
|
||||
- if (access (outname, F_OK) == 0 && access (outname, W_OK) != 0)
|
||||
- pfatal_with_name (outname);
|
||||
-
|
||||
- /* Also check that outname's directory is writable to the real uid. */
|
||||
- {
|
||||
- char *buf = (char *) xmalloc (strlen (outname) + 1);
|
||||
- char *p;
|
||||
- strcpy (buf, outname);
|
||||
- p = buf + strlen (buf);
|
||||
- while (p > buf && !IS_DIRECTORY_SEP (p[-1]))
|
||||
- *--p = 0;
|
||||
- if (p == buf)
|
||||
- *p++ = '.';
|
||||
- if (access (buf, W_OK) != 0)
|
||||
- pfatal_with_name (buf);
|
||||
- free (buf);
|
||||
- }
|
||||
-
|
||||
#ifdef MAIL_USE_POP
|
||||
if (!strncmp (inname, "po:", 3))
|
||||
{
|
||||
@@ -277,15 +260,11 @@ main (argc, argv)
|
||||
exit (status);
|
||||
}
|
||||
|
||||
- setuid (getuid ());
|
||||
+ if (setuid (getuid ()) < 0)
|
||||
+ fatal ("Failed to drop privileges", 0, 0);
|
||||
#endif /* MAIL_USE_POP */
|
||||
|
||||
#ifndef DISABLE_DIRECT_ACCESS
|
||||
-
|
||||
- /* Check access to input file. */
|
||||
- if (access (inname, R_OK | W_OK) != 0)
|
||||
- pfatal_with_name (inname);
|
||||
-
|
||||
#ifndef MAIL_USE_MMDF
|
||||
#ifndef MAIL_USE_SYSTEM_LOCK
|
||||
#ifdef MAIL_USE_MAILLOCK
|
||||
@@ -379,7 +358,8 @@ main (argc, argv)
|
||||
time_t touched_lock, now;
|
||||
#endif
|
||||
|
||||
- setuid (getuid ());
|
||||
+ if (setuid (getuid ()) < 0 || setegid (real_gid) < 0)
|
||||
+ fatal("Failed to drop privileges", 0, 0);
|
||||
|
||||
#ifndef MAIL_USE_MMDF
|
||||
#ifdef MAIL_USE_SYSTEM_LOCK
|
||||
@@ -405,6 +385,9 @@ main (argc, argv)
|
||||
if (outdesc < 0)
|
||||
pfatal_with_name (outname);
|
||||
|
||||
+ if (setegid (priv_gid) < 0)
|
||||
+ fatal("Failed to regain privileges", 0, 0);
|
||||
+
|
||||
/* This label exists so we can retry locking
|
||||
after a delay, if it got EAGAIN or EBUSY. */
|
||||
retry_lock:
|
||||
@@ -502,6 +485,10 @@ main (argc, argv)
|
||||
if (close (outdesc) != 0)
|
||||
pfatal_and_delete (outname);
|
||||
|
||||
+ /* Prevent symlink attacks truncating other users' mailboxes */
|
||||
+ if (setegid (real_gid) < 0)
|
||||
+ fatal("Failed to drop privileges", 0, 0);
|
||||
+
|
||||
#ifdef MAIL_USE_SYSTEM_LOCK
|
||||
if (! preserve_mail)
|
||||
{
|
||||
@@ -529,6 +516,10 @@ main (argc, argv)
|
||||
}
|
||||
#endif /* not MAIL_USE_SYSTEM_LOCK */
|
||||
|
||||
+ /* End of mailbox truncation */
|
||||
+ if (setegid (priv_gid) < 0)
|
||||
+ fatal("Failed to regain privileges", 0, 0);
|
||||
+
|
||||
#ifdef MAIL_USE_MAILLOCK
|
||||
/* This has to occur in the child, i.e., in the process that
|
||||
acquired the lock! */
|
45
emacs-23.1-nxml.patch
Normal file
45
emacs-23.1-nxml.patch
Normal file
@ -0,0 +1,45 @@
|
||||
=== modified file 'lisp/nxml/nxml-mode.el'
|
||||
--- lisp/nxml/nxml-mode.el 2009-09-24 23:22:17 +0000
|
||||
+++ lisp/nxml/nxml-mode.el 2009-10-24 21:32:19 +0000
|
||||
@@ -1254,29 +1254,31 @@
|
||||
|
||||
(defun nxml-balanced-close-start-tag (block-or-inline)
|
||||
(let ((token-end (nxml-token-before))
|
||||
- (pos (1+ (point))))
|
||||
+ (pos (1+ (point)))
|
||||
+ (token-start xmltok-start))
|
||||
(unless (or (eq xmltok-type 'partial-start-tag)
|
||||
(and (memq xmltok-type '(start-tag
|
||||
empty-element
|
||||
partial-empty-element))
|
||||
(>= token-end pos)))
|
||||
(error "Not in a start-tag"))
|
||||
+ ;; Note that this insertion changes xmltok-start.
|
||||
(insert "></"
|
||||
(buffer-substring-no-properties (+ xmltok-start 1)
|
||||
(min xmltok-name-end (point)))
|
||||
">")
|
||||
(if (eq block-or-inline 'inline)
|
||||
(goto-char pos)
|
||||
- (goto-char xmltok-start)
|
||||
+ (goto-char token-start)
|
||||
(back-to-indentation)
|
||||
- (if (= (point) xmltok-start)
|
||||
+ (if (= (point) token-start)
|
||||
(let ((indent (current-column)))
|
||||
- (goto-char pos)
|
||||
- (insert "\n")
|
||||
- (indent-line-to indent)
|
||||
- (goto-char pos)
|
||||
- (insert "\n")
|
||||
- (indent-line-to (+ nxml-child-indent indent)))
|
||||
+ (goto-char pos)
|
||||
+ (insert "\n")
|
||||
+ (indent-line-to indent)
|
||||
+ (goto-char pos)
|
||||
+ (insert "\n")
|
||||
+ (indent-line-to (+ nxml-child-indent indent)))
|
||||
(goto-char pos)))))
|
||||
|
||||
(defun nxml-finish-element ()
|
||||
|
82
emacs-23.1-scroll.patch
Normal file
82
emacs-23.1-scroll.patch
Normal file
@ -0,0 +1,82 @@
|
||||
diff -up emacs-23.1/src/gtkutil.c.scroll emacs-23.1/src/gtkutil.c
|
||||
--- emacs-23.1/src/gtkutil.c.scroll 2009-06-21 06:38:15.000000000 +0200
|
||||
+++ emacs-23.1/src/gtkutil.c 2009-12-02 17:10:08.000000000 +0100
|
||||
@@ -3401,6 +3401,38 @@ xg_set_toolkit_scroll_bar_thumb (bar, po
|
||||
}
|
||||
}
|
||||
|
||||
+/* Return non-zero if EVENT is for a scroll bar in frame F.
|
||||
+ When the same X window is used for several Gtk+ widgets, we cannot
|
||||
+ say for sure based on the X window alone if an event is for the
|
||||
+ frame. This function does additional checks.
|
||||
+
|
||||
+ Return non-zero if the event is for a scroll bar, zero otherwise. */
|
||||
+
|
||||
+int
|
||||
+xg_event_is_for_scrollbar (f, event)
|
||||
+ FRAME_PTR f;
|
||||
+ XEvent *event;
|
||||
+{
|
||||
+ int retval = 0;
|
||||
+
|
||||
+ if (f && event->type == ButtonPress)
|
||||
+ {
|
||||
+ /* Check if press occurred outside the edit widget. */
|
||||
+ GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f));
|
||||
+ retval = gdk_display_get_window_at_pointer (gdpy, NULL, NULL)
|
||||
+ != f->output_data.x->edit_widget->window;
|
||||
+ }
|
||||
+ else if (f && (event->type != ButtonRelease || event->type != MotionNotify))
|
||||
+ {
|
||||
+ /* If we are releasing or moving the scroll bar, it has the grab. */
|
||||
+ retval = gtk_grab_get_current () != 0
|
||||
+ && gtk_grab_get_current () != f->output_data.x->edit_widget;
|
||||
+ }
|
||||
+
|
||||
+ return retval;
|
||||
+}
|
||||
+
|
||||
+
|
||||
|
||||
/***********************************************************************
|
||||
Tool bar functions
|
||||
diff -up emacs-23.1/src/gtkutil.h.scroll emacs-23.1/src/gtkutil.h
|
||||
--- emacs-23.1/src/gtkutil.h.scroll 2009-06-21 06:38:15.000000000 +0200
|
||||
+++ emacs-23.1/src/gtkutil.h 2009-12-02 17:10:08.000000000 +0100
|
||||
@@ -180,6 +180,8 @@ extern void xg_set_toolkit_scroll_bar_th
|
||||
int position,
|
||||
int whole));
|
||||
|
||||
+extern int xg_event_is_for_scrollbar P_ ((FRAME_PTR f, XEvent *event));
|
||||
+
|
||||
|
||||
extern void update_frame_tool_bar P_ ((FRAME_PTR f));
|
||||
extern void free_frame_tool_bar P_ ((FRAME_PTR f));
|
||||
diff -up emacs-23.1/src/xterm.c.scroll emacs-23.1/src/xterm.c
|
||||
--- emacs-23.1/src/xterm.c.scroll 2009-06-21 06:38:20.000000000 +0200
|
||||
+++ emacs-23.1/src/xterm.c 2009-12-02 17:13:24.000000000 +0100
|
||||
@@ -6743,6 +6743,12 @@ handle_one_xevent (dpyinfo, eventp, fini
|
||||
clear_mouse_face (dpyinfo);
|
||||
}
|
||||
|
||||
+
|
||||
+#ifdef USE_GTK
|
||||
+ if (f && xg_event_is_for_scrollbar (f, &event))
|
||||
+ f = 0;
|
||||
+#endif
|
||||
+
|
||||
if (f)
|
||||
{
|
||||
|
||||
@@ -6899,6 +6905,11 @@ handle_one_xevent (dpyinfo, eventp, fini
|
||||
else
|
||||
f = x_window_to_frame (dpyinfo, event.xbutton.window);
|
||||
|
||||
+#ifdef USE_GTK
|
||||
+ if (f && xg_event_is_for_scrollbar (f, &event))
|
||||
+ f = 0;
|
||||
+#endif
|
||||
+
|
||||
if (f)
|
||||
{
|
||||
/* Is this in the tool-bar? */
|
26
emacs-23.1-spacing.patch
Normal file
26
emacs-23.1-spacing.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/src/ftfont.c b/src/ftfont.c
|
||||
index 4ebc4be..bac9a4f 100644
|
||||
--- a/src/ftfont.c
|
||||
+++ b/src/ftfont.c
|
||||
@@ -1262,7 +1262,7 @@ ftfont_open (f, entity, pixel_size)
|
||||
spacing = XINT (AREF (entity, FONT_SPACING_INDEX));
|
||||
else
|
||||
spacing = FC_PROPORTIONAL;
|
||||
- if (spacing != FC_PROPORTIONAL)
|
||||
+ if (spacing != FC_PROPORTIONAL && spacing != FC_DUAL)
|
||||
font->min_width = font->average_width = font->space_width
|
||||
= (scalable ? ft_face->max_advance_width * size / upEM
|
||||
: ft_face->size->metrics.max_advance >> 6);
|
||||
diff --git a/src/xftfont.c b/src/xftfont.c
|
||||
index 82701ce..e74ce31 100644
|
||||
--- a/src/xftfont.c
|
||||
+++ b/src/xftfont.c
|
||||
@@ -418,7 +418,7 @@ xftfont_open (f, entity, pixel_size)
|
||||
ascii_printable[i] = ' ' + i;
|
||||
}
|
||||
BLOCK_INPUT;
|
||||
- if (spacing != FC_PROPORTIONAL)
|
||||
+ if (spacing != FC_PROPORTIONAL && spacing != FC_DUAL)
|
||||
{
|
||||
font->min_width = font->average_width = font->space_width
|
||||
= xftfont->max_advance_width;
|
11
emacs-terminal.desktop
Normal file
11
emacs-terminal.desktop
Normal file
@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Name=Emacs Terminal
|
||||
GenericName=Emacs Terminal
|
||||
Comment=Emacs Terminal Mode
|
||||
Exec=emacs-terminal
|
||||
Icon=utilities-terminal
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Categories=Application;Utility;X-Red-Hat-Base;GTK;TerminalEmulator;
|
||||
Encoding=UTF-8
|
||||
StartupWMClass=Emacs
|
3
emacs-terminal.sh
Normal file
3
emacs-terminal.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
exec emacs -Q --eval '(ansi-term "/bin/bash")'
|
130
emacs.spec
130
emacs.spec
@ -4,7 +4,7 @@ Summary: GNU Emacs text editor
|
||||
Name: emacs
|
||||
Epoch: 1
|
||||
Version: 23.1
|
||||
Release: 9%{?dist}
|
||||
Release: 24%{?dist}
|
||||
License: GPLv3+
|
||||
URL: http://www.gnu.org/software/emacs/
|
||||
Group: Applications/Editors
|
||||
@ -16,24 +16,52 @@ Source7: http://php-mode.svn.sourceforge.net/svnroot/php-mode/tags/php-mode-1.4.
|
||||
Source8: php-mode-init.el
|
||||
Source9: ssl.el
|
||||
# rpm-spec-mode from XEmacs
|
||||
Source10: http://cvs.xemacs.org/viewcvs.cgi/*checkout*/XEmacs/packages/xemacs-packages/prog-modes/rpm-spec-mode.el
|
||||
Source10: rpm-spec-mode.el
|
||||
Source11: rpm-spec-mode-init.el
|
||||
Source13: focus-init.el
|
||||
Source14: po-mode.el
|
||||
Source15: po-mode-init.el
|
||||
Source18: default.el
|
||||
# Emacs Terminal Mode, #551949
|
||||
Source19: emacs-terminal.desktop
|
||||
Source20: emacs-terminal.sh
|
||||
Patch0: glibc-open-macro.patch
|
||||
Patch1: rpm-spec-mode.patch
|
||||
Patch2: po-mode-auto-replace-date-71264.patch
|
||||
Patch3: rpm-spec-mode-utc.patch
|
||||
Patch4: emacs-gtk.patch
|
||||
Patch5: emacs-23.1-xdg.patch
|
||||
|
||||
# Fixed in upstream CVS.
|
||||
Patch6: emacs-23.1-cpp.patch
|
||||
Patch7: emacs-23.1-scroll.patch
|
||||
Patch8: emacs-23.1-indian.patch
|
||||
# Fixed in upstream CVS
|
||||
Patch9: emacs-23.1-memmove.patch
|
||||
# Taken from upstream GIT repository
|
||||
# http://git.savannah.gnu.org/cgit/emacs.git/diff/src/xsettings.c?id=b3a25b88e82569f916712c635207c8bdd590e13b
|
||||
# rhbz#517272
|
||||
Patch10: emacs-23.1-fontdpi.patch
|
||||
# Fix https://bugzilla.redhat.com/show_bug.cgi?id=547566
|
||||
# Reported upstream: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5313
|
||||
Patch11: emacs-23.1-hexl-mode.patch
|
||||
# Fix https://bugzilla.redhat.com/show_bug.cgi?id=553346
|
||||
# Upstream: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=2840
|
||||
# Backported fix from upstream:
|
||||
# http://bazaar.launchpad.net/~vcs-imports/emacs/trunk/revision/98299
|
||||
Patch12: emacs-23.1-nxml.patch
|
||||
# Fix https://bugzilla.redhat.com/show_bug.cgi?id=578272
|
||||
# CVE-2010-0825
|
||||
Patch13: emacs-23.1-movemail.patch
|
||||
# Fix https://bugzilla.redhat.com/show_bug.cgi?id=595546
|
||||
# Upstream: http://emacsbugs.donarmstrong.com/cgi/bugreport.cgi?bug=6158
|
||||
Patch14: emacs-23.1-hideshow-comment.patch
|
||||
# Reported upstream http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4129
|
||||
Patch15: emacs-23.1-spacing.patch
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-root
|
||||
BuildRequires: atk-devel, cairo-devel, desktop-file-utils, freetype-devel, fontconfig-devel, dbus-devel, giflib-devel, glibc-devel, gtk2-devel, libpng-devel
|
||||
BuildRequires: libjpeg-devel, libtiff-devel, libX11-devel, libXau-devel, libXdmcp-devel, libXrender-devel, libXt-devel
|
||||
BuildRequires: libXpm-devel, ncurses-devel, xorg-x11-proto-devel, zlib-devel
|
||||
BuildRequires: autoconf, automake, bzip2, cairo, texinfo
|
||||
BuildRequires: autoconf, automake, bzip2, cairo, texinfo, gzip
|
||||
%ifarch %{ix86}
|
||||
BuildRequires: setarch
|
||||
%endif
|
||||
@ -51,6 +79,9 @@ BuildRequires: desktop-file-utils
|
||||
Requires: desktop-file-utils
|
||||
Conflicts: gettext < 0.10.40
|
||||
Provides: emacs(bin)
|
||||
# #516391
|
||||
Obsoletes: emacs-nxml-mode < 0.20041004-10
|
||||
Provides: emacs-nxml-mode = 0.20041004-10
|
||||
|
||||
# C and build patches
|
||||
|
||||
@ -90,7 +121,9 @@ on a terminal.
|
||||
%package common
|
||||
Summary: Emacs common files
|
||||
Group: Applications/Editors
|
||||
PreReq: /sbin/install-info, dev, %{_sbindir}/alternatives
|
||||
Requires(preun): %{_sbindir}/alternatives, /sbin/install-info, dev
|
||||
Requires(posttrans): %{_sbindir}/alternatives
|
||||
Requires(post): /sbin/install-info, dev
|
||||
Obsoletes: emacs-leim
|
||||
|
||||
%description common
|
||||
@ -119,6 +152,16 @@ Emacs packages or see some elisp examples.
|
||||
%patch0 -p1 -b .glibc-open-macro
|
||||
%patch4 -p1 -b .gtk
|
||||
%patch5 -p1 -b .xdg
|
||||
%patch6 -p1
|
||||
%patch7 -p1 -b .scroll
|
||||
%patch8 -p1
|
||||
%patch9 -p1 -b .memmove
|
||||
%patch10 -p1 -b .fontdpi
|
||||
%patch11 -p0
|
||||
%patch12 -p0
|
||||
%patch13 -p1
|
||||
%patch14 -p0
|
||||
%patch15 -p1 -b .spacing
|
||||
|
||||
# install rest of site-lisp files
|
||||
( cd site-lisp
|
||||
@ -162,6 +205,8 @@ fi
|
||||
%build
|
||||
export CFLAGS="-DMAIL_USE_LOCKF $RPM_OPT_FLAGS"
|
||||
|
||||
#we patch configure.in so we have to do this
|
||||
autoconf
|
||||
%configure --with-dbus --with-gif --with-jpeg --with-png --with-rsvg \
|
||||
--with-tiff --with-xft --with-xpm --with-x-toolkit=gtk
|
||||
|
||||
@ -180,7 +225,7 @@ ${TOPDIR}/src/emacs %{bytecompargs} site-lisp/*.el
|
||||
# Create pkgconfig file
|
||||
cat > emacs.pc << EOF
|
||||
sitepkglispdir=%{site_lisp}
|
||||
sitestartdir=%{site_lisp}/site-start.d
|
||||
sitestartdir=%{site_start_d}
|
||||
|
||||
Name: emacs
|
||||
Description: GNU Emacs text editor
|
||||
@ -190,10 +235,11 @@ EOF
|
||||
# Create macros.emacs RPM macro file
|
||||
cat > macros.emacs << EOF
|
||||
%%_emacs_version %{version}
|
||||
%%_emacs_epoch %{epoch}
|
||||
%%_emacs_ev %{?epoch:%{epoch}:}%{version}
|
||||
%%_emacs_evr %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
%%_emacs_sitelispdir %{site_lisp}
|
||||
%%_emacs_sitestartdir %{site_start_d}
|
||||
%%_emacs_bytecompile /usr/bin/emacs %bytecompargs
|
||||
%%_emacs_bytecompile /usr/bin/emacs -batch --no-init-file --no-site-file --eval '(progn (setq load-path (cons "." load-path)))' -f batch-byte-compile
|
||||
EOF
|
||||
|
||||
%install
|
||||
@ -204,6 +250,10 @@ make install INSTALL="%{__install} -p" DESTDIR=%{buildroot}
|
||||
# let alternatives manage the symlink
|
||||
rm %{buildroot}%{_bindir}/emacs
|
||||
|
||||
# do not compress the files which implement compression itself (#484830)
|
||||
gunzip %{buildroot}%{_datadir}/emacs/%{version}/lisp/jka-compr.el.gz
|
||||
gunzip %{buildroot}%{_datadir}/emacs/%{version}/lisp/jka-cmpr-hook.el.gz
|
||||
|
||||
# rebuild without X support
|
||||
# remove the versioned binary with X support so that we end up with .1 suffix for emacs-nox too
|
||||
rm src/emacs-%{version}.*
|
||||
@ -220,6 +270,11 @@ mkdir -p %{buildroot}%{site_lisp}
|
||||
install -p -m 0644 %SOURCE4 %{buildroot}%{site_lisp}/site-start.el
|
||||
install -p -m 0644 %SOURCE18 %{buildroot}%{site_lisp}
|
||||
|
||||
#this solves bz#474958, "update-directory-autoloads" now finally works
|
||||
#the path is different each version, so we'll generate it here
|
||||
echo "(setq source-directory \"%{_datadir}/emacs/%{version}/\")" \
|
||||
>> %{buildroot}%{site_lisp}/site-start.el
|
||||
|
||||
mv %{buildroot}%{_bindir}/{etags,etags.emacs}
|
||||
mv %{buildroot}%{_mandir}/man1/{ctags.1,gctags.1}
|
||||
mv %{buildroot}%{_mandir}/man1/{etags.1,etags.emacs.1}
|
||||
@ -243,14 +298,19 @@ install -p -m 0644 emacs.pc %{buildroot}/%{pkgconfig}
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/rpm
|
||||
install -p -m 0644 macros.emacs %{buildroot}%{_sysconfdir}/rpm/
|
||||
|
||||
# installing emacs-terminal binary
|
||||
install -p -m 755 %SOURCE20 %{buildroot}%{_bindir}/emacs-terminal
|
||||
|
||||
# after everything is installed, remove info dir
|
||||
rm -f %{buildroot}%{_infodir}/dir
|
||||
rm %{buildroot}%{_localstatedir}/games/emacs/*
|
||||
|
||||
# install desktop file
|
||||
# install desktop files
|
||||
mkdir -p %{buildroot}%{_datadir}/applications
|
||||
desktop-file-install --dir=%{buildroot}%{_datadir}/applications \
|
||||
%SOURCE1
|
||||
desktop-file-install --dir=%{buildroot}%{_datadir}/applications \
|
||||
%SOURCE19
|
||||
|
||||
|
||||
#
|
||||
@ -337,10 +397,12 @@ alternatives --install %{_bindir}/etags emacs.etags %{_bindir}/etags.emacs 80 \
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/emacs-%{version}
|
||||
%{_bindir}/emacs-terminal
|
||||
%dir %{_libexecdir}/emacs
|
||||
%dir %{_libexecdir}/emacs/%{version}
|
||||
%dir %{emacs_libexecdir}
|
||||
%{_datadir}/applications/emacs.desktop
|
||||
%{_datadir}/applications/emacs-terminal.desktop
|
||||
%{_datadir}/icons/hicolor/*/apps/emacs.png
|
||||
%{_datadir}/icons/hicolor/*/apps/emacs22.png
|
||||
%{_datadir}/icons/hicolor/scalable/apps/emacs.svg
|
||||
@ -378,6 +440,56 @@ alternatives --install %{_bindir}/etags emacs.etags %{_bindir}/etags.emacs 80 \
|
||||
%dir %{_datadir}/emacs/%{version}
|
||||
|
||||
%changelog
|
||||
* Thu Jun 3 2010 Karel Klic <kklic@redhat.com> - 1:23.1-24
|
||||
- Fixed handling of dual spacing fonts rhbz#599437
|
||||
|
||||
* Thu May 27 2010 Karel Klíč <kklic@redhat.com> - 1:23.1-23
|
||||
- Add patch to fix rhbz#595546 hideshow library matches wrong parenthesis
|
||||
under certain circumstances
|
||||
|
||||
* Wed May 19 2010 Naveen Kumar <nkumar@redhat.com> - 1:23.1-22
|
||||
- Added a desktop file for adding terminal mode to menu (RHBZ #551949)
|
||||
|
||||
* Thu Apr 1 2010 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1:23.1-21
|
||||
- Add patch to fix RHBZ #578272 - security vulnerability with movemail
|
||||
(CVE-2010-0825)
|
||||
|
||||
* Tue Mar 30 2010 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1:23.1-20
|
||||
- Add fix for BZ 553346
|
||||
|
||||
* Tue Mar 23 2010 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1:23.1-19
|
||||
- Backport fixes for bugs 516391, 484830, 474958 from F-13 branch
|
||||
- Add cwd to load-path in byte-compile macro for add-on packaging
|
||||
- Add some commentary to spec file
|
||||
|
||||
* Thu Jan 14 2010 Jonathan G. Underwood <jonathan.underwood@gmail.com> 1:23.1-18
|
||||
- Add patch to fix rhbz#547566 (from Juanma Barranquero)
|
||||
|
||||
* Thu Jan 7 2010 Karel Klic <kklic@redhat.com> 1:23.1-17
|
||||
- Simpler fix for rhbz#517272
|
||||
|
||||
* Mon Jan 4 2010 Karel Klic <kklic@redhat.com> 1:23.1-16
|
||||
- Fixed rhbz#517272 - emacs-23.1 update shows fonts in double the normal size
|
||||
|
||||
* Tue Dec 8 2009 Karel Klic <kklic@redhat.com> 1:23.1-15
|
||||
- Fixed rhbz#545398 - ETags messes up filenames
|
||||
|
||||
* Thu Dec 03 2009 Daniel Novotny <dnovotny@redhat.com> 1:23.1-14
|
||||
- fix #542657 - emacs does not display indic text
|
||||
|
||||
* Wed Dec 02 2009 Daniel Novotny <dnovotny@redhat.com> 1:23.1-13
|
||||
- fix #543046 - Using scroll bar in emacs highlights/selects text
|
||||
|
||||
* Mon Nov 30 2009 Daniel Novotny <dnovotny@redhat.com> 1:23.1-12
|
||||
- fixed FTBFS in F12 and higher (#540921)
|
||||
|
||||
* Wed Oct 14 2009 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1:23.1-11
|
||||
- Bump release to fix tagging problem
|
||||
|
||||
* Wed Oct 14 2009 Jonathan G. Underwood <jonathan.underwood@gmail.com> - 1:23.1-10
|
||||
- Update macros.xemacs to treat epoch correctly and be consistent with xemacs package
|
||||
- Use site_start_d macro consistently
|
||||
|
||||
* Thu Sep 24 2009 Daniel Novotny <dnovotny@redhat.com> 1:23.1-9
|
||||
- use xdg-open(1) for opening URLs (#316131)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user