diff --git a/emacs/Makefile b/emacs/Makefile index bb90c51..9729e4d 100644 --- a/emacs/Makefile +++ b/emacs/Makefile @@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=emacs PKG_VERSION:=23.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=ftp://ftp.fu-berlin.de/pub/gnu/emacs/ \ @GNU/emacs/ @@ -86,9 +86,25 @@ $(call Package/emacs/Default/description) C-h f in case provided documentation of an Emacs function is insufficient. endef -HOST_CONFIGURE_ARGS += --without-x -CONFIGURE_ARGS += --without-x -MAKE_FLAGS += "LD=$(TARGET_CROSS)gcc -nostdlib" +EMACS_STRIPTEASE_ARGS = \ + --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" + +## Don't try that: lowering PURESIZE makes Emacs' RAM usage explode! Maybe +## something about Elisp garbage collection!? +#TARGET_CPPFLAGS += -DPURESIZE=16 define Build/Prepare $(call Build/Prepare/Default) @@ -128,7 +144,7 @@ define Build/Compile endef 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 endef @@ -174,5 +190,5 @@ $(eval $(call BuildPackage,emacs-el)) # The following comments configure the Emacs editor. Just ignore them. # 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: diff --git a/emacs/files/site-start.el b/emacs/files/site-start.el index e3362f2..7d59ca6 100644 --- a/emacs/files/site-start.el +++ b/emacs/files/site-start.el @@ -9,3 +9,8 @@ ;; Allow us to output international characters to the terminal (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 x menu-bar-open +;; or tmm-menubar +(menu-bar-mode 0) diff --git a/emacs/patches/001-tune-loadup.patch b/emacs/patches/001-tune-loadup.patch new file mode 100644 index 0000000..5c2a994 --- /dev/null +++ b/emacs/patches/001-tune-loadup.patch @@ -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.