Makefile revision 1339
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai###############################################################################
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai# xterm - terminal emulator for X
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai# Permission is hereby granted, free of charge, to any person obtaining a
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai# copy of this software and associated documentation files (the "Software"),
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai# to deal in the Software without restriction, including without limitation
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai# the rights to use, copy, modify, merge, publish, distribute, sublicense,
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai# and/or sell copies of the Software, and to permit persons to whom the
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai# Software is furnished to do so, subject to the following conditions:
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai# The above copyright notice and this permission notice (including the next
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai# paragraph) shall be included in all copies or substantial portions of the
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai# DEALINGS IN THE SOFTWARE.
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai# Package name used in tarballs
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai# pkg(5) name we deliver the files in (override default)
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai# resize goes into a separate package so it can be installed in zones without
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai# X, but which you login to from a resizable GUI terminal window.
1bb9ba7f0e700971d0c04fca23820699348cfd49Satyen Desai# Package classification (override default)
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai# Package metadata
0709cd166604645c5511b892413b44ad6bce6b64Satyen DesaiUPSTREAM_URL = http://invisible-island.net/xterm/
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen DesaiMODULE_DESC = the xterm terminal emulator application
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai# Version number (used in path names)
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai# Checksums for upstream tarball
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen DesaiTARBALL_SHA1 = 53586916147cb88e71b3d620a7d1b80f1696749b
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai# Source tarball
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen DesaiSOURCE_URL=ftp://invisible-island.net/xterm/$(SOURCE_TARBALL_NAME:.tar.gz=.tgz)
0709cd166604645c5511b892413b44ad6bce6b64Satyen Desai# Source tarball
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen DesaiSOURCE_TARBALL_NAME=$(MODULE_NAME)-$(MODULE_VERSION).tar.gz
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai# Patches to apply to source after unpacking, in order
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen DesaiSOURCE_PATCHES = resize.man.patch,-p1 desktop-icon.patch,-p1
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai# Man pages to apply Sun footer to & attributes to list
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen DesaiSUNTOUCHED_MANPAGES=koi8rxterm.man resize.man uxterm.man xterm.man
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai# Fix man page footers to not say "Last changed: X Window System"
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen DesaiXORGRELSTRING = $(MODULE_NAME) $(MODULE_VERSION)
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai XVENDORVERS = "$(XORGRELSTRING)" "$(XORGMANNAME)"
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen DesaiMODULE_SUNTOUCH_MAN_FLAGS = -r '{__vendorversion__, $(XVENDORVERS)}'
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai# Override specific attributes for specific man pages
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai $(SUNTOUCH_MAN_FLAGS_$(@F:%.man.$(FIXED_MAN_SUFFIX)=%))
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen DesaiSUNTOUCH_MAN_FLAGS_resize = -o '{Availability, $(RESIZE_PKGNAME)}'
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai# Paths to find Xft/fontconfig/freetype headers libraries at build time
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai# and run time
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen DesaiFT_CFLAGS= -I$(PROTODIR)/usr/include -I$(PROTODIR)/usr/include/freetype2
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai -L$(PROTODIR)/usr/lib$(LIBSUBDIR) -R/usr/lib$(LIBSUBDIR) -lXft -lfontconfig
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai# Override the flags xterm's configure script generates, since it incorrectly
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai# adds -R flags pointing to the build proto area, which are not wanted.
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai LDFLAGS="$(DEFAULT_CONFIG_LDFLAGS) $(MODTYPE_CFLAGS) $(MODTYPE_LDFLAGS)"
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai# Additional flags to pass to configure script
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen DesaiMODULE_CONFIG_OPTS = --enable-256-color --enable-88-color --enable-wide-chars \
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai --with-freetype-cflags="$(FT_CFLAGS)" --with-freetype-libs="$(FT_LIBS)" \
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai --disable-setuid --disable-setgid --enable-luit --disable-imake \
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai --x-includes=$(PROTODIR)$(X11_INCLUDES_DIR) --x-libraries=$(X11_LIB_DIR) \
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai --with-app-defaults=/usr/share/X11/app-defaults \
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai --with-icondir=/usr/share/pixmaps --enable-logging
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai# Sort-of emulate automake silent rules - run make configure V=1 to see
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai# full compiler flags
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen DesaiMODULE_CONFIG_OPTS_VERBOSE_ = $(MODULE_CONFIG_OPTS_VERBOSE_0)
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen DesaiMODULE_CONFIG_OPTS += $(MODULE_CONFIG_OPTS_VERBOSE_$(V))
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai# Tell configure where to find luit binary
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai# Compatibility links from /usr/X11/bin to /usr/bin
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen DesaiMODULE_ADD_INSTALL_TARGETS=install_docs install_desktop
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai# Install documentation of xterm control sequences for packaging
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen DesaiPROTO_CTLSEQS=$(PROTODIR)$(MODULE_DOCDIR)/ctlseqs.txt
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai# Install desktop file to allow starting xterm from GNOME menu
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen DesaiPROTO_DESKTOP=$(PROTODIR)$(DESKTOP_DIR)/xterm.desktop
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai$(PROTO_CTLSEQS) $(PROTO_DESKTOP): $(UNPACK_TARGET)
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen Desai# Metadata for separate package for resize
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen DesaiRESIZE_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%xterm=%resize)
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen DesaiRESIZE_PKG_ATTRDATA_FILE = $(RESIZE_PKG_METADATA_DIR)/$(ATTRDATA_FILE_NAME)
9bdfc363ef897a298b7596475f598c1c4fd427b6Satyen DesaiRESIZE_PKG_LICENSE_FILE = $(RESIZE_PKG_METADATA_DIR)/$(LICENSE_FILE_NAME)