From 958fbef795b03e7230c3ae39a2c683e5819eed39 Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Mon, 4 Mar 2013 18:19:31 -0800 Subject: [PATCH] bump(coreos-base/libchrome): bump to 180609 also remove the wno-c++11 flag which is breaking with our compiler --- .../libchrome/files/SConstruct-125070 | 2 +- .../libchrome/files/SConstruct-180609 | 238 ++++++++++++++++++ .../libchrome/files/build_config.h-180609 | 154 ++++++++++++ .../libchrome/libchrome-180609-r1.ebuild | 1 + .../libchrome/libchrome-180609.ebuild | 90 +++++++ 5 files changed, 484 insertions(+), 1 deletion(-) create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/libchrome/files/SConstruct-180609 create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/libchrome/files/build_config.h-180609 create mode 120000 sdk_container/src/third_party/coreos-overlay/coreos-base/libchrome/libchrome-180609-r1.ebuild create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/libchrome/libchrome-180609.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/libchrome/files/SConstruct-125070 b/sdk_container/src/third_party/coreos-overlay/coreos-base/libchrome/files/SConstruct-125070 index 81a7ad19e9..67e62718e1 100755 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/libchrome/files/SConstruct-125070 +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/libchrome/files/SConstruct-125070 @@ -218,7 +218,7 @@ Requires: Requires.private: glib-2.0 @PRIVATE_PC@ Libs: -lbase-${bslot} Libs.private: @BASE_LIBS@ @LIBS@ -Cflags: -I${includedir}/base-${bslot} -Wno-c++11-extensions +Cflags: -I${includedir}/base-${bslot} """)]) env.Substfile('libbase-%s.so' % BASE_VER, diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/libchrome/files/SConstruct-180609 b/sdk_container/src/third_party/coreos-overlay/coreos-base/libchrome/files/SConstruct-180609 new file mode 100644 index 0000000000..2ebb0658f3 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/libchrome/files/SConstruct-180609 @@ -0,0 +1,238 @@ +# -*- python -*- + +# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import os + +# This block will most likely need updating whenever libchrome gets updated. +# The order of the libs below doesn't matter (as scons will take care of +# building things in the required order). The split between them is purely +# to reduce over linking of 3rd party libraries. i.e. 'core' should require +# only the C library (and glib), and all other 3rd party libraries should +# get a unique 'xxx' name. +base_name = 'base' +base_libs = [ + { + 'name' : 'core', + 'sources' : """ + allocator/type_profiler_control.cc + at_exit.cc + atomicops_internals_x86_gcc.cc + base_switches.cc + callback_internal.cc + chromeos/chromeos_version.cc + command_line.cc + debug/alias.cc + debug/debugger.cc + debug/debugger_posix.cc + debug/stack_trace.cc + debug/stack_trace_posix.cc + environment.cc + file_path.cc + file_util.cc + file_util_posix.cc + json/json_parser.cc + json/json_reader.cc + json/json_writer.cc + json/json_string_value_serializer.cc + json/string_escape.cc + lazy_instance.cc + location.cc + logging.cc + memory/ref_counted.cc + memory/ref_counted_memory.cc + memory/singleton.cc + memory/weak_ptr.cc + message_pump.cc + message_pump_default.cc + metrics/bucket_ranges.cc + metrics/histogram.cc + metrics/histogram_base.cc + metrics/histogram_samples.cc + metrics/sample_map.cc + metrics/sample_vector.cc + metrics/sparse_histogram.cc + metrics/statistics_recorder.cc + pickle.cc + platform_file.cc + platform_file_posix.cc + posix/file_descriptor_shuffle.cc + process_posix.cc + process_util.cc + process_util_linux.cc + process_util_posix.cc + profiler/alternate_timer.cc + profiler/tracked_time.cc + safe_strerror_posix.cc + string16.cc + string_number_conversions.cc + string_piece.cc + stringprintf.cc + string_split.cc + string_util.cc + synchronization/condition_variable_posix.cc + synchronization/lock.cc + synchronization/lock_impl_posix.cc + synchronization/waitable_event_posix.cc + sys_info_posix.cc + sys_string_conversions_posix.cc + third_party/dmg_fp/dtoa.cc + third_party/dmg_fp/g_fmt.cc + third_party/dynamic_annotations/dynamic_annotations.c + third_party/icu/icu_utf.cc + third_party/nspr/prtime.cc + threading/non_thread_safe_impl.cc + threading/platform_thread_posix.cc + threading/thread_checker_impl.cc + threading/thread_collision_warner.cc + threading/thread_id_name_manager.cc + threading/thread_local_posix.cc + threading/thread_local_storage_posix.cc + threading/thread_restrictions.cc + time.cc + time_posix.cc + tracked_objects.cc + utf_string_conversions.cc + utf_string_conversion_utils.cc + values.cc + vlog.cc + """, + 'libs' : 'pthread rt', + 'pc_libs' : 'glib-2.0', + }, + { + 'name' : 'glib', + 'sources' : """ + debug/trace_event_impl.cc + files/scoped_temp_dir.cc + message_pump_glib.cc + rand_util.cc + rand_util_posix.cc + """, + 'libs' : '', + 'pc_libs' : 'glib-2.0', + }, + { + 'name' : 'event', + 'sources' : """ + message_loop.cc + message_loop_proxy.cc + message_loop_proxy_impl.cc + message_pump_libevent.cc + pending_task.cc + run_loop.cc + task_runner.cc + thread_task_runner_handle.cc + threading/post_task_and_reply_impl.cc + threading/thread.cc + tracking_info.cc + """, + 'libs' : 'event base-glib-${bslot}', + 'pc_libs' : 'glib-2.0', + }, + { + 'name' : 'dl', + 'sources' : """ + native_library_posix.cc + """, + 'libs' : 'dl', + 'pc_libs' : '', + }, +] + +env = Environment() + +BASE_VER = os.environ.get('BASE_VER', '0') +PKG_CONFIG = os.environ.get('PKG_CONFIG', 'pkg-config') + +env.Append( + CPPPATH=['files'], + CCFLAGS=['-g'] +) +for key in Split('CC CXX AR RANLIB LD NM CFLAGS CCFLAGS'): + value = os.environ.get(key) + if value: + env[key] = Split(value) + +env['CCFLAGS'] += ['-fPIC', + '-fno-exceptions', + '-Wall', + '-Werror', + '-Wno-psabi', + '-DOS_CHROMEOS=1', + '-DTOOLKIT_VIEWS=1', + '-DUSE_AURA=1', + '-I..'] + +# Fix issue with scons not passing some vars through the environment. +for key in Split('PKG_CONFIG SYSROOT'): + if os.environ.has_key(key): + env['ENV'][key] = os.environ[key] + +all_base_libs = [] +all_pc_libs = '' +all_libs = [] +all_scons_libs = [] + +# Build all the shared libraries. +for lib in base_libs: + pc_libs = lib['pc_libs'].replace('${bslot}', BASE_VER) + all_pc_libs += ' ' + pc_libs + + libs = Split(lib['libs'].replace('${bslot}', BASE_VER)) + all_libs += libs + + name = '%s-%s-%s' % (base_name, lib['name'], BASE_VER) + all_base_libs += [name] + corename = '%s-core-%s' % (base_name, BASE_VER) + # Automatically link the sub-libs against the main core lib. + # This is to keep from having to explicitly mention it in the + # table above (i.e. lazy). + if name != corename: + libs += [corename] + + e = env.Clone() + e.Append( + LIBS = Split(libs), + LIBPATH = ['.'], + LINKFLAGS = ['-Wl,--as-needed', '-Wl,-z,defs', + '-Wl,-soname,lib%s.so' % name], + ) + if pc_libs: + e.ParseConfig(PKG_CONFIG + ' --cflags --libs %s' % pc_libs) + all_scons_libs += [ e.SharedLibrary(name, Split(lib['sources'])) ] + + +# Build the random text files (pkg-config and linker script). + +def lib_list(libs): + return ' '.join(['-l' + l for l in libs]) + +subst_dict = { + '@BSLOT@' : BASE_VER, + '@PRIVATE_PC@' : all_pc_libs, + '@BASE_LIBS@' : lib_list(all_base_libs), + '@LIBS@' : lib_list(all_libs), +} +env = Environment(tools = ['textfile'], SUBST_DICT = subst_dict) + +env.Substfile('libchrome-%s.pc' % BASE_VER, + [Value(""" +prefix=/usr +includedir=${prefix}/include +bslot=@BSLOT@ + +Name: libchrome +Description: chrome base library +Version: ${bslot} +Requires: +Requires.private: glib-2.0 @PRIVATE_PC@ +Libs: -lbase-${bslot} +Libs.private: @BASE_LIBS@ @LIBS@ +Cflags: -I${includedir}/base-${bslot} +""")]) + +env.Substfile('libbase-%s.so' % BASE_VER, + [Value('GROUP ( AS_NEEDED ( @BASE_LIBS@ ) )')]) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/libchrome/files/build_config.h-180609 b/sdk_container/src/third_party/coreos-overlay/coreos-base/libchrome/files/build_config.h-180609 new file mode 100644 index 0000000000..462518d26d --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/libchrome/files/build_config.h-180609 @@ -0,0 +1,154 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// This file adds defines about the platform we're currently building on. +// Operating System: +// OS_WIN / OS_MACOSX / OS_LINUX / OS_POSIX (MACOSX or LINUX) +// Compiler: +// COMPILER_MSVC / COMPILER_GCC +// Processor: +// ARCH_CPU_X86 / ARCH_CPU_X86_64 / ARCH_CPU_X86_FAMILY (X86 or X86_64) +// ARCH_CPU_32_BITS / ARCH_CPU_64_BITS + +#ifndef BUILD_BUILD_CONFIG_H_ +#define BUILD_BUILD_CONFIG_H_ + +#if defined(__APPLE__) +#include +#endif + +// A set of macros to use for platform detection. +#if defined(__APPLE__) +#define OS_MACOSX 1 +#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE +#define OS_IOS 1 +#endif // defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE +#elif defined(ANDROID) +#define OS_ANDROID 1 +#elif defined(__native_client__) +#define OS_NACL 1 +#elif defined(__linux__) +#define OS_LINUX 1 +// Use TOOLKIT_GTK on linux if TOOLKIT_VIEWS isn't defined. +#if !defined(TOOLKIT_VIEWS) +#define TOOLKIT_GTK +#endif +#elif defined(_WIN32) +#define OS_WIN 1 +#define TOOLKIT_VIEWS 1 +#elif defined(__FreeBSD__) +#define OS_FREEBSD 1 +#define TOOLKIT_GTK +#elif defined(__OpenBSD__) +#define OS_OPENBSD 1 +#define TOOLKIT_GTK +#elif defined(__sun) +#define OS_SOLARIS 1 +#define TOOLKIT_GTK +#else +#error Please add support for your platform in build/build_config.h +#endif + +#if defined(USE_OPENSSL) && defined(USE_NSS) +#error Cannot use both OpenSSL and NSS +#endif + +// For access to standard BSD features, use OS_BSD instead of a +// more specific macro. +#if defined(OS_FREEBSD) || defined(OS_OPENBSD) +#define OS_BSD 1 +#endif + +// For access to standard POSIXish features, use OS_POSIX instead of a +// more specific macro. +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_FREEBSD) || \ + defined(OS_OPENBSD) || defined(OS_SOLARIS) || defined(OS_ANDROID) || \ + defined(OS_NACL) +#define OS_POSIX 1 +#endif + +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && \ + !defined(OS_NACL) +#define USE_X11 1 // Use X for graphics. +#endif + +// Use tcmalloc +#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(NO_TCMALLOC) +#define USE_TCMALLOC 1 +#endif + +// Compiler detection. +#if defined(__GNUC__) +#define COMPILER_GCC 1 +#elif defined(_MSC_VER) +#define COMPILER_MSVC 1 +#else +#error Please add support for your compiler in build/build_config.h +#endif + +// Processor architecture detection. For more info on what's defined, see: +// http://msdn.microsoft.com/en-us/library/b0084kay.aspx +// http://www.agner.org/optimize/calling_conventions.pdf +// or with gcc, run: "echo | gcc -E -dM -" +#if defined(_M_X64) || defined(__x86_64__) +#define ARCH_CPU_X86_FAMILY 1 +#define ARCH_CPU_X86_64 1 +#define ARCH_CPU_64_BITS 1 +#define ARCH_CPU_LITTLE_ENDIAN 1 +#elif defined(_M_IX86) || defined(__i386__) +#define ARCH_CPU_X86_FAMILY 1 +#define ARCH_CPU_X86 1 +#define ARCH_CPU_32_BITS 1 +#define ARCH_CPU_LITTLE_ENDIAN 1 +#elif defined(__ARMEL__) +#define ARCH_CPU_ARM_FAMILY 1 +#define ARCH_CPU_ARMEL 1 +#define ARCH_CPU_32_BITS 1 +#define ARCH_CPU_LITTLE_ENDIAN 1 +#elif defined(__pnacl__) +#define ARCH_CPU_32_BITS 1 +#elif defined(__MIPSEL__) +#define ARCH_CPU_MIPS_FAMILY 1 +#define ARCH_CPU_MIPSEL 1 +#define ARCH_CPU_32_BITS 1 +#define ARCH_CPU_LITTLE_ENDIAN 1 +#else +#error Please add support for your architecture in build/build_config.h +#endif + +// Type detection for wchar_t. +#if defined(OS_WIN) +#define WCHAR_T_IS_UTF16 +#elif defined(OS_POSIX) && defined(COMPILER_GCC) && \ + defined(__WCHAR_MAX__) && \ + (__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff) +#define WCHAR_T_IS_UTF32 +#elif defined(OS_POSIX) && defined(COMPILER_GCC) && \ + defined(__WCHAR_MAX__) && \ + (__WCHAR_MAX__ == 0x7fff || __WCHAR_MAX__ == 0xffff) +// On Posix, we'll detect short wchar_t, but projects aren't guaranteed to +// compile in this mode (in particular, Chrome doesn't). This is intended for +// other projects using base who manage their own dependencies and make sure +// short wchar works for them. +#define WCHAR_T_IS_UTF16 +#else +#error Please add support for your compiler in build/build_config.h +#endif + +#if defined(__ARMEL__) && !defined(OS_IOS) +#define WCHAR_T_IS_UNSIGNED 1 +#elif defined(__MIPSEL__) +#define WCHAR_T_IS_UNSIGNED 0 +#endif + +#if defined(OS_ANDROID) +// The compiler thinks std::string::const_iterator and "const char*" are +// equivalent types. +#define STD_STRING_ITERATOR_IS_CHAR_POINTER +// The compiler thinks base::string16::const_iterator and "char16*" are +// equivalent types. +#define BASE_STRING16_ITERATOR_IS_CHAR16_POINTER +#endif + +#endif // BUILD_BUILD_CONFIG_H_ diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/libchrome/libchrome-180609-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/libchrome/libchrome-180609-r1.ebuild new file mode 120000 index 0000000000..15f856517e --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/libchrome/libchrome-180609-r1.ebuild @@ -0,0 +1 @@ +libchrome-180609.ebuild \ No newline at end of file diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/libchrome/libchrome-180609.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/libchrome/libchrome-180609.ebuild new file mode 100644 index 0000000000..1cb6b24675 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/libchrome/libchrome-180609.ebuild @@ -0,0 +1,90 @@ +# Copyright (c) 2013 The Chromium OS Authors. All rights reserved. +# Distributed under the terms of the GNU General Public License v2 + +# Note: the ${PV} should represent the overall svn rev number of the +# chromium tree that we're extracting from rather than the svn rev of +# the last change actually made to the base subdir. This way packages +# from other locations (like libchrome_crypto) can be coordinated. + +# XXX: This hits svn rev 180557 instead of rev 180609, but +# that is correct. See above note. + +EAPI="4" +CROS_WORKON_COMMIT="94b9b5d64fa557377ab1e3a5e3bd6cca7d0b73d8" +CROS_WORKON_PROJECT="chromium/src/base" +CROS_WORKON_GIT_SUFFIX="-${PV}" + +inherit cros-workon cros-debug toolchain-funcs scons-utils + +DESCRIPTION="Chrome base/ library extracted for use on Chrome OS" +HOMEPAGE="http://dev.chromium.org/chromium-os/packages/libchrome" +SRC_URI="" + +LICENSE="BSD" +SLOT="${PV}" +KEYWORDS="amd64 arm x86" +IUSE="cros_host" + +RDEPEND="dev-libs/glib + dev-libs/libevent + dev-libs/nss" +DEPEND="${RDEPEND} + dev-cpp/gtest + cros_host? ( dev-util/scons )" + +src_prepare() { + ln -s "${S}" "${WORKDIR}/base" &> /dev/null + + mkdir -p "${WORKDIR}/build" + cp -p "${FILESDIR}/build_config.h-${SLOT}" "${WORKDIR}/build/build_config.h" || die + + cp -p "${FILESDIR}/SConstruct-${SLOT}" "${S}/SConstruct" || die + epatch "${FILESDIR}"/gtest_include_path_fixup.patch + + epatch "${FILESDIR}"/base-125070-no-X.patch + epatch "${FILESDIR}"/base-125070-x32.patch +} + +src_configure() { + tc-export CC CXX AR RANLIB LD NM PKG_CONFIG + cros-debug-add-NDEBUG + export CCFLAGS="$CFLAGS" + + mkdir -p third_party/libevent + echo '#include ' > third_party/libevent/event.h +} + +src_compile() { + BASE_VER=${SLOT} escons -k +} + +src_install() { + dolib.so libbase*-${SLOT}.so + + local d header_dirs=( + third_party/icu + third_party/nspr + third_party/valgrind + third_party/dynamic_annotations + . + debug + files + json + memory + metrics + posix + strings + synchronization + threading + ) + for d in "${header_dirs[@]}" ; do + insinto /usr/include/base-${SLOT}/base/${d} + doins ${d}/*.h + done + + insinto /usr/include/base-${SLOT}/build + doins "${WORKDIR}"/build/build_config.h + + insinto /usr/$(get_libdir)/pkgconfig + doins libchrome-${SLOT}.pc +}