Makefile revision 4804
176N/A#
176N/A# CDDL HEADER START
176N/A#
176N/A# The contents of this file are subject to the terms of the
176N/A# Common Development and Distribution License (the "License").
176N/A# You may not use this file except in compliance with the License.
176N/A#
176N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
176N/A# or http://www.opensolaris.org/os/licensing.
176N/A# See the License for the specific language governing permissions
176N/A# and limitations under the License.
176N/A#
176N/A# When distributing Covered Code, include this CDDL HEADER in each
176N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
176N/A# If applicable, add the following below this CDDL HEADER, with the
176N/A# fields enclosed by brackets "[]" replaced with your own identifying
176N/A# information: Portions Copyright [yyyy] [name of copyright owner]
176N/A#
176N/A# CDDL HEADER END
176N/A#
3817N/A# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
176N/A#
176N/Ainclude ../../make-rules/shared-macros.mk
176N/A
176N/ACOMPONENT_NAME= emacs
4789N/ACOMPONENT_VERSION= 24.5
618N/ACOMPONENT_PROJECT_URL= http://www.gnu.org/software/emacs/
176N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
2134N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
844N/ACOMPONENT_ARCHIVE_HASH= \
4789N/A sha256:2737a6622fb2d9982e9c47fb6f2fb297bda42674e09db40fc9bcc0db4297c3b6
176N/ACOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/emacs/$(COMPONENT_ARCHIVE)
1258N/ACOMPONENT_BUGDB= utility/emacs
176N/A
4789N/ATPNO= 23457
2899N/A
3817N/Ainclude $(WS_MAKE_RULES)/prep.mk
3817N/Ainclude $(WS_MAKE_RULES)/configure.mk
3817N/Ainclude $(WS_MAKE_RULES)/ips.mk
176N/A
4789N/A# We patch the configure.ac file. Get the new configure generated during prep.
4789N/ACOMPONENT_PREP_ACTION = (cd $(@D) ; aclocal -I m4; autoconf )
4789N/A
4789N/A# We build three different variants of emacs for our users. As Solaris
176N/A# always has a 64-bit kernel, and 64-bit emacs can handle larger files,
176N/A# we only build and deliver 64-bit binaries.
176N/AVARIANTS = nox x gtk
176N/A
176N/ABUILD_64 = $(VARIANTS:%=$(BUILD_DIR)/$(MACH64)-%/.built)
176N/AINSTALL_64 = $(VARIANTS:%=$(BUILD_DIR)/$(MACH64)-%/.installed)
176N/A
176N/A# emacs creates a directory in usr/lib/emacs/$(COMPONENT_VERSION) that
176N/A# contains the platform name. Although the name is platform dependent,
176N/A# the files inside it are the same on all platforms. By adding this
176N/A# to the pkgmogrify macros, we can write our manifests in a portable way.
176N/AEMACS_ULEV_PFX = $(MACH:sparc=sparc-sun)
176N/AEMACS_ULEVDIR = $(EMACS_ULEV_PFX:i386=x86_64-pc)-solaris$(SOLARIS_VERSION)
176N/APKG_MACROS += EMACS_ULEVDIR=$(EMACS_ULEVDIR)
176N/A
176N/A# LD_OPTIONS is defined to apply desirable link-editor options to Userland
176N/A# components. Non-executable stack and data break sparc emacs.
176N/A#
176N/ALD_MAP_NOEXSTK.sparc=
176N/ALD_MAP_NOEXDATA.sparc=
176N/A
176N/A# Uncomment this for debugging only. It configures emacs to run from the
4789N/A# local proto instead of from its final installed location. This is useful
4789N/A# for initial bringup of new emacs versions, but can only be used up through
4789N/A# the 'gmake build' stage.
4789N/A#
176N/A#CONFIGURE_PREFIX = $(PROTO_DIR)/usr
176N/A
703N/A# The configure script runs the pkg-config command. Since we're building
703N/A# 64-bit executables, we need pkg-config to use the 64-bit metadata files
703N/ACONFIGURE_ENV += PKG_CONFIG_PATH=/usr/lib/$(MACH64)/pkgconfig
703N/A
176N/A# configure options common to all variants of emacs that we want to build.
519N/ACONFIGURE_OPTIONS += CC="$(CC) -m64"
4789N/ACONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
176N/ACONFIGURE_OPTIONS += --datarootdir=$(CONFIGURE_PREFIX)/share
176N/ACONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_PREFIX)/lib
176N/ACONFIGURE_OPTIONS += --with-gif=no
176N/ACONFIGURE_OPTIONS += ac_cv_sys_long_file_names=yes
4804N/Aifeq ($(strip $(PARFAIT_BUILD)),yes)
4804N/ACONFIGURE_OPTIONS += emacs_cv_prog_cc_o=no
4804N/Aendif
176N/A
4789N/A# Disable gsettings and dbus. gsettings causes numerous startup errors
4789N/A# of the form
4789N/A# (process:25309): GLib-GIO-CRITICAL **: file gsettingsschema.c:
4789N/A# line 416: assertion 'source != NULL' failed
4789N/A# without providing much benefit on Solaris. dbus does not offer sufficient
4789N/A# utility for Solaris to be worth the negative interactions with ssh, where
4789N/A# the session blocks on exit due to dbus holding an open port.
4789N/A#
4789N/ACONFIGURE_OPTIONS += --without-gsettings --without-dbus
4789N/A
4789N/A# ASLR should remain disabled for emacs. ASLR undermines emacs's dumping
4789N/A# code, which requires every execution to have the same mappings. Since
4789N/A# emacs is not network facing, or run with elevated privileges, this is
4789N/A# not a security concern.
1639N/AASLR_MODE = $(ASLR_DISABLE)
1392N/A
176N/A# variant specific configure options
2134N/A$(BUILD_DIR)/%-nox/.configured: CONFIGURE_OPTIONS += --without-all --without-x
176N/A$(BUILD_DIR)/%-x/.configured: CONFIGURE_OPTIONS += --with-x-toolkit=lucid
176N/A$(BUILD_DIR)/%-gtk/.configured: CONFIGURE_OPTIONS += --with-x-toolkit=gtk
176N/A
176N/A# we need to build all variants, but only have to install one in order
176N/A# to get the common files shared by all. We use COMPONENT_POST_INSTALL_ACTION
176N/A# to remove unwanted files, copy the emacs binaries from the other tookit
176N/A# builds into place, and install the additional files we provide.
176N/A#
176N/A# Note that this tweaking is not required, as the proto need not match
176N/A# the packaging. However, doing it this way allows us to examine the proto
176N/A# as a finished and complete product, simplifies debugging emacs, and
176N/A# facilitates the use of 'gmake sample-manifest'.
176N/APBIN= $(PROTO_DIR)/usr/bin
176N/APETC= $(PROTO_DIR)/usr/share/emacs/$(COMPONENT_VERSION)/etc
176N/APGBIN= $(PROTO_DIR)/usr/gnu/bin
176N/APGSHAREMAN1= $(PROTO_DIR)/usr/gnu/share/man/man1
176N/APSHAREMAN1= $(PROTO_DIR)/usr/share/man/man1
176N/APVAR= $(PROTO_DIR)/var
176N/A
4789N/A# Remove existing emacs executable from usr/bin. We install the binaries
4789N/A# under their variant names. /usr/bin/emacs ends up as an IPS mediated link.
414N/ACOMPONENT_POST_INSTALL_ACTION += $(RM) $(PBIN)/emacs $(PBIN)/emacs-* ;
176N/A
176N/A# GTK binaries
414N/ACOMPONENT_POST_INSTALL_ACTION += \
414N/A $(CP) $(BUILD_DIR)/$(MACH64)-gtk/src/emacs-$(COMPONENT_VERSION).1 \
414N/A $(PBIN)/emacs-gtk ;
414N/ACOMPONENT_POST_INSTALL_ACTION += \
414N/A $(LN) $(PBIN)/emacs-gtk $(PBIN)/emacs-gtk-$(COMPONENT_VERSION) ;
176N/A
176N/A# Non-X11 binaries
414N/ACOMPONENT_POST_INSTALL_ACTION += \
414N/A $(CP) $(BUILD_DIR)/$(MACH64)-nox/src/emacs-$(COMPONENT_VERSION).1 \
414N/A $(PBIN)/emacs-nox ;
414N/ACOMPONENT_POST_INSTALL_ACTION += \
414N/A $(LN) $(PBIN)/emacs-nox $(PBIN)/emacs-nox-$(COMPONENT_VERSION) ;
176N/A
176N/A# X11 (Athena) binaries
414N/ACOMPONENT_POST_INSTALL_ACTION += \
414N/A $(CP) $(BUILD_DIR)/$(MACH64)-x/src/emacs-$(COMPONENT_VERSION).1 \
414N/A $(PBIN)/emacs-x ;
414N/ACOMPONENT_POST_INSTALL_ACTION += \
414N/A $(LN) $(PBIN)/emacs-x $(PBIN)/emacs-x-$(COMPONENT_VERSION) ;
176N/A
2134N/A# ctags and etags go in /usr/gnu/bin instead of /usr/bin. At this time,
2134N/A# etags could arguably go into /usr/bin, but we'd like to preserve the
2134N/A# ability to replace the standard Solaris /usr/bin/ctags, along with
2134N/A# both of the ones we're delivering, with Exuberant Ctags. Putting both
2134N/A# emacs tags programs in /usr/gnu/bin helps that, and is a simpler story.
414N/ACOMPONENT_POST_INSTALL_ACTION += $(MKDIR) $(PGBIN) ;
414N/ACOMPONENT_POST_INSTALL_ACTION += $(MV) $(PBIN)/ctags $(PBIN)/etags $(PGBIN) ;
176N/A
176N/A# We do not install the files under /var/games/emacs. The reason for
176N/A# this is that we do not install update-game-score as setuid, and
176N/A# therefore the game files are not usable. This the same decision made
176N/A# by Debian, among others.
414N/ACOMPONENT_POST_INSTALL_ACTION += $(RM) -r $(PVAR) ;
176N/A
4789N/A# Provide manpages for the emacs variants, which are our creation, referring
2134N/A# the reader to the main emacs(1) manpage.
414N/ACOMPONENT_POST_INSTALL_ACTION += \
414N/A $(CP) augment/man/man1/emacs-gtk.1 $(PSHAREMAN1)/emacs-gtk.1 ;
414N/ACOMPONENT_POST_INSTALL_ACTION += \
414N/A $(CP) augment/man/man1/emacs-nox.1 $(PSHAREMAN1)/emacs-nox.1 ;
414N/ACOMPONENT_POST_INSTALL_ACTION += \
414N/A $(CP) augment/man/man1/emacs-x.1 $(PSHAREMAN1)/emacs-x.1 ;
176N/A
414N/ACOMPONENT_POST_INSTALL_ACTION += $(MKDIR) $(PGSHAREMAN1) ;
414N/ACOMPONENT_POST_INSTALL_ACTION += \
414N/A $(CP) $(COMPONENT_SRC)/doc/man/ctags.1 $(PGSHAREMAN1)/ctags.1 ;
414N/ACOMPONENT_POST_INSTALL_ACTION += \
414N/A $(CP) $(COMPONENT_SRC)/doc/man/etags.1 $(PGSHAREMAN1)/etags.1 ;
176N/A
4789N/A# Throw away usr/share/info/dir and usr/share/info/info.info. These files
4789N/A# live at the topmost node of the Info hierarchy. Emacs builds them, as
4789N/A# presumably do all GNU packages, but on Solaris, they are delivered by
4789N/A# pkg:/text/texinfo.
4789N/ACOMPONENT_POST_INSTALL_ACTION += $(RM) \
4789N/A $(PROTO_DIR)/usr/share/info/dir \
4789N/A $(PROTO_DIR)/usr/share/info/info.info ;
176N/A
4789N/A# By default, emacs is configured to compress lisp files, manpages, and info
4789N/A# files. The option to disable that (--without-compress-install) has no
4789N/A# granularity --- it's all or nothing. For Solaris, we want to compress lisp
4789N/A# sources, but not the others. It's simplest to let everything be compressed.
4789N/A# and then explicitly decompress the manpages and info files.
4789N/ACOMPONENT_POST_INSTALL_ACTION += $(GUNZIP) \
4789N/A $(PROTO_DIR)/usr/share/info/*.gz \
4789N/A $(PROTO_DIR)/usr/share/man/man1/*.gz ;
176N/A
176N/A# common targets
3477N/Aconfigure: $(CONFIGURE_64)
3477N/A
176N/Abuild: $(BUILD_64)
176N/A
176N/Ainstall: $(BUILD_64) $(BUILD_DIR)/$(MACH64)-x/.installed
176N/A
4789N/A# The upstream emacs distribution does not have tests to be run
4789N/A# from this target.
3353N/Atest: $(NO_TESTS)
176N/A
4337N/Asystem-test: $(NO_TESTS)
4337N/A
176N/A
3817N/AREQUIRED_PACKAGES += editor/gnu-emacs
3817N/AREQUIRED_PACKAGES += file/gnu-findutils
3817N/AREQUIRED_PACKAGES += gnome/config/gconf
3817N/AREQUIRED_PACKAGES += image/imagemagick
3817N/AREQUIRED_PACKAGES += image/library/libjpeg
3817N/AREQUIRED_PACKAGES += image/library/libpng
3817N/AREQUIRED_PACKAGES += image/library/librsvg
3817N/AREQUIRED_PACKAGES += image/library/libtiff
3817N/AREQUIRED_PACKAGES += library/desktop/cairo
3817N/AREQUIRED_PACKAGES += library/desktop/gdk-pixbuf
3817N/AREQUIRED_PACKAGES += library/desktop/gtk3
3817N/AREQUIRED_PACKAGES += library/desktop/pango
3817N/AREQUIRED_PACKAGES += library/glib2
3817N/AREQUIRED_PACKAGES += library/gnutls
3817N/AREQUIRED_PACKAGES += library/libxml2
3817N/AREQUIRED_PACKAGES += library/ncurses
4789N/AREQUIRED_PACKAGES += library/zlib
3817N/AREQUIRED_PACKAGES += runtime/perl-512
4744N/AREQUIRED_PACKAGES += runtime/perl-520
3817N/AREQUIRED_PACKAGES += shell/ksh93
3817N/AREQUIRED_PACKAGES += system/library
3817N/AREQUIRED_PACKAGES += system/library/fontconfig
3817N/AREQUIRED_PACKAGES += system/library/freetype-2
3817N/AREQUIRED_PACKAGES += system/library/math
3817N/AREQUIRED_PACKAGES += x11/library/libice
3817N/AREQUIRED_PACKAGES += x11/library/libsm
3817N/AREQUIRED_PACKAGES += x11/library/libx11
3817N/AREQUIRED_PACKAGES += x11/library/libxft
4789N/AREQUIRED_PACKAGES += x11/library/libxinerama
3817N/AREQUIRED_PACKAGES += x11/library/libxmu
3817N/AREQUIRED_PACKAGES += x11/library/libxpm
4789N/AREQUIRED_PACKAGES += x11/library/libxrandr
3817N/AREQUIRED_PACKAGES += x11/library/libxrender
3817N/AREQUIRED_PACKAGES += x11/library/toolkit/libxaw7
3817N/AREQUIRED_PACKAGES += x11/library/toolkit/libxt