Makefile revision 818
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley###############################################################################
75c0816e8295e180f4bc7f10db3d0d880383bc1cMark Andrews# Fontconfig 2.x Makefile
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley# Use is subject to license terms.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Permission is hereby granted, free of charge, to any person obtaining a
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews# copy of this software and associated documentation files (the
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews# "Software"), to deal in the Software without restriction, including
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# without limitation the rights to use, copy, modify, merge, publish,
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews# distribute, and/or sell copies of the Software, and to permit persons
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews# to whom the Software is furnished to do so, provided that the above
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews# copyright notice(s) and this permission notice appear in all copies of
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews# the Software and that both the above copyright notice(s) and this
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley# 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
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews# 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,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# 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
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# 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.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# @(#)Makefile 1.84 09/10/26
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Package name used in tarballs
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Version number (used in path names)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Source tarball
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinSOURCE_TARBALL_NAME=fontconfig-$(MODULE_VERSION).tar.gz
b2f07642fd712c8fda81a116bcdde229ab291f33Tinderbox User# Download site for source
b2f07642fd712c8fda81a116bcdde229ab291f33Tinderbox UserSOURCE_URL=http://fontconfig.org/release/$(SOURCE_TARBALL_NAME)
b2f07642fd712c8fda81a116bcdde229ab291f33Tinderbox User# Patches to apply to source after unpacking, in order
b2f07642fd712c8fda81a116bcdde229ab291f33Tinderbox UserSOURCE_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 Austein# Install to /usr, not /usr/X11
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Additional command line options to GNU autoconf configure script
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein --with-confdir=/etc/fonts --with-default-fonts='--font-dirs-go-here--' \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein --with-freetype-config=$(PROTODIR)/usr/bin$(LIBSUBDIR)/freetype-config \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Need to use GNU Make to build
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# What to build
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinMODULE_ADD_BUILD_TARGETS = $(SOURCE_DIR)/fonts.conf-SUNW
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# Path to install fc-cache manifest & method script
1224c3b69b3d18f7127aa042644936af25a2d679Mark AndrewsFONTCONFIG_SMF_MANIFEST_dir=$(PROTODIR)/var/svc/manifest/application/font
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinFONTCONFIG_SMF_MANIFEST=$(FONTCONFIG_SMF_MANIFEST_dir)/fc-cache.xml
1224c3b69b3d18f7127aa042644936af25a2d679Mark AndrewsFONTCONFIG_SMF_METHOD_dir=$(PROTODIR)/lib/svc/method
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinFONTCONFIG_SMF_METHOD=$(FONTCONFIG_SMF_METHOD_dir)/fc-cache
b2f07642fd712c8fda81a116bcdde229ab291f33Tinderbox User# README file to be installed in /etc/fonts/conf.avail/README
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinFONTCONFIG_ETC_README=$(PROTODIR)/etc/fonts/conf.avail/README
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# local.conf file to be installed in /etc/fonts/local.conf
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinFONTCONFIG_LOCAL_CONF = $(PROTODIR)/etc/fonts/local.conf
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) \
d3ddafd7469d1f3430ccd1b0fe0d13ccbbaf5debTinderbox User $(FONTCONFIG_ETC_README) $(FONTCONFIG_LOCAL_CONF)
d3ddafd7469d1f3430ccd1b0fe0d13ccbbaf5debTinderbox User# Include common rulesets
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein$(SOURCE_DIR)/fonts.conf-SUNW: $(SOURCE_DIR)/fonts.conf fonts.conf.append fix-fonts.conf.pl
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein perl fix-fonts.conf.pl < $(SOURCE_DIR)/fonts.conf > $(SOURCE_DIR)/fonts.conf-SUNW
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein$(SOURCE_DIR)/fonts.conf: $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeininstall_gen:: default_install $(SOURCE_DIR)/fonts.conf-SUNW
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein cp $(SOURCE_DIR)/fonts.conf-SUNW $(PROTODIR)/etc/fonts/fonts.conf
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein$(FONTCONFIG_ETC_README): $(SOURCE_DIR)/conf.d/README
0ccb0e98c77a9b9636a036f8f64f5679a430aaf4Tinderbox User mkdir -p $(FC_MAN_DIR)/man4 $(FC_MAN_DIR)/man3lib
0ccb0e98c77a9b9636a036f8f64f5679a430aaf4Tinderbox User sed -e 's/.TH "FONTS-CONF" "5"/.TH "fonts.conf" "4"/' \
0ccb0e98c77a9b9636a036f8f64f5679a430aaf4Tinderbox User $(FC_MAN_DIR)/man5/fonts-conf.5 > $(FC_MAN_DIR)/man4/fonts.conf.4
0ccb0e98c77a9b9636a036f8f64f5679a430aaf4Tinderbox User -rm -f $(FC_MAN_DIR)/man3lib/libfontconfig.3lib
0ccb0e98c77a9b9636a036f8f64f5679a430aaf4Tinderbox User perl -p -e 's/^$$/.LP/;' -e 's/\251/\\(co/;' \
0ccb0e98c77a9b9636a036f8f64f5679a430aaf4Tinderbox User libfontconfig.3lib $(SOURCE_DIR)/COPYING >> \