diff options
author | Zhang, DingYuan | 2020-08-08 10:05:38 +0800 |
---|---|---|
committer | Zhang, DingYuan | 2020-08-08 10:05:38 +0800 |
commit | 027f5d7faeeac0ab296fde1c98aa7399cf63a863 (patch) | |
tree | e1b1705be13caa254fb0d00864e4918547880008 | |
download | aur-027f5d7faeeac0ab296fde1c98aa7399cf63a863.tar.gz |
update
-rw-r--r-- | .SRCINFO | 26 | ||||
-rw-r--r-- | PKGBUILD | 73 | ||||
-rw-r--r-- | SettingsBackendLike.patch | 42 | ||||
-rw-r--r-- | glib-2.63.patch | 12 |
4 files changed, 153 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..95ca4ddc3fa5 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,26 @@ +pkgbase = golang-deepin-gir-git + pkgdesc = Generate static golang bindings for GObject + pkgver = 2.0.2.r0.g095577f + pkgrel = 1 + url = https://github.com/linuxdeepin/go-gir-generator + arch = any + groups = deepin-git + license = GPL3 + checkdepends = golang-gopkg-check.v1 + makedepends = git + makedepends = go + makedepends = gobject-introspection + depends = gtk3 + depends = libgudev + provides = golang-deepin-gir + conflicts = golang-deepin-gir + replaces = golang-deepin-gir + source = git://github.com/linuxdeepin/go-gir-generator + source = SettingsBackendLike.patch + source = glib-2.63.patch + sha512sums = SKIP + sha512sums = bd97770e2a345bc1fe4248238f13bd741c157629c5e097c56039326fe7fa4d550c8030272c18c2adc1c0dce35dd72c8d4e6fc394bf4d659076794e6a375d045a + sha512sums = 0cdf4e2251eb6c88f37cea12af8db9e2e7465bebb4636ce90c86cce994b5b9a82ff332964735ae8349d8a67e5146ff26a42802ce46f33def5c9452fe6eda92f3 + +pkgname = golang-deepin-gir-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..489b0adf3eef --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,73 @@ +# Maintainer: DingYuan Zhang <justforlxz@gmail.com> + +pkgname=golang-deepin-gir-git +pkgver=2.0.2.r0.g095577f +pkgrel=1 +pkgdesc='Generate static golang bindings for GObject' +arch=('any') +url="https://github.com/linuxdeepin/go-gir-generator" +license=('GPL3') +depends=('gtk3' 'libgudev') +makedepends=('git' 'go' 'gobject-introspection') +checkdepends=('golang-gopkg-check.v1') +provides=('golang-deepin-gir') +conflicts=('golang-deepin-gir') +replaces=('golang-deepin-gir') +groups=('deepin-git') +source=('git://github.com/linuxdeepin/go-gir-generator' + SettingsBackendLike.patch glib-2.63.patch) +sha512sums=('SKIP' + 'bd97770e2a345bc1fe4248238f13bd741c157629c5e097c56039326fe7fa4d550c8030272c18c2adc1c0dce35dd72c8d4e6fc394bf4d659076794e6a375d045a' + '0cdf4e2251eb6c88f37cea12af8db9e2e7465bebb4636ce90c86cce994b5b9a82ff332964735ae8349d8a67e5146ff26a42802ce46f33def5c9452fe6eda92f3') + +pkgver() { + cd go-gir-generator + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd go-gir-generator + mkdir -p "$srcdir"/build/src/pkg.deepin.io + + # Should be fixed upstream + mkdir -p out/src/pkg.deepin.io/gir/{glib-2.0,gobject-2.0,gio-2.0,gudev-1.0} + + # Our gobject-introspection is too new + # https://cr.deepin.io/#/c/16880/ + patch -p1 -i ../SettingsBackendLike.patch + + patch -p0 -i ../glib-2.63.patch + + # https://github.com/linuxdeepin/developer-center/issues/955 + sed -i "s/'Can'tFind'/“Can'tFind”/" lib.in/glib-2.0/keyfile_test.go +} + +build() { + export GOPATH="$srcdir/build:/usr/share/gocode" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" + + cd go-gir-generator + rm -r gogtk-demo + make + + mv out/src/pkg.deepin.io/gir "$srcdir"/build/src/pkg.deepin.io/ +} + +check() { + # https://github.com/linuxdeepin/developer-center/issues/955 + export GOPATH="$srcdir/build:/usr/share/gocode" + cd "$srcdir"/build/src/pkg.deepin.io/gir + go test -v $(go list ./...) + + cd "$srcdir"/go-gir-generator + go run test/memory.go +} + +package() { + mkdir -p "$pkgdir"/usr/share/gocode/src/pkg.deepin.io + cp -a "$srcdir"/build/src/pkg.deepin.io/gir "$pkgdir"/usr/share/gocode/src/pkg.deepin.io/ +} diff --git a/SettingsBackendLike.patch b/SettingsBackendLike.patch new file mode 100644 index 000000000000..a90b95476a45 --- /dev/null +++ b/SettingsBackendLike.patch @@ -0,0 +1,42 @@ +From 55ad8df560b2a8aec3462e61edff781f11cf86a9 Mon Sep 17 00:00:00 2001 +From: jouyouyun <jouyouwen717@gmail.com> +Date: Mon, 24 Oct 2016 19:43:32 +0800 +Subject: [PATCH] Fix 'SettingsBackendLike' undefined + +Change-Id: I9b817b3a6ec26ce8023e26a6b2c7abc67074d53f +--- + +diff --git a/lib.in/gio-2.0/config.json b/lib.in/gio-2.0/config.json +index aaf75ed..7733140 100644 +--- a/lib.in/gio-2.0/config.json ++++ b/lib.in/gio-2.0/config.json +@@ -35,6 +35,7 @@ + "AppLaunchContext", + "Emblem", + "Settings", ++ "SettingsBackend", + "FileMonitor", + "FileInfo", + "InputStream", +@@ -52,7 +53,6 @@ + "FileAttributeInfoList", + "FileAttributeMatcher", + "ActionEntry", +- "SettingsBackend", + "MountIface", + "OutputVector" + //"SettingsSchema" +diff --git a/lib.in/glib-2.0/config.json b/lib.in/glib-2.0/config.json +index 88a8314..4290004 100644 +--- a/lib.in/glib-2.0/config.json ++++ b/lib.in/glib-2.0/config.json +@@ -11,7 +11,8 @@ + "KeyFile", + "Variant", + "VariantType", +- "PollFD" ++ "PollFD", ++ "Tree" + ], + "functions": [ + "get_user_cache_dir", diff --git a/glib-2.63.patch b/glib-2.63.patch new file mode 100644 index 000000000000..2778ba518325 --- /dev/null +++ b/glib-2.63.patch @@ -0,0 +1,12 @@ +--- lib.in/gio-2.0/config.json.orig 2020-03-09 18:23:09.847076069 +0800 ++++ lib.in/gio-2.0/config.json 2020-03-09 18:23:15.253769410 +0800 +@@ -222,7 +222,8 @@ + "launch_uris_as_manager_with_fds" + ], + "Cancellable": [ +- "connect" ++ "connect", ++ "source_new" + ], + "Application": [ + "get_dbus_connection" |