Makefile revision 1231
792N/A###############################################################################
792N/A#
792N/A# xterm Makefile
792N/A#
943N/A# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
792N/A#
792N/A# Permission is hereby granted, free of charge, to any person obtaining a
919N/A# copy of this software and associated documentation files (the "Software"),
919N/A# to deal in the Software without restriction, including without limitation
919N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
919N/A# and/or sell copies of the Software, and to permit persons to whom the
919N/A# Software is furnished to do so, subject to the following conditions:
919N/A#
919N/A# The above copyright notice and this permission notice (including the next
919N/A# paragraph) shall be included in all copies or substantial portions of the
919N/A# Software.
919N/A#
919N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
919N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
919N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
919N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
919N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
919N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
919N/A# DEALINGS IN THE SOFTWARE.
792N/A#
792N/A#
792N/A
792N/A# Package name used in tarballs
792N/AMODULE_NAME=xterm
792N/A
970N/A# pkg(5) name we deliver the files in (override default)
970N/AMODULE_PKGNAME=terminal/xterm
970N/AMODULE_PKGNAME_SET=yes
970N/A
792N/A# resize goes into a separate package so it can be installed in zones without
792N/A# X, but which you login to from a resizable GUI terminal window.
792N/ARESIZE_PKGNAME=terminal/resize
911N/A
911N/A# Package classification (override default)
911N/AMODULE_PKGCLASS=Applications/System Utilities
911N/AMODULE_PKGCLASS_SET=yes
792N/A
792N/A# Package metadata
792N/AUPSTREAM = Thomas Dickey
792N/AUPSTREAM_URL = http://invisible-island.net/xterm/
792N/AUPSTREAM_SET = yes
930N/A
924N/A# Version number (used in path names)
792N/AMODULE_VERSION=271
792N/A
792N/A# Checksums for upstream tarball
792N/ATARBALL_MD5 = e07b05bd3d3a666a8cf086fcc8d227f3
792N/ATARBALL_SHA1 = 53586916147cb88e71b3d620a7d1b80f1696749b
792N/A
792N/A# Source tarball
792N/ASOURCE_URL=ftp://invisible-island.net/xterm/$(SOURCE_TARBALL_NAME:.tar.gz=.tgz)
792N/ASOURCE_URL_SET=yes
792N/A
792N/A# Source tarball
792N/ASOURCE_TARBALL_NAME=$(MODULE_NAME)-$(MODULE_VERSION).tar.gz
792N/ASOURCE_TARBALL_NAME_SET=yes
792N/A
792N/A# Patches to apply to source after unpacking, in order
792N/ASOURCE_PATCHES = resize.man.patch,-p1 desktop-icon.patch,-p1
792N/ASOURCE_PATCHES += solaris-ia.patch,-p1
792N/A
792N/A# Man pages to apply Sun footer to & attributes to list
792N/ASUNTOUCHED_MANPAGES=koi8rxterm.man resize.man uxterm.man xterm.man
792N/AMODULE_STABILITY=Committed
792N/A
792N/A# Fix man page footers to not say "Last changed: X Window System"
792N/AXORGRELSTRING = $(MODULE_NAME) $(MODULE_VERSION)
792N/A XORGMANNAME = X Version 11
792N/A XVENDORVERS = "$(XORGRELSTRING)" "$(XORGMANNAME)"
792N/AMODULE_SUNTOUCH_MAN_FLAGS = -r '{__vendorversion__, $(XVENDORVERS)}'
851N/A
851N/A# Override specific attributes for specific man pages
792N/AMODULE_SUNTOUCH_MAN_FLAGS += \
792N/A $(SUNTOUCH_MAN_FLAGS_$(@F:%.man.$(FIXED_MAN_SUFFIX)=%))
792N/ASUNTOUCH_MAN_FLAGS_resize = -o '{Availability, $(RESIZE_PKGNAME)}'
792N/A
792N/A# Paths to find Xft/fontconfig/freetype headers libraries at build time
792N/A# and run time
792N/AFT_CFLAGS= -I$(PROTODIR)/usr/include -I$(PROTODIR)/usr/include/freetype2
792N/AFT_LIBS= \
792N/A -L$(PROTODIR)/usr/lib$(LIBSUBDIR) -R/usr/lib$(LIBSUBDIR) -lXft -lfontconfig
792N/A
792N/A# Override the flags xterm's configure script generates, since it incorrectly
792N/A# adds -R flags pointing to the build proto area, which are not wanted.
792N/AMODULE_BUILD_MAKEFLAGS = \
792N/A LDFLAGS="$(DEFAULT_CONFIG_LDFLAGS) $(MODTYPE_CFLAGS) $(MODTYPE_LDFLAGS)"
792N/A
792N/A# Additional flags to pass to configure script
792N/AMODULE_CONFIG_OPTS = --enable-256-color --enable-88-color --enable-wide-chars \
792N/A --with-freetype-cflags="$(FT_CFLAGS)" --with-freetype-libs="$(FT_LIBS)" \
792N/A --disable-setuid --disable-setgid --enable-luit --disable-imake \
792N/A --x-includes=$(PROTODIR)$(X11_INCLUDES_DIR) --x-libraries=$(X11_LIB_DIR) \
792N/A --with-app-defaults=/usr/share/X11/app-defaults \
792N/A --with-icondir=/usr/share/pixmaps --enable-logging
792N/A
792N/A# Sort-of emulate automake silent rules - run make configure V=1 to see
792N/A# full compiler flags
792N/AMODULE_CONFIG_OPTS_VERBOSE_0 = --disable-echo
792N/AMODULE_CONFIG_OPTS_VERBOSE_1 = --enable-echo
792N/AMODULE_CONFIG_OPTS_VERBOSE_ = $(MODULE_CONFIG_OPTS_VERBOSE_0)
792N/AMODULE_CONFIG_OPTS += $(MODULE_CONFIG_OPTS_VERBOSE_$(V))
792N/A
792N/A# Tell configure where to find luit binary
792N/AMODULE_CONFIG_ENV = LUIT=$(X11_BIN_DIR)/luit
792N/A
792N/A# Compatibility links from /usr/X11/bin to /usr/bin
792N/AMODULE_X11_BINCOMPAT_LINKS = xterm resize
792N/A
792N/AMODULE_ADD_INSTALL_TARGETS=install_docs install_desktop
792N/A
792N/Ainclude ../Makefile.inc
792N/A
792N/A# Install documentation of xterm control sequences for packaging
967N/AMODULE_DOCDIR=/usr/share/doc/xterm
792N/APROTO_CTLSEQS=$(PROTODIR)$(MODULE_DOCDIR)/ctlseqs.txt
792N/A
792N/Ainstall_docs: $(PROTO_CTLSEQS)
967N/A
792N/A# Install desktop file to allow starting xterm from GNOME menu
792N/ADESKTOP_DIR=/usr/share/applications
792N/APROTO_DESKTOP=$(PROTODIR)$(DESKTOP_DIR)/xterm.desktop
792N/A
792N/Ainstall_desktop: $(PROTO_DESKTOP)
792N/A
$(PROTO_CTLSEQS) $(PROTO_DESKTOP): $(UNPACK_TARGET)
mkdir -p $(@D)
cp -pf $(SOURCE_DIR)/$(@F) $@
# Metadata for separate package for resize
RESIZE_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%xterm=%resize)
RESIZE_PKG_ATTRDATA_FILE = $(RESIZE_PKG_METADATA_DIR)/$(ATTRDATA_FILE_NAME)
RESIZE_PKG_LICENSE_FILE = $(RESIZE_PKG_METADATA_DIR)/$(LICENSE_FILE_NAME)
RESIZE_METADATA_TARGETS = \
$(RESIZE_PKG_METADATA_DIR) \
$(RESIZE_PKG_ATTRDATA_FILE) \
$(RESIZE_PKG_LICENSE_FILE)
install_metadata: $(RESIZE_METADATA_TARGETS)
$(RESIZE_PKG_METADATA_DIR):
mkdir -p $@
$(RESIZE_PKG_ATTRDATA_FILE) $(RESIZE_PKG_LICENSE_FILE): $(RESIZE_PKG_METADATA_DIR)