components/gnome/glib2/Makefile
changeset 5891 196a7310cc4d
child 5898 bec0360592b2
equal deleted inserted replaced
5890:e3686c085735 5891:196a7310cc4d
       
     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) 2016, Oracle and/or its affiliates. All rights reserved.
       
    24 #
       
    25 
       
    26 COMPILER =      	gcc
       
    27 BUILD_BITS =            32_and_64
       
    28 include ../../../make-rules/shared-macros.mk
       
    29 
       
    30 COMPONENT_NAME=		glib
       
    31 COMPONENT_VERSION=	2.46.0
       
    32 COMPONENT_PROJECT_URL=	https://wiki.gnome.org/Projects/GLib/
       
    33 COMPONENT_ARCHIVE_HASH=	\
       
    34     sha256:b1cee83469ae7d80f17c267c37f090414e93960bd62d2b254a5a96fbc5baacb4
       
    35 COMPONENT_BUGDB=	gnome/glib
       
    36 
       
    37 TPNO=			24986
       
    38 
       
    39 # No need to build for older versions.
       
    40 PYTHON_VERSIONS= 3.4
       
    41 
       
    42 include $(WS_MAKE_RULES)/gnome-component.mk
       
    43 
       
    44 # Necessary to ensure patches applied to configure.ac take effect.
       
    45 COMPONENT_PREP_ACTION += ( cd $(@D); NOCONFIGURE=1 $(CONFIG_SHELL) autogen.sh );
       
    46 
       
    47 CFLAGS += $(CPP_XPG6MODE)
       
    48 CFLAGS.gcc += -std=gnu11
       
    49 CFLAGS.studio += -std=c11 -xlang=c11
       
    50 
       
    51 # Disabled by default (temporarily disabled here because it significantly
       
    52 # increases build time).
       
    53 CONFIGURE_OPTIONS += --disable-gtk-doc
       
    54 
       
    55 # Building dtrace probes doesn't work correctly (results in undefined symbols
       
    56 # in programs), disable until we can figure out how to fix.
       
    57 CONFIGURE_OPTIONS += --disable-dtrace
       
    58 
       
    59 # The build process modifies the shebang line to use the version of Python
       
    60 # automatically found; to avoid using the current system default, one is
       
    61 # explicitly specified here.
       
    62 CONFIGURE_OPTIONS += --with-python=$(PYTHON.3.4)
       
    63 
       
    64 # Configure doesn't find this since it's not in $PATH
       
    65 CONFIGURE_OPTIONS += DBUS_DAEMON=/usr/lib/dbus-daemon
       
    66 
       
    67 # configure sets this to gcc's -fvisibility=hidden, replace with correct
       
    68 # flag for Studio builds
       
    69 COMPONENT_BUILD_ARGS.studio += GLIB_HIDDEN_VISIBILITY_CFLAGS='-xldscope=hidden'
       
    70 COMPONENT_BUILD_ARGS += $(COMPONENT_BUILD_ARGS.$(COMPILER))
       
    71 
       
    72 # Assumes GNU msgfmt in PATH.
       
    73 # Need to include /usr/sbin so configure can find dtrace
       
    74 CONFIGURE_ENV += PATH="$(PATH):/usr/sbin"
       
    75 COMPONENT_BUILD_ENV += PATH="$(GNUBIN):$(PATH):/usr/sbin"
       
    76 
       
    77 # Needed for "gmake test" to work successfully.
       
    78 # If SHELLOPTS is exported (as it is by the userland makefiles),
       
    79 # then all shell options get exported to child invocations of bash,
       
    80 # which results in test failures due to nounset and xtrace being
       
    81 # set unexpectedly, and errors such as "$1: unbound variable" and
       
    82 # diffs failing due to script tracing in output files.
       
    83 unexport SHELLOPTS
       
    84 
       
    85 # Strip random seeds from glib tests that use different values each run
       
    86 COMPONENT_TEST_TRANSFORMS += \
       
    87 	'-e "s/seed:[0-9]*/seed:/"'
       
    88 
       
    89 # Strip filenames that are reported in different order between runs
       
    90 COMPONENT_TEST_TRANSFORMS += \
       
    91 	'-e "s%/bookmarks/parse/.*%%"' \
       
    92 	'-e "s%/markup/parse/.*%%"' \
       
    93 
       
    94 # Standard automake test framework results transform
       
    95 COMPONENT_TEST_TRANSFORMS += \
       
    96         '-n ' \
       
    97         '-e "/TOTAL/p" ' \
       
    98         '-e "/SKIP/p" ' \
       
    99         '-e "/PASS/p" ' \
       
   100         '-e "/FAIL/p" ' \
       
   101         '-e "/ERROR/p" '
       
   102 
       
   103 REQUIRED_PACKAGES += data/docbook
       
   104 REQUIRED_PACKAGES += desktop/xdg/desktop-file-utils
       
   105 REQUIRED_PACKAGES += developer/documentation-tool/gtk-doc
       
   106 REQUIRED_PACKAGES += library/file-monitor/gamin
       
   107 REQUIRED_PACKAGES += library/libffi
       
   108 REQUIRED_PACKAGES += library/pcre
       
   109 REQUIRED_PACKAGES += library/zlib
       
   110 REQUIRED_PACKAGES += $(PERL_PKG)
       
   111 REQUIRED_PACKAGES += runtime/python-34
       
   112 REQUIRED_PACKAGES += system/library/dbus
       
   113 REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime