commit | author | age
|
ad8773
|
1 |
# |
AB |
2 |
# CDDL HEADER START |
|
3 |
# |
|
4 |
# The contents of this file are subject to the terms of the |
|
5 |
# Common Development and Distribution License (the "License"). |
|
6 |
# You may not use this file except in compliance with the License. |
|
7 |
# |
|
8 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
9 |
# or http://www.opensolaris.org/os/licensing. |
|
10 |
# See the License for the specific language governing permissions |
|
11 |
# and limitations under the License. |
|
12 |
# |
|
13 |
# When distributing Covered Code, include this CDDL HEADER in each |
|
14 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
15 |
# If applicable, add the following below this CDDL HEADER, with the |
|
16 |
# fields enclosed by brackets "[]" replaced with your own identifying |
|
17 |
# information: Portions Copyright [yyyy] [name of copyright owner] |
|
18 |
# |
|
19 |
# CDDL HEADER END |
|
20 |
# |
0f1b63
|
21 |
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. |
22d1d4
|
22 |
# Copyright (c) 2019, Michal Nowak |
70a91e
|
23 |
# Copyright (c) 2020, Andreas Wacknitz |
a0c7b2
|
24 |
# Copyright (c) 2023, Klaus Ziegler |
ad8773
|
25 |
# |
22d1d4
|
26 |
|
5f467b
|
27 |
USE_PARALLEL_BUILD= yes |
9bb041
|
28 |
include ../../../make-rules/shared-macros.mk |
ad8773
|
29 |
|
850e0b
|
30 |
COMPONENT_NAME= emacs |
5f467b
|
31 |
COMPONENT_VERSION= 29.3 |
850e0b
|
32 |
COMPONENT_PROJECT_URL= https://www.gnu.org/software/emacs/ |
AW |
33 |
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
|
34 |
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz |
5f467b
|
35 |
COMPONENT_ARCHIVE_HASH= sha256:c34c05d3ace666ed9c7f7a0faf070fea3217ff1910d004499bd5453233d742a0 |
10cbf5
|
36 |
COMPONENT_ARCHIVE_URL= https://ftp.gnu.org/gnu/emacs/$(COMPONENT_ARCHIVE) |
AW |
37 |
COMPONENT_FMRI= editor/gnu-emacs |
|
38 |
COMPONENT_CLASSIFICATION= Development/Editors |
|
39 |
COMPONENT_LICENSE= GPLv3 |
2fee78
|
40 |
COMPONENT_LICENSE_FILE= COPYING |
ad8773
|
41 |
|
c83ed2
|
42 |
TEST_TARGET= $(NO_TESTS) |
3683ee
|
43 |
include $(WS_MAKE_RULES)/common.mk |
ad8773
|
44 |
|
AB |
45 |
# we build three different variants of emacs for our users. As Solaris |
|
46 |
# always has a 64-bit kernel, and 64-bit emacs can handle larger files, |
|
47 |
# we only build and deliver 64-bit binaries. |
c83ed2
|
48 |
X_VARIANT= $(BUILD_DIR)/$(MACH64)-x |
AW |
49 |
NOX_VARIANT= $(BUILD_DIR)/$(MACH64)-nox |
|
50 |
GTK_VARIANT= $(BUILD_DIR)/$(MACH64)-gtk |
|
51 |
VARIANTS= $(NOX_VARIANT) $(X_VARIANT) $(GTK_VARIANT) |
ad8773
|
52 |
|
b0ad6e
|
53 |
$(VARIANTS:%=%/.configured): BITS=64 |
K |
54 |
|
c83ed2
|
55 |
BUILD_64= $(VARIANTS:%=%/.built) |
AW |
56 |
INSTALL_64= $(VARIANTS:%=%/.installed) |
d4e3a1
|
57 |
|
AL |
58 |
# build with the distribution preferred libjpeg implementation |
|
59 |
CFLAGS += $(JPEG_CPPFLAGS) $(JPEG_CFLAGS) |
|
60 |
CXXFLAGS += $(JPEG_CPPFLAGS) $(JPEG_CXXFLAGS) |
|
61 |
LDFLAGS += $(JPEG_LDFLAGS) |
1024a8
|
62 |
|
c83ed2
|
63 |
CFLAGS += $(shell pkg-config --cflags lcms2) |
ad8773
|
64 |
|
AB |
65 |
# LD_OPTIONS is defined to apply desirable link-editor options to Userland |
|
66 |
# components. Non-executable stack and data break sparc emacs. |
|
67 |
LD_MAP_NOEXSTK.sparc= |
|
68 |
LD_MAP_NOEXDATA.sparc= |
|
69 |
|
331b22
|
70 |
# LDFLAGS is defined for emacs to detect ncurses |
b0ad6e
|
71 |
LDFLAGS += -L/usr/gnu/lib/$(MACH64) -R/usr/gnu/lib/$(MACH64) |
331b22
|
72 |
|
ad8773
|
73 |
# Uncomment this for debugging only. It configures emacs to run from the |
AB |
74 |
# local proto instead of from its final installed location. |
|
75 |
#CONFIGURE_PREFIX = $(PROTO_DIR)/usr |
|
76 |
|
5b3b5f
|
77 |
# The configure script runs the pkg-config command. Since we're building |
AB |
78 |
# 64-bit executables, we need pkg-config to use the 64-bit metadata files |
b0ad6e
|
79 |
CONFIGURE_ENV += PKG_CONFIG_PATH=/usr/lib/$(MACH64)/pkgconfig |
5b3b5f
|
80 |
|
ad8773
|
81 |
# configure options common to all variants of emacs that we want to build. |
1024a8
|
82 |
CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR) |
ad8773
|
83 |
CONFIGURE_OPTIONS += --datarootdir=$(CONFIGURE_PREFIX)/share |
AB |
84 |
CONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/lib |
10cbf5
|
85 |
CONFIGURE_OPTIONS += --with-gif=yes |
AW |
86 |
CONFIGURE_OPTIONS += --with-xaw3d=no |
b0ad6e
|
87 |
CONFIGURE_OPTIONS += --with-mailutils |
b476d9
|
88 |
CONFIGURE_OPTIONS += --with-modules |
5fb2cd
|
89 |
CONFIGURE_OPTIONS += --with-imagemagick |
b476d9
|
90 |
CONFIGURE_OPTIONS += --with-threads |
AW |
91 |
CONFIGURE_OPTIONS += --with-png |
|
92 |
CONFIGURE_OPTIONS += --with-rsvg |
|
93 |
CONFIGURE_OPTIONS += --with-sqlite3 |
|
94 |
CONFIGURE_OPTIONS += --with-tiff |
|
95 |
CONFIGURE_OPTIONS += --with-toolkit-scroll-bars |
|
96 |
CONFIGURE_OPTIONS += --with-webp |
|
97 |
CONFIGURE_OPTIONS += --with-treesitter |
|
98 |
CONFIGURE_OPTIONS += --with-sound=oss |
ad8773
|
99 |
CONFIGURE_OPTIONS += ac_cv_sys_long_file_names=yes |
AB |
100 |
|
a0c7b2
|
101 |
# SPARC needs this to be set in order to publish correctly. |
K |
102 |
ifeq ($(strip $(MACH)),sparc) |
|
103 |
CONFIGURE_OPTIONS += --build=$(GCC_GNU_TRIPLET) |
|
104 |
endif |
|
105 |
|
9bb041
|
106 |
# ASLR should remain disabled for emacs (the default); |
0f1b63
|
107 |
# build consistently core dumps with ASLR |
1d52aa
|
108 |
ASLR_MODE = $(ASLR_DISABLE) |
f778b1
|
109 |
# LD_EXEC_OPTIONS is not supported on illumos, we need to disable ASLR in LD_OPTIONS |
AL |
110 |
LD_OPTIONS+= $(ASLR_MODE) |
0f1b63
|
111 |
|
ad8773
|
112 |
# variant specific configure options |
331b22
|
113 |
$(BUILD_DIR)/%-nox/.configured: CONFIGURE_OPTIONS += --without-all --without-x |
ad8773
|
114 |
$(BUILD_DIR)/%-x/.configured: CONFIGURE_OPTIONS += --with-x-toolkit=lucid |
91a15b
|
115 |
$(BUILD_DIR)/%-gtk/.configured: CONFIGURE_OPTIONS += --with-x-toolkit=gtk3 --with-xwidgets |
ad8773
|
116 |
|
AB |
117 |
# we need to build all variants, but only have to install one in order |
|
118 |
# to get the common files shared by all. We use COMPONENT_POST_INSTALL_ACTION |
|
119 |
# to remove unwanted files, copy the emacs binaries from the other tookit |
|
120 |
# builds into place, and install the additional files we provide. |
|
121 |
# |
|
122 |
# Note that this tweaking is not required, as the proto need not match |
|
123 |
# the packaging. However, doing it this way allows us to examine the proto |
|
124 |
# as a finished and complete product, simplifies debugging emacs, and |
|
125 |
# facilitates the use of 'gmake sample-manifest'. |
|
126 |
PBIN= $(PROTO_DIR)/usr/bin |
|
127 |
PETC= $(PROTO_DIR)/usr/share/emacs/$(COMPONENT_VERSION)/etc |
2fdeba
|
128 |
PPDMP= $(PROTO_DIR)/usr/lib/emacs/$(COMPONENT_VERSION)/$(GCC_GNU_TRIPLET) |
ad8773
|
129 |
PGBIN= $(PROTO_DIR)/usr/gnu/bin |
AB |
130 |
PGSHAREMAN1= $(PROTO_DIR)/usr/gnu/share/man/man1 |
|
131 |
PSHAREMAN1= $(PROTO_DIR)/usr/share/man/man1 |
|
132 |
PVAR= $(PROTO_DIR)/var |
|
133 |
|
|
134 |
# Remove emacs existing emacs executables/script from usr/bin |
220bb0
|
135 |
COMPONENT_POST_INSTALL_ACTION += $(RM) $(PBIN)/emacs $(PBIN)/emacs-* ; |
ad8773
|
136 |
|
AB |
137 |
# GTK binaries |
220bb0
|
138 |
COMPONENT_POST_INSTALL_ACTION += \ |
b0ad6e
|
139 |
$(CP) $(BUILD_DIR)/$(MACH64)-gtk/src/emacs-$(COMPONENT_VERSION).1 \ |
220bb0
|
140 |
$(PBIN)/emacs-gtk ; |
AB |
141 |
COMPONENT_POST_INSTALL_ACTION += \ |
|
142 |
$(LN) $(PBIN)/emacs-gtk $(PBIN)/emacs-gtk-$(COMPONENT_VERSION) ; |
70a91e
|
143 |
# Each emacs variant needs its own dump file: |
AW |
144 |
COMPONENT_POST_INSTALL_ACTION += \ |
b0ad6e
|
145 |
$(CP) $(BUILD_DIR)/$(MACH64)-gtk/src/emacs.pdmp \ |
70a91e
|
146 |
$(PPDMP)/emacs-gtk.pdmp ; |
ad8773
|
147 |
|
AB |
148 |
# Non-X11 binaries |
220bb0
|
149 |
COMPONENT_POST_INSTALL_ACTION += \ |
b0ad6e
|
150 |
$(CP) $(BUILD_DIR)/$(MACH64)-nox/src/emacs-$(COMPONENT_VERSION).1 \ |
220bb0
|
151 |
$(PBIN)/emacs-nox ; |
AB |
152 |
COMPONENT_POST_INSTALL_ACTION += \ |
|
153 |
$(LN) $(PBIN)/emacs-nox $(PBIN)/emacs-nox-$(COMPONENT_VERSION) ; |
70a91e
|
154 |
# Each emacs variant needs its own dump file: |
AW |
155 |
COMPONENT_POST_INSTALL_ACTION += \ |
b0ad6e
|
156 |
$(CP) $(BUILD_DIR)/$(MACH64)-nox/src/emacs.pdmp \ |
70a91e
|
157 |
$(PPDMP)/emacs-nox.pdmp ; |
ad8773
|
158 |
|
AB |
159 |
# X11 (Athena) binaries |
220bb0
|
160 |
COMPONENT_POST_INSTALL_ACTION += \ |
b0ad6e
|
161 |
$(CP) $(BUILD_DIR)/$(MACH64)-x/src/emacs-$(COMPONENT_VERSION).1 \ |
220bb0
|
162 |
$(PBIN)/emacs-x ; |
AB |
163 |
COMPONENT_POST_INSTALL_ACTION += \ |
|
164 |
$(LN) $(PBIN)/emacs-x $(PBIN)/emacs-x-$(COMPONENT_VERSION) ; |
70a91e
|
165 |
# Each emacs variant needs its own dump file: |
AW |
166 |
COMPONENT_POST_INSTALL_ACTION += \ |
b0ad6e
|
167 |
$(CP) $(BUILD_DIR)/$(MACH64)-x/src/emacs.pdmp \ |
70a91e
|
168 |
$(PPDMP)/emacs-x.pdmp ; |
ad8773
|
169 |
|
AB |
170 |
# Emacs shell script that picks the right variant at runtime |
220bb0
|
171 |
COMPONENT_POST_INSTALL_ACTION += $(CP) augment/emacs $(PBIN) ; |
AB |
172 |
COMPONENT_POST_INSTALL_ACTION += $(CHMOD) +x $(PBIN)/emacs ; |
ad8773
|
173 |
|
AB |
174 |
# ctags and etags go in /usr/gnu/bin instead of /usr/bin |
220bb0
|
175 |
COMPONENT_POST_INSTALL_ACTION += $(MKDIR) $(PGBIN) ; |
AB |
176 |
COMPONENT_POST_INSTALL_ACTION += $(MV) $(PBIN)/ctags $(PBIN)/etags $(PGBIN) ; |
ad8773
|
177 |
|
AB |
178 |
# We do not install the files under /var/games/emacs. The reason for |
|
179 |
# this is that we do not install update-game-score as setuid, and |
|
180 |
# therefore the game files are not usable. This the same decision made |
|
181 |
# by Debian, among others. |
220bb0
|
182 |
COMPONENT_POST_INSTALL_ACTION += $(RM) -r $(PVAR) ; |
ad8773
|
183 |
|
220bb0
|
184 |
# The file usr/share/emacs/23.1/etc/DOC-23.1.2 gets installed instead of |
AB |
185 |
# DOC-23.1.1. Remove and replace. |
|
186 |
COMPONENT_POST_INSTALL_ACTION += $(RM) $(PETC)/DOC-$(COMPONENT_VERSION).2 ; |
|
187 |
COMPONENT_POST_INSTALL_ACTION += \ |
b0ad6e
|
188 |
$(CP) $(BUILD_DIR)/$(MACH64)-x/etc/DOC-$(COMPONENT_VERSION).1 \ |
220bb0
|
189 |
$(PETC)/DOC-$(COMPONENT_VERSION).1 ; |
ad8773
|
190 |
|
220bb0
|
191 |
COMPONENT_POST_INSTALL_ACTION += \ |
AB |
192 |
$(CP) augment/man/man1/emacs-gtk.1 $(PSHAREMAN1)/emacs-gtk.1 ; |
|
193 |
COMPONENT_POST_INSTALL_ACTION += \ |
|
194 |
$(CP) augment/man/man1/emacs-nox.1 $(PSHAREMAN1)/emacs-nox.1 ; |
|
195 |
COMPONENT_POST_INSTALL_ACTION += \ |
|
196 |
$(CP) augment/man/man1/emacs-x.1 $(PSHAREMAN1)/emacs-x.1 ; |
ad8773
|
197 |
|
220bb0
|
198 |
COMPONENT_POST_INSTALL_ACTION += $(MKDIR) $(PGSHAREMAN1) ; |
AB |
199 |
COMPONENT_POST_INSTALL_ACTION += \ |
|
200 |
$(CP) $(COMPONENT_SRC)/doc/man/ctags.1 $(PGSHAREMAN1)/ctags.1 ; |
|
201 |
COMPONENT_POST_INSTALL_ACTION += \ |
|
202 |
$(CP) $(COMPONENT_SRC)/doc/man/etags.1 $(PGSHAREMAN1)/etags.1 ; |
ad8773
|
203 |
|
fbf173
|
204 |
# By default, emacs is configured to compress lisp files, manpages, and info |
AP |
205 |
# files. The option to disable that (--without-compress-install) has no |
|
206 |
# granularity --- it's all or nothing. For Solaris, we want to compress lisp |
|
207 |
# sources, but not the others. It's simplest to let everything be compressed. |
|
208 |
# and then explicitly decompress the manpages and info files. |
|
209 |
COMPONENT_POST_INSTALL_ACTION += $(GUNZIP) \ |
|
210 |
$(PROTO_DIR)/usr/share/info/*.gz \ |
|
211 |
$(PROTO_DIR)/usr/share/man/man1/*.gz ; |
|
212 |
|
ad8773
|
213 |
# Throw away usr/share/info/dir. This file is the topmost node of the Info |
AB |
214 |
# hierarchy. Emacs builds it, as presumably do all GNU packages, but on |
|
215 |
# Solaris, it is delivered by system/prerequisite/gnu. |
220bb0
|
216 |
COMPONENT_POST_INSTALL_ACTION += $(RM) $(PROTO_DIR)/usr/share/info/dir ; |
ad8773
|
217 |
|
b0ad6e
|
218 |
install: $(BUILD_64) $(BUILD_DIR)/$(MACH64)-x/.installed |
K |
219 |
|
|
220 |
# build dependencies. |
|
221 |
REQUIRED_PACKAGES += mail/mailutils |
ad8773
|
222 |
|
d4e3a1
|
223 |
# Auto-generated dependencies |
2fee78
|
224 |
REQUIRED_PACKAGES += $(JPEG_IMPLEM_PKG) |
760da8
|
225 |
REQUIRED_PACKAGES += database/sqlite-3 |
b5e837
|
226 |
REQUIRED_PACKAGES += file/gnu-findutils |
5fb2cd
|
227 |
REQUIRED_PACKAGES += image/imagemagick |
5f467b
|
228 |
REQUIRED_PACKAGES += image/library/libjpeg-turbo |
b5e837
|
229 |
REQUIRED_PACKAGES += image/library/libpng16 |
AP |
230 |
REQUIRED_PACKAGES += image/library/librsvg |
|
231 |
REQUIRED_PACKAGES += image/library/libtiff |
70a91e
|
232 |
REQUIRED_PACKAGES += library/c++/harfbuzz |
22d1d4
|
233 |
REQUIRED_PACKAGES += library/desktop/cairo |
b5e837
|
234 |
REQUIRED_PACKAGES += library/desktop/gdk-pixbuf |
22d1d4
|
235 |
REQUIRED_PACKAGES += library/desktop/gtk3 |
MN |
236 |
REQUIRED_PACKAGES += library/desktop/pango |
91a15b
|
237 |
REQUIRED_PACKAGES += library/desktop/webkitgtk2 |
10cbf5
|
238 |
REQUIRED_PACKAGES += library/giflib |
b5e837
|
239 |
REQUIRED_PACKAGES += library/glib2 |
b0ad6e
|
240 |
REQUIRED_PACKAGES += library/gmp |
b5e837
|
241 |
REQUIRED_PACKAGES += library/gnutls-3 |
70a91e
|
242 |
REQUIRED_PACKAGES += library/jansson |
1024a8
|
243 |
REQUIRED_PACKAGES += library/lcms2 |
760da8
|
244 |
REQUIRED_PACKAGES += library/libwebp |
b5e837
|
245 |
REQUIRED_PACKAGES += library/libxml2 |
AP |
246 |
REQUIRED_PACKAGES += library/ncurses |
b476d9
|
247 |
REQUIRED_PACKAGES += library/tree-sitter |
b5e837
|
248 |
REQUIRED_PACKAGES += library/zlib |
10cbf5
|
249 |
REQUIRED_PACKAGES += shell/ksh93 |
b5e837
|
250 |
REQUIRED_PACKAGES += system/library |
AP |
251 |
REQUIRED_PACKAGES += system/library/fontconfig |
|
252 |
REQUIRED_PACKAGES += system/library/freetype-2 |
|
253 |
REQUIRED_PACKAGES += system/library/libdbus |
|
254 |
REQUIRED_PACKAGES += system/library/math |
|
255 |
REQUIRED_PACKAGES += x11/library/libice |
|
256 |
REQUIRED_PACKAGES += x11/library/libsm |
|
257 |
REQUIRED_PACKAGES += x11/library/libx11 |
|
258 |
REQUIRED_PACKAGES += x11/library/libxcb |
760da8
|
259 |
REQUIRED_PACKAGES += x11/library/libxcomposite |
1024a8
|
260 |
REQUIRED_PACKAGES += x11/library/libxext |
b5e837
|
261 |
REQUIRED_PACKAGES += x11/library/libxfixes |
760da8
|
262 |
REQUIRED_PACKAGES += x11/library/libxi |
b5e837
|
263 |
REQUIRED_PACKAGES += x11/library/libxinerama |
AP |
264 |
REQUIRED_PACKAGES += x11/library/libxmu |
|
265 |
REQUIRED_PACKAGES += x11/library/libxpm |
|
266 |
REQUIRED_PACKAGES += x11/library/libxrandr |
|
267 |
REQUIRED_PACKAGES += x11/library/libxrender |
|
268 |
REQUIRED_PACKAGES += x11/library/toolkit/libxaw7 |
|
269 |
REQUIRED_PACKAGES += x11/library/toolkit/libxt |
760da8
|
270 |
REQUIRED_PACKAGES += x11/library/xcb-util |