21 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. |
21 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. |
22 # |
22 # |
23 include ../../make-rules/shared-macros.mk |
23 include ../../make-rules/shared-macros.mk |
24 |
24 |
25 COMPONENT_NAME= emacs |
25 COMPONENT_NAME= emacs |
26 COMPONENT_VERSION= 24.3 |
26 COMPONENT_VERSION= 24.5 |
27 COMPONENT_PROJECT_URL= http://www.gnu.org/software/emacs/ |
27 COMPONENT_PROJECT_URL= http://www.gnu.org/software/emacs/ |
28 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
28 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
29 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
29 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
30 COMPONENT_ARCHIVE_HASH= \ |
30 COMPONENT_ARCHIVE_HASH= \ |
31 sha256:0098ca3204813d69cd8412045ba33e8701fa2062f4bff56bedafc064979eef41 |
31 sha256:2737a6622fb2d9982e9c47fb6f2fb297bda42674e09db40fc9bcc0db4297c3b6 |
32 COMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/emacs/$(COMPONENT_ARCHIVE) |
32 COMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/emacs/$(COMPONENT_ARCHIVE) |
33 COMPONENT_BUGDB= utility/emacs |
33 COMPONENT_BUGDB= utility/emacs |
34 |
34 |
35 TPNO= 15684 |
35 TPNO= 23457 |
36 |
36 |
37 include $(WS_MAKE_RULES)/prep.mk |
37 include $(WS_MAKE_RULES)/prep.mk |
38 include $(WS_MAKE_RULES)/configure.mk |
38 include $(WS_MAKE_RULES)/configure.mk |
39 include $(WS_MAKE_RULES)/ips.mk |
39 include $(WS_MAKE_RULES)/ips.mk |
40 |
40 |
41 # we build three different variants of emacs for our users. As Solaris |
41 # We patch the configure.ac file. Get the new configure generated during prep. |
|
42 COMPONENT_PREP_ACTION = (cd $(@D) ; aclocal -I m4; autoconf ) |
|
43 |
|
44 # We build three different variants of emacs for our users. As Solaris |
42 # always has a 64-bit kernel, and 64-bit emacs can handle larger files, |
45 # always has a 64-bit kernel, and 64-bit emacs can handle larger files, |
43 # we only build and deliver 64-bit binaries. |
46 # we only build and deliver 64-bit binaries. |
44 VARIANTS = nox x gtk |
47 VARIANTS = nox x gtk |
45 |
48 |
46 BUILD_64 = $(VARIANTS:%=$(BUILD_DIR)/$(MACH64)-%/.built) |
49 BUILD_64 = $(VARIANTS:%=$(BUILD_DIR)/$(MACH64)-%/.built) |
59 # |
62 # |
60 LD_MAP_NOEXSTK.sparc= |
63 LD_MAP_NOEXSTK.sparc= |
61 LD_MAP_NOEXDATA.sparc= |
64 LD_MAP_NOEXDATA.sparc= |
62 |
65 |
63 # Uncomment this for debugging only. It configures emacs to run from the |
66 # Uncomment this for debugging only. It configures emacs to run from the |
64 # local proto instead of from its final installed location. |
67 # local proto instead of from its final installed location. This is useful |
|
68 # for initial bringup of new emacs versions, but can only be used up through |
|
69 # the 'gmake build' stage. |
|
70 # |
65 #CONFIGURE_PREFIX = $(PROTO_DIR)/usr |
71 #CONFIGURE_PREFIX = $(PROTO_DIR)/usr |
66 |
72 |
67 # The configure script runs the pkg-config command. Since we're building |
73 # The configure script runs the pkg-config command. Since we're building |
68 # 64-bit executables, we need pkg-config to use the 64-bit metadata files |
74 # 64-bit executables, we need pkg-config to use the 64-bit metadata files |
69 CONFIGURE_ENV += PKG_CONFIG_PATH=/usr/lib/$(MACH64)/pkgconfig |
75 CONFIGURE_ENV += PKG_CONFIG_PATH=/usr/lib/$(MACH64)/pkgconfig |
70 |
76 |
71 # configure options common to all variants of emacs that we want to build. |
77 # configure options common to all variants of emacs that we want to build. |
72 CONFIGURE_OPTIONS += CC="$(CC) -m64" |
78 CONFIGURE_OPTIONS += CC="$(CC) -m64" |
73 CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR) --with-compress-info=no |
79 CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR) |
74 CONFIGURE_OPTIONS += --datarootdir=$(CONFIGURE_PREFIX)/share |
80 CONFIGURE_OPTIONS += --datarootdir=$(CONFIGURE_PREFIX)/share |
75 CONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/lib |
81 CONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/lib |
76 CONFIGURE_OPTIONS += --with-gif=no |
82 CONFIGURE_OPTIONS += --with-gif=no |
77 CONFIGURE_OPTIONS += ac_cv_sys_long_file_names=yes |
83 CONFIGURE_OPTIONS += ac_cv_sys_long_file_names=yes |
78 |
84 |
79 # ASLR should remain disabled for emacs (the default). ASLR undermines |
85 # Disable gsettings and dbus. gsettings causes numerous startup errors |
80 # emacs's dumping code, which requires every execution to have the same |
86 # of the form |
81 # mappings. Since emacs is not network facing, or run with elevated |
87 # (process:25309): GLib-GIO-CRITICAL **: file gsettingsschema.c: |
82 # privileges, this is not a security concern. |
88 # line 416: assertion 'source != NULL' failed |
|
89 # without providing much benefit on Solaris. dbus does not offer sufficient |
|
90 # utility for Solaris to be worth the negative interactions with ssh, where |
|
91 # the session blocks on exit due to dbus holding an open port. |
|
92 # |
|
93 CONFIGURE_OPTIONS += --without-gsettings --without-dbus |
|
94 |
|
95 # ASLR should remain disabled for emacs. ASLR undermines emacs's dumping |
|
96 # code, which requires every execution to have the same mappings. Since |
|
97 # emacs is not network facing, or run with elevated privileges, this is |
|
98 # not a security concern. |
83 ASLR_MODE = $(ASLR_DISABLE) |
99 ASLR_MODE = $(ASLR_DISABLE) |
84 |
100 |
85 # variant specific configure options |
101 # variant specific configure options |
86 $(BUILD_DIR)/%-nox/.configured: CONFIGURE_OPTIONS += --without-all --without-x |
102 $(BUILD_DIR)/%-nox/.configured: CONFIGURE_OPTIONS += --without-all --without-x |
87 $(BUILD_DIR)/%-x/.configured: CONFIGURE_OPTIONS += --with-x-toolkit=lucid |
103 $(BUILD_DIR)/%-x/.configured: CONFIGURE_OPTIONS += --with-x-toolkit=lucid |
101 PGBIN= $(PROTO_DIR)/usr/gnu/bin |
117 PGBIN= $(PROTO_DIR)/usr/gnu/bin |
102 PGSHAREMAN1= $(PROTO_DIR)/usr/gnu/share/man/man1 |
118 PGSHAREMAN1= $(PROTO_DIR)/usr/gnu/share/man/man1 |
103 PSHAREMAN1= $(PROTO_DIR)/usr/share/man/man1 |
119 PSHAREMAN1= $(PROTO_DIR)/usr/share/man/man1 |
104 PVAR= $(PROTO_DIR)/var |
120 PVAR= $(PROTO_DIR)/var |
105 |
121 |
106 # Remove existing emacs executable from usr/bin, so that we can replace |
122 # Remove existing emacs executable from usr/bin. We install the binaries |
107 # it with our script. |
123 # under their variant names. /usr/bin/emacs ends up as an IPS mediated link. |
108 COMPONENT_POST_INSTALL_ACTION += $(RM) $(PBIN)/emacs $(PBIN)/emacs-* ; |
124 COMPONENT_POST_INSTALL_ACTION += $(RM) $(PBIN)/emacs $(PBIN)/emacs-* ; |
109 |
125 |
110 # GTK binaries |
126 # GTK binaries |
111 COMPONENT_POST_INSTALL_ACTION += \ |
127 COMPONENT_POST_INSTALL_ACTION += \ |
112 $(CP) $(BUILD_DIR)/$(MACH64)-gtk/src/emacs-$(COMPONENT_VERSION).1 \ |
128 $(CP) $(BUILD_DIR)/$(MACH64)-gtk/src/emacs-$(COMPONENT_VERSION).1 \ |
125 COMPONENT_POST_INSTALL_ACTION += \ |
141 COMPONENT_POST_INSTALL_ACTION += \ |
126 $(CP) $(BUILD_DIR)/$(MACH64)-x/src/emacs-$(COMPONENT_VERSION).1 \ |
142 $(CP) $(BUILD_DIR)/$(MACH64)-x/src/emacs-$(COMPONENT_VERSION).1 \ |
127 $(PBIN)/emacs-x ; |
143 $(PBIN)/emacs-x ; |
128 COMPONENT_POST_INSTALL_ACTION += \ |
144 COMPONENT_POST_INSTALL_ACTION += \ |
129 $(LN) $(PBIN)/emacs-x $(PBIN)/emacs-x-$(COMPONENT_VERSION) ; |
145 $(LN) $(PBIN)/emacs-x $(PBIN)/emacs-x-$(COMPONENT_VERSION) ; |
130 |
|
131 # Emacs shell script that picks the right variant at runtime |
|
132 COMPONENT_POST_INSTALL_ACTION += $(CP) augment/emacs $(PBIN) ; |
|
133 COMPONENT_POST_INSTALL_ACTION += $(CHMOD) +x $(PBIN)/emacs ; |
|
134 |
146 |
135 # ctags and etags go in /usr/gnu/bin instead of /usr/bin. At this time, |
147 # ctags and etags go in /usr/gnu/bin instead of /usr/bin. At this time, |
136 # etags could arguably go into /usr/bin, but we'd like to preserve the |
148 # etags could arguably go into /usr/bin, but we'd like to preserve the |
137 # ability to replace the standard Solaris /usr/bin/ctags, along with |
149 # ability to replace the standard Solaris /usr/bin/ctags, along with |
138 # both of the ones we're delivering, with Exuberant Ctags. Putting both |
150 # both of the ones we're delivering, with Exuberant Ctags. Putting both |
144 # this is that we do not install update-game-score as setuid, and |
156 # this is that we do not install update-game-score as setuid, and |
145 # therefore the game files are not usable. This the same decision made |
157 # therefore the game files are not usable. This the same decision made |
146 # by Debian, among others. |
158 # by Debian, among others. |
147 COMPONENT_POST_INSTALL_ACTION += $(RM) -r $(PVAR) ; |
159 COMPONENT_POST_INSTALL_ACTION += $(RM) -r $(PVAR) ; |
148 |
160 |
149 # The file usr/share/emacs/23.1/etc/DOC-23.1.2 gets installed instead of |
161 # Provide manpages for the emacs variants, which are our creation, referring |
150 # DOC-23.1.1. Remove and replace. |
|
151 COMPONENT_POST_INSTALL_ACTION += $(RM) $(PETC)/DOC-$(COMPONENT_VERSION).2 ; |
|
152 COMPONENT_POST_INSTALL_ACTION += \ |
|
153 $(CP) $(BUILD_DIR)/$(MACH64)-x/etc/DOC-$(COMPONENT_VERSION).1 \ |
|
154 $(PETC)/DOC-$(COMPONENT_VERSION).1 ; |
|
155 |
|
156 # Provide manpages for the emacs variants, which are our creation, refering |
|
157 # the reader to the main emacs(1) manpage. |
162 # the reader to the main emacs(1) manpage. |
158 COMPONENT_POST_INSTALL_ACTION += \ |
163 COMPONENT_POST_INSTALL_ACTION += \ |
159 $(CP) augment/man/man1/emacs-gtk.1 $(PSHAREMAN1)/emacs-gtk.1 ; |
164 $(CP) augment/man/man1/emacs-gtk.1 $(PSHAREMAN1)/emacs-gtk.1 ; |
160 COMPONENT_POST_INSTALL_ACTION += \ |
165 COMPONENT_POST_INSTALL_ACTION += \ |
161 $(CP) augment/man/man1/emacs-nox.1 $(PSHAREMAN1)/emacs-nox.1 ; |
166 $(CP) augment/man/man1/emacs-nox.1 $(PSHAREMAN1)/emacs-nox.1 ; |
166 COMPONENT_POST_INSTALL_ACTION += \ |
171 COMPONENT_POST_INSTALL_ACTION += \ |
167 $(CP) $(COMPONENT_SRC)/doc/man/ctags.1 $(PGSHAREMAN1)/ctags.1 ; |
172 $(CP) $(COMPONENT_SRC)/doc/man/ctags.1 $(PGSHAREMAN1)/ctags.1 ; |
168 COMPONENT_POST_INSTALL_ACTION += \ |
173 COMPONENT_POST_INSTALL_ACTION += \ |
169 $(CP) $(COMPONENT_SRC)/doc/man/etags.1 $(PGSHAREMAN1)/etags.1 ; |
174 $(CP) $(COMPONENT_SRC)/doc/man/etags.1 $(PGSHAREMAN1)/etags.1 ; |
170 |
175 |
171 # Throw away usr/share/info/dir. This file is the topmost node of the Info |
176 # Throw away usr/share/info/dir and usr/share/info/info.info. These files |
172 # hierarchy. Emacs builds it, as presumably do all GNU packages, but on |
177 # live at the topmost node of the Info hierarchy. Emacs builds them, as |
173 # Solaris, it is delivered by system/prerequisite/gnu. |
178 # presumably do all GNU packages, but on Solaris, they are delivered by |
174 COMPONENT_POST_INSTALL_ACTION += $(RM) $(PROTO_DIR)/usr/share/info/dir ; |
179 # pkg:/text/texinfo. |
175 |
180 COMPONENT_POST_INSTALL_ACTION += $(RM) \ |
|
181 $(PROTO_DIR)/usr/share/info/dir \ |
|
182 $(PROTO_DIR)/usr/share/info/info.info ; |
|
183 |
|
184 # By default, emacs is configured to compress lisp files, manpages, and info |
|
185 # files. The option to disable that (--without-compress-install) has no |
|
186 # granularity --- it's all or nothing. For Solaris, we want to compress lisp |
|
187 # sources, but not the others. It's simplest to let everything be compressed. |
|
188 # and then explicitly decompress the manpages and info files. |
|
189 COMPONENT_POST_INSTALL_ACTION += $(GUNZIP) \ |
|
190 $(PROTO_DIR)/usr/share/info/*.gz \ |
|
191 $(PROTO_DIR)/usr/share/man/man1/*.gz ; |
176 |
192 |
177 # common targets |
193 # common targets |
178 configure: $(CONFIGURE_64) |
194 configure: $(CONFIGURE_64) |
179 |
195 |
180 build: $(BUILD_64) |
196 build: $(BUILD_64) |
181 |
197 |
182 install: $(BUILD_64) $(BUILD_DIR)/$(MACH64)-x/.installed |
198 install: $(BUILD_64) $(BUILD_DIR)/$(MACH64)-x/.installed |
183 |
199 |
|
200 # The upstream emacs distribution does not have tests to be run |
|
201 # from this target. |
184 test: $(NO_TESTS) |
202 test: $(NO_TESTS) |
185 |
203 |
186 system-test: $(NO_TESTS) |
204 system-test: $(NO_TESTS) |
187 |
205 |
188 |
206 |
200 REQUIRED_PACKAGES += library/desktop/pango |
218 REQUIRED_PACKAGES += library/desktop/pango |
201 REQUIRED_PACKAGES += library/glib2 |
219 REQUIRED_PACKAGES += library/glib2 |
202 REQUIRED_PACKAGES += library/gnutls |
220 REQUIRED_PACKAGES += library/gnutls |
203 REQUIRED_PACKAGES += library/libxml2 |
221 REQUIRED_PACKAGES += library/libxml2 |
204 REQUIRED_PACKAGES += library/ncurses |
222 REQUIRED_PACKAGES += library/ncurses |
|
223 REQUIRED_PACKAGES += library/zlib |
205 REQUIRED_PACKAGES += runtime/perl-512 |
224 REQUIRED_PACKAGES += runtime/perl-512 |
206 REQUIRED_PACKAGES += runtime/perl-520 |
225 REQUIRED_PACKAGES += runtime/perl-520 |
207 REQUIRED_PACKAGES += shell/ksh93 |
226 REQUIRED_PACKAGES += shell/ksh93 |
208 REQUIRED_PACKAGES += system/library |
227 REQUIRED_PACKAGES += system/library |
209 REQUIRED_PACKAGES += system/library/fontconfig |
228 REQUIRED_PACKAGES += system/library/fontconfig |
210 REQUIRED_PACKAGES += system/library/freetype-2 |
229 REQUIRED_PACKAGES += system/library/freetype-2 |
211 REQUIRED_PACKAGES += system/library/libdbus |
|
212 REQUIRED_PACKAGES += system/library/math |
230 REQUIRED_PACKAGES += system/library/math |
213 REQUIRED_PACKAGES += x11/library/libice |
231 REQUIRED_PACKAGES += x11/library/libice |
214 REQUIRED_PACKAGES += x11/library/libsm |
232 REQUIRED_PACKAGES += x11/library/libsm |
215 REQUIRED_PACKAGES += x11/library/libx11 |
233 REQUIRED_PACKAGES += x11/library/libx11 |
216 REQUIRED_PACKAGES += x11/library/libxft |
234 REQUIRED_PACKAGES += x11/library/libxft |
|
235 REQUIRED_PACKAGES += x11/library/libxinerama |
217 REQUIRED_PACKAGES += x11/library/libxmu |
236 REQUIRED_PACKAGES += x11/library/libxmu |
218 REQUIRED_PACKAGES += x11/library/libxpm |
237 REQUIRED_PACKAGES += x11/library/libxpm |
|
238 REQUIRED_PACKAGES += x11/library/libxrandr |
219 REQUIRED_PACKAGES += x11/library/libxrender |
239 REQUIRED_PACKAGES += x11/library/libxrender |
220 REQUIRED_PACKAGES += x11/library/toolkit/libxaw7 |
240 REQUIRED_PACKAGES += x11/library/toolkit/libxaw7 |
221 REQUIRED_PACKAGES += x11/library/toolkit/libxt |
241 REQUIRED_PACKAGES += x11/library/toolkit/libxt |