From b606fa230823fde97039997b4c667a4068db84e1 Mon Sep 17 00:00:00 2001 From: Antonio Gomes Date: Thu, 15 Jan 2015 08:44:58 -0800 Subject: [PATCH] Stop autogenerating chromium-efl.pc As part of an earlier build system refactor [1], we stopped using a static .pc file so that we could export all chromium-efl defines to chromium-ewk build system, as part of chromium-efl's pkgconfig cflags. At this point, chromium-efl used GYP and chromium-ewk CMake. After the build system integration [2], the situation was fixed (defines were shared between both modules), but we continued to export all internal defines in chromium-efl.pc. As a result, third-party apps that actually need to deal with chromium-efl.pc, were wrongly having unrelated defines set. Particularly, in chromium-rgl beta/m40 branch, where "override" and "final" are defined to nil due to compiler (GCC 4.6) limitations, some ecore headers (namely Ecore_X.h) got affected, as the token "override" was being used in its defitions. Patch fixes that by switching back to a static chromium-efl.pc file, and remove related code that used to auto generate the pc file. It allows the t-browser (beta/m34 branch) to build out of the box on top of chromium-efl (beta/m40). [1] http://165.213.202.130:8080/#/c/68779/ [2] http://165.213.202.130:8080/#/c/70211/ Reviewed by: Antonio Gomes, Piotr Tworek, Viatcheslav Ostapenko Change-Id: I171233ab5c9812e9dd4a08cbbfcada3332fcce75 Signed-off-by: Antonio Gomes --- tizen_src/build/pkgconfig/chromium-efl.pc.in | 11 ++++ tizen_src/impl/chromium-efl.gyp | 19 ------- tizen_src/impl/pkgconfig/gen_pkgconfigs.py | 82 ---------------------------- tizen_src/packaging/chromium-efl.spec | 5 ++ 4 files changed, 16 insertions(+), 101 deletions(-) create mode 100644 tizen_src/build/pkgconfig/chromium-efl.pc.in delete mode 100755 tizen_src/impl/pkgconfig/gen_pkgconfigs.py diff --git a/tizen_src/build/pkgconfig/chromium-efl.pc.in b/tizen_src/build/pkgconfig/chromium-efl.pc.in new file mode 100644 index 0000000..15c969d --- /dev/null +++ b/tizen_src/build/pkgconfig/chromium-efl.pc.in @@ -0,0 +1,11 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: chromium-efl +Description: Chromium EFL port +Version: ?VERSION? + +Libs: -L${libdir} -Wl,-rpath-link=${libdir} -lchromium-efl -lchromium-ewk +Cflags: -I${includedir}/chromium-ewk -I${includedir}/v8 diff --git a/tizen_src/impl/chromium-efl.gyp b/tizen_src/impl/chromium-efl.gyp index b22f423..4b0710b 100644 --- a/tizen_src/impl/chromium-efl.gyp +++ b/tizen_src/impl/chromium-efl.gyp @@ -502,25 +502,6 @@ ], }], ], - 'actions': [{ - 'action_name': 'generate_pkgconfigs', - 'variables': { - 'generator_path': 'pkgconfig/gen_pkgconfigs.py', - }, - 'inputs': [ - '<(generator_path)', - ], - 'outputs': [ - '<(PRODUCT_DIR)/pkgconfig/chromium-efl.pc', - '<(PRODUCT_DIR)/pkgconfig/desktop/chromium-efl.pc', - ], - 'action': [ - 'python', '<(generator_path)', - '--out-dir', '<(PRODUCT_DIR)', - '--defines', '${defines}', - '--chrome-src', '<(chrome_src_dir)', - ], - }], # actions }, { 'target_name': 'efl_webprocess', diff --git a/tizen_src/impl/pkgconfig/gen_pkgconfigs.py b/tizen_src/impl/pkgconfig/gen_pkgconfigs.py deleted file mode 100755 index f83f694..0000000 --- a/tizen_src/impl/pkgconfig/gen_pkgconfigs.py +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env python - -import sys, os, getopt -import subprocess - - -def get_command_output(args): - proc = subprocess.Popen(args, stdout=subprocess.PIPE) - (stdout, stderr) = proc.communicate() - return (stdout, proc.returncode) - - -def get_chrome_version(chrome_src): - tool = os.path.join(chrome_src, 'build/util/version.py') - file = os.path.join(chrome_src, 'chrome/VERSION') - - (stdout, retval) = get_command_output([tool, '-f', file, '-t', '@MAJOR@.@MINOR@.@BUILD@']) - - if not retval: - return stdout.rstrip() - else: - print("Failed to determine chromium version: " + stdout) - return "0.0.0" - - -def gen_pkgconfig_file(path, version, defines): - pc_dir = os.path.join(path, 'pkgconfig') - pc_path = os.path.join(pc_dir, 'chromium-efl.pc') - - print(" * Generating GBS chromium-efl.pc") - - if not os.path.exists(pc_dir): - os.makedirs(pc_dir) - - out = open(pc_path, "w"); - - out.write("prefix=/usr\n") - out.write("exec_prefix=${prefix}\n") - out.write("libdir=${prefix}/lib\n") - out.write("includedir=${prefix}/include\n\n") - - out.write("Name: chromium-efl\n") - out.write("Description: Chromium EFL port\n") - out.write("Version: " + version + "\n\n") - out.write("Libs: -L${libdir} -Wl,-rpath-link=${libdir} -lchromium-efl -lchromium-ewk\n") - out.write("Cflags: -I${includedir}/chromium-ewk -I/usr/include/v8 " + defines + "\n") - - out.close() - - -def main(): - try: - opts, args = getopt.getopt(sys.argv[1:], "o:d:c:", ["out-dir=", "defines=", "chrome-src="]) - except getopt.GetoptError as err: - print (str(err)) - usage() - sys.exit(2) - - outdir = None - defines = None - chrome_src = None - for o, a in opts: - if o in ("-o", "--out-dir"): - outdir = a - elif o in ("-d", "--defines"): - defines = a - elif o in ("-c", "--chrome-src"): - chrome_src = a - else: - assert False, "unhandled option" - - if not (outdir and defines and chrome_src): - print("Invalid arguments specified!") - sys.exit(2) - - gen_pkgconfig_file(outdir, get_chrome_version(chrome_src), defines) - - sys.exit(0) - - -if __name__ == "__main__": - main() diff --git a/tizen_src/packaging/chromium-efl.spec b/tizen_src/packaging/chromium-efl.spec index fc50f62..0c39f57 100755 --- a/tizen_src/packaging/chromium-efl.spec +++ b/tizen_src/packaging/chromium-efl.spec @@ -241,6 +241,11 @@ ninja %{_smp_mflags} -C"%{OUTPUT_FOLDER}" angle_unittests env_chromium_unittests cp src/third_party/icu/android/icudtl.dat "%{OUTPUT_FOLDER}" %install + +# Generate pkg-confg file +mkdir -p "%{OUTPUT_FOLDER}"/pkgconfig/ +sed -e 's#?VERSION?#%{version}#' build/pkgconfig/chromium-efl.pc.in > "%{OUTPUT_FOLDER}"/pkgconfig/chromium-efl.pc + install -d "%{buildroot}"%{_sysconfdir}/smack/accesses2.d install -d "%{buildroot}"%{_bindir} install -d "%{buildroot}"%{_bindir} -- 2.7.4