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