Makefile revision 32
0N/A###############################################################################
0N/A#
0N/A# Fontconfig 2.x Makefile
0N/A#
407N/A# Copyright 2005 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
154N/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
154N/A# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
159N/A#
154N/A# Except as contained in this notice, the name of a copyright holder
292N/A# shall not be used in advertising or otherwise to promote the sale, use
292N/A# or other dealings in this Software without prior written authorization
159N/A# of the copyright holder.
154N/A#
154N/A# @(#)Makefile 1.61 05/11/30
605N/A#
434N/A
434N/APWD:sh=pwd
259N/ATOP=$(PWD)/../..
89N/ABUILD_TYPES=32 64
0N/A
0N/A# Version number (used in path names)
0N/AFONTCONFIG_VERS=2.3.2
0N/A
456N/A# Source tarball
92N/ASOURCE_TARBALL_NAME=fontconfig-$(FONTCONFIG_VERS).tar.gz
92N/A
92N/A# Download site for source
92N/ASOURCE_URL=http://fontconfig.org/release/fontconfig-2.3.2.tar.gz
92N/A
92N/ASOURCE_UNCOMPRESS=gzcat
154N/A
456N/A# Patches to apply to source after unpacking, in order
456N/ASOURCE_PATCHES=fontconfig-$(FONTCONFIG_VERS).patch
456N/A
456N/Ainclude $(TOP)/common/Makefile.inc
345N/A
0N/A# Directory created by unpacking source
345N/ASOURCE_DIR=$(BUILD_DIR)/fontconfig-$(FONTCONFIG_VERS)
0N/A
0N/A# Special version of freetype config to force certain arguments
92N/AFONTCONFIG_FT2CFG=$(BUILD_DIR)/freetype-config
92N/A
92N/A# Command line options to GNU autoconf configure script
92N/AFONTCONFIG_CFG=--enable-shared=yes --enable-static=no --with-expat-includes=/usr/sfw/include --with-expat-lib=/usr/sfw/lib$(LIBSUBDIR) --prefix=/usr --with-confdir=/etc/fonts --with-default-fonts='--font-dirs-go-here--' --with-freetype-config=../freetype-config --libdir='$${exec_prefix}/lib$(LIBSUBDIR)'
92N/A
92N/A# Library built in tree
92N/AFONTCONFIG_LIB=$(SOURCE_DIR)/src/.libs/libfontconfig.so.1.0.4
92N/A
92N/A# Where to install most files
345N/AFONTCONFIG_prefix=$(PROTODIR)
92N/A
92N/A# Where to install libraries
345N/AFONTCONFIG_libdir=$(FONTCONFIG_prefix)/usr/lib
0N/A
0N/A# Paths to find libraries
92N/AFONTCONFIG_libpaths= LD_LIBRARY_PATH=$(PROTODIR)/usr/sfw/lib$(LIBSUBDIR) LD_RUN_PATH=/usr/sfw/lib$(LIBSUBDIR)
92N/A
92N/A# Path to install fc-cache manifest
92N/AFONTCONFIG_SMF_MANIFEST_dir=$(PROTODIR)/var/svc/manifest/application/font
345N/AFONTCONFIG_SMF_MANIFEST=$(FONTCONFIG_SMF_MANIFEST_dir)/fc-cache.xml
92N/A
92N/Abuild_gen: $(FONTCONFIG_LIB)
92N/A
92N/A$(FONTCONFIG_FT2CFG): $(PROTODIR)/usr/sfw/bin$(LIBSUBDIR)/freetype-config
92N/A -if [ -f $@ ] ; then rm $@ ; fi
345N/A sed -e 's|-L$$libdir|-L$(PROTODIR)$${exec_prefix}/lib$(LIBSUBDIR) -L$$libdir|' -e 's|^includedir=$${prefix}|includedir=$(PROTODIR)$${prefix}|' $(PROTODIR)/usr/sfw/bin$(LIBSUBDIR)/freetype-config > $@
92N/A chmod +x $@
439N/A
345N/A# Run configure script
92N/A$(SOURCE_DIR)/Makefile:= OPT_CFLAGS=$(FC_OPTFLAGS)
345N/AFC_OPTFLAGS:sh=arch | sed 's/^\(.*\)$/\$\(FC_\1_OPT_FLAGS\)/'
92N/AFC_i386_OPT_FLAGS = ""
92N/AFC_sun4_OPT_FLAGS = $(DEFAULT_OPT_CFLAGS)
92N/A
154N/A$(SOURCE_DIR)/Makefile: $(UNPACK_TARGET) $(FONTCONFIG_FT2CFG)
92N/A (cd $(SOURCE_DIR) ; \
92N/A chmod a+x configure ; \
92N/A CC=$(CC) CFLAGS="$(LIB_CFLAGS)" LD="$(CC) $(LIB_CFLAGS) $(LDFLAGS)" LDFLAGS="$(LIB_LDFLAGS)" $(FONTCONFIG_libpaths) ./configure $(FONTCONFIG_CFG) )
345N/A if [ -f $(SOURCE_DIR)/src/Makefile.bak ] ; then \
92N/A rm -f $(SOURCE_DIR)/src/Makefile.bak ; \
154N/A fi
345N/A
92N/A$(SOURCE_DIR)/fonts.conf-SUNW: $(SOURCE_DIR)/fonts.conf fonts.conf.append fonts.conf.preuser fix-fonts.conf.pl
92N/A perl fix-fonts.conf.pl < $(SOURCE_DIR)/fonts.conf > $(SOURCE_DIR)/fonts.conf-SUNW
92N/A
92N/A# Build Fontconfig
92N/A$(FONTCONFIG_LIB): $(SOURCE_DIR)/Makefile $(SOURCE_DIR)/fonts.conf-SUNW
92N/A (cd $(SOURCE_DIR) ; LD_OPTIONS="$(LIB_LDFLAGS)" $(FONTCONFIG_libpaths) $(MAKE) $(MFLAGS) )
92N/A
92N/Ainstall_gen: $(FONTCONFIG_LIB) $(SOURCE_DIR)/fonts.conf-SUNW $(FONTCONFIG_SMF_MANIFEST)
92N/A (cd $(SOURCE_DIR) ; $(FONTCONFIG_libpaths) $(MAKE) -e DESTDIR=$(FONTCONFIG_prefix) libdir=/usr/lib$(ARCHLIBSUBDIR) bindir=/usr/bin$(ARCHLIBSUBDIR) install )
92N/A rm $(PROTODIR)/etc/fonts/fonts.conf
92N/A cp $(SOURCE_DIR)/fonts.conf-SUNW $(PROTODIR)/etc/fonts/fonts.conf
92N/A $(MAKE) $(MFLAGS) fontconfig-sunman-install
345N/A
92N/A$(FONTCONFIG_SMF_MANIFEST): fc-cache.xml
154N/A /usr/sbin/svccfg validate fc-cache.xml
154N/A mkdir -p $(FONTCONFIG_SMF_MANIFEST_dir)
154N/A if [ -f $@ ] ; then /bin/rm -f $@ ; fi
154N/A cp fc-cache.xml $@
154N/A
154N/A# Quick inline perl script to fix up fc-cache & fc-list man pages
154N/AFC_MAN_FIX=perl -n -MPOSIX=strftime -e \
154N/A 'BEGIN { \
154N/A $$date=strftime("%e %b %Y",localtime((stat($$ARGV[0]))[9])); \
154N/A print "\047\\\" t\n"; \
154N/A } \
154N/A { \
154N/A s|__vendorversion__|"$$date"| ; \
154N/A s|__package__|SUNWfontconfig| ; \
92N/A s|fontconfig\(3\)|libfontconfig\(3lib\)|; \
92N/A s%^\\\|\.%.IR \\|.%; \
92N/A print \
990N/A }'
990N/A
990N/Afontconfig-sunman-install: $(PROTODIR)/usr/man/man5/fonts-conf.5
990N/A mkdir -p $(PROTODIR)/usr/man/man1 $(PROTODIR)/usr/man/man4 $(PROTODIR)/usr/man/man3lib
990N/A $(FC_MAN_FIX) $(PROTODIR)/usr/man/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/' > $(PROTODIR)/usr/man/man4/fonts.conf.4
990N/A -if [ -f $(PROTODIR)/usr/man/man3lib/libfontconfig.3lib ] ; then \
990N/A rm -f $(PROTODIR)/usr/man/man3lib/libfontconfig.3lib ; \
990N/A fi
990N/A perl -p -e 's/^$$/.LP/;' -e 's/\251/\\(co/;' libfontconfig.3lib $(SOURCE_DIR)/COPYING >> $(PROTODIR)/usr/man/man3lib/libfontconfig.3lib
604N/A for i in fc-cache fc-list ; do \
604N/A if [ -f $(PROTODIR)/usr/man/man1/$$i.1 ] ; then \
604N/A rm -f $(PROTODIR)/usr/man/man1/$$i.1 ; \
604N/A fi ; \
0N/A if [ -f sunman-notes-$$i ] ; then \
0N/A APPEND="sunman-notes-$$i $(TOP)/common/sunman-stability" ; \
0N/A else \
154N/A APPEND=$(TOP)/common/sunman-stability ; \
583N/A fi ; \
583N/A $(FC_MAN_FIX) $(SOURCE_DIR)/$$i/$$i.man $$APPEND > \
583N/A $(PROTODIR)/usr/man/man1/$$i.1 ; \
583N/A done
604N/A
604N/Ainstall_64::
605N/A -/bin/rm -f $(FONTCONFIG_libdir)/64
605N/A ln -s $(FONTCONFIG_libdir)/$(SUBDIR64) $(FONTCONFIG_libdir)/64
604N/A
0N/A
605N/A