Makefile revision 1231
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync###############################################################################
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync#
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# xterm Makefile
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync#
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync#
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Permission is hereby granted, free of charge, to any person obtaining a
7eaaa8a4480370b82ef3735994f986f338fb4df2vboxsync# copy of this software and associated documentation files (the "Software"),
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# to deal in the Software without restriction, including without limitation
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# the rights to use, copy, modify, merge, publish, distribute, sublicense,
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# and/or sell copies of the Software, and to permit persons to whom the
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Software is furnished to do so, subject to the following conditions:
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync#
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# The above copyright notice and this permission notice (including the next
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# paragraph) shall be included in all copies or substantial portions of the
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Software.
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync#
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
9040f019271f91b98e1320c0a8c38a42636e3979vboxsync# DEALINGS IN THE SOFTWARE.
9040f019271f91b98e1320c0a8c38a42636e3979vboxsync#
9040f019271f91b98e1320c0a8c38a42636e3979vboxsync#
9040f019271f91b98e1320c0a8c38a42636e3979vboxsync
9040f019271f91b98e1320c0a8c38a42636e3979vboxsync# Package name used in tarballs
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncMODULE_NAME=xterm
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# pkg(5) name we deliver the files in (override default)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncMODULE_PKGNAME=terminal/xterm
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncMODULE_PKGNAME_SET=yes
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# resize goes into a separate package so it can be installed in zones without
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# X, but which you login to from a resizable GUI terminal window.
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncRESIZE_PKGNAME=terminal/resize
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Package classification (override default)
9040f019271f91b98e1320c0a8c38a42636e3979vboxsyncMODULE_PKGCLASS=Applications/System Utilities
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncMODULE_PKGCLASS_SET=yes
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Package metadata
9040f019271f91b98e1320c0a8c38a42636e3979vboxsyncUPSTREAM = Thomas Dickey
9040f019271f91b98e1320c0a8c38a42636e3979vboxsyncUPSTREAM_URL = http://invisible-island.net/xterm/
9040f019271f91b98e1320c0a8c38a42636e3979vboxsyncUPSTREAM_SET = yes
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Version number (used in path names)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncMODULE_VERSION=271
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Checksums for upstream tarball
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncTARBALL_MD5 = e07b05bd3d3a666a8cf086fcc8d227f3
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncTARBALL_SHA1 = 53586916147cb88e71b3d620a7d1b80f1696749b
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Source tarball
9040f019271f91b98e1320c0a8c38a42636e3979vboxsyncSOURCE_URL=ftp://invisible-island.net/xterm/$(SOURCE_TARBALL_NAME:.tar.gz=.tgz)
9040f019271f91b98e1320c0a8c38a42636e3979vboxsyncSOURCE_URL_SET=yes
9040f019271f91b98e1320c0a8c38a42636e3979vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Source tarball
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncSOURCE_TARBALL_NAME=$(MODULE_NAME)-$(MODULE_VERSION).tar.gz
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncSOURCE_TARBALL_NAME_SET=yes
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Patches to apply to source after unpacking, in order
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncSOURCE_PATCHES = resize.man.patch,-p1 desktop-icon.patch,-p1
99be02f9e15a3ca61b6a7c207cc7eb68dbd04817vboxsyncSOURCE_PATCHES += solaris-ia.patch,-p1
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Man pages to apply Sun footer to & attributes to list
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncSUNTOUCHED_MANPAGES=koi8rxterm.man resize.man uxterm.man xterm.man
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncMODULE_STABILITY=Committed
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Fix man page footers to not say "Last changed: X Window System"
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncXORGRELSTRING = $(MODULE_NAME) $(MODULE_VERSION)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync XORGMANNAME = X Version 11
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync XVENDORVERS = "$(XORGRELSTRING)" "$(XORGMANNAME)"
bbf3d430bae83177ab9ce3097f49d89cc873e7c0vboxsyncMODULE_SUNTOUCH_MAN_FLAGS = -r '{__vendorversion__, $(XVENDORVERS)}'
bbf3d430bae83177ab9ce3097f49d89cc873e7c0vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Override specific attributes for specific man pages
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncMODULE_SUNTOUCH_MAN_FLAGS += \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync $(SUNTOUCH_MAN_FLAGS_$(@F:%.man.$(FIXED_MAN_SUFFIX)=%))
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncSUNTOUCH_MAN_FLAGS_resize = -o '{Availability, $(RESIZE_PKGNAME)}'
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Paths to find Xft/fontconfig/freetype headers libraries at build time
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# and run time
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncFT_CFLAGS= -I$(PROTODIR)/usr/include -I$(PROTODIR)/usr/include/freetype2
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncFT_LIBS= \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync -L$(PROTODIR)/usr/lib$(LIBSUBDIR) -R/usr/lib$(LIBSUBDIR) -lXft -lfontconfig
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Override the flags xterm's configure script generates, since it incorrectly
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# adds -R flags pointing to the build proto area, which are not wanted.
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncMODULE_BUILD_MAKEFLAGS = \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync LDFLAGS="$(DEFAULT_CONFIG_LDFLAGS) $(MODTYPE_CFLAGS) $(MODTYPE_LDFLAGS)"
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Additional flags to pass to configure script
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncMODULE_CONFIG_OPTS = --enable-256-color --enable-88-color --enable-wide-chars \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync --with-freetype-cflags="$(FT_CFLAGS)" --with-freetype-libs="$(FT_LIBS)" \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync --disable-setuid --disable-setgid --enable-luit --disable-imake \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync --x-includes=$(PROTODIR)$(X11_INCLUDES_DIR) --x-libraries=$(X11_LIB_DIR) \
6c90795355c6e59ba82e8e5a58e10d686a6d6e65vboxsync --with-app-defaults=/usr/share/X11/app-defaults \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync --with-icondir=/usr/share/pixmaps --enable-logging
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Sort-of emulate automake silent rules - run make configure V=1 to see
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# full compiler flags
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncMODULE_CONFIG_OPTS_VERBOSE_0 = --disable-echo
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncMODULE_CONFIG_OPTS_VERBOSE_1 = --enable-echo
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncMODULE_CONFIG_OPTS_VERBOSE_ = $(MODULE_CONFIG_OPTS_VERBOSE_0)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncMODULE_CONFIG_OPTS += $(MODULE_CONFIG_OPTS_VERBOSE_$(V))
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Tell configure where to find luit binary
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncMODULE_CONFIG_ENV = LUIT=$(X11_BIN_DIR)/luit
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Compatibility links from /usr/X11/bin to /usr/bin
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncMODULE_X11_BINCOMPAT_LINKS = xterm resize
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncMODULE_ADD_INSTALL_TARGETS=install_docs install_desktop
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncinclude ../Makefile.inc
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Install documentation of xterm control sequences for packaging
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncMODULE_DOCDIR=/usr/share/doc/xterm
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncPROTO_CTLSEQS=$(PROTODIR)$(MODULE_DOCDIR)/ctlseqs.txt
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncinstall_docs: $(PROTO_CTLSEQS)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Install desktop file to allow starting xterm from GNOME menu
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncDESKTOP_DIR=/usr/share/applications
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncPROTO_DESKTOP=$(PROTODIR)$(DESKTOP_DIR)/xterm.desktop
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncinstall_desktop: $(PROTO_DESKTOP)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync$(PROTO_CTLSEQS) $(PROTO_DESKTOP): $(UNPACK_TARGET)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync mkdir -p $(@D)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync cp -pf $(SOURCE_DIR)/$(@F) $@
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync# Metadata for separate package for resize
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncRESIZE_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%xterm=%resize)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncRESIZE_PKG_ATTRDATA_FILE = $(RESIZE_PKG_METADATA_DIR)/$(ATTRDATA_FILE_NAME)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncRESIZE_PKG_LICENSE_FILE = $(RESIZE_PKG_METADATA_DIR)/$(LICENSE_FILE_NAME)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncRESIZE_METADATA_TARGETS = \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync $(RESIZE_PKG_METADATA_DIR) \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync $(RESIZE_PKG_ATTRDATA_FILE) \
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync $(RESIZE_PKG_LICENSE_FILE)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsyncinstall_metadata: $(RESIZE_METADATA_TARGETS)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync$(RESIZE_PKG_METADATA_DIR):
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync mkdir -p $@
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync$(RESIZE_PKG_ATTRDATA_FILE) $(RESIZE_PKG_LICENSE_FILE): $(RESIZE_PKG_METADATA_DIR)
c1f5ec452b23d55c71e6f07628b84ac5e97cf551vboxsync