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#
3996N/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
2239N/ACOMPONENT_VERSION= 24.3
618N/ACOMPONENT_PROJECT_URL= http://www.gnu.org/software/emacs/
176N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
2239N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
844N/ACOMPONENT_ARCHIVE_HASH= \
2239N/A sha256:0098ca3204813d69cd8412045ba33e8701fa2062f4bff56bedafc064979eef41
176N/ACOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/emacs/$(COMPONENT_ARCHIVE)
1273N/ACOMPONENT_BUGDB= utility/emacs
176N/A
3661N/ATPNO= 15684
3661N/A
3996N/Ainclude $(WS_MAKE_RULES)/prep.mk
3996N/Ainclude $(WS_MAKE_RULES)/configure.mk
3996N/Ainclude $(WS_MAKE_RULES)/ips.mk
176N/A
176N/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
176N/A# local proto instead of from its final installed location.
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"
2239N/ACONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR) --with-compress-info=no
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
176N/A
176N/A# variant specific configure options
2239N/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
2239N/A# Remove existing emacs executable from usr/bin, so that we can replace
2239N/A# it with our script.
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
176N/A# Emacs shell script that picks the right variant at runtime
414N/ACOMPONENT_POST_INSTALL_ACTION += $(CP) augment/emacs $(PBIN) ;
414N/ACOMPONENT_POST_INSTALL_ACTION += $(CHMOD) +x $(PBIN)/emacs ;
176N/A
2239N/A# ctags and etags go in /usr/gnu/bin instead of /usr/bin. At this time,
2239N/A# etags could arguably go into /usr/bin, but we'd like to preserve the
2239N/A# ability to replace the standard Solaris /usr/bin/ctags, along with
2239N/A# both of the ones we're delivering, with Exuberant Ctags. Putting both
2239N/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
414N/A# The file usr/share/emacs/23.1/etc/DOC-23.1.2 gets installed instead of
414N/A# DOC-23.1.1. Remove and replace.
414N/ACOMPONENT_POST_INSTALL_ACTION += $(RM) $(PETC)/DOC-$(COMPONENT_VERSION).2 ;
414N/ACOMPONENT_POST_INSTALL_ACTION += \
414N/A $(CP) $(BUILD_DIR)/$(MACH64)-x/etc/DOC-$(COMPONENT_VERSION).1 \
414N/A $(PETC)/DOC-$(COMPONENT_VERSION).1 ;
176N/A
2239N/A# Provide manpages for the emacs variants, which are our creation, refering
2239N/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
176N/A# Throw away usr/share/info/dir. This file is the topmost node of the Info
176N/A# hierarchy. Emacs builds it, as presumably do all GNU packages, but on
176N/A# Solaris, it is delivered by system/prerequisite/gnu.
414N/ACOMPONENT_POST_INSTALL_ACTION += $(RM) $(PROTO_DIR)/usr/share/info/dir ;
176N/A
176N/A
176N/A# common targets
176N/Abuild: $(BUILD_64)
176N/A
176N/Ainstall: $(BUILD_64) $(BUILD_DIR)/$(MACH64)-x/.installed
176N/A
176N/Atest:
176N/A @echo "no tests available"
176N/A
176N/A
3996N/AREQUIRED_PACKAGES += editor/gnu-emacs
3996N/AREQUIRED_PACKAGES += file/gnu-findutils
3996N/AREQUIRED_PACKAGES += gnome/config/gconf
3996N/AREQUIRED_PACKAGES += image/imagemagick
3996N/AREQUIRED_PACKAGES += image/library/libjpeg
3996N/AREQUIRED_PACKAGES += image/library/libpng
3996N/AREQUIRED_PACKAGES += image/library/librsvg
3996N/AREQUIRED_PACKAGES += image/library/libtiff
3996N/AREQUIRED_PACKAGES += library/desktop/gtk2
3996N/AREQUIRED_PACKAGES += library/glib2
3996N/AREQUIRED_PACKAGES += library/gnutls
3996N/AREQUIRED_PACKAGES += library/libxml2
3996N/AREQUIRED_PACKAGES += library/ncurses
3996N/AREQUIRED_PACKAGES += runtime/perl-512
3996N/AREQUIRED_PACKAGES += shell/ksh93
3996N/AREQUIRED_PACKAGES += system/library
3996N/AREQUIRED_PACKAGES += system/library/fontconfig
3996N/AREQUIRED_PACKAGES += system/library/freetype-2
3996N/AREQUIRED_PACKAGES += system/library/libdbus
3996N/AREQUIRED_PACKAGES += system/library/math
3996N/AREQUIRED_PACKAGES += x11/library/libice
3996N/AREQUIRED_PACKAGES += x11/library/libsm
3996N/AREQUIRED_PACKAGES += x11/library/libx11
3996N/AREQUIRED_PACKAGES += x11/library/libxcursor
3996N/AREQUIRED_PACKAGES += x11/library/libxft
3996N/AREQUIRED_PACKAGES += x11/library/libxmu
3996N/AREQUIRED_PACKAGES += x11/library/libxpm
3996N/AREQUIRED_PACKAGES += x11/library/libxrender
3996N/AREQUIRED_PACKAGES += x11/library/toolkit/libxaw7
3996N/AREQUIRED_PACKAGES += x11/library/toolkit/libxt