Makefile revision 980
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley###############################################################################
75c0816e8295e180f4bc7f10db3d0d880383bc1cMark Andrews# Fontconfig 2.x Makefile
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater# Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
6ea1b817e31b89a627e146fe69e23ea0a64c89ecBob Halley# Permission is hereby granted, free of charge, to any person obtaining a
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# copy of this software and associated documentation files (the "Software"),
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews# to deal in the Software without restriction, including without limitation
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews# the rights to use, copy, modify, merge, publish, distribute, sublicense,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# and/or sell copies of the Software, and to permit persons to whom the
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews# Software is furnished to do so, subject to the following conditions:
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews# The above copyright notice and this permission notice (including the next
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews# paragraph) shall be included in all copies or substantial portions of the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# DEALINGS IN THE SOFTWARE.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Package name used in tarballs
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# pkg(5) name we deliver the files in (override default)
ea94d370123a5892f6c47a97f21d1b28d44bb168Tinderbox User# Package classification (override default)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# ARC cases that covered this module
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# LSARC/2003/273 fontconfig library
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# PSARC/2004/752 X Consolidation conversion to SMF
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# LSARC/2006/485 fontconfig Hide/Only/Poor (HOP) language matching
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# LSARC/2007/532 fc-match
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# LSARC/2008/140 fontconfig 2.5.0
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Package metadata
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Version number (used in path names)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Checksums for upstream tarball
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinTARBALL_SHA1 = 570fb55eb14f2c92a7b470b941e9d35dbfafa716
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Source tarball
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinSOURCE_TARBALL_NAME=fontconfig-$(MODULE_VERSION).tar.gz
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Download site for source
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinSOURCE_URL=http://fontconfig.org/release/$(SOURCE_TARBALL_NAME)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Patches to apply to source after unpacking, in order
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Library name (used for specfiles/mapfiles)
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater# Man pages to apply Sun footer to & attributes to list
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic UpdaterFONTCONFIG_CMDS = fc-cache fc-list fc-query fc-cat fc-match fc-scan
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic UpdaterSUNTOUCHED_MANPAGES = $(FONTCONFIG_CMDS:%=%/%.1) doc/*.3 doc/*.5
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Override specific attributes for specific man pages
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinSUNTOUCH_MAN_FLAGS = $(COMMON_SUNTOUCH_MAN_FLAGS) \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein $(SUNTOUCH_MAN_FLAGS_$(@F:%.$(FIXED_MAN_SUFFIX)=%))
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# API docs are in doc/*.3
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinSUNTOUCH_MAN_FLAGS_*.3 = $(MODTYPE_SUNTOUCH_MAN_FLAGS)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Command docs are in per-command dirs
a1b05dea35aa30b152a47115e18bbe679d3fcf19Mark AndrewsSUNTOUCH_MAN_FLAGS_CMDS = -p $(MODULE_PREFIX)/bin/
a1b05dea35aa30b152a47115e18bbe679d3fcf19Mark AndrewsSUNTOUCH_MAN_FLAGS_fc-cache.1 = $(SUNTOUCH_MAN_FLAGS_CMDS)
a1b05dea35aa30b152a47115e18bbe679d3fcf19Mark AndrewsSUNTOUCH_MAN_FLAGS_fc-list.1 = $(SUNTOUCH_MAN_FLAGS_CMDS)
a1b05dea35aa30b152a47115e18bbe679d3fcf19Mark AndrewsSUNTOUCH_MAN_FLAGS_fc-query.1 = $(SUNTOUCH_MAN_FLAGS_CMDS)
a1b05dea35aa30b152a47115e18bbe679d3fcf19Mark AndrewsSUNTOUCH_MAN_FLAGS_fc-cat.1 = $(SUNTOUCH_MAN_FLAGS_CMDS)
a1b05dea35aa30b152a47115e18bbe679d3fcf19Mark AndrewsSUNTOUCH_MAN_FLAGS_fc-match.1 = $(SUNTOUCH_MAN_FLAGS_CMDS)
a1b05dea35aa30b152a47115e18bbe679d3fcf19Mark AndrewsSUNTOUCH_MAN_FLAGS_fc-scan.1 = $(SUNTOUCH_MAN_FLAGS_CMDS)
a1b05dea35aa30b152a47115e18bbe679d3fcf19Mark Andrews# Install to /usr, not /usr/X11
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Additional command line options to GNU autoconf configure script
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein --with-add-fonts='/etc/X11/fontpath.d,/usr/share/ghostscript/fonts,/usr/X11/lib/X11/fonts' \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein --with-freetype-config=$(PROTODIR)/usr/bin$(LIBSUBDIR)/freetype-config \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Need to use GNU Make to build
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Paths to find libraries
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinMODULE_BUILD_ENV = LD_LIBRARY_PATH=$(PROTODIR)/usr/lib$(LIBSUBDIR) \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Need to rebuild autoconf/automake files
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Include common rulesets
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Path to install fc-cache SMF files and the RBAC files they use
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinFONTCONFIG_SMF_MANIFEST_dir=$(PROTODIR)$(SMF_MANIFEST_DIR)/application/font
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinFONTCONFIG_SMF_MANIFEST=$(FONTCONFIG_SMF_MANIFEST_dir)/fc-cache.xml
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinFONTCONFIG_SMF_METHOD_dir=$(PROTODIR)$(SMF_METHOD_DIR)
c4d99a62407cebca29653666ae11f87e4f56ebbcAutomatic UpdaterFONTCONFIG_SMF_METHOD=$(FONTCONFIG_SMF_METHOD_dir)/fc-cache
c4d99a62407cebca29653666ae11f87e4f56ebbcAutomatic UpdaterFONTCONFIG_RBAC_AUTH_dir=$(PROTODIR)/etc/security/auth_attr.d
c4d99a62407cebca29653666ae11f87e4f56ebbcAutomatic UpdaterFONTCONFIG_RBAC_AUTH=$(FONTCONFIG_RBAC_AUTH_dir)/fontconfig
c4d99a62407cebca29653666ae11f87e4f56ebbcAutomatic UpdaterFONTCONFIG_RBAC_HELP_dir=$(PROTODIR)/usr/lib/help/auths/locale/C
c4d99a62407cebca29653666ae11f87e4f56ebbcAutomatic UpdaterFONTCONFIG_RBAC_HELP=$(FONTCONFIG_RBAC_HELP_dir)/FontStates.html
c4d99a62407cebca29653666ae11f87e4f56ebbcAutomatic Updater# Sun specification configuration files to be installed in /etc/fonts/conf.d
c4d99a62407cebca29653666ae11f87e4f56ebbcAutomatic UpdaterFONTCONFIG_CONFDIR = $(PROTODIR)/etc/fonts/conf.avail
c4d99a62407cebca29653666ae11f87e4f56ebbcAutomatic UpdaterSUN_CONFFILES = 20-indic.conf 49-sun-preuser.conf 90-sun-prefer-bitmap.conf
c4d99a62407cebca29653666ae11f87e4f56ebbcAutomatic UpdaterFONTCONFIG_SUN_CONFFILES = $(SUN_CONFFILES:%=$(FONTCONFIG_CONFDIR)/%)
c4d99a62407cebca29653666ae11f87e4f56ebbcAutomatic Updater# Additional targets to install beyond the default_install,
c4d99a62407cebca29653666ae11f87e4f56ebbcAutomatic Updater# run just once, not per bitwidth
c4d99a62407cebca29653666ae11f87e4f56ebbcAutomatic UpdaterFONTCONFIG_INSTALL_RULES = fontconfig-sunman-install \
c4d99a62407cebca29653666ae11f87e4f56ebbcAutomatic Updater $(FONTCONFIG_SMF_MANIFEST) $(FONTCONFIG_SMF_METHOD) \
c4d99a62407cebca29653666ae11f87e4f56ebbcAutomatic Updater $(FONTCONFIG_RBAC_AUTH) $(FONTCONFIG_RBAC_HELP) \
c4d99a62407cebca29653666ae11f87e4f56ebbcAutomatic Updater $(INSTALL_SCRIPT) -c -m 0444 fc-cache.xml $@
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews mkdir -p $(PROTODIR)/etc/fonts/conf.d $(PROTODIR)/etc/fonts/conf.avail
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein ln -sf ../conf.avail/$(@F) $(PROTODIR)/etc/fonts/conf.d/$(@F)
2a1d6afad5c725cbc796c10f1d2b9041eda9f077Automatic Updaterfontconfig-sunman-install: $(INSTALL_RULES)
2a1d6afad5c725cbc796c10f1d2b9041eda9f077Automatic Updater mkdir -p $(FC_MAN_DIR)/man4 $(FC_MAN_DIR)/man3lib
2a1d6afad5c725cbc796c10f1d2b9041eda9f077Automatic Updater sed -e 's/.TH "FONTS-CONF" "5"/.TH "fonts.conf" "4"/' \
2a1d6afad5c725cbc796c10f1d2b9041eda9f077Automatic Updater $(FC_MAN_DIR)/man5/fonts-conf.5 > $(FC_MAN_DIR)/man4/fonts.conf.4
2a1d6afad5c725cbc796c10f1d2b9041eda9f077Automatic Updater -rm -f $(FC_MAN_DIR)/man3lib/libfontconfig.3lib
2a1d6afad5c725cbc796c10f1d2b9041eda9f077Automatic Updater $(PERL) -p -e 's/^$$/.LP/;' -e 's/.?\251/\\(co/;' \
2a1d6afad5c725cbc796c10f1d2b9041eda9f077Automatic Updater libfontconfig.3lib > $(FC_MAN_DIR)/man3lib/libfontconfig.3lib