[arch-commits] Commit in libgit2-glib/trunk (PKGBUILD build.diff)
Jan Steffens
heftig at archlinux.org
Wed Feb 26 08:35:25 UTC 2020
Date: Wednesday, February 26, 2020 @ 08:35:25
Author: heftig
Revision: 376249
0.99.0-1
Added:
libgit2-glib/trunk/build.diff
Modified:
libgit2-glib/trunk/PKGBUILD
------------+
PKGBUILD | 46 +++++++++++++++++------------
build.diff | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 120 insertions(+), 18 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-02-26 08:16:47 UTC (rev 376248)
+++ PKGBUILD 2020-02-26 08:35:25 UTC (rev 376249)
@@ -3,42 +3,52 @@
# Contributor: David Runge <dave at sleepmap.de>
pkgname=libgit2-glib
-pkgver=0.28.0.1
-pkgrel=4
+pkgver=0.99.0
+pkgrel=1
pkgdesc="GLib wrapper for libgit2"
url="https://wiki.gnome.org/Projects/Libgit2-glib"
license=('LGPL2.1')
arch=('x86_64')
depends=('glib2' 'libgit2')
-makedepends=('gobject-introspection' 'gtk-doc' 'meson' 'python-gobject' 'vala')
-provides=('libgit2-glib-1.0.so')
-source=("https://gitlab.gnome.org/gnome/${pkgname}/-/archive/v${pkgver}/${pkgname}-v${pkgver}.tar.gz")
-sha256sums=('f180c3030b33930133b2dd66aecf64ec354433c603323da810ff84f542243350')
+makedepends=('gobject-introspection' 'gtk-doc' 'meson' 'python-gobject' 'vala'
+ 'git')
+_commit=0a55b5a078af476d522d89e60cd0a49e8722f066 # tags/v.0.99.0^0
+source=("git+https://gitlab.gnome.org/GNOME/libgit2-glib.git#commit=$_commit"
+ build.diff)
+sha256sums=('SKIP'
+ '8f2a5e245f70f7685ba3692074ed1d372cf766b4a490f67b101f68f054e22289')
+pkgver() {
+ cd $pkgname
+ git describe --tags | sed -r 's/^v\.?//;s/-/+/g'
+}
+
prepare() {
- mv -v "${pkgname}-v${pkgver}" "${pkgname}-${pkgver}"
+ cd $pkgname
+
+ # build fixes
+ git apply -3 ../build.diff
}
build() {
- cd "${pkgname}-${pkgver}"
- arch-meson build -D gtk_doc=true
+ arch-meson $pkgname build -D gtk_doc=true
ninja -C build
}
check() {
- cd "${pkgname}-${pkgver}"
- meson test -C build
+ meson test -C build --print-errorlogs
}
package() {
- cd "${pkgname}-${pkgver}"
- local py_ver=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
+ depends+=('libgit2.so')
+ provides+=('libgit2-glib-1.0.so')
+
DESTDIR="$pkgdir" meson install -C build
+
# strip $pkgdir from embedded paths:
- python -m compileall -d "/usr/lib/python${py_ver}" \
- "${pkgdir}/usr/lib/python${py_ver}"
- python -O -m compileall -d "/usr/lib/python${py_ver}" \
- "${pkgdir}/usr/lib/python${py_ver}"
- install -vDm 644 {AUTHORS,ChangeLog,NEWS,README} \
+ python -m compileall -d "/usr/lib" "$pkgdir/usr/lib"
+ python -O -m compileall -d "/usr/lib" "$pkgdir/usr/lib"
+
+ install -vDm 644 $pkgname/{AUTHORS,ChangeLog,NEWS,README} \
-t "${pkgdir}/usr/share/doc/${pkgname}"
}
Added: build.diff
===================================================================
--- build.diff (rev 0)
+++ build.diff 2020-02-26 08:35:25 UTC (rev 376249)
@@ -0,0 +1,92 @@
+diff --git i/libgit2-glib/ggit-cred-plaintext.c w/libgit2-glib/ggit-cred-plaintext.c
+index 6ae3218..a8bc643 100644
+--- i/libgit2-glib/ggit-cred-plaintext.c
++++ w/libgit2-glib/ggit-cred-plaintext.c
+@@ -179,7 +179,7 @@ ggit_cred_plaintext_initable_init (GInitable *initable,
+
+ _ggit_native_set (initable,
+ cred,
+- (GDestroyNotify)cred->free);
++ (GDestroyNotify)git_cred_free);
+
+ return TRUE;
+ }
+diff --git i/libgit2-glib/ggit-cred-ssh-interactive.c w/libgit2-glib/ggit-cred-ssh-interactive.c
+index 97f51cf..d0489bd 100644
+--- i/libgit2-glib/ggit-cred-ssh-interactive.c
++++ w/libgit2-glib/ggit-cred-ssh-interactive.c
+@@ -246,7 +246,7 @@ ggit_cred_ssh_interactive_initable_init (GInitable *initable,
+
+ _ggit_native_set (initable,
+ cred,
+- (GDestroyNotify)cred->free);
++ (GDestroyNotify)git_cred_free);
+
+ return TRUE;
+ }
+diff --git i/libgit2-glib/ggit-cred-ssh-key-from-agent.c w/libgit2-glib/ggit-cred-ssh-key-from-agent.c
+index 2931b43..62ba7a3 100644
+--- i/libgit2-glib/ggit-cred-ssh-key-from-agent.c
++++ w/libgit2-glib/ggit-cred-ssh-key-from-agent.c
+@@ -155,7 +155,7 @@ ggit_cred_ssh_key_from_agent_initable_init (GInitable *initable,
+
+ _ggit_native_set (initable,
+ cred,
+- (GDestroyNotify)cred->free);
++ (GDestroyNotify)git_cred_free);
+
+ return TRUE;
+ }
+diff --git i/meson.build w/meson.build
+index 6d314b5..32c08d4 100644
+--- i/meson.build
++++ w/meson.build
+@@ -135,7 +135,8 @@ if enable_vapi
+ assert(enable_gir, 'vapi support was requested, but introspection support is mandatory.')
+ assert(add_languages('vala', required: false), 'vapi support was requested, but vala not found.')
+
+- meson.add_install_script('meson_vapi_link.py', libgit2_glib_datadir)
++ # Requires the prefix-relative datadir
++ meson.add_install_script('meson_vapi_link.py', get_option('datadir'))
+ endif
+
+ # Check for libgit2 ssh support
+diff --git i/meson_python_compile.py w/meson_python_compile.py
+index 1ffe0c0..24a74d8 100755
+--- i/meson_python_compile.py
++++ w/meson_python_compile.py
+@@ -8,7 +8,7 @@ if not os.environ.get('DESTDIR'):
+ libdir = sys.argv[1]
+
+ print('Byte-compiling python modules...')
+- subprocess.call(['python3', '-m', 'compileall', '-f', '-q', libdir])
++ subprocess.check_call(['python3', '-m', 'compileall', '-f', '-q', libdir])
+
+ print('Byte-compiling python modules (optimized versions) ...')
+- subprocess.call(['python3', '-O', '-m', 'compileall', '-f', '-q', libdir])
++ subprocess.check_call(['python3', '-O', '-m', 'compileall', '-f', '-q', libdir])
+diff --git i/meson_vapi_link.py w/meson_vapi_link.py
+index eb64fd6..3b4155e 100644
+--- i/meson_vapi_link.py
++++ w/meson_vapi_link.py
+@@ -5,18 +5,14 @@ import subprocess
+ import sys
+
+ vapidir = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], sys.argv[1], 'vala', 'vapi')
++os.chdir(vapidir)
+
+ # FIXME: meson will not track the creation of these files
+ # https://github.com/mesonbuild/meson/blob/master/mesonbuild/scripts/uninstall.py#L39
+ old = 'ggit-1.0'
+ new = 'libgit2-glib-1.0'
+
+-wd = os.getcwd()
+-os.chdir(vapidir)
+-
+ for ext in ['vapi', 'deps']:
+ src = os.path.join('{}.{}'.format(new, ext))
+ dest = os.path.join('{}.{}'.format(old, ext))
+- subprocess.call(['ln', '-s', '-f', src, dest])
+-
+-os.chdir(wd)
++ subprocess.check_call(['ln', '-s', '-f', src, dest])
More information about the arch-commits
mailing list