Makefile revision 1652
280a8a0544b4aeb52414d20e8c6e6c5b1108562eTinderbox User###############################################################################
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater# Fontconfig - Font configuration and customization library
19558a04decde0e7261d489d92d04ad88104217bTinderbox User# Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
827f8cccb5280f4da66c46186e792d1cb9d73503Mark Andrews# Permission is hereby granted, free of charge, to any person obtaining a
969eaf7df8ac651946f76b6631ff5db568c11ef6Tinderbox User# copy of this software and associated documentation files (the "Software"),
03ebc228ee3725738b067b6bd7082a9a731822a1Tinderbox User# to deal in the Software without restriction, including without limitation
f4ee48be3994797a8332b86c101db4d7b54799ceTinderbox User# the rights to use, copy, modify, merge, publish, distribute, sublicense,
a2c370ca12bb0360ff7e969474ead3f788c65fffTinderbox User# and/or sell copies of the Software, and to permit persons to whom the
8de3f14f1c300c3e1ed99084cc03485b42c92bf1Tinderbox User# Software is furnished to do so, subject to the following conditions:
950d203b64f512b85fcc093ee1e9e3e531a1aea3Tinderbox User# The above copyright notice and this permission notice (including the next
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User# paragraph) shall be included in all copies or substantial portions of the
e676a596869d8a80a644c99a848afb53d1c5975eMark Andrews# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
b91d11bfcc30b96f2c80f3a76d12e3dcc8597a68Mark Andrews# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
d5637bdbb931ff79fced3d4858d83212ea58ed15Tinderbox User# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
3759f10fc543747668b1ca4b4671f35b0dea8445Francis Dupont# DEALINGS IN THE SOFTWARE.
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# Package name used in tarballs
30370d905e9be3be7d9b947fd432bacecbb13bb9Evan Hunt# Package metadata
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsMODULE_DESC = the FontConfig font configuration and customization library
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews# pkg(5) name we deliver the files in (override default)
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User# Package classification (override default)
30370d905e9be3be7d9b947fd432bacecbb13bb9Evan Hunt# ARC cases that covered this module
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# LSARC/2003/273 fontconfig library
03ebc228ee3725738b067b6bd7082a9a731822a1Tinderbox User# PSARC/2004/752 X Consolidation conversion to SMF
dc238a06bffa79de141ee7655765e2df91498a8aTinderbox User# LSARC/2006/485 fontconfig Hide/Only/Poor (HOP) language matching
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt# LSARC/2007/532 fc-match
3759f10fc543747668b1ca4b4671f35b0dea8445Francis Dupont# LSARC/2008/140 fontconfig 2.5.0
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt# PSARC/2010/162 fontconfig 2.8.0
827f8cccb5280f4da66c46186e792d1cb9d73503Mark Andrews# PSARC/2015/035 Moving fontconfig utilities to LP64 by default
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# PSARC/2015/527 Fontconfig 2.11.94
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# Package metadata
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# Version number (used in path names)
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# Checksums for upstream tarball
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterTARBALL_MD5 = b5af5a423ee3b5cfc34846838963c058
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsTARBALL_SHA1 = 30d832b754fb10a3b70ebac750a38a0275438ad8
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark AndrewsTARBALL_SHA256 = b449a3e10c47e1d1c7a6ec6e2016cca73d3bd68fbbd4f0ae5cc6b573f7d6c7f3
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrews# Download site for source
30370d905e9be3be7d9b947fd432bacecbb13bb9Evan HuntSOURCE_URL=http://fontconfig.org/release/$(SOURCE_TARBALL_NAME)
03ebc228ee3725738b067b6bd7082a9a731822a1Tinderbox User# Patches to apply to source after unpacking, in order
2ae159b376dac23870d8005563c585acf85a4b5aEvan Hunt# Library name (used for specfiles/mapfiles)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Man pages to apply Sun footer to & attributes to list
549c517e2ecad52bb1d32f08920e29d4e8cda71eTinderbox UserFONTCONFIG_CMDS = fc-cache fc-list fc-query fc-cat fc-match fc-scan fc-pattern fc-validate
549c517e2ecad52bb1d32f08920e29d4e8cda71eTinderbox UserSUNTOUCHED_MANPAGES = $(FONTCONFIG_CMDS:%=%/%.1) doc/*.3 doc/*.5
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Override specific attributes for specific man pages
b91d11bfcc30b96f2c80f3a76d12e3dcc8597a68Mark AndrewsSUNTOUCH_MAN_FLAGS = $(COMMON_SUNTOUCH_MAN_FLAGS) \
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews $(SUNTOUCH_MAN_FLAGS_$(@F:%.$(FIXED_MAN_SUFFIX)=%))
aef6cf0f147a5014d4891c9689b9f463399e16e7Tinderbox User# API docs are in doc/*.3
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsSUNTOUCH_MAN_FLAGS_*.3 = $(MODTYPE_SUNTOUCH_MAN_FLAGS)
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User# Command docs are in per-command dirs
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonSUNTOUCH_MAN_FLAGS_CMDS = -p $(MODULE_BIN_DIR)/
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox UserSUNTOUCH_MAN_FLAGS_fc-cache.1 = $(SUNTOUCH_MAN_FLAGS_CMDS)
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark AndrewsSUNTOUCH_MAN_FLAGS_fc-list.1 = $(SUNTOUCH_MAN_FLAGS_CMDS)
30370d905e9be3be7d9b947fd432bacecbb13bb9Evan HuntSUNTOUCH_MAN_FLAGS_fc-query.1 = $(SUNTOUCH_MAN_FLAGS_CMDS)
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsSUNTOUCH_MAN_FLAGS_fc-cat.1 = $(SUNTOUCH_MAN_FLAGS_CMDS)
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox UserSUNTOUCH_MAN_FLAGS_fc-match.1 = $(SUNTOUCH_MAN_FLAGS_CMDS)
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark AndrewsSUNTOUCH_MAN_FLAGS_fc-scan.1 = $(SUNTOUCH_MAN_FLAGS_CMDS)
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark AndrewsSUNTOUCH_MAN_FLAGS_fc-pattern.1 = $(SUNTOUCH_MAN_FLAGS_CMDS)
30370d905e9be3be7d9b947fd432bacecbb13bb9Evan HuntSUNTOUCH_MAN_FLAGS_fc-validate.1= $(SUNTOUCH_MAN_FLAGS_CMDS)
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User# pkg-config files to update
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User# Don't include path to freetype headers in our proto area in the *.pc files.
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrews# The 'Requires: freetype' will handle the right -I flags for us.
30370d905e9be3be7d9b947fd432bacecbb13bb9Evan HuntMODULE_FIX_PC_FLAGS += -e 's| \@FREETYPE_CFLAGS\@||g;'
30370d905e9be3be7d9b947fd432bacecbb13bb9Evan Hunt# Additional command line options to GNU autoconf configure script
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews --with-add-fonts='/etc/X11/fontpath.d,/usr/share/ghostscript/fonts,/usr/X11/lib/X11/fonts' \
827f8cccb5280f4da66c46186e792d1cb9d73503Mark Andrews# Need to use GNU Make to build
827f8cccb5280f4da66c46186e792d1cb9d73503Mark Andrews# Paths to find libraries
2a31bd531072824ef252c18303859d6af7451b00Francis DupontMODULE_BUILD_ENV = LD_LIBRARY_PATH=$(PROTODIR)/usr/lib$(LIBSUBDIR)
e40c4e4c17d4df338e2a7db0f84d8dbb3858964cTinderbox User# Need to rebuild autoconf/automake files
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews# Override linker flags for programs
a03cb08d0c4f1ca5fbc121d2f02bdffa7eb52286Mark AndrewsFONTCONFIG_PROG_LDFLAGS=$(MAPFILES_FOR_PROGS) ../src/libfontconfig.so.1
827f8cccb5280f4da66c46186e792d1cb9d73503Mark AndrewsPROGRAM_VARS = fc_cache fc_cat fc_list fc_match fc_query fc_scan
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark AndrewsMODULE_BUILD_MAKEFLAGS = $(PROGRAM_VARS:%=%_LDADD="$(FONTCONFIG_PROG_LDFLAGS)")
7f9e2fff07b9c17e0d7a0ea7abc9304ce9d01b61Tinderbox User# 22507047 libfontconfig should not need a libpthread dependency
5747235bf35e7398984fd6b4632743396895ea7aTinderbox User# Upstream uses ac_pthread.m4 which insists on using -mt & -lpthread on Solaris
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews# despite them not being necessary any more
827f8cccb5280f4da66c46186e792d1cb9d73503Mark Andrews# Include common rulesets
e40c4e4c17d4df338e2a7db0f84d8dbb3858964cTinderbox User# Path to install fc-cache SMF files and the RBAC files they use
827f8cccb5280f4da66c46186e792d1cb9d73503Mark AndrewsFONTCONFIG_SMF_MANIFEST_dir=$(PROTODIR)$(SMF_MANIFEST_DIR)/application/font
01a5c5503482fb3ba52088bf0178a7213273bf96Mark AndrewsFONTCONFIG_SMF_MANIFEST=$(FONTCONFIG_SMF_MANIFEST_dir)/fc-cache.xml
e40c4e4c17d4df338e2a7db0f84d8dbb3858964cTinderbox UserFONTCONFIG_SMF_METHOD_dir=$(PROTODIR)$(SMF_METHOD_DIR)
e40c4e4c17d4df338e2a7db0f84d8dbb3858964cTinderbox UserFONTCONFIG_SMF_METHOD=$(FONTCONFIG_SMF_METHOD_dir)/fc-cache
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox UserFONTCONFIG_RBAC_AUTH_dir=$(PROTODIR)/etc/security/auth_attr.d
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic UpdaterFONTCONFIG_RBAC_AUTH=$(FONTCONFIG_RBAC_AUTH_dir)/fontconfig
30370d905e9be3be7d9b947fd432bacecbb13bb9Evan Hunt# Sun specification configuration files to be installed in /etc/fonts/conf.d
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsFONTCONFIG_CONFDIR = $(PROTODIR)/etc/fonts/conf.avail
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox UserSUN_CONFFILES = 20-indic.conf 49-sun-preuser.conf 90-sun-prefer-bitmap.conf
fe80a4909bf62b602feaf246866e9d29f7654194Automatic UpdaterFONTCONFIG_SUN_CONFFILES = $(SUN_CONFFILES:%=$(FONTCONFIG_CONFDIR)/%)
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrews# Link /usr/bin/$cmdname to the 64-bit version
30370d905e9be3be7d9b947fd432bacecbb13bb9Evan HuntFONTCONFIG_CMD_LINKS = $(FONTCONFIG_CMDS:%=$(PROTODIR)/usr/bin/%)
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User# Additional targets to install beyond the default_install,
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater# run just once, not per bitwidth
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox UserFONTCONFIG_INSTALL_RULES = fontconfig-sunman-install \
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrews $(FONTCONFIG_SMF_MANIFEST) $(FONTCONFIG_SMF_METHOD) \
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews $(FONTCONFIG_SUN_CONFFILES) $(FONTCONFIG_CMD_LINKS)
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews mkdir -p $(PROTODIR)/etc/fonts/conf.d $(PROTODIR)/etc/fonts/conf.avail
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User ln -sf ../conf.avail/$(@F) $(PROTODIR)/etc/fonts/conf.d/$(@F)
5f7586ddbd3edd11272cdd30ed613d936129328bTinderbox User mkdir -p $(FC_MAN_DIR)/man5 $(FC_MAN_DIR)/man3lib
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrews ln -s fonts-conf.5 $(FC_MAN_DIR)/man5/fonts.conf.5
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews $(PERL) -p -e 's/^$$/.LP/;' -e 's/.?\251/\\(co/;' \
015055b6e23f5c08f6a5b34726f90b62597e9e45Tinderbox User libfontconfig.3lib > $(FC_MAN_DIR)/man3lib/libfontconfig.3lib