17806728 fontconfig programs should move to LP64 versions as default [PSARC/2015/035]
PSARC/2015/035 Moving fontconfig utilities to LP64 by default
--- a/open-src/lib/fontconfig/Makefile Tue Feb 10 21:16:05 2015 -0800
+++ b/open-src/lib/fontconfig/Makefile Wed Feb 11 09:16:44 2015 -0800
@@ -2,7 +2,7 @@
#
# Fontconfig - Font configuration and customization library
#
-# Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -50,6 +50,10 @@
MODULE_ARC_CASES += LSARC/2007/532
# LSARC/2008/140 fontconfig 2.5.0
MODULE_ARC_CASES += LSARC/2008/140
+# PSARC/2010/162 fontconfig 2.8.0
+MODULE_ARC_CASES += PSARC/2010/162
+# PSARC/2015/035 Moving fontconfig utilities to LP64 by default
+MODULE_ARC_CASES += PSARC/2015/035
# Package metadata
UPSTREAM = fontconfig
@@ -112,8 +116,13 @@
# pkg-config files to update
FIX_PC_FILES=fontconfig.pc.in
+BINSUBDIR = $(BINSUBDIR_$(BUILD_TYPE))
+BINSUBDIR_32 = $(SUBDIR32)
+BINSUBDIR_64 = $(SUBDIR64)
+
# Additional command line options to GNU autoconf configure script
MODULE_CONFIG_OPTS = \
+ --bindir='$${exec_prefix}/bin/$(BINSUBDIR)' \
--with-confdir=/etc/fonts \
--with-default-fonts='/usr/share/fonts' \
--with-add-fonts='/etc/X11/fontpath.d,/usr/share/ghostscript/fonts,/usr/X11/lib/X11/fonts' \
@@ -153,12 +162,21 @@
SUN_CONFFILES = 20-indic.conf 49-sun-preuser.conf 90-sun-prefer-bitmap.conf
FONTCONFIG_SUN_CONFFILES = $(SUN_CONFFILES:%=$(FONTCONFIG_CONFDIR)/%)
+# Link /usr/bin/$cmdname to the 64-bit version
+FONTCONFIG_CMD_LINKS = $(FONTCONFIG_CMDS:%=$(PROTODIR)/usr/bin/%)
+$(FONTCONFIG_CMD_LINKS): $(PROTODIR)/usr/bin
+ -rm -f $@
+ ln -s $(BINSUBDIR_64)/${@F} $@
+
+$(PROTODIR)/usr/bin:
+ mkdir $@
+
# Additional targets to install beyond the default_install,
# run just once, not per bitwidth
FONTCONFIG_INSTALL_RULES = fontconfig-sunman-install \
$(FONTCONFIG_SMF_MANIFEST) $(FONTCONFIG_SMF_METHOD) \
$(FONTCONFIG_RBAC_AUTH) $(FONTCONFIG_RBAC_HELP) \
- $(FONTCONFIG_SUN_CONFFILES)
+ $(FONTCONFIG_SUN_CONFFILES) $(FONTCONFIG_CMD_LINKS)
install: $(FONTCONFIG_INSTALL_RULES)
@@ -169,7 +187,7 @@
$(FONTCONFIG_SMF_METHOD): fc-cache.sh
mkdir -p $(FONTCONFIG_SMF_METHOD_dir)
- $(INSTALL_SCRIPT) -c -m 0755 fc-cache.sh $@
+ $(INSTALL_SCRIPT) -c -m 0555 fc-cache.sh $@
$(FONTCONFIG_RBAC_AUTH): auth_attr
mkdir -p $(FONTCONFIG_RBAC_AUTH_dir)
--- a/open-src/lib/fontconfig/fc-cache.sh Tue Feb 10 21:16:05 2015 -0800
+++ b/open-src/lib/fontconfig/fc-cache.sh Wed Feb 11 09:16:44 2015 -0800
@@ -1,6 +1,6 @@
#!/bin/ksh93
#
-# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -75,19 +75,26 @@
POSTCMD="svccfg -s application/font/fc-cache setprop options/force_rebuild=false"
fi
-/usr/bin/fc-cache $ARGS
+case "$(uname -p)" in
+ sparc) ARCH32="sparcv7" ARCH64="sparcv9" ;;
+ i386) ARCH32="i86" ARCH64="amd64" ;;
+ *) echo "Unknown architecture $(uname -p)"
+ exit $SMF_EXIT_ERR_FATAL ;;
+esac
+
+# Run 32-bit & 64-bit cache builds in parallel
+/usr/bin/${ARCH32}/fc-cache $ARGS &
+pid32=$!
+
+/usr/bin/${ARCH64}/fc-cache $ARGS &
+pid64=$!
+
+wait $pid32
if [ $? -ne 0 ] ; then
RETVAL=$SMF_EXIT_MON_DEGRADE
fi
-case "$(uname -p)" in
- sparc) ARCH64="sparcv9" ;;
- i386) ARCH64="amd64" ;;
- *) echo "Unknown architecture $(uname -p)"
- exit $SMF_EXIT_ERR_FATAL ;;
-esac
-
-/usr/bin/${ARCH64}/fc-cache $ARGS
+wait $pid64
if [ $? -ne 0 ] ; then
RETVAL=$SMF_EXIT_MON_DEGRADE
fi
--- a/pkg/manifests/system-library-fontconfig.p5m Tue Feb 10 21:16:05 2015 -0800
+++ b/pkg/manifests/system-library-fontconfig.p5m Wed Feb 11 09:16:44 2015 -0800
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -93,18 +93,24 @@
dir path=lib/svc/manifest/application/font
file path=lib/svc/manifest/application/font/fc-cache.xml
file path=lib/svc/method/fc-cache
+file path=usr/bin/$(ARCH32)/fc-cache
+file path=usr/bin/$(ARCH32)/fc-cat
+file path=usr/bin/$(ARCH32)/fc-list
+file path=usr/bin/$(ARCH32)/fc-match
+file path=usr/bin/$(ARCH32)/fc-query
+file path=usr/bin/$(ARCH32)/fc-scan
file path=usr/bin/$(ARCH64)/fc-cache
file path=usr/bin/$(ARCH64)/fc-cat
file path=usr/bin/$(ARCH64)/fc-list
file path=usr/bin/$(ARCH64)/fc-match
file path=usr/bin/$(ARCH64)/fc-query
file path=usr/bin/$(ARCH64)/fc-scan
-file path=usr/bin/fc-cache
-file path=usr/bin/fc-cat
-file path=usr/bin/fc-list
-file path=usr/bin/fc-match
-file path=usr/bin/fc-query
-file path=usr/bin/fc-scan
+link path=usr/bin/fc-cache target=$(ARCH64)/fc-cache
+link path=usr/bin/fc-cat target=$(ARCH64)/fc-cat
+link path=usr/bin/fc-list target=$(ARCH64)/fc-list
+link path=usr/bin/fc-match target=$(ARCH64)/fc-match
+link path=usr/bin/fc-query target=$(ARCH64)/fc-query
+link path=usr/bin/fc-scan target=$(ARCH64)/fc-scan
dir path=usr/include/fontconfig
file path=usr/include/fontconfig/fcfreetype.h
file path=usr/include/fontconfig/fcprivate.h