Makefile revision 1339
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller###############################################################################
088fa5d9eaa83bf4b3d59a64c0519f42a143aaa9Alin Brici#
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller#
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller# Permission is hereby granted, free of charge, to any person obtaining a
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller# copy of this software and associated documentation files (the "Software"),
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller# to deal in the Software without restriction, including without limitation
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller# the rights to use, copy, modify, merge, publish, distribute, sublicense,
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller# and/or sell copies of the Software, and to permit persons to whom the
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller# Software is furnished to do so, subject to the following conditions:
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller#
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller# The above copyright notice and this permission notice (including the next
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller# paragraph) shall be included in all copies or substantial portions of the
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller# Software.
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller#
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
a20f25a11beaf0445cc53f4d56537cef3d26281eBrendan Mmiller# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
f39dc15e901a18aaac2ef6ca0d668bff5d35a9e4Brendan Mmiller# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
f39dc15e901a18aaac2ef6ca0d668bff5d35a9e4Brendan Mmiller# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21dcdac963f79c098a5ea1a2c5c5e109429c9786Brendan Miller# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21dcdac963f79c098a5ea1a2c5c5e109429c9786Brendan Miller# DEALINGS IN THE SOFTWARE.
088fa5d9eaa83bf4b3d59a64c0519f42a143aaa9Alin Brici#
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller#
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller# Package name used in tarballs
3a666413480ef97101461705e1f47cbab0266301Brendan MmillerMODULE_NAME=libX11
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller# Version number (used in path names)
bfd9faff49961e9db7b92f310d59923fd6234372Brendan MmillerMODULE_VERSION = 1.5.0
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller# Checksums for upstream tarball
3a666413480ef97101461705e1f47cbab0266301Brendan MmillerTARBALL_MD5 = 78b4b3bab4acbdf0abcfca30a8c70cc6
3a666413480ef97101461705e1f47cbab0266301Brendan MmillerTARBALL_SHA1 = 8177535c9c59d8c3ab98d55ce53520b5737ccd1a
3a666413480ef97101461705e1f47cbab0266301Brendan MmillerTARBALL_SHA256= c382efd7e92bfc3cef39a4b7f1ecf2744ba4414a705e3bc1e697f75502bd4d86
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller# Patches to apply to source after unpacking, in order
3a666413480ef97101461705e1f47cbab0266301Brendan MmillerSOURCE_PATCHES = \
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller 1234757.patch,-p1 \
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller 4010755.patch \
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller 4614834.patch \
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller 5039226.patch \
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller solaris-abi.patch,-p1 \
f39dc15e901a18aaac2ef6ca0d668bff5d35a9e4Brendan Mmiller solaris-kbd.patch,-p1 \
f39dc15e901a18aaac2ef6ca0d668bff5d35a9e4Brendan Mmiller SolarisIA.patch,-p1 \
f39dc15e901a18aaac2ef6ca0d668bff5d35a9e4Brendan Mmiller 6714036.patch,-p1 \
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller 6789219.patch,-p1 \
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller im-suneu-greek.patch \
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller im-ximcp.patch \
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller lc-jisx0212.patch \
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller lc-jisx0208.patch \
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller lc-ksc5601.1992-3.patch,-p1 \
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller lc-gb18030.patch,-p1 \
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller om-generic.patch,-p1 \
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller compose.dir.patch \
80a21b2f138c5017c1d929d4879bfc686d6841ebBrendan Miller compose-iso8859-1.patch \
a20f25a11beaf0445cc53f4d56537cef3d26281eBrendan Mmiller compose-iso8859-2.patch \
a20f25a11beaf0445cc53f4d56537cef3d26281eBrendan Mmiller compose-iso8859-5.patch \
a20f25a11beaf0445cc53f4d56537cef3d26281eBrendan Mmiller compose-iso8859-6.patch \
a20f25a11beaf0445cc53f4d56537cef3d26281eBrendan Mmiller compose-iso8859-7.patch,-p1 \
a20f25a11beaf0445cc53f4d56537cef3d26281eBrendan Mmiller compose-iso8859-8.patch \
a20f25a11beaf0445cc53f4d56537cef3d26281eBrendan Mmiller compose-iso8859-9.patch \
a20f25a11beaf0445cc53f4d56537cef3d26281eBrendan Mmiller compose-iso8859-13.patch \
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller compose-iso8859-15.patch \
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller compose-el_GR.UTF-8.patch \
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller compose-en_US.UTF-8.patch,-p1 \
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller compose-ja_JP.UTF-8.patch \
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller compose-ko_KR.UTF-8.patch \
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller compose-pt_BR.UTF-8.patch,-p1 \
80a21b2f138c5017c1d929d4879bfc686d6841ebBrendan Miller compose-th_TH.UTF-8.patch \
72b75f9642d4c117775b8613ccffddd5ff9c59a8Brendan Mmiller compose-zh_CN.UTF-8.patch \
72b75f9642d4c117775b8613ccffddd5ff9c59a8Brendan Mmiller compose-zh_HK.UTF-8.patch \
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller compose-zh_TW.UTF-8.patch \
80a21b2f138c5017c1d929d4879bfc686d6841ebBrendan Miller locale.aliases.patch,-p1 \
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller locale.dir.patch \
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller locale.paths.patch,-p1 \
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller locale-C.patch \
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller locale-iso8859-1.patch \
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller locale-iso8859-6.patch \
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller locale-iso8859-8.patch \
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller locale-en_US.UTF-8.patch \
80a21b2f138c5017c1d929d4879bfc686d6841ebBrendan Miller locale-ja.SJIS.patch \
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller locale-ja.patch \
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller locale-ja_JP.UTF-8.patch \
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller locale-ko.patch \
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller locale-ko_KR.UTF-8.patch \
bfd9faff49961e9db7b92f310d59923fd6234372Brendan Mmiller locale-pt_BR.UTF-8.patch \
0c5e7ab011ba63c40aeb6c924bb888b21e481f59Brendan Mmiller locale-th_TH.UTF-8.patch \
e7bcfc8fc3a59824ed58768c7ef24163fed628cfBrendan Mmiller locale-zh_CN.UTF-8.patch \
877835274f73615fe922911749e4de093fb26cceBrendan Mmiller locale-zh_CN.gb18030.patch \
e7bcfc8fc3a59824ed58768c7ef24163fed628cfBrendan Mmiller locale-zh_HK.UTF-8.patch \
72b75f9642d4c117775b8613ccffddd5ff9c59a8Brendan Mmiller locale-zh_TW.UTF-8.patch \
1865547d14d52f49a59e81d183910420f25dcecaBrendan Mmiller locale-zh_TW.patch \
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller locale-ru-RU.UTF-8.patch
3a666413480ef97101461705e1f47cbab0266301Brendan Mmiller
# Library name (used for specfiles/mapfiles)
LIBNAME=X11
# Dates to show in Oracle copyright notice in pkg license file
# Earliest & latest of the copyrights in the Oracle files in this pkg
ORACLE_COPYRIGHT_YEARS = 1986, 2012
# ARC cases that covered this module
# PSARC/1992/077 X11/R5 Xlib API
MODULE_ARC_CASES = PSARC/1992/077
# PSARC/1992/082 Dynamic Locale Access For X11/R5 Xlib
MODULE_ARC_CASES += PSARC/1992/082
# PSARC/1997/141 Sym links needed in /usr/lib for SPARC ABI compliance
MODULE_ARC_CASES += PSARC/1997/141
# PSARC/2006/448 UTF8_STRING support in Solaris libX11 and XLC modules
MODULE_ARC_CASES += PSARC/2006/448
# PSARC/2008/062 Porting of Xorg XI18N
MODULE_ARC_CASES += PSARC/2008/062
# PSARC/2009/666 libX11 1.3
MODULE_ARC_CASES += PSARC/2009/666
# PSARC/2010/109 Introduce libXcb in Solaris
MODULE_ARC_CASES += PSARC/2010/109
# Man pages to apply Sun footer to & attributes to list
SUNTOUCHED_MANPAGES=man/*.man man/xkb/*.man
MODULE_STABILITY=Committed
LIB_MAN_SUFFIX=3x11
# Command line options to GNU autoconf configure script
MODULE_CONFIG_OPTS = --enable-xthreads --enable-loadable-i18n \
--disable-xf86bigfont \
--with-xcb=yes --enable-loadable-xcursor --enable-xcms \
--enable-xlocaledir --enable-xkb --enable-man-pages=$(LIB_MAN_SUFFIX) \
--with-locale-lib-dir='$${exec_prefix}/lib/X11/locale$(LIBSUBDIR)'
# -xF is needed for mapfile reordering to work
MODULE_CFLAGS = -xF
# -DSUNSOFT enables Solaris extensions
# -DMOTIFBC enables compatibility with bugs in Motif & other apps
# -DSUNSOFT_KBD enables Solaris traditional keyboard handling
MODULE_CPPFLAGS = -DSUNSOFT -DMOTIFBC -DSUNSOFT_KBD \
-I$(PROTODIR)/usr/include/X11 \
-I$(PROTODIR)/usr/include/xcb
MODULE_LDFLAGS = -R$(X11_LIB_DIR)$(ARCHLIBSUBDIR)
# Need to ignore extra libraries like -lsocket & -lnsl in i18n modules
MODULE_LD_OPTIONS = -z ignore
# Backwards compatibility for old paths until g11n moves all input methods
MODULE_CONFIG_ENV = \
XLOCALEDIR="/usr/share/X11/locale:/usr/X11/share/X11/locale" \
XLOCALELIBDIR="/usr/lib/X11/locale$(LIBSUBDIR):/usr/X11/lib/X11/locale$(LIBSUBDIR)"
# Work around libtool's interference
DELIBTOOLIZE=yes
# Use -KPIC instead of -Kpic because we have too many symbols on SPARC
DELIBTOOLIZE_FLAGS_sparc = -P
DELIBTOOLIZE_FLAGS_i386 =
DELIBTOOLIZE_FLAGS = $(DELIBTOOLIZE_FLAGS_$(MACH))
# Need additional mapfile for additional symbols in 64-bit versions
MODULE_BUILD_64_FLAGS = ADD_libX11_LDFLAGS="-M $(PWD)/mapfile-vers-64"
# pkg-config files that need to have -R added
FIX_PC_FILES=x11.pc.in
# Regenerate Makefile.in's from Makefile.am's after patching them
AUTORECONF=yes
# Merge in additional sources from sun-src directory
ADDITIONAL_SOURCE_DIR=sun-src
# Install additional headers we need in other parts of the build or ship in
# packages, but which X.Org doesn't
MODULE_ADD_INSTALL_TARGETS_32 = install_extra_headers
MODULE_ADD_INSTALL_TARGETS = $(MODULE_ADD_INSTALL_TARGETS_$(BUILD_TYPE))
# Extra links to libX11 for compatibility with SVID / SPARC ABI / etc.
EXTRA_LINKS = libX.so libX.so.4 libX11.so.5
MODULE_ADD_INSTALL_TARGETS += install_extra_links
# Compatibility links from /usr/X11/lib to /usr/lib
MODULE_X11_LIBCOMPAT_LINKS = libX11.so libX11.so.4 $(EXTRA_LINKS)
include ../Makefile.inc
install_extra_headers: $(INSTALL_DEPS)
mkdir -p $(PROTODIR)$(X11_INCLUDES_DIR)/X11/extensions
cp -pf sun-src/include/X11/Xvarargs.h \
$(PROTODIR)$(X11_INCLUDES_DIR)/X11/
cp -pf sun-src/include/X11/extensions/XInteractive.h \
$(PROTODIR)$(X11_INCLUDES_DIR)/X11/extensions/
cp -pf $(SOURCE_DIR)/src/xlibi18n/Xlc*.h \
$(PROTODIR)$(X11_INCLUDES_DIR)/X11/
# Install additional links to libX11 that we include in our packages
EXTRA_PROTO_LINKS = $(EXTRA_LINKS:%=$(PROTODIR)$(MODULE_PREFIX)/lib$(ARCHLIBSUBDIR)/%)
$(EXTRA_PROTO_LINKS): $(INSTALL_DEPS)
@rm -f $@
ln -s libX11.so.4 $@
install_extra_links: $(EXTRA_PROTO_LINKS)