Makefile revision 1102
c313914d0e66b20969215e519bbf2ab4ecf39512Tinderbox User###############################################################################
c80e152862cc3e3207dc837fde7116bd4c0e4b9dTinderbox User# Fontconfig 2.x Makefile
8d1b3ceb4d491ce32572f1702f37ed585eede993Evan Hunt# Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
d77cb075aae5595e460e3299bfc1e8ea5d42b560Evan Hunt# Permission is hereby granted, free of charge, to any person obtaining a
30ca20f720ad0887772a79e7abb25b4fa0e4b5b0Mark Andrews# copy of this software and associated documentation files (the "Software"),
30ca20f720ad0887772a79e7abb25b4fa0e4b5b0Mark Andrews# to deal in the Software without restriction, including without limitation
30ca20f720ad0887772a79e7abb25b4fa0e4b5b0Mark Andrews# the rights to use, copy, modify, merge, publish, distribute, sublicense,
30ca20f720ad0887772a79e7abb25b4fa0e4b5b0Mark Andrews# and/or sell copies of the Software, and to permit persons to whom the
30ca20f720ad0887772a79e7abb25b4fa0e4b5b0Mark Andrews# Software is furnished to do so, subject to the following conditions:
7ec97ae74e42ec21b354fd2d1366313b41d947d6Evan Hunt# The above copyright notice and this permission notice (including the next
701a93f5a592e4652343e049aa495d409c3ee133Mark Andrews# paragraph) shall be included in all copies or substantial portions of the
002f1373374a0b72fc0329baa682917929bef168Tony Finch# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
8f1ed05dc0aae7ae6c3da6ec6d405df61257a61eMark Andrews# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
8f1ed05dc0aae7ae6c3da6ec6d405df61257a61eMark Andrews# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
8f1ed05dc0aae7ae6c3da6ec6d405df61257a61eMark Andrews# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
8f1ed05dc0aae7ae6c3da6ec6d405df61257a61eMark Andrews# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
8f1ed05dc0aae7ae6c3da6ec6d405df61257a61eMark Andrews# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
73cf0ba4e82c6baef638ecc4e31321223f841d28Mark Andrews# DEALINGS IN THE SOFTWARE.
d8351dfc9b725b0d727be7acab6247d7d501d9a0Mark Andrews# Package name used in tarballs
3a29ce9c08dd31709c73e7187aebda0d360c537bEvan Hunt# pkg(5) name we deliver the files in (override default)
f1740da065d4555039fe8bb53beb4153e3f94de3Mark Andrews# Package classification (override default)
31c7ab4fb3f7710af87dc9c3d64c5daf9a3dea35Mark Andrews# ARC cases that covered this module
31c7ab4fb3f7710af87dc9c3d64c5daf9a3dea35Mark Andrews# LSARC/2003/273 fontconfig library
ad309e8dfa0601d6053aaa12770a98a6940f89deEvan Hunt# PSARC/2004/752 X Consolidation conversion to SMF
635e4351b04fd61ca6d853bdac6268c090b55129Mark Andrews# LSARC/2006/485 fontconfig Hide/Only/Poor (HOP) language matching
fc04365d2f83f197c8a54545dd9cd4ce6a209940Mark Andrews# LSARC/2007/532 fc-match
7cbac360bf98c0a52b2d6866ad887616c32d4d3aMark Andrews# LSARC/2008/140 fontconfig 2.5.0
1cf118a656f5fd210787908b845362077fc507f8Evan Hunt# Package metadata
1cf118a656f5fd210787908b845362077fc507f8Evan Hunt# Version number (used in path names)
6fb3db01acad7f5c1f4e23789fb0f2ce56cc07deMukund Sivaraman# Checksums for upstream tarball
6fb3db01acad7f5c1f4e23789fb0f2ce56cc07deMukund SivaramanTARBALL_MD5 = 77e15a92006ddc2adbb06f840d591c0e
fd82c70695888c134287b8018296028c252d100eMukund SivaramanTARBALL_SHA1 = 570fb55eb14f2c92a7b470b941e9d35dbfafa716
fd82c70695888c134287b8018296028c252d100eMukund Sivaraman# Source tarball
fd82c70695888c134287b8018296028c252d100eMukund SivaramanSOURCE_TARBALL_NAME=fontconfig-$(MODULE_VERSION).tar.gz
2cf0fe3b8092f64f8f68ae3693fe2e73e90ad1a4Mark Andrews# Download site for source
2cf0fe3b8092f64f8f68ae3693fe2e73e90ad1a4Mark AndrewsSOURCE_URL=http://fontconfig.org/release/$(SOURCE_TARBALL_NAME)
4221d9cd1d02311fbf9b5f08a038f5af78b10b4aEvan Hunt# Patches to apply to source after unpacking, in order
e526027287b849f0b6ab6e069156697cbafa22c1Michał Kępień# Library name (used for specfiles/mapfiles)
929329d2d66a7e1083c70a9c918381935bf12799Mukund Sivaraman# Man pages to apply Sun footer to & attributes to list
929329d2d66a7e1083c70a9c918381935bf12799Mukund SivaramanFONTCONFIG_CMDS = fc-cache fc-list fc-query fc-cat fc-match fc-scan
929329d2d66a7e1083c70a9c918381935bf12799Mukund SivaramanSUNTOUCHED_MANPAGES = $(FONTCONFIG_CMDS:%=%/%.1) doc/*.3 doc/*.5
afefd754734f896bf3e0590177fff83e7cdfdf35Mark Andrews# Override specific attributes for specific man pages
f0353a586c2bfbae999193cb644b6bc94c7944d8Mark AndrewsSUNTOUCH_MAN_FLAGS = $(COMMON_SUNTOUCH_MAN_FLAGS) \
f0353a586c2bfbae999193cb644b6bc94c7944d8Mark Andrews $(SUNTOUCH_MAN_FLAGS_$(@F:%.$(FIXED_MAN_SUFFIX)=%))
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan Hunt# API docs are in doc/*.3
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan HuntSUNTOUCH_MAN_FLAGS_*.3 = $(MODTYPE_SUNTOUCH_MAN_FLAGS)
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan Hunt# Command docs are in per-command dirs
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan HuntSUNTOUCH_MAN_FLAGS_fc-cache.1 = $(SUNTOUCH_MAN_FLAGS_CMDS)
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan HuntSUNTOUCH_MAN_FLAGS_fc-list.1 = $(SUNTOUCH_MAN_FLAGS_CMDS)
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan HuntSUNTOUCH_MAN_FLAGS_fc-query.1 = $(SUNTOUCH_MAN_FLAGS_CMDS)
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan HuntSUNTOUCH_MAN_FLAGS_fc-cat.1 = $(SUNTOUCH_MAN_FLAGS_CMDS)
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan HuntSUNTOUCH_MAN_FLAGS_fc-match.1 = $(SUNTOUCH_MAN_FLAGS_CMDS)
cad79077bd5b2616bc4a7a6b3cbc0953bef8917fMark AndrewsSUNTOUCH_MAN_FLAGS_fc-scan.1 = $(SUNTOUCH_MAN_FLAGS_CMDS)
cad79077bd5b2616bc4a7a6b3cbc0953bef8917fMark Andrews# Install to /usr, not /usr/X11
adfe58e8e5cd1890585e92b67f1fd01989a1fa7dMark Andrews# Additional command line options to GNU autoconf configure script
c3237dec879f82855403ff7e3ba87b298172efd5Mark Andrews --with-add-fonts='/etc/X11/fontpath.d,/usr/share/ghostscript/fonts,/usr/X11/lib/X11/fonts' \
c3237dec879f82855403ff7e3ba87b298172efd5Mark Andrews --with-freetype-config=$(PROTODIR)/usr/bin$(LIBSUBDIR)/freetype-config \
cb616c6d5c2ece1fac37fa6e0bca2b53d4043098Mark Andrews# Need to use GNU Make to build
534057c9f91a3eb6e0541f3526459c716239b337Mark Andrews# Paths to find libraries
534057c9f91a3eb6e0541f3526459c716239b337Mark AndrewsMODULE_BUILD_ENV = LD_LIBRARY_PATH=$(PROTODIR)/usr/lib$(LIBSUBDIR) \
0f14b041328c062b1fa391887376388dfc8b2fe5Mark Andrews# Need to rebuild autoconf/automake files
f7f4730e563a2749629fe7fef4cd9513cd2bfab7Mark Andrews# Include common rulesets
1848d38f441ebf70ab21f6151bc3487a92d25b63Mark Andrews# Path to install fc-cache SMF files and the RBAC files they use
2d82ed9456e72dc4373bea19d63411afe1c48962Mark AndrewsFONTCONFIG_SMF_MANIFEST_dir=$(PROTODIR)$(SMF_MANIFEST_DIR)/application/font
2d82ed9456e72dc4373bea19d63411afe1c48962Mark AndrewsFONTCONFIG_SMF_MANIFEST=$(FONTCONFIG_SMF_MANIFEST_dir)/fc-cache.xml
2d82ed9456e72dc4373bea19d63411afe1c48962Mark AndrewsFONTCONFIG_SMF_METHOD_dir=$(PROTODIR)$(SMF_METHOD_DIR)
a5a1cbece45e6ca68aafe3b9b995eac6b0f45dd2Mark AndrewsFONTCONFIG_SMF_METHOD=$(FONTCONFIG_SMF_METHOD_dir)/fc-cache
a5a1cbece45e6ca68aafe3b9b995eac6b0f45dd2Mark AndrewsFONTCONFIG_RBAC_AUTH_dir=$(PROTODIR)/etc/security/auth_attr.d
0d6328ce5f6b799f8e7c6cbbb3b965cf29bfb7baMark AndrewsFONTCONFIG_RBAC_AUTH=$(FONTCONFIG_RBAC_AUTH_dir)/fontconfig
0d6328ce5f6b799f8e7c6cbbb3b965cf29bfb7baMark AndrewsFONTCONFIG_RBAC_HELP_dir=$(PROTODIR)/usr/lib/help/auths/locale/C
0d6328ce5f6b799f8e7c6cbbb3b965cf29bfb7baMark AndrewsFONTCONFIG_RBAC_HELP=$(FONTCONFIG_RBAC_HELP_dir)/FontStates.html
677f507de7c546c187c1505c48bc7b440545485cMark Andrews# Sun specification configuration files to be installed in /etc/fonts/conf.d
677f507de7c546c187c1505c48bc7b440545485cMark AndrewsFONTCONFIG_CONFDIR = $(PROTODIR)/etc/fonts/conf.avail
677f507de7c546c187c1505c48bc7b440545485cMark AndrewsSUN_CONFFILES = 20-indic.conf 49-sun-preuser.conf 90-sun-prefer-bitmap.conf
124cc0660c7eff8021c2422fb47441e9ca08b3f9Tinderbox UserFONTCONFIG_SUN_CONFFILES = $(SUN_CONFFILES:%=$(FONTCONFIG_CONFDIR)/%)
677f507de7c546c187c1505c48bc7b440545485cMark Andrews# Additional targets to install beyond the default_install,
677f507de7c546c187c1505c48bc7b440545485cMark Andrews# run just once, not per bitwidth
677f507de7c546c187c1505c48bc7b440545485cMark AndrewsFONTCONFIG_INSTALL_RULES = fontconfig-sunman-install \
677f507de7c546c187c1505c48bc7b440545485cMark Andrews $(FONTCONFIG_SMF_MANIFEST) $(FONTCONFIG_SMF_METHOD) \
677f507de7c546c187c1505c48bc7b440545485cMark Andrews $(FONTCONFIG_RBAC_AUTH) $(FONTCONFIG_RBAC_HELP) \
64d7fa3ec4785b390665860aa6bdae304b3c1d24Mark Andrews $(INSTALL_SCRIPT) -c -m 0444 FontStates.html $@
64d7fa3ec4785b390665860aa6bdae304b3c1d24Mark Andrews mkdir -p $(PROTODIR)/etc/fonts/conf.d $(PROTODIR)/etc/fonts/conf.avail
75505befa93c993aa5d2df24a2b64eac0c34cbffMark Andrews ln -sf ../conf.avail/$(@F) $(PROTODIR)/etc/fonts/conf.d/$(@F)
39d5523a8afc73cbdb4fa426de2ce071267a5d6fMark Andrews mkdir -p $(FC_MAN_DIR)/man4 $(FC_MAN_DIR)/man3lib
39d5523a8afc73cbdb4fa426de2ce071267a5d6fMark Andrews sed -e 's/.TH "FONTS-CONF" "5"/.TH "fonts.conf" "4"/' \
39d5523a8afc73cbdb4fa426de2ce071267a5d6fMark Andrews $(FC_MAN_DIR)/man5/fonts-conf.5 > $(FC_MAN_DIR)/man4/fonts.conf.4
1f4a3c7088594d1b64cd734eb69e1fd023fde8bfMichał Kępień -rm -f $(FC_MAN_DIR)/man3lib/libfontconfig.3lib
1f4a3c7088594d1b64cd734eb69e1fd023fde8bfMichał Kępień $(PERL) -p -e 's/^$$/.LP/;' -e 's/.?\251/\\(co/;' \
1f4a3c7088594d1b64cd734eb69e1fd023fde8bfMichał Kępień libfontconfig.3lib > $(FC_MAN_DIR)/man3lib/libfontconfig.3lib