components/gnome/gtk3/Makefile
changeset 6215 1f0767d254fe
child 6242 9bcb362ee1dc
equal deleted inserted replaced
6214:4761a444c624 6215:1f0767d254fe
       
     1 #
       
     2 # CDDL HEADER START
       
     3 #
       
     4 # The contents of this file are subject to the terms of the
       
     5 # Common Development and Distribution License (the "License").
       
     6 # You may not use this file except in compliance with the License.
       
     7 #
       
     8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
       
     9 # or http://www.opensolaris.org/os/licensing.
       
    10 # See the License for the specific language governing permissions
       
    11 # and limitations under the License.
       
    12 #
       
    13 # When distributing Covered Code, include this CDDL HEADER in each
       
    14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
       
    15 # If applicable, add the following below this CDDL HEADER, with the
       
    16 # fields enclosed by brackets "[]" replaced with your own identifying
       
    17 # information: Portions Copyright [yyyy] [name of copyright owner]
       
    18 #
       
    19 # CDDL HEADER END
       
    20 #
       
    21 
       
    22 #
       
    23 # Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
       
    24 #
       
    25 
       
    26 BUILD_BITS =            32_and_64
       
    27 # All components using gobject-introspection must be built with gcc as
       
    28 # gobject-introspection does not produce correct results when using Studio.
       
    29 COMPILER =              gcc
       
    30 include ../../../make-rules/shared-macros.mk
       
    31 
       
    32 COMPONENT_NAME=		gtk3
       
    33 COMPONENT_VERSION=	3.18.0
       
    34 COMPONENT_PROJECT_URL=	https://wiki.gnome.org/Projects/GTK+
       
    35 COMPONENT_SRC=		gtk+-$(COMPONENT_VERSION)
       
    36 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.xz
       
    37 COMPONENT_ARCHIVE_HASH=	\
       
    38     sha256:7fb8ae257403317d3852bad28d064d35f67e978b1fed8b71d5997e87204271b9
       
    39 COMPONENT_ARCHIVE_URL=	https://download.gnome.org/sources/gtk+/3.18/$(COMPONENT_ARCHIVE)
       
    40 COMPONENT_BUGDB=	gnome/gtk+
       
    41 
       
    42 TPNO=			24779
       
    43 
       
    44 ETCDIR.64="$(ETCDIR)/$(MACH64)"
       
    45 
       
    46 # Enable tests once all dependencies are install on the build server
       
    47 TEST_TARGET = $(SKIP_TEST)
       
    48 
       
    49 # Needs gobject-introspection, not available on S11.
       
    50 ifeq ($(BUILD_TYPE), evaluation)
       
    51 BUILD_32_and_64=
       
    52 INSTALL_32_and_64=
       
    53 PUBLISH_STAMP=
       
    54 endif
       
    55 
       
    56 include $(WS_MAKE_RULES)/gnome-component.mk
       
    57 
       
    58 # Uses isinf, etc. only available in c99 and newer.  The GNU variant is chosen
       
    59 # due to use of M_PI, etc. dropped in C99 and newer.
       
    60 CFLAGS.gcc += -std=gnu11
       
    61 
       
    62 # 32-bit gcc builds cause segfaults in gtk3; see bug 21393975.
       
    63 gcc_OPT.i386.32 = -O2
       
    64 
       
    65 # Generate and install architecture-specific configuration files.
       
    66 PROTOETCGTKDIR.32=	$(PROTO_DIR)/$(ETCDIR.32)/gtk-3.0
       
    67 PROTOETCGTKDIR.64=	$(PROTO_DIR)/$(ETCDIR.64)/gtk-3.0
       
    68 PROTOETCIMMCONF.32=	$(PROTOETCGTKDIR.32)/gtk.immodules
       
    69 PROTOETCIMMCONF.64=	$(PROTOETCGTKDIR.64)/gtk.immodules
       
    70 
       
    71 $(PROTOETCIMMCONF.32):
       
    72 	$(MKDIR) $(PROTOETCGTKDIR.32); \
       
    73 	LD_LIBRARY_PATH=$(PROTO_DIR)/$(USRLIB.32) \
       
    74 	  $(PROTOUSRBINDIR)/gtk-query-immodules-3.0 \
       
    75 	  $(PROTOUSRLIBDIR)/gtk-3.0/*/immodules/*.so | \
       
    76 	  $(GSED) -e "s#$(PROTO_DIR)/##" > $(PROTOETCIMMCONF.32)
       
    77 
       
    78 $(PROTOETCIMMCONF.64):
       
    79 	$(MKDIR) $(PROTOETCGTKDIR.64); \
       
    80 	LD_LIBRARY_PATH=$(PROTO_DIR)/$(USRLIB.64) \
       
    81 	  $(PROTOUSRBINDIR64)/gtk-query-immodules-3.0 \
       
    82 	  $(PROTOUSRLIBDIR64)/gtk-3.0/*/immodules/*.so | \
       
    83 	  $(GSED) -e "s#$(PROTO_DIR)/##" > $(PROTOETCIMMCONF.64)
       
    84 
       
    85 install: $(PROTOETCIMMCONF.32) $(PROTOETCIMMCONF.64)
       
    86 
       
    87 CONFIGURE_ENV += PATH=$(GNUBIN):$(PATH)
       
    88 CONFIGURE_OPTIONS += --enable-cloudprint
       
    89 # Required for other components.
       
    90 CONFIGURE_OPTIONS += --enable-introspection
       
    91 CONFIGURE_OPTIONS += --enable-libcanberra
       
    92 # Generate man pages
       
    93 CONFIGURE_OPTIONS += --enable-man
       
    94 CONFIGURE_OPTIONS += --with-x
       
    95 
       
    96 # Delete this when build servers are installed with an updated at-spi2-atk
       
    97 ATK_BASE = $(WS_COMPONENTS)/gnome/at-spi2-atk/build/prototype/$(MACH)
       
    98 PKG_CONFIG_PATHS.32 += $(ATK_BASE)/usr/lib/pkgconfig/
       
    99 PKG_CONFIG_PATHS.64 += $(ATK_BASE)/usr/lib/$(MACH64)/pkgconfig/
       
   100 PKG_CONFIG_PATHS += $(PKG_CONFIG_PATHS.$(BITS))
       
   101 
       
   102 LD_OPTIONS.32 += -L $(ATK_BASE)/usr/lib 
       
   103 LD_OPTIONS.64 += -L $(ATK_BASE)/usr/lib/$(MACH64)
       
   104 LD_OPTIONS += $(LD_OPTIONS.$(BITS))
       
   105 
       
   106 CPPFLAGS += -I$(ATK_BASE)/usr/include/at-spi2-atk/2.0
       
   107 
       
   108 REST_BASE = $(WS_COMPONENTS)/gnome/rest/build/prototype/$(MACH)
       
   109 PKG_CONFIG_PATHS.32 += $(REST_BASE)/usr/lib/pkgconfig/
       
   110 PKG_CONFIG_PATHS.64 += $(REST_BASE)/usr/lib/$(MACH64)/pkgconfig/
       
   111 PKG_CONFIG_PATHS += $(PKG_CONFIG_PATHS.$(BITS))
       
   112 
       
   113 LD_OPTIONS.32 += -L $(REST_BASE)/usr/lib
       
   114 LD_OPTIONS.64 += -L $(REST_BASE)/usr/lib/$(MACH64)
       
   115 LD_OPTIONS += $(LD_OPTIONS.$(BITS))
       
   116 
       
   117 CPPFLAGS += -I$(REST_BASE)/usr/include/rest-0.7
       
   118 
       
   119 # Work around pkgdepend bug which doesn't resolve dependencies from
       
   120 # the local workspace repo. 
       
   121 DEPENDED += $(WS_TOP)/components/gnome/rest/build/manifest-$(MACH)-rest.depend
       
   122 DEPENDED += $(WS_TOP)/components/gnome/at-spi2-atk/build/manifest-$(MACH)-at-spi2-atk.depend
       
   123 
       
   124 # Temporary until dependencies are all on build machines
       
   125 REQUIRED_PACKAGES += $(shell $(GSED) -n 's/REQUIRED_PACKAGES +=//p' ../at-spi2-atk/Makefile) 
       
   126 REQUIRED_PACKAGES += $(shell $(GSED) -n 's/REQUIRED_PACKAGES +=//p' ../rest/Makefile) 
       
   127 #end Delete
       
   128 
       
   129 # Needed due to patch to configure.ac.
       
   130 COMPONENT_PREP_ACTION += (cd $(@D); autoreconf -fiv);
       
   131 
       
   132 REQUIRED_PACKAGES += data/docbook/docbook-dtds
       
   133 REQUIRED_PACKAGES += data/docbook/docbook-style-dsssl
       
   134 REQUIRED_PACKAGES += data/docbook/docbook-style-xsl
       
   135 REQUIRED_PACKAGES += developer/documentation-tool/gtk-doc
       
   136 REQUIRED_PACKAGES += developer/gnu-indent
       
   137 REQUIRED_PACKAGES += library/desktop/at-spi2-atk
       
   138 REQUIRED_PACKAGES += library/desktop/atk
       
   139 REQUIRED_PACKAGES += library/desktop/cairo
       
   140 REQUIRED_PACKAGES += library/desktop/gdk-pixbuf
       
   141 REQUIRED_PACKAGES += library/desktop/gobject/gobject-introspection
       
   142 REQUIRED_PACKAGES += library/desktop/librest
       
   143 REQUIRED_PACKAGES += library/desktop/pango
       
   144 REQUIRED_PACKAGES += library/desktop/xdg/libcanberra
       
   145 REQUIRED_PACKAGES += library/glib2
       
   146 REQUIRED_PACKAGES += library/json-glib
       
   147 REQUIRED_PACKAGES += library/print/cups-libs
       
   148 REQUIRED_PACKAGES += print/cups
       
   149 REQUIRED_PACKAGES += runtime/perl-522
       
   150 REQUIRED_PACKAGES += runtime/python-27
       
   151 REQUIRED_PACKAGES += service/image/colord
       
   152 REQUIRED_PACKAGES += system/library/fontconfig
       
   153 REQUIRED_PACKAGES += system/library/freetype-2
       
   154 REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
       
   155 REQUIRED_PACKAGES += system/library/math
       
   156 REQUIRED_PACKAGES += x11/library/libepoxy
       
   157 REQUIRED_PACKAGES += x11/library/libx11
       
   158 REQUIRED_PACKAGES += x11/library/libxcomposite
       
   159 REQUIRED_PACKAGES += x11/library/libxcursor
       
   160 REQUIRED_PACKAGES += x11/library/libxdamage
       
   161 REQUIRED_PACKAGES += x11/library/libxext
       
   162 REQUIRED_PACKAGES += x11/library/libxfixes
       
   163 REQUIRED_PACKAGES += x11/library/libxi
       
   164 REQUIRED_PACKAGES += x11/library/libxinerama
       
   165 REQUIRED_PACKAGES += x11/library/libxrandr
       
   166 REQUIRED_PACKAGES += x11/library/libxrender