Makefile revision 947
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# Version number (used in path names)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Checksums for upstream tarball
ea94d370123a5892f6c47a97f21d1b28d44bb168Tinderbox UserTARBALL_MD5 = 747d2c691c66b563c8e8c1784ce8d014
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinTARBALL_SHA1 = bc84b883673a7f43f2849f06ec110c4eaccfb42c
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 AusteinSOURCE_PATCHES=fontconfig-$(MODULE_VERSION)-fonts.conf.patch,-p1 \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Library name (used for specfiles/mapfiles)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Man pages to apply Sun footer to & attributes to list
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinFONTCONFIG_CMDS = fc-cache fc-list fc-query fc-cat fc-match fc-scan
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinSUNTOUCHED_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
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinSUNTOUCH_MAN_FLAGS_CMDS = -p $(MODULE_PREFIX)/bin/
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinSUNTOUCH_MAN_FLAGS_fc-cache.1 = $(SUNTOUCH_MAN_FLAGS_CMDS)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinSUNTOUCH_MAN_FLAGS_fc-list.1 = $(SUNTOUCH_MAN_FLAGS_CMDS)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinSUNTOUCH_MAN_FLAGS_fc-query.1 = $(SUNTOUCH_MAN_FLAGS_CMDS)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinSUNTOUCH_MAN_FLAGS_fc-cat.1 = $(SUNTOUCH_MAN_FLAGS_CMDS)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinSUNTOUCH_MAN_FLAGS_fc-match.1 = $(SUNTOUCH_MAN_FLAGS_CMDS)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinSUNTOUCH_MAN_FLAGS_fc-scan.1 = $(SUNTOUCH_MAN_FLAGS_CMDS)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Install to /usr, not /usr/X11
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater# Additional command line options to GNU autoconf configure script
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater --with-add-fonts='/etc/X11/fontpath.d,/usr/share/ghostscript/fonts,/usr/X11/lib/X11/fonts' \
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater --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) \
a1b05dea35aa30b152a47115e18bbe679d3fcf19Mark Andrews# Need to rebuild autoconf/automake files
a1b05dea35aa30b152a47115e18bbe679d3fcf19Mark Andrews# Path to install fc-cache manifest & method script
a1b05dea35aa30b152a47115e18bbe679d3fcf19Mark AndrewsFONTCONFIG_SMF_MANIFEST_dir=$(PROTODIR)/var/svc/manifest/application/font
a1b05dea35aa30b152a47115e18bbe679d3fcf19Mark AndrewsFONTCONFIG_SMF_MANIFEST=$(FONTCONFIG_SMF_MANIFEST_dir)/fc-cache.xml
a1b05dea35aa30b152a47115e18bbe679d3fcf19Mark AndrewsFONTCONFIG_SMF_METHOD_dir=$(PROTODIR)/lib/svc/method
a1b05dea35aa30b152a47115e18bbe679d3fcf19Mark AndrewsFONTCONFIG_SMF_METHOD=$(FONTCONFIG_SMF_METHOD_dir)/fc-cache
a1b05dea35aa30b152a47115e18bbe679d3fcf19Mark Andrews# Sun specification configuration files to be installed in /etc/fonts/conf.d
a1b05dea35aa30b152a47115e18bbe679d3fcf19Mark AndrewsFONTCONFIG_CONFDIR = $(PROTODIR)/etc/fonts/conf.avail
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinSUN_CONFFILES = 20-indic.conf 49-sun-preuser.conf 90-sun-prefer-bitmap.conf
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinFONTCONFIG_SUN_CONFFILES = $(SUN_CONFFILES:%=$(FONTCONFIG_CONFDIR)/%)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Additional targets to install beyond the default_install
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinMODULE_ADD_INSTALL_TARGETS = fontconfig-sunman-install \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein $(FONTCONFIG_SMF_MANIFEST) $(FONTCONFIG_SMF_METHOD) \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Include common rulesets
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein 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
c4d99a62407cebca29653666ae11f87e4f56ebbcAutomatic Updater mkdir -p $(FC_MAN_DIR)/man4 $(FC_MAN_DIR)/man3lib
c4d99a62407cebca29653666ae11f87e4f56ebbcAutomatic Updater sed -e 's/.TH "FONTS-CONF" "5"/.TH "fonts.conf" "4"/' \
c4d99a62407cebca29653666ae11f87e4f56ebbcAutomatic Updater -e 's/SUNWfontconfig/SUNWfontconfig-root/' \
c4d99a62407cebca29653666ae11f87e4f56ebbcAutomatic Updater $(FC_MAN_DIR)/man5/fonts-conf.5 > $(FC_MAN_DIR)/man4/fonts.conf.4
c4d99a62407cebca29653666ae11f87e4f56ebbcAutomatic Updater -rm -f $(FC_MAN_DIR)/man3lib/libfontconfig.3lib
c4d99a62407cebca29653666ae11f87e4f56ebbcAutomatic Updater $(PERL) -p -e 's/^$$/.LP/;' -e 's/.?\251/\\(co/;' \
c4d99a62407cebca29653666ae11f87e4f56ebbcAutomatic Updater libfontconfig.3lib $(SOURCE_DIR)/COPYING >> \