Date:2010-12-12 00:28:11 (9 years 6 months ago)
Author:David Kühling
Commit:bea9c01bf4d1ff3fd2e046552e18dad5b28aee06
Message:First shot at an Emacs package. Experimental!

Files: emacs/Makefile (1 diff)

Change Details

emacs/Makefile
1#
2# Copyright (C) David Kuehling <dvdkhlng TA gmx TOD de>
3#
4# License GPLv2 or later.
5#
6include $(TOPDIR)/rules.mk
7
8PKG_NAME:=emacs
9PKG_VERSION:=23.2
10PKG_RELEASE:=1
11PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12PKG_SOURCE_URL:=ftp://ftp.fu-berlin.de/pub/gnu/emacs/ \
13    @GNU/emacs/
14
15PKG_MD5SUM:=b6691852dae0bc142b3c12749f6b7ade
16PKG_INSTALL:=1
17PKG_FIXUP:=libtool
18
19PKG_BUILD_DEPENDS:= emacs/host libtool/host
20
21include $(INCLUDE_DIR)/host-build.mk
22include $(INCLUDE_DIR)/package.mk
23
24define Package/emacs
25  SECTION:=utils
26  CATEGORY:=Utilities
27  DEPENDS:=+libncurses
28  TITLE:=The GNU Emacs Self-Documenting, Extensible Editor
29  URL:=http://www.gnu.org/software/emacs/
30  SUBMENU:=Editors
31endef
32
33define Package/emacs/description
34GNU Emacs is an extensible, customizable text editor — and more.
35At its core is an interpreter for Emacs Lisp, a dialect of the
36Lisp programming language with extensions to support text editing.
37endef
38
39HOST_CONFIGURE_ARGS += --without-x
40CONFIGURE_ARGS += --without-x
41MAKE_FLAGS += "LD=$(TARGET_CROSS)gcc -nostdlib"
42
43    # --with-xpm=no \
44    # --with-jpeg=no \
45    # --with-png=no \
46    # --with-gif=no \
47    # --with-tiff=no \
48    # --without-x \
49    # --with-x-toolkit=no \
50
51
52
53
54define Build/Prepare
55    $(call Build/Prepare/Default)
56endef
57
58define Host/Configure
59    $(call Host/Configure/Default)
60endef
61
62## On the host, we only compile and install minimum Emacs components used for
63## bootstrapping
64define Host/Compile
65    export LD_LIBRARY_PATH=$(STAGING_DIR_HOST)/lib; \
66    $(call Host/Compile/Default, lib-src)
67    $(call Host/Compile/Default, -C src temacs emacs)
68endef
69
70define Host/Install
71    export LD_LIBRARY_PATH=$(STAGING_DIR_HOST)/lib; \
72    $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
73    $(INSTALL_DIR) $(STAGING_DIR_HOST)/lib
74    $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/temacs $(STAGING_DIR_HOST)/bin/
75    $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/emacs $(STAGING_DIR_HOST)/bin/
76    $(INSTALL_BIN) $(HOST_BUILD_DIR)/lib-src/make-docfile $(STAGING_DIR_HOST)/bin/emacs-make-docfile
77    $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/prefix-args $(STAGING_DIR_HOST)/bin/emacs-prefix-args
78# $(INSTALL_DATA) $(HOST_BUILD_DIR)/bla $(STAGING_DIR_HOST)/lib/
79endef
80
81define Build/Configure
82    $(call Build/Configure/Default)
83endef
84
85define Build/Compile
86    $(call Build/Compile/Default, -C lib-src -o test-distrib)
87# ln -sf $(STAGING_DIR_HOST)/bin/temacs $(PKG_BUILD_DIR)/src/
88    ln -sf $(STAGING_DIR_HOST)/bin/emacs-make-docfile $(PKG_BUILD_DIR)/lib-src/make-docfile
89    ln -sf $(STAGING_DIR_HOST)/bin/emacs-prefix-args $(PKG_BUILD_DIR)/src/prefix-args
90    sed -ie 's% /usr/lib/crt% $(TOOLCHAIN_DIR)/usr/lib/crt%g' $(PKG_BUILD_DIR)/src/Makefile
91    $(call Build/Compile/Default, -C src -o lib-src -o prefix-args -o ../lib-src/make-docfile temacs ../etc/DOC)
92    cp -v $(PKG_BUILD_DIR)/src/temacs $(PKG_BUILD_DIR)/src/emacs
93    $(call Build/Compile/Default, -C lisp EMACS=$(STAGING_DIR_HOST)/bin/emacs)
94    $(call Build/Compile/Default, -C leim BUILT-EMACS=$(STAGING_DIR_HOST)/bin/emacs)
95endef
96
97define Build/Install
98    $(call Build/Install/Default,install-arch-indep install-arch-dep install-leim "MFLAGS=-o test-distrib")
99endef
100
101define Package/emacs/install
102    $(INSTALL_DIR) $(1)/usr
103    cp -r $(PKG_INSTALL_DIR)/usr/{bin,lib,share} $(1)/usr
104endef
105
106$(eval $(call HostBuild))
107$(eval $(call BuildPackage,emacs))
108
109# The following comments configure the Emacs editor. Just ignore them.
110# Local Variables:
111# compile-command: "make -C ~/h/src/qi/openwrt-xburst package/emacs/compile -j2 V=99"
112# End:

Archive Download the corresponding diff file



interactive