1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-11-25 22:36:15 +02:00

Disable Emacs build/startup hacks, rename package emacs-bin to emacs.

Now we just link with gcc standard libraries and startup code.
This commit is contained in:
David Kühling 2010-12-18 20:35:36 +01:00
parent 73f3a07d86
commit 5b037bab7f

View File

@ -1,17 +1,15 @@
# #
# Copyright (C) David Kuehling <dvdkhlng TA gmx TOD de> # Copyright (C) David Kuehling <dvdkhlng TA gmx TOD de>
# #
# License GPLv2 or later. # License GPLv2 or later. NO WARRANTY.
# #
# Package for the complete GNU Emacs editor # OpenWRT package for the complete GNU Emacs editor
# Todo: disable libdbus automatic selection for linking in ./configure
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=emacs PKG_NAME:=emacs
PKG_VERSION:=23.2 PKG_VERSION:=23.2
PKG_RELEASE:=2 PKG_RELEASE:=3
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/
@ -29,7 +27,7 @@ define Package/emacs/Default
SUBMENU:=Emacs SUBMENU:=Emacs
SECTION:=utils SECTION:=utils
CATEGORY:=Utilities CATEGORY:=Utilities
TITLE:=The GNU Emacs Self-Documenting, Extensible Editor TITLE:=The GNU Emacs Editor a.k.a. \"Emacs OS\"
URL:=http://www.gnu.org/software/emacs/ URL:=http://www.gnu.org/software/emacs/
# SUBMENU:=Editors # SUBMENU:=Editors
endef endef
@ -40,13 +38,13 @@ At its core is an interpreter for Emacs Lisp, a dialect of the
Lisp programming language with extensions to support text editing. Lisp programming language with extensions to support text editing.
endef endef
define Package/emacs-bin define Package/emacs
$(call Package/emacs/Default) $(call Package/emacs/Default)
DEPENDS:=+libncurses +emacs-data DEPENDS:=+libncurses +emacs-data
TITLE+= (executable) TITLE+= (executable)
endef endef
define Package/emacs-bin/description define Package/emacs/description
$(call Package/emacs/Default/description) $(call Package/emacs/Default/description)
This package contains the Emacs executable files This package contains the Emacs executable files
endef endef
@ -64,7 +62,7 @@ endef
define Package/emacs-ja-dic define Package/emacs-ja-dic
$(call Package/emacs/Default) $(call Package/emacs/Default)
TITLE+= (japanese input dictionary) TITLE+= (japanese input dictionary)
DEPENDS:=+emacs-bin DEPENDS:=+emacs
endef endef
define Package/emacs-ja-dic/description define Package/emacs-ja-dic/description
@ -100,12 +98,20 @@ EMACS_STRIPTEASE_ARGS = \
HOST_CONFIGURE_ARGS += $(EMACS_STRIPTEASE_ARGS) HOST_CONFIGURE_ARGS += $(EMACS_STRIPTEASE_ARGS)
CONFIGURE_ARGS += $(EMACS_STRIPTEASE_ARGS) CONFIGURE_ARGS += $(EMACS_STRIPTEASE_ARGS)
MAKE_FLAGS += "LD=$(TARGET_CROSS)gcc -nostdlib" MAKE_FLAGS += "LD=$(TARGET_CROSS)gcc"
## Don't try that: lowering PURESIZE makes Emacs' RAM usage explode! Maybe ## Don't try that: lowering PURESIZE makes Emacs' RAM usage explode! Maybe
## something about Elisp garbage collection!? ## something about Elisp garbage collection!?
#TARGET_CPPFLAGS += -DPURESIZE=16 #TARGET_CPPFLAGS += -DPURESIZE=16
## Keep emacs build system from doing all kinds nasty tricks that won't work
## (well) with openwrt and uclibc. Especially keep it from attempting to
## manually configure crt* startup file linking. We won't be able to 'dump'
## during cross-compile anyway. Dumping inside the target system seems not
## possible due to lack of RAM. Note that we also need to sanitize the
## Makefile using 'sed' below.
TARGET_CPPFLAGS += -DCANNOT_DUMP -DNO_REMAP -DORDINARY_LINK
define Build/Prepare define Build/Prepare
$(call Build/Prepare/Default) $(call Build/Prepare/Default)
endef endef
@ -135,7 +141,9 @@ define Build/Compile
$(call Build/Compile/Default, -C lib-src -o test-distrib) $(call Build/Compile/Default, -C lib-src -o test-distrib)
ln -sf $(STAGING_DIR_HOST)/bin/emacs-make-docfile $(PKG_BUILD_DIR)/lib-src/make-docfile ln -sf $(STAGING_DIR_HOST)/bin/emacs-make-docfile $(PKG_BUILD_DIR)/lib-src/make-docfile
ln -sf $(STAGING_DIR_HOST)/bin/emacs-prefix-args $(PKG_BUILD_DIR)/src/prefix-args ln -sf $(STAGING_DIR_HOST)/bin/emacs-prefix-args $(PKG_BUILD_DIR)/src/prefix-args
sed -ie 's; /usr/lib/crt; $(TOOLCHAIN_DIR)/usr/lib/crt;g' $(PKG_BUILD_DIR)/src/Makefile sed -ie 's;\(TEMACS_LDFLAGS\|STARTFILES\) =.*;\1 =;' $(PKG_BUILD_DIR)/src/Makefile
# sed -ie 's; /usr/lib/crt[^ ]\+; $(TOOLCHAIN_DIR)/usr/lib/crt;g' $(PKG_BUILD_DIR)/src/Makefile
sed -ie 's; /usr/lib/crt[^ ]\+; ;g' $(PKG_BUILD_DIR)/src/Makefile
sed -ie 's;\(#.*PATH_DUMPLOADSEARCH\).*$$$$;\1 PATH_LOADSEARCH;' $(PKG_BUILD_DIR)/src/epaths.h sed -ie 's;\(#.*PATH_DUMPLOADSEARCH\).*$$$$;\1 PATH_LOADSEARCH;' $(PKG_BUILD_DIR)/src/epaths.h
$(call Build/Compile/Default, -C src -o lib-src -o prefix-args -o ../lib-src/make-docfile temacs ../etc/DOC) $(call Build/Compile/Default, -C src -o lib-src -o prefix-args -o ../lib-src/make-docfile temacs ../etc/DOC)
cp -v $(PKG_BUILD_DIR)/src/temacs $(PKG_BUILD_DIR)/src/emacs cp -v $(PKG_BUILD_DIR)/src/temacs $(PKG_BUILD_DIR)/src/emacs
@ -144,26 +152,28 @@ define Build/Compile
endef endef
define Build/Install define Build/Install
sed -ie 's;./src/emacs\( --version\);$(STAGING_DIR_HOST)/bin/emacs \1;g' \
$(PKG_BUILD_DIR)/Makefile
$(call Build/Install/Default,install-arch-indep install-arch-dep install-leim INSTALL_STRIP=-s "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
define Package/emacs-bin/install define Package/emacs/install
$(INSTALL_DIR) $(1)/usr $(INSTALL_DIR) $(1)/usr
cp -r $(PKG_INSTALL_DIR)/usr/{bin,lib} $(1)/usr cp -r $(PKG_INSTALL_DIR)/usr/{bin,lib} $(1)/usr
endef endef
define Package/emacs-data/install define Package/emacs-data/install
$(INSTALL_DIR) $(1)/usr $(INSTALL_DIR) $(1)/
(cd $(PKG_INSTALL_DIR)/usr && \ (cd $(PKG_INSTALL_DIR)/ && \
tar -cf - --exclude "*.el.gz" \ tar -cf - --exclude "*.el.gz" \
--exclude "images" \ --exclude "images" \
--exclude "refcards" \ --exclude "refcards" \
--exclude "schema" \ --exclude "schema" \
--exclude "NEWS*" \ --exclude "NEWS*" \
--exclude "ja-dic" \ --exclude "ja-dic" \
share) \ usr/share var) \
| (cd $(1)/usr && tar -xvf -) | (cd $(1)/ && tar -xvf -)
endef endef
define Package/emacs-ja-dic/install define Package/emacs-ja-dic/install
@ -182,7 +192,7 @@ endef
$(eval $(call HostBuild)) $(eval $(call HostBuild))
$(eval $(call BuildPackage,emacs-bin)) $(eval $(call BuildPackage,emacs))
$(eval $(call BuildPackage,emacs-data)) $(eval $(call BuildPackage,emacs-data))
$(eval $(call BuildPackage,emacs-ja-dic)) $(eval $(call BuildPackage,emacs-ja-dic))
$(eval $(call BuildPackage,emacs-el)) $(eval $(call BuildPackage,emacs-el))