Makefile revision 561
0N/A###############################################################################
0N/A#
0N/A# Fontconfig 2.x Makefile
0N/A#
314N/A# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
0N/A# Use subject to license terms.
0N/A#
0N/A# Permission is hereby granted, free of charge, to any person obtaining a
0N/A# copy of this software and associated documentation files (the
0N/A# "Software"), to deal in the Software without restriction, including
0N/A# without limitation the rights to use, copy, modify, merge, publish,
0N/A# distribute, and/or sell copies of the Software, and to permit persons
0N/A# to whom the Software is furnished to do so, provided that the above
0N/A# copyright notice(s) and this permission notice appear in all copies of
0N/A# the Software and that both the above copyright notice(s) and this
0N/A# permission notice appear in supporting documentation.
0N/A#
0N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
0N/A# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
0N/A# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
0N/A# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
0N/A# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
0N/A# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
0N/A# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
0N/A# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
0N/A# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
0N/A#
0N/A# Except as contained in this notice, the name of a copyright holder
0N/A# shall not be used in advertising or otherwise to promote the sale, use
0N/A# or other dealings in this Software without prior written authorization
0N/A# of the copyright holder.
0N/A#
493N/A# @(#)Makefile 1.77 08/08/08
0N/A#
0N/A
364N/APWD:sh=pwd
364N/ATOP=$(PWD)/../..
364N/A
156N/A# Package name used in tarballs
493N/AMODULE_NAME=fontconfig
0N/A
0N/A# Version number (used in path names)
493N/AMODULE_VERSION=2.5.0
0N/A
0N/A# Source tarball
493N/ASOURCE_TARBALL_NAME=fontconfig-$(MODULE_VERSION).tar.gz
493N/ASOURCE_TARBALL_NAME_SET=yes
156N/ASOURCE_UNCOMPRESS=gzcat
0N/A
0N/A# Download site for source
156N/ASOURCE_URL=http://fontconfig.org/release/$(SOURCE_TARBALL_NAME)
156N/ASOURCE_URL_SET=yes
0N/A
0N/A# Patches to apply to source after unpacking, in order
493N/ASOURCE_PATCHES=fontconfig-$(MODULE_VERSION).patch,-p1 \
493N/A fontconfig-$(MODULE_VERSION).patch.hide,-p1 \
493N/A fontconfig-$(MODULE_VERSION)-fonts.conf.patch \
477N/A 6729284.patch,-p1
364N/A
156N/A# Library name (used for specfiles/mapfiles)
156N/ALIBNAME=fontconfig
0N/A
493N/A# Directory created by unpacking source
493N/ASOURCE_DIR=$(BUILD_DIR)/$(MODULE_NAME)-$(MODULE_VERSION)
0N/A
156N/A# Install to /usr, not /usr/X11
493N/AMODULE_PREFIX=/usr
493N/AMODULE_PREFIX_SET=yes
156N/A
493N/A# Additional command line options to GNU autoconf configure script
493N/AMODULE_CONFIG_OPTS = \
156N/A --with-confdir=/etc/fonts --with-default-fonts='--font-dirs-go-here--' \
493N/A --with-freetype-config=$(PROTODIR)/usr/bin$(LIBSUBDIR)/freetype-config \
493N/A --with-cache-dir=/var/cache/fontconfig
156N/A
493N/A# Need to use GNU Make to build
493N/AMODULE_MAKE=$(GNUMAKE)
493N/AMODULE_MAKE_SET=yes
364N/A
364N/A# What to build
493N/ABUILD_TARGETS=$(GNUMAKE) default_build $(SOURCE_DIR)/fonts.conf-SUNW
493N/ABUILD_TARGETS_SET=yes
0N/A
0N/A# Paths to find libraries
493N/AMODULE_BUILD_ENV = LD_LIBRARY_PATH=$(PROTODIR)/usr/lib$(LIBSUBDIR) \
493N/A LD_RUN_PATH=/usr/lib$(LIBSUBDIR) $(DOC_PATH)
156N/A
493N/A# Need to rebuild autoconf/automake files
493N/AAUTORECONF=yes
0N/A
339N/A# Path to install fc-cache manifest & method script
0N/AFONTCONFIG_SMF_MANIFEST_dir=$(PROTODIR)/var/svc/manifest/application/font
0N/AFONTCONFIG_SMF_MANIFEST=$(FONTCONFIG_SMF_MANIFEST_dir)/fc-cache.xml
339N/AFONTCONFIG_SMF_METHOD_dir=$(PROTODIR)/lib/svc/method
339N/AFONTCONFIG_SMF_METHOD=$(FONTCONFIG_SMF_METHOD_dir)/fc-cache
0N/A
493N/A# Include common rulesets
493N/Ainclude ../Makefile.inc
0N/A
364N/A$(SOURCE_DIR)/fonts.conf-SUNW: $(SOURCE_DIR)/fonts.conf fonts.conf.append fix-fonts.conf.pl
0N/A perl fix-fonts.conf.pl < $(SOURCE_DIR)/fonts.conf > $(SOURCE_DIR)/fonts.conf-SUNW
0N/A
493N/A$(SOURCE_DIR)/fonts.conf: $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
0N/A
364N/Ainstall_gen:: $(LIB_BUILT) $(SOURCE_DIR)/fonts.conf-SUNW $(FONTCONFIG_SMF_MANIFEST) $(FONTCONFIG_SMF_METHOD)
0N/A rm $(PROTODIR)/etc/fonts/fonts.conf
0N/A cp $(SOURCE_DIR)/fonts.conf-SUNW $(PROTODIR)/etc/fonts/fonts.conf
493N/A $(MAKE) $(MAKEFLAGS) fontconfig-sunman-install
0N/A
0N/A$(FONTCONFIG_SMF_MANIFEST): fc-cache.xml
0N/A /usr/sbin/svccfg validate fc-cache.xml
0N/A mkdir -p $(FONTCONFIG_SMF_MANIFEST_dir)
0N/A if [ -f $@ ] ; then /bin/rm -f $@ ; fi
0N/A cp fc-cache.xml $@
0N/A
339N/A$(FONTCONFIG_SMF_METHOD): fc-cache.sh
339N/A mkdir -p $(FONTCONFIG_SMF_METHOD_dir)
339N/A if [ -f $@ ] ; then /bin/rm -f $@ ; fi
339N/A cp fc-cache.sh $@
339N/A chmod 755 $@
339N/A
0N/A# Quick inline perl script to fix up fc-cache & fc-list man pages
0N/AFC_MAN_FIX=perl -n -MPOSIX=strftime -e \
0N/A 'BEGIN { \
0N/A $$date=strftime("%e %b %Y",localtime((stat($$ARGV[0]))[9])); \
0N/A print "\047\\\" t\n"; \
0N/A } \
0N/A { \
0N/A s|__vendorversion__|"$$date"| ; \
0N/A s|__package__|SUNWfontconfig| ; \
0N/A s|fontconfig\(3\)|libfontconfig\(3lib\)|; \
0N/A s%^\\\|\.%.IR \\|.%; \
0N/A print \
0N/A }'
493N/A
156N/AFC_MAN_DIR=$(PROTODIR)/usr/share/man
156N/A
156N/Afontconfig-sunman-install:
156N/A mkdir -p $(FC_MAN_DIR)/man1 $(FC_MAN_DIR)/man4 $(FC_MAN_DIR)/man3lib
156N/A $(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
156N/A -if [ -f $(FC_MAN_DIR)/man3lib/libfontconfig.3lib ] ; then \
156N/A rm -f $(FC_MAN_DIR)/man3lib/libfontconfig.3lib ; \
0N/A fi
156N/A perl -p -e 's/^$$/.LP/;' -e 's/\251/\\(co/;' libfontconfig.3lib $(SOURCE_DIR)/COPYING >> $(FC_MAN_DIR)/man3lib/libfontconfig.3lib
493N/A @case '$(MAKEFLAGS)' in *[ik]*) set +e;; esac; set -x ; \
364N/A for i in fc-cache fc-list fc-match fc-cat ; do \
156N/A if [ -f $(FC_MAN_DIR)/man1/$$i.1 ] ; then \
156N/A rm -f $(FC_MAN_DIR)/man1/$$i.1 ; \
0N/A fi ; \
0N/A if [ -f sunman-notes-$$i ] ; then \
172N/A APPEND="sunman-notes-$$i $(TOP)/common/sunman-stability" ; \
172N/A else \
0N/A APPEND=$(TOP)/common/sunman-stability ; \
0N/A fi ; \
221N/A if [ -f $(SOURCE_DIR)/$$i/$$i.1 ] ; then \
221N/A $(FC_MAN_FIX) $(SOURCE_DIR)/$$i/$$i.1 $$APPEND > \
156N/A $(FC_MAN_DIR)/man1/$$i.1 ; \
172N/A else \
172N/A $(FC_MAN_FIX) $$i.man $$APPEND > \
172N/A $(FC_MAN_DIR)/man1/$$i.1 ; \
172N/A fi ; \
0N/A done
0N/A
0N/A
0N/A