From ee80fdc78bf2033a4fa7105c0fe46d7b904d5e35 Mon Sep 17 00:00:00 2001 From: Kouhei Sutou Date: Sun, 22 Oct 2017 15:26:16 +0900 Subject: [PATCH] [GLib] Fix Go example failure It's caused by GObject Introspection package in Ubuntu 14.04 is old. Recent GObject Introspection doesn't have this problem. --- ci/travis_before_script_c_glib.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ci/travis_before_script_c_glib.sh b/ci/travis_before_script_c_glib.sh index 01ef9e8e76e7f..a63945e1745d0 100755 --- a/ci/travis_before_script_c_glib.sh +++ b/ci/travis_before_script_c_glib.sh @@ -59,12 +59,22 @@ fi if [ $BUILD_SYSTEM = "autotools" ]; then go get github.com/linuxdeepin/go-gir-generator || : pushd $GOPATH/src/github.com/linuxdeepin/go-gir-generator + + # For old GObject Introspection. + # We can remove this when we use more later Ubuntu. + mv lib.in/glib-2.0/config.json{,.orig} + sed \ + -e 's/\("unref_to_array"\)/"get_data", \1/g' \ + lib.in/glib-2.0/config.json.orig > lib.in/glib-2.0/config.json + + # Workaround. TODO: We should send a patch to go-gir-generator. rm lib.in/gio-2.0/gdk_workaround.go mv lib.in/gio-2.0/config.json{,.orig} sed \ -e 's/\("Settings",\)/\/\/ \1/g' \ -e 's/\("SettingsBackend",\)/\/\/ \1/g' \ lib.in/gio-2.0/config.json.orig > lib.in/gio-2.0/config.json + mv Makefile{,.orig} sed -e 's/ gudev-1.0//' Makefile.orig > Makefile mkdir -p out/src/gir/gudev-1.0