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