open-src/font/Makefile.inc
author Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
Wed Aug 10 21:49:25 2016 -0700 (2016-08-10)
changeset 1653 9fcb30a2102b
parent 1479 4a76cf532c2c
permissions -rw-r--r--
24443559 Update deja-vu fonts to version 2.37
     1 # -*- Makefile -*- rules common to most X.Org font modules
     2 #
     3 # Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
     4 #
     5 # Permission is hereby granted, free of charge, to any person obtaining a
     6 # copy of this software and associated documentation files (the "Software"),
     7 # to deal in the Software without restriction, including without limitation
     8 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
     9 # and/or sell copies of the Software, and to permit persons to whom the
    10 # Software is furnished to do so, subject to the following conditions:
    11 #
    12 # The above copyright notice and this permission notice (including the next
    13 # paragraph) shall be included in all copies or substantial portions of the
    14 # Software.
    15 #
    16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    17 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    18 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
    19 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    20 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    21 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    22 # DEALINGS IN THE SOFTWARE.
    23 #
    24 #
    25 
    26 ### Makefile settings/rules common to all X.Org font modules
    27 
    28 PWD:sh=pwd
    29 TOP=$(PWD)/../../..
    30 
    31 MODTYPE=font
    32 
    33 ### Include common definitions
    34 include $(TOP)/open-src/common/Makefile.init
    35 
    36 # Default package name for font packages
    37 MODTYPE_PKGHIER_DEFAULT         = $(MODTYPE_PKGHIER_SET:yes=$(POUND_SIGN))
    38 $(MODTYPE_PKGHIER_DEFAULT)	MODTYPE_PKGHIER=system/font
    39 MODTYPE_PKGHIER_SET=yes
    40 MODULE_PKGTAIL_DEFAULT		= $(MODULE_PKGTAIL_SET:yes=$(POUND_SIGN))
    41 $(MODULE_PKGTAIL_DEFAULT)	MODULE_PKGTAIL:sh=basename $(pwd)
    42 MODULE_PKGTAIL_SET	      	= yes
    43 
    44 # Package classification
    45 MODULE_PKGCLASS_DEFAULT		= $(MODULE_PKGCLASS_SET:yes=$(POUND_SIGN))
    46 $(MODULE_PKGCLASS_DEFAULT)	MODULE_PKGCLASS=System/Fonts
    47 MODULE_PKGCLASS_SET		= yes
    48 
    49 # Default module description for packages in this area
    50 MODTYPE_DESC = the $(MODULE_NAME:font-%=%) fonts
    51 
    52 # Default TPNO & license text for X.Org fonts
    53 UPSTREAM_DEFAULT	= $(UPSTREAM_SET:yes=$(POUND_SIGN))	
    54 $(UPSTREAM_DEFAULT)	ORACLE_TPNO = $(ORACLE_TPNO_xorg_fonts)
    55 $(UPSTREAM_DEFAULT)	ORACLE_TPNO_SET = yes
    56 $(UPSTREAM_DEFAULT)	XORG_FONT_LICENSE  = ../X11-font-license.txt
    57 $(UPSTREAM_DEFAULT) 	ADD_LICENSE_HEADER = ../X11-font-license-add.txt
    58 $(UPSTREAM_DEFAULT)	LICENSE_APPEND = $(ADD_LICENSE_FILES)
    59 
    60 # If font makefile contains AUTO_ADD_LICENSE = no, we just display the X.Org
    61 # font license, as there is no other attribution notice required for the 
    62 # package.  Otherwise we display the X11 license, plus a header and the 
    63 # package's own COPYING file.
    64 ADD_LICENSE_YES  = $(AUTO_ADD_LICENSE:no=$(POUND_SIGN)) 
    65 $(ADD_LICENSE_YES) ADD_LICENSE_NO = $(POUND_SIGN)
    66 
    67 $(UPSTREAM_DEFAULT)$(ADD_LICENSE_YES)	MODULE_LICENSE_PREPEND  = $(XORG_FONT_LICENSE)
    68 $(UPSTREAM_DEFAULT)$(ADD_LICENSE_YES)	MODULE_LICENSE_PREPEND += $(ADD_LICENSE_HEADER)
    69 $(UPSTREAM_DEFAULT)$(ADD_LICENSE_NO)	LICENSE_FILE = $(XORG_FONT_LICENSE)
    70 $(UPSTREAM_DEFAULT)$(ADD_LICENSE_NO)	LICENSE_FILE_SET = yes
    71 
    72 # Most font modules have no man pages
    73 MODTYPE_SUNTOUCH_MAN_FLAGS= 
    74 
    75 # No common dependencies
    76 MODTYPE_CONFIGURE_DEPS=
    77 
    78 # Set default installation path for fonts
    79 MODTYPE_CONFIG_OPTS = --with-fontrootdir="$(X11_FONT_DIR)"
    80 MODTYPE_CONFIG_OPTS += $(MODULE_FONTDIR:%=--with-fontdir="%")
    81 
    82 # Disable compression of pcf fonts
    83 MODTYPE_CONFIG_OPTS += --without-compression
    84 
    85 # Avoid races between modules that install to the same directory by not 
    86 # running mkfontdir at build time, but waiting for later (either in the
    87 # sun-aliases module or during packaging in generate_font_metadata.pl).
    88 MODTYPE_CONFIG_OPTS += MKFONTDIR=/usr/bin/true
    89 
    90 # Most font modules have nothing to build, but font-util builds some programs
    91 MODTYPE_CFLAGS=$(PROG_CFLAGS)
    92 MODTYPE_CPPFLAGS=$(PROG_CPPFLAGS)
    93 MODTYPE_CXXFLAGS=$(PROG_CXXFLAGS)
    94 MODTYPE_LDFLAGS=$(PROG_LDFLAGS)
    95 MODTYPE_LD_OPTIONS=
    96 
    97 # Paths to find mkfontscale, fc-cache & the libraries they need in build area
    98 FONT_UTILS_PATH=$(PROTODIR)/usr/bin
    99 FONT_LIBS_PATH=$(PROTODIR)$(X11_SERVERLIBS_DIR)$(LIBSUBDIR_64):$(PROTODIR)/usr/lib$(LIBSUBDIR_64)
   100 
   101 # Additional environment variable options to GNU autoconf configure script
   102 MODTYPE_CONFIG_ENV = PATH="$(FONT_UTILS_PATH):$$PATH" \
   103 	LD_LIBRARY_PATH="$(FONT_LIBS_PATH)"
   104 
   105 # Environment variable options needed when building
   106 MODTYPE_BUILD_ENV = PATH="$(FONT_UTILS_PATH):$$PATH" \
   107 	LD_LIBRARY_PATH="$(FONT_LIBS_PATH)"
   108 
   109 # Need to install links in fontpath.d directory
   110 MODTYPE_ADD_INSTALL_TARGETS = install_fontpath_links
   111 
   112 ### Include common rulesets
   113 include $(TOP)/open-src/common/Makefile.inc
   114 
   115 # Can't use Makefile substitutions or dependencies on the links themselves
   116 #  due to the : characters & shell math expansion in the link names
   117 # Ignores errors since /usr/bin/ln -sf can fail due to race conditions
   118 #  when parallel makes try making the same symlink at the same time
   119 install_fontpath_links: $(PROTODIR)$(X11_FONT_CATALOGUE)
   120 	@for l in $(FONTPATH_LINKS) ; do \
   121 	    if [[ ! -L $(PROTODIR)$(X11_FONT_CATALOGUE)/$$l ]] ; then \
   122 		( $(START_CMD_ECHO) ; ln -sf ../../..$(MODULE_FONTDIR) \
   123 		  $(PROTODIR)$(X11_FONT_CATALOGUE)/$$l || true ); \
   124 	    fi \
   125 	done
   126 
   127 $(PROTODIR)$(X11_FONT_CATALOGUE):
   128 	mkdir -p $@