mirror of
git://projects.qi-hardware.com/openwrt-packages.git
synced 2024-11-22 22:25:21 +02:00
tune Emacs' RAM usage (down to approx 10MB now). Hide menu bar,
to save screen space.
This commit is contained in:
parent
b7c65f3d54
commit
ccd581858e
@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=emacs
|
PKG_NAME:=emacs
|
||||||
PKG_VERSION:=23.2
|
PKG_VERSION:=23.2
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=ftp://ftp.fu-berlin.de/pub/gnu/emacs/ \
|
PKG_SOURCE_URL:=ftp://ftp.fu-berlin.de/pub/gnu/emacs/ \
|
||||||
@GNU/emacs/
|
@GNU/emacs/
|
||||||
@ -86,10 +86,26 @@ $(call Package/emacs/Default/description)
|
|||||||
C-h f in case provided documentation of an Emacs function is insufficient.
|
C-h f in case provided documentation of an Emacs function is insufficient.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
HOST_CONFIGURE_ARGS += --without-x
|
EMACS_STRIPTEASE_ARGS = \
|
||||||
CONFIGURE_ARGS += --without-x
|
--without-x \
|
||||||
|
--without-xpm \
|
||||||
|
--without-jpeg \
|
||||||
|
--without-gif \
|
||||||
|
--without-png \
|
||||||
|
--without-rsvg \
|
||||||
|
--without-xft \
|
||||||
|
--without-libotf \
|
||||||
|
--without-dbus \
|
||||||
|
--without-gconf
|
||||||
|
|
||||||
|
HOST_CONFIGURE_ARGS += $(EMACS_STRIPTEASE_ARGS)
|
||||||
|
CONFIGURE_ARGS += $(EMACS_STRIPTEASE_ARGS)
|
||||||
MAKE_FLAGS += "LD=$(TARGET_CROSS)gcc -nostdlib"
|
MAKE_FLAGS += "LD=$(TARGET_CROSS)gcc -nostdlib"
|
||||||
|
|
||||||
|
## Don't try that: lowering PURESIZE makes Emacs' RAM usage explode! Maybe
|
||||||
|
## something about Elisp garbage collection!?
|
||||||
|
#TARGET_CPPFLAGS += -DPURESIZE=16
|
||||||
|
|
||||||
define Build/Prepare
|
define Build/Prepare
|
||||||
$(call Build/Prepare/Default)
|
$(call Build/Prepare/Default)
|
||||||
endef
|
endef
|
||||||
@ -128,7 +144,7 @@ define Build/Compile
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Install
|
define Build/Install
|
||||||
$(call Build/Install/Default,install-arch-indep install-arch-dep install-leim "MFLAGS=-o test-distrib")
|
$(call Build/Install/Default,install-arch-indep install-arch-dep install-leim INSTALL_STRIP=-s "MFLAGS=-o test-distrib")
|
||||||
$(INSTALL_DATA) ./files/site-start.el $(PKG_INSTALL_DIR)/usr/share/emacs/$(PKG_VERSION)/site-lisp
|
$(INSTALL_DATA) ./files/site-start.el $(PKG_INSTALL_DIR)/usr/share/emacs/$(PKG_VERSION)/site-lisp
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@ -174,5 +190,5 @@ $(eval $(call BuildPackage,emacs-el))
|
|||||||
|
|
||||||
# The following comments configure the Emacs editor. Just ignore them.
|
# The following comments configure the Emacs editor. Just ignore them.
|
||||||
# Local Variables:
|
# Local Variables:
|
||||||
# compile-command: "make -C ~/h/src/qi/openwrt-xburst package/emacs-ja-dic-m/compile -j2 V=99"
|
# compile-command: "make -C ~/h/src/qi/openwrt-xburst package/emacs/compile -j2 V=99"
|
||||||
# End:
|
# End:
|
||||||
|
@ -9,3 +9,8 @@
|
|||||||
|
|
||||||
;; Allow us to output international characters to the terminal
|
;; Allow us to output international characters to the terminal
|
||||||
(set-terminal-coding-system 'utf-8)
|
(set-terminal-coding-system 'utf-8)
|
||||||
|
|
||||||
|
;; Do not show the menu bar. What use is it without a mouse?
|
||||||
|
;; (Note that you can still use the menu via <Esc> x menu-bar-open
|
||||||
|
;; or tmm-menubar
|
||||||
|
(menu-bar-mode 0)
|
||||||
|
34
emacs/patches/001-tune-loadup.patch
Normal file
34
emacs/patches/001-tune-loadup.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
Index: emacs23.2-openwrt/lisp/loadup.el
|
||||||
|
===================================================================
|
||||||
|
--- emacs23.2-openwrt/lisp/loadup.el (revision 360)
|
||||||
|
+++ emacs23.2-openwrt/lisp/loadup.el (working copy)
|
||||||
|
@@ -47,6 +47,13 @@
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
+;; This reduces memory usage by a few MB. So far no negative consequences
|
||||||
|
+;; have been witnessed.
|
||||||
|
+(setq inhibit-load-charset-map t)
|
||||||
|
+
|
||||||
|
+;; Not sure whether required. Playing safe.
|
||||||
|
+(setq purify-flag nil)
|
||||||
|
+
|
||||||
|
;; Add subdirectories to the load-path for files that might get
|
||||||
|
;; autoloaded when bootstrapping.
|
||||||
|
(if (or (equal (nth 3 command-line-args) "bootstrap")
|
||||||
|
@@ -326,9 +333,13 @@
|
||||||
|
;; We don't use this fns-*.el file. Instead we keep the data in PURE space.
|
||||||
|
;; Make sure that the spine of the list is not in pure space because it can
|
||||||
|
;; be destructively mutated in lread.c:build_load_history.
|
||||||
|
-(setq load-history (mapcar 'purecopy load-history))
|
||||||
|
-(setq symbol-file-load-history-loaded t)
|
||||||
|
|
||||||
|
+;; The code below makes no sense with a CANNOT_DUMP emacs build. Commented
|
||||||
|
+;; out.
|
||||||
|
+
|
||||||
|
+;; (setq load-history (mapcar 'purecopy load-history))
|
||||||
|
+;; (setq symbol-file-load-history-loaded t)
|
||||||
|
+
|
||||||
|
(set-buffer-modified-p nil)
|
||||||
|
|
||||||
|
;; reset the load-path. See lread.c:init_lread why.
|
Loading…
Reference in New Issue
Block a user