Makefile revision 493
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein###############################################################################
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Fontconfig 2.x Makefile
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# Use subject to license terms.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Permission is hereby granted, free of charge, to any person obtaining a
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# copy of this software and associated documentation files (the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# "Software"), to deal in the Software without restriction, including
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# without limitation the rights to use, copy, modify, merge, publish,
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# distribute, and/or sell copies of the Software, and to permit persons
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# to whom the Software is furnished to do so, provided that the above
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# copyright notice(s) and this permission notice appear in all copies of
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# the Software and that both the above copyright notice(s) and this
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# permission notice appear in supporting documentation.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Except as contained in this notice, the name of a copyright holder
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# shall not be used in advertising or otherwise to promote the sale, use
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# or other dealings in this Software without prior written authorization
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# of the copyright holder.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# @(#)Makefile 1.77 08/08/08
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Package name used in tarballs
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Version number (used in path names)
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox User# Source tarball
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox UserSOURCE_TARBALL_NAME=fontconfig-$(MODULE_VERSION).tar.gz
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox User# Download site for source
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox UserSOURCE_URL=http://fontconfig.org/release/$(SOURCE_TARBALL_NAME)
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox User# Patches to apply to source after unpacking, in order
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinSOURCE_PATCHES=fontconfig-$(MODULE_VERSION).patch,-p1 \
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews fontconfig-$(MODULE_VERSION)-fonts.conf.patch \
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox User# Library name (used for specfiles/mapfiles)
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox User# Directory created by unpacking source
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinSOURCE_DIR=$(BUILD_DIR)/$(MODULE_NAME)-$(MODULE_VERSION)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Install to /usr, not /usr/X11
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox User# Additional command line options to GNU autoconf configure script
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox User --with-confdir=/etc/fonts --with-default-fonts='--font-dirs-go-here--' \
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox User --with-freetype-config=$(PROTODIR)/usr/bin$(LIBSUBDIR)/freetype-config \
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox User# Need to use GNU Make to build
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# What to build
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntBUILD_TARGETS=$(GNUMAKE) default_build $(SOURCE_DIR)/fonts.conf-SUNW
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Paths to find libraries
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox UserMODULE_BUILD_ENV = LD_LIBRARY_PATH=$(PROTODIR)/usr/lib$(LIBSUBDIR) \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Need to rebuild autoconf/automake files
2b4d1b54f6ca406b8233d9e6fea9593df6dad035Tinderbox User# Path to install fc-cache manifest & method script
2b4d1b54f6ca406b8233d9e6fea9593df6dad035Tinderbox UserFONTCONFIG_SMF_MANIFEST_dir=$(PROTODIR)/var/svc/manifest/application/font
2b4d1b54f6ca406b8233d9e6fea9593df6dad035Tinderbox UserFONTCONFIG_SMF_MANIFEST=$(FONTCONFIG_SMF_MANIFEST_dir)/fc-cache.xml
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinFONTCONFIG_SMF_METHOD_dir=$(PROTODIR)/lib/svc/method
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox UserFONTCONFIG_SMF_METHOD=$(FONTCONFIG_SMF_METHOD_dir)/fc-cache
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Include common rulesets
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox User$(SOURCE_DIR)/fonts.conf-SUNW: $(SOURCE_DIR)/fonts.conf fonts.conf.append fix-fonts.conf.pl
af40ebed6257e4ac1996144530b3de317cf4da11Tinderbox User perl fix-fonts.conf.pl < $(SOURCE_DIR)/fonts.conf > $(SOURCE_DIR)/fonts.conf-SUNW
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt$(SOURCE_DIR)/fonts.conf: $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userinstall_gen:: $(LIB_BUILT) $(SOURCE_DIR)/fonts.conf-SUNW $(FONTCONFIG_SMF_MANIFEST) $(FONTCONFIG_SMF_METHOD)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User cp $(SOURCE_DIR)/fonts.conf-SUNW $(PROTODIR)/etc/fonts/fonts.conf
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User $(MAKE) $(MAKEFLAGS) fontconfig-sunman-install
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Quick inline perl script to fix up fc-cache & fc-list man pages
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox User $$date=strftime("%e %b %Y",localtime((stat($$ARGV[0]))[9])); \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User print "\047\\\" t\n"; \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User s|__vendorversion__|"$$date"| ; \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User s|__package__|SUNWfontconfig| ; \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User s|fontconfig\(3\)|libfontconfig\(3lib\)|; \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User s%^\\\|\.%.IR \\|.%; \
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt mkdir -p $(FC_MAN_DIR)/man1 $(FC_MAN_DIR)/man4 $(FC_MAN_DIR)/man3lib
bcf15a19ae0efa72a22cdfb50666a3c6ce39eb9fTinderbox User $(FC_MAN_FIX) $(FC_MAN_DIR)/man5/fonts-conf.5 sunman-notes-fonts.conf $(TOP)/common/sunman-stability | sed -e 's/.TH "FONTS-CONF" "5"/.TH "fonts.conf" "4"/' -e 's/SUNWfontconfig/SUNWfontconfig-root/' > $(FC_MAN_DIR)/man4/fonts.conf.4
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User -if [ -f $(FC_MAN_DIR)/man3lib/libfontconfig.3lib ] ; then \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User rm -f $(FC_MAN_DIR)/man3lib/libfontconfig.3lib ; \
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User perl -p -e 's/^$$/.LP/;' -e 's/\251/\\(co/;' libfontconfig.3lib $(SOURCE_DIR)/COPYING >> $(FC_MAN_DIR)/man3lib/libfontconfig.3lib
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User @case '$(MAKEFLAGS)' in *[ik]*) set +e;; esac; set -x ; \
260e8e04b0dc24cb884c789b5d9eb046457f264eTinderbox User for i in fc-cache fc-list fc-match fc-cat ; do \
983df82baf1d7d0b668c98cf45928a19f175c6e7Tinderbox User APPEND="sunman-notes-$$i $(TOP)/common/sunman-stability" ; \
71c66a876ecca77923638d3f94cc0783152b2f03Mark Andrews $(FC_MAN_FIX) $(SOURCE_DIR)/$$i/$$i.1 $$APPEND > \