Alan@98: # -*- Makefile -*- rules common to most X.Org font modules Alan@98: # Alan@1610: # Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. Alan@98: # Alan@98: # Permission is hereby granted, free of charge, to any person obtaining a Alan@919: # copy of this software and associated documentation files (the "Software"), Alan@919: # to deal in the Software without restriction, including without limitation Alan@919: # the rights to use, copy, modify, merge, publish, distribute, sublicense, Alan@919: # and/or sell copies of the Software, and to permit persons to whom the Alan@919: # Software is furnished to do so, subject to the following conditions: Alan@919: # Alan@919: # The above copyright notice and this permission notice (including the next Alan@919: # paragraph) shall be included in all copies or substantial portions of the Alan@919: # Software. Alan@919: # Alan@919: # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR Alan@919: # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, Alan@919: # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL Alan@919: # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER Alan@919: # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING Alan@919: # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER Alan@919: # DEALINGS IN THE SOFTWARE. Alan@98: # Alan@98: # Alan@98: Alan@156: ### Makefile settings/rules common to all X.Org font modules Alan@98: Alan@98: PWD:sh=pwd Alan@967: TOP=$(PWD)/../../.. Alan@98: Alan@493: MODTYPE=font Alan@493: Alan@493: ### Include common definitions Alan@967: include $(TOP)/open-src/common/Makefile.init Alan@493: Alan@970: # Default package name for font packages Alan@970: MODTYPE_PKGHIER_DEFAULT = $(MODTYPE_PKGHIER_SET:yes=$(POUND_SIGN)) Alan@970: $(MODTYPE_PKGHIER_DEFAULT) MODTYPE_PKGHIER=system/font Alan@970: MODTYPE_PKGHIER_SET=yes Alan@970: MODULE_PKGTAIL_DEFAULT = $(MODULE_PKGTAIL_SET:yes=$(POUND_SIGN)) Alan@970: $(MODULE_PKGTAIL_DEFAULT) MODULE_PKGTAIL:sh=basename $(pwd) Alan@970: MODULE_PKGTAIL_SET = yes Alan@970: Alan@970: # Package classification Alan@970: MODULE_PKGCLASS_DEFAULT = $(MODULE_PKGCLASS_SET:yes=$(POUND_SIGN)) Alan@970: $(MODULE_PKGCLASS_DEFAULT) MODULE_PKGCLASS=System/Fonts Alan@970: MODULE_PKGCLASS_SET = yes Alan@970: Alan@1356: # Default module description for packages in this area Alan@1356: MODTYPE_DESC = the $(MODULE_NAME:font-%=%) fonts Alan@1356: Alan@1392: # Default TPNO & license text for X.Org fonts Alan@1395: UPSTREAM_DEFAULT = $(UPSTREAM_SET:yes=$(POUND_SIGN)) Alan@1395: $(UPSTREAM_DEFAULT) ORACLE_TPNO = $(ORACLE_TPNO_xorg_fonts) Alan@1395: $(UPSTREAM_DEFAULT) ORACLE_TPNO_SET = yes Alan@1395: $(UPSTREAM_DEFAULT) XORG_FONT_LICENSE = ../X11-font-license.txt Alan@1395: $(UPSTREAM_DEFAULT) ADD_LICENSE_HEADER = ../X11-font-license-add.txt Alan@1395: $(UPSTREAM_DEFAULT) LICENSE_APPEND = $(ADD_LICENSE_FILES) Alan@1395: Alan@1395: # If font makefile contains AUTO_ADD_LICENSE = no, we just display the X.Org Alan@1395: # font license, as there is no other attribution notice required for the Alan@1395: # package. Otherwise we display the X11 license, plus a header and the Alan@1395: # package's own COPYING file. Alan@1395: ADD_LICENSE_YES = $(AUTO_ADD_LICENSE:no=$(POUND_SIGN)) Alan@1395: $(ADD_LICENSE_YES) ADD_LICENSE_NO = $(POUND_SIGN) Alan@1395: Alan@1395: $(UPSTREAM_DEFAULT)$(ADD_LICENSE_YES) MODULE_LICENSE_PREPEND = $(XORG_FONT_LICENSE) Alan@1395: $(UPSTREAM_DEFAULT)$(ADD_LICENSE_YES) MODULE_LICENSE_PREPEND += $(ADD_LICENSE_HEADER) Alan@1395: $(UPSTREAM_DEFAULT)$(ADD_LICENSE_NO) LICENSE_FILE = $(XORG_FONT_LICENSE) Alan@1395: $(UPSTREAM_DEFAULT)$(ADD_LICENSE_NO) LICENSE_FILE_SET = yes Alan@1392: Alan@493: # Most font modules have no man pages Alan@493: MODTYPE_SUNTOUCH_MAN_FLAGS= Alan@98: Alan@493: # No common dependencies Alan@493: MODTYPE_CONFIGURE_DEPS= Alan@98: Alan@837: # Set default installation path for fonts Alan@837: MODTYPE_CONFIG_OPTS = --with-fontrootdir="$(X11_FONT_DIR)" Alan@963: MODTYPE_CONFIG_OPTS += $(MODULE_FONTDIR:%=--with-fontdir="%") Alan@837: Alan@837: # Disable compression of pcf fonts Alan@837: MODTYPE_CONFIG_OPTS += --without-compression Alan@837: Alan@1288: # Avoid races between modules that install to the same directory by not Alan@1288: # running mkfontdir at build time, but waiting for later (either in the Alan@1288: # sun-aliases module or during packaging in generate_font_metadata.pl). Alan@1288: MODTYPE_CONFIG_OPTS += MKFONTDIR=/usr/bin/true Alan@1288: Alan@1425: # Most font modules have nothing to build, but font-util builds some programs Alan@1425: MODTYPE_CFLAGS=$(PROG_CFLAGS) Alan@1425: MODTYPE_CPPFLAGS=$(PROG_CPPFLAGS) Alan@1425: MODTYPE_CXXFLAGS=$(PROG_CXXFLAGS) Alan@1425: MODTYPE_LDFLAGS=$(PROG_LDFLAGS) Alan@493: MODTYPE_LD_OPTIONS= Alan@98: Alan@306: # Paths to find mkfontscale, fc-cache & the libraries they need in build area Alan@1610: FONT_UTILS_PATH=$(PROTODIR)/usr/bin Alan@1610: FONT_LIBS_PATH=$(PROTODIR)$(X11_SERVERLIBS_DIR)$(LIBSUBDIR_64):$(PROTODIR)/usr/lib$(LIBSUBDIR_64) Alan@306: Alan@493: # Additional environment variable options to GNU autoconf configure script Alan@493: MODTYPE_CONFIG_ENV = PATH="$(FONT_UTILS_PATH):$$PATH" \ Alan@493: LD_LIBRARY_PATH="$(FONT_LIBS_PATH)" Alan@98: Alan@98: # Environment variable options needed when building Alan@493: MODTYPE_BUILD_ENV = PATH="$(FONT_UTILS_PATH):$$PATH" \ Alan@606: LD_LIBRARY_PATH="$(FONT_LIBS_PATH)" Alan@98: Alan@963: # Need to install links in fontpath.d directory Alan@963: MODTYPE_ADD_INSTALL_TARGETS = install_fontpath_links Alan@963: Alan@493: ### Include common rulesets Alan@967: include $(TOP)/open-src/common/Makefile.inc Alan@98: Alan@963: # Can't use Makefile substitutions or dependencies on the links themselves Alan@963: # due to the : characters & shell math expansion in the link names Alan@963: # Ignores errors since /usr/bin/ln -sf can fail due to race conditions Alan@963: # when parallel makes try making the same symlink at the same time Alan@963: install_fontpath_links: $(PROTODIR)$(X11_FONT_CATALOGUE) Alan@963: @for l in $(FONTPATH_LINKS) ; do \ Alan@963: if [[ ! -L $(PROTODIR)$(X11_FONT_CATALOGUE)/$$l ]] ; then \ Alan@963: ( $(START_CMD_ECHO) ; ln -sf ../../..$(MODULE_FONTDIR) \ Alan@963: $(PROTODIR)$(X11_FONT_CATALOGUE)/$$l || true ); \ Alan@963: fi \ Alan@963: done Alan@963: Alan@963: $(PROTODIR)$(X11_FONT_CATALOGUE): Alan@963: mkdir -p $@