Hello community, here is the log from the commit of package libgit2-glib for openSUSE:Factory checked in at 2019-02-24 17:07:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libgit2-glib (Old) and /work/SRC/openSUSE:Factory/.libgit2-glib.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libgit2-glib" Sun Feb 24 17:07:06 2019 rev:32 rq:674756 version:0.27.8 Changes: -------- --- /work/SRC/openSUSE:Factory/libgit2-glib/libgit2-glib.changes 2018-11-18 23:26:07.145921646 +0100 +++ /work/SRC/openSUSE:Factory/.libgit2-glib.new.28833/libgit2-glib.changes 2019-02-24 17:07:08.000573790 +0100 @@ -1,0 +2,16 @@ +Wed Feb 13 12:26:14 UTC 2019 - bjorn....@gmail.com + +- Add libgit2-glib-libgit2_028-compat.patch: Fix build with libgit2 + 0.28 version. Patch from upstream merge requests. + +------------------------------------------------------------------- +Wed Feb 13 09:43:55 UTC 2019 - bjorn....@gmail.com + +- Update to version 0.27.8: + + Add body property to DiffFormatEmailOptions. + + Add submodule update. + + Fix missing struct field init in branch enumerator. + + Fix cross compilation builds. + + Several meson improvements. + +------------------------------------------------------------------- @@ -4 +20 @@ -- Update to version 0.27.7 +- Update to version 0.27.7: Old: ---- libgit2-glib-0.27.7.tar.xz New: ---- libgit2-glib-0.27.8.tar.xz libgit2-glib-libgit2_028-compat.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libgit2-glib.spec ++++++ --- /var/tmp/diff_new_pack.ehkYzG/_old 2019-02-24 17:07:08.504573550 +0100 +++ /var/tmp/diff_new_pack.ehkYzG/_new 2019-02-24 17:07:08.504573550 +0100 @@ -1,7 +1,7 @@ # # spec file for package libgit2-glib # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2013 Dominique Leuenberger, Amsterdam, The Netherlands. # # All modifications and additions to the file contributed by third parties @@ -13,18 +13,21 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: libgit2-glib -Version: 0.27.7 +Version: 0.27.8 Release: 0 Summary: GLib wrapper library around libgit2 License: LGPL-2.1-or-later Group: Development/Libraries/C and C++ URL: https://wiki.gnome.org/Projects/Libgit2-glib Source0: https://download.gnome.org/sources/libgit2-glib/0.27/%{name}-%{version}.tar.xz +# PATCH-FIX-UPSTREAM libgit2-glib-libgit2_028-compat.patch -- Fix build with new libgit2 0.28 +Patch0: libgit2-glib-libgit2_028-compat.patch + BuildRequires: gtk-doc BuildRequires: meson BuildRequires: pkgconfig @@ -64,7 +67,7 @@ libgit2-glib is a GLib wrapper library around the libgit2 git access library. %prep -%setup -q +%autosetup -p1 %build %meson \ ++++++ libgit2-glib-0.27.7.tar.xz -> libgit2-glib-0.27.8.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-0.27.7/.gitignore new/libgit2-glib-0.27.8/.gitignore --- old/libgit2-glib-0.27.7/.gitignore 2018-11-04 02:51:54.000000000 +0100 +++ new/libgit2-glib-0.27.8/.gitignore 1970-01-01 01:00:00.000000000 +0100 @@ -1,70 +0,0 @@ -*.bak -*.lo -*.la -*.o -*.gir -*.typelib -*~ -*.stamp -.*.sw[nop] -*.gcov -.deps -.libs -Makefile -Makefile.in -/ABOUT-NLS -/aclocal.m4 -/autom4te.cache -/config.cache -/config.guess -/config.h -/config.h.in -/config.log -/config.lt -/config.rpath -/config.status -/config.status.lineno -/config.sub -/configure -/configure.lineno -/depcomp -/examples/general -/examples/walk -/gnome-doc-utils.make -/gtk-doc.make -/INSTALL -/install-sh -/intltool-extract -/intltool-extract.in -/intltool-merge -/intltool-merge.in -/intltool-update -/intltool-update.in -/libgit2-glib-1.0.pc -/libgit2-glib-*.tar.bz2 -/libgit2-glib/ggit-enum-types.c -/libgit2-glib/ggit-enum-types.h -/libtool -/ltmain.sh -/m4 -/missing -/mkinstalldirs -/omf.make -/po/*.header -/po/*.gmo -/po/*.mo -/po/*.sed -/po/*.sin -/po/.intltool-merge-cache -/po/Makefile -/po/Makefile.in -/po/Makefile.in.in -/po/Makevars.template -/po/POTFILES -/po/Rules-quot -/po/stamp-it -/py-compile -/so_locations -/stamp-h1 -/tests/repository -/xmldocs.make diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-0.27.7/NEWS new/libgit2-glib-0.27.8/NEWS --- old/libgit2-glib-0.27.7/NEWS 2018-11-04 02:51:54.000000000 +0100 +++ new/libgit2-glib-0.27.8/NEWS 2019-02-13 08:17:38.000000000 +0100 @@ -1,3 +1,11 @@ +News in 0.27.8 +-------------- +* Add body property to DiffFormatEmailOptions +* Add submodule update +* Fix missing struct field init in branch enumerator +* Fix cross compilation builds +* Several meson improvements + News in 0.27.7 -------------- * pkg-config pc file generation fixed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-0.27.7/README new/libgit2-glib-0.27.8/README --- old/libgit2-glib-0.27.7/README 2018-11-04 02:51:54.000000000 +0100 +++ new/libgit2-glib-0.27.8/README 2019-02-13 08:17:38.000000000 +0100 @@ -20,8 +20,8 @@ Simple install procedure: - % tar Jxf libgit2-glib-0.27.7.tar.xz # unpack the sources - % cd libgit2-glib-0.27.7 # change to the toplevel directory + % tar Jxf libgit2-glib-0.27.8.tar.xz # unpack the sources + % cd libgit2-glib-0.27.8 # change to the toplevel directory % meson builddir # run meson % ninja -C builddir # build libgit2-glib # [ Become root if necessary ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-0.27.7/docs/reference/meson.build new/libgit2-glib-0.27.8/docs/reference/meson.build --- old/libgit2-glib-0.27.7/docs/reference/meson.build 2018-11-04 02:51:54.000000000 +0100 +++ new/libgit2-glib-0.27.8/docs/reference/meson.build 2019-02-13 08:17:38.000000000 +0100 @@ -1,28 +1,32 @@ +glib_prefix = glib_dep.get_pkgconfig_variable('prefix') + +fixxref_args = [ + '--extra-dir=' + join_paths(glib_prefix, gnome.gtkdoc_html_dir('glib')), + '--extra-dir=' + join_paths(glib_prefix, gnome.gtkdoc_html_dir('gobject')), + '--extra-dir=' + join_paths(glib_prefix, gnome.gtkdoc_html_dir('gio')), + '--html-dir=' + join_paths(libgit2_glib_prefix, gnome.gtkdoc_html_dir(libgit2_glib_api_name)), +] + docs_conf = configuration_data() docs_conf.set('PACKAGE_VERSION', libgit2_glib_version) name = 'version.xml' -configure_file(input: name + '.in', - output: name, - configuration: docs_conf) - -glib_prefix = glib_dep.get_pkgconfig_variable('prefix') -glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html') +content_files = configure_file( + input: name + '.in', + output: name, + configuration: docs_conf, +) -gnome.gtkdoc(libgit2_glib_api_name, - main_sgml: libgit2_glib_api_name + '-docs.sgml', - src_dir: join_paths(meson.source_root(), 'libgit2-glib'), - dependencies: libgit2_glib_dep, - gobject_typesfile: libgit2_glib_api_name + '.types', - scan_args: [ - '--rebuild-types', - '--ignore-headers=' + ' '.join(private_headers), - ], - fixxref_args: [ - '--extra-dir=' + join_paths(glib_docpath, 'glib'), - '--extra-dir=' + join_paths(glib_docpath, 'gobject'), - '--extra-dir=' + join_paths(glib_docpath, 'gio'), - '--html-dir=' + join_paths(libgit2_glib_prefix, gnome.gtkdoc_html_dir(libgit2_glib_api_name)), - ], - install: true) +gnome.gtkdoc( + libgit2_glib_api_name, + main_sgml: libgit2_glib_api_name + '-docs.sgml', + src_dir: join_paths(meson.source_root(), 'libgit2-glib'), + dependencies: libgit2_glib_dep, + ignore_headers: private_headers, + gobject_typesfile: libgit2_glib_api_name + '.types', + scan_args: '--rebuild-types', + fixxref_args: fixxref_args, + content_files: content_files, + install: true, +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-0.27.7/examples/meson.build new/libgit2-glib-0.27.8/examples/meson.build --- old/libgit2-glib-0.27.7/examples/meson.build 2018-11-04 02:51:54.000000000 +0100 +++ new/libgit2-glib-0.27.8/examples/meson.build 2019-02-13 08:17:38.000000000 +0100 @@ -1,14 +1,17 @@ examples = [ 'general', - 'walk' + 'walk', ] if have_termios - examples += [ 'clone' ] + examples += ['clone'] endif foreach example: examples - executable(example, example + '.c', - dependencies: libgit2_glib_dep, - include_directories: libgit2_glib_inc) + executable( + example, + example + '.c', + include_directories: top_inc, + dependencies: libgit2_glib_dep, + ) endforeach diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-0.27.7/libgit2-glib/ggit-branch-enumerator.c new/libgit2-glib-0.27.8/libgit2-glib/ggit-branch-enumerator.c --- old/libgit2-glib-0.27.7/libgit2-glib/ggit-branch-enumerator.c 2018-11-04 02:51:54.000000000 +0100 +++ new/libgit2-glib-0.27.8/libgit2-glib/ggit-branch-enumerator.c 2019-02-13 08:17:38.000000000 +0100 @@ -19,6 +19,7 @@ ret = g_slice_new (GgitBranchEnumerator); ret->ref_count = 1; ret->iterator = iter; + ret->ref = NULL; return ret; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-0.27.7/libgit2-glib/ggit-diff-format-email-options.c new/libgit2-glib-0.27.8/libgit2-glib/ggit-diff-format-email-options.c --- old/libgit2-glib-0.27.7/libgit2-glib/ggit-diff-format-email-options.c 2018-11-04 02:51:54.000000000 +0100 +++ new/libgit2-glib-0.27.8/libgit2-glib/ggit-diff-format-email-options.c 2019-02-13 08:17:38.000000000 +0100 @@ -35,6 +35,7 @@ GgitOId *id; gchar *summary; + gchar *body; GgitSignature *author; } GgitDiffFormatEmailOptionsPrivate; @@ -48,6 +49,7 @@ PROP_TOTAL_PATCHES, PROP_ID, PROP_SUMMARY, + PROP_BODY, PROP_AUTHOR }; @@ -65,6 +67,7 @@ } g_free (priv->summary); + g_free (priv->body); g_clear_object (&priv->author); G_OBJECT_CLASS (ggit_diff_format_email_options_parent_class)->finalize (object); @@ -98,6 +101,9 @@ case PROP_SUMMARY: ggit_diff_format_email_options_set_summary (options, g_value_get_string (value)); break; + case PROP_BODY: + ggit_diff_format_email_options_set_body (options, g_value_get_string (value)); + break; case PROP_AUTHOR: ggit_diff_format_email_options_set_author (options, g_value_get_object (value)); break; @@ -135,6 +141,9 @@ case PROP_SUMMARY: g_value_set_string (value, priv->summary); break; + case PROP_BODY: + g_value_set_string (value, priv->body); + break; case PROP_AUTHOR: g_value_set_object (value, priv->author); break; @@ -205,6 +214,15 @@ G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, + PROP_BODY, + g_param_spec_string ("body", + "Body", + "Body", + NULL, + G_PARAM_READWRITE | + G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (object_class, PROP_AUTHOR, g_param_spec_object ("author", "Author", @@ -487,6 +505,52 @@ } /** + * ggit_diff_format_email_options_get_body: + * @options: a #GgitDiffFormatEmailOptions. + * + * Get the body. + * + * Returns: (transfer none) (nullable): the body. + * + **/ +const gchar * +ggit_diff_format_email_options_get_body (GgitDiffFormatEmailOptions *options) +{ + GgitDiffFormatEmailOptionsPrivate *priv; + + g_return_val_if_fail (GGIT_IS_DIFF_FORMAT_EMAIL_OPTIONS (options), NULL); + + priv = ggit_diff_format_email_options_get_instance_private (options); + + return priv->body; +} + +/** + * ggit_diff_format_email_options_set_body: + * @options: a #GgitDiffFormatEmailOptions. + * @body: (allow-none): the body. + * + * Set the body. + * + **/ +void +ggit_diff_format_email_options_set_body (GgitDiffFormatEmailOptions *options, + const gchar *body) +{ + GgitDiffFormatEmailOptionsPrivate *priv; + + g_return_if_fail (GGIT_IS_DIFF_FORMAT_EMAIL_OPTIONS (options)); + + priv = ggit_diff_format_email_options_get_instance_private (options); + + g_free (priv->body); + priv->body = g_strdup (body); + + priv->options.body = priv->body; + g_object_notify (G_OBJECT (options), "body"); +} + +/** * ggit_diff_format_email_options_get_author: * @options: a #GgitDiffFormatEmailOptions. * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-0.27.7/libgit2-glib/ggit-diff-format-email-options.h new/libgit2-glib-0.27.8/libgit2-glib/ggit-diff-format-email-options.h --- old/libgit2-glib-0.27.7/libgit2-glib/ggit-diff-format-email-options.h 2018-11-04 02:51:54.000000000 +0100 +++ new/libgit2-glib-0.27.8/libgit2-glib/ggit-diff-format-email-options.h 2019-02-13 08:17:38.000000000 +0100 @@ -75,6 +75,12 @@ GgitDiffFormatEmailOptions *options, const gchar *summary); +const gchar *ggit_diff_format_email_options_get_body ( + GgitDiffFormatEmailOptions *options); +void ggit_diff_format_email_options_set_body ( + GgitDiffFormatEmailOptions *options, + const gchar *body); + GgitSignature *ggit_diff_format_email_options_get_author ( GgitDiffFormatEmailOptions *options); void ggit_diff_format_email_options_set_author ( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-0.27.7/libgit2-glib/ggit-submodule.c new/libgit2-glib-0.27.8/libgit2-glib/ggit-submodule.c --- old/libgit2-glib-0.27.7/libgit2-glib/ggit-submodule.c 2018-11-04 02:51:54.000000000 +0100 +++ new/libgit2-glib-0.27.8/libgit2-glib/ggit-submodule.c 2019-02-13 08:17:38.000000000 +0100 @@ -413,4 +413,41 @@ } } +/** + * ggit_submodule_update: + * @submodule: a #GgitSubmodule. + * @init: If the submodule is not initialized, setting this flag to true + * will initialize the submodule before updating. Otherwise, this + * will return an error if attempting to update an uninitialzed + * repository. but setting this to true forces them to be updated. + * @options: a #GgitSubmoduleUpdateOptions object. + * @error: a #GError for error reporting, or %NULL. + * + * Update a submodule. This will clone a missing submodule and checkout + * the subrepository to the commit specified in the index of the containing + * repository. If the submodule repository doesn't contain the target commit + * (e.g. because fetchRecurseSubmodules isn't set), then the submodule is + * fetched using the fetch options supplied in options. + */ +void +ggit_submodule_update (GgitSubmodule *submodule, + gboolean init, + GgitSubmoduleUpdateOptions *options, + GError **error) +{ + gint ret; + + g_return_if_fail (submodule != NULL); + g_return_if_fail (submodule->valid); + g_return_val_if_fail (options == NULL || GGIT_IS_SUBMODULE_UPDATE_OPTIONS (options), NULL); + g_return_if_fail (error == NULL || *error == NULL); + + ret = git_submodule_update (submodule->submodule, init, options ? _ggit_submodule_update_options_get_submodule_update_options (options) : NULL); + + if (ret != GIT_OK) + { + _ggit_error_set (error, ret); + } +} + /* ex:set ts=8 noet: */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-0.27.7/libgit2-glib/ggit-submodule.h new/libgit2-glib-0.27.8/libgit2-glib/ggit-submodule.h --- old/libgit2-glib-0.27.7/libgit2-glib/ggit-submodule.h 2018-11-04 02:51:54.000000000 +0100 +++ new/libgit2-glib-0.27.8/libgit2-glib/ggit-submodule.h 2019-02-13 08:17:38.000000000 +0100 @@ -25,6 +25,7 @@ #include <git2.h> #include "ggit-types.h" +#include "ggit-submodule-update-options.h" G_BEGIN_DECLS @@ -33,46 +34,50 @@ GType ggit_submodule_get_type (void) G_GNUC_CONST; -GgitSubmodule *_ggit_submodule_wrap (const git_submodule *submodule); -void _ggit_submodule_invalidate (GgitSubmodule *submodule); +GgitSubmodule *_ggit_submodule_wrap (const git_submodule *submodule); +void _ggit_submodule_invalidate (GgitSubmodule *submodule); -GgitSubmodule *ggit_submodule_ref (GgitSubmodule *submodule); -void ggit_submodule_unref (GgitSubmodule *submodule); +GgitSubmodule *ggit_submodule_ref (GgitSubmodule *submodule); +void ggit_submodule_unref (GgitSubmodule *submodule); -GgitRepository *ggit_submodule_open (GgitSubmodule *submodule, - GError **error); +GgitRepository *ggit_submodule_open (GgitSubmodule *submodule, + GError **error); -GgitRepository *ggit_submodule_get_owner (GgitSubmodule *submodule); +GgitRepository *ggit_submodule_get_owner (GgitSubmodule *submodule); -const gchar *ggit_submodule_get_name (GgitSubmodule *submodule); +const gchar *ggit_submodule_get_name (GgitSubmodule *submodule); -const gchar *ggit_submodule_get_path (GgitSubmodule *submodule); +const gchar *ggit_submodule_get_path (GgitSubmodule *submodule); -const gchar *ggit_submodule_get_url (GgitSubmodule *submodule); +const gchar *ggit_submodule_get_url (GgitSubmodule *submodule); -GgitOId *ggit_submodule_get_index_id (GgitSubmodule *submodule); +GgitOId *ggit_submodule_get_index_id (GgitSubmodule *submodule); -GgitOId *ggit_submodule_get_head_id (GgitSubmodule *submodule); +GgitOId *ggit_submodule_get_head_id (GgitSubmodule *submodule); -GgitOId *ggit_submodule_get_workdir_id (GgitSubmodule *submodule); +GgitOId *ggit_submodule_get_workdir_id (GgitSubmodule *submodule); -GgitSubmoduleIgnore ggit_submodule_get_ignore (GgitSubmodule *submodule); +GgitSubmoduleIgnore ggit_submodule_get_ignore (GgitSubmodule *submodule); -GgitSubmoduleUpdate ggit_submodule_get_update (GgitSubmodule *submodule); +GgitSubmoduleUpdate ggit_submodule_get_update (GgitSubmodule *submodule); -gboolean ggit_submodule_get_fetch_recurse (GgitSubmodule *submodule); +gboolean ggit_submodule_get_fetch_recurse (GgitSubmodule *submodule); -void ggit_submodule_init (GgitSubmodule *submodule, - gboolean overwrite, - GError **error); +void ggit_submodule_init (GgitSubmodule *submodule, + gboolean overwrite, + GError **error); -void ggit_submodule_sync (GgitSubmodule *submodule, - GError **error); +void ggit_submodule_sync (GgitSubmodule *submodule, + GError **error); -void ggit_submodule_reload (GgitSubmodule *submodule, - gboolean force, - GError **error); +void ggit_submodule_reload (GgitSubmodule *submodule, + gboolean force, + GError **error); +void ggit_submodule_update (GgitSubmodule *submodule, + gboolean init, + GgitSubmoduleUpdateOptions *options, + GError **error); G_DEFINE_AUTOPTR_CLEANUP_FUNC (GgitSubmodule, ggit_submodule_unref) G_END_DECLS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-0.27.7/libgit2-glib/meson.build new/libgit2-glib-0.27.8/libgit2-glib/meson.build --- old/libgit2-glib-0.27.7/libgit2-glib/meson.build 2018-11-04 02:51:54.000000000 +0100 +++ new/libgit2-glib-0.27.8/libgit2-glib/meson.build 2019-02-13 08:17:38.000000000 +0100 @@ -1,5 +1,3 @@ -libgit2_glib_inc = include_directories('.') - headers = [ 'ggit-annotated-commit.h', 'ggit-blame.h', @@ -66,7 +64,7 @@ 'ggit-tree.h', 'ggit-tree-builder.h', 'ggit-tree-entry.h', - 'ggit-types.h' + 'ggit-types.h', ] private_headers = [ @@ -150,6 +148,8 @@ 'ggit-utils.c', ] +cflags = [] + if enable_ssh headers += ssh_headers @@ -163,7 +163,7 @@ #include <libgit2-glib/ggit-cred-ssh-interactive.h> ''' - extra_args += [ '-DGIT_SSH=1' ] + cflags += ['-DGIT_SSH=1'] else private_headers += ssh_headers @@ -179,39 +179,49 @@ input: ggit_h + '.in', output: ggit_h, configuration: ggit_h_conf, - install_dir: libgit2_glib_pkgincludedir) + install_dir: libgit2_glib_pkgincludedir, +) -enum_types = gnome.mkenums('ggit-enum-types', - sources : headers, - h_template : 'ggit-enum-types.h.template', - c_template : 'ggit-enum-types.c.template', - install_header : true, - install_dir: libgit2_glib_pkgincludedir) +enum_types = 'ggit-enum-types' -install_headers(headers, subdir: join_paths(libgit2_glib_api_name, meson.project_name())) +enum_sources = gnome.mkenums( + enum_types, + sources: headers, + h_template: enum_types + '.h.template', + c_template: enum_types + '.c.template', + install_header: true, + install_dir: libgit2_glib_pkgincludedir, +) + +install_headers( + headers, + subdir: join_paths(libgit2_glib_api_name, meson.project_name()) +) platform_deps = [ gio_dep, glib_dep, gobject_dep, - libgit2_dep + libgit2_dep, ] if cc.get_id() == 'msvc' libgit2_glib_link_args = [] else - libgit2_glib_link_args = [ '-Wl,-Bsymbolic-functions' ] + libgit2_glib_link_args = ['-Wl,-Bsymbolic-functions'] endif -libgit2_glib = shared_library('git2-glib-@0@'.format(libgit2_glib_api_version), - include_directories: core_inc, - sources: sources + enum_types + private_headers, +libgit2_glib = shared_library( + 'git2-glib-' + libgit2_glib_api_version, version: libversion, soversion: soversion, - install: true, + sources: sources + enum_sources, + include_directories: top_inc, dependencies: platform_deps, - c_args: extra_args + [ '-DG_LOG_DOMAIN="@0@"'.format(libgit2_glib_ns) ], - link_args: libgit2_glib_link_args) + c_args: cflags + ['-DG_LOG_DOMAIN="@0@"'.format(libgit2_glib_ns)], + link_args: libgit2_glib_link_args, + install: true, +) pkg.generate( libraries: libgit2_glib, @@ -220,38 +230,47 @@ description: 'libgit2-glib, a a glib wrapper library around the libgit2 git access library.', filebase: libgit2_glib_api_name, subdirs: libgit2_glib_api_name, - requires: ['libgit2 >= ' + git2_req, 'glib-2.0 >= ' + glib_req, 'gobject-2.0 >= ' + glib_req, 'gio-2.0 >= ' + glib_req], + requires: platform_deps, variables: 'exec_prefix=${prefix}', - extra_cflags: extra_args + extra_cflags: cflags, ) # Internal dependency, for tests and benchmarks -libgit2_glib_dep = declare_dependency(link_with: libgit2_glib, - include_directories: [ core_inc, libgit2_glib_inc ], - dependencies: platform_deps, - # Everything that uses libgit2-glib needs this built to compile - sources: enum_types[1]) +libgit2_glib_dep = declare_dependency( + # Everything that uses libgit2-glib needs this built to compile + sources: enum_sources[1], + include_directories: include_directories('.'), + dependencies: platform_deps, + link_with: libgit2_glib, +) if enable_python - install_data('Ggit.py', install_dir: join_paths(python.sysconfig_path('purelib'), 'gi', 'overrides')) + install_data( + 'Ggit.py', + install_dir: join_paths(python.sysconfig_path('purelib'), 'gi', 'overrides'), + ) endif if enable_gir - libgit2_glib_gir = gnome.generate_gir(libgit2_glib, - sources: headers + sources + enum_types, - namespace: libgit2_glib_ns, - nsversion: libgit2_glib_api_version, - identifier_prefix: libgit2_glib_ns, - symbol_prefix: libgit2_glib_ns.to_lower(), - export_packages: libgit2_glib_api_name, - includes: [ 'GObject-2.0', 'GLib-2.0', 'Gio-2.0' ], - header: join_paths(meson.project_name(), ggit_h), - install: true) + libgit2_glib_gir = gnome.generate_gir( + libgit2_glib, + sources: headers + sources + enum_sources, + namespace: libgit2_glib_ns, + nsversion: libgit2_glib_api_version, + identifier_prefix: libgit2_glib_ns, + symbol_prefix: libgit2_glib_ns.to_lower(), + export_packages: libgit2_glib_api_name, + includes: ['GObject-2.0', 'GLib-2.0', 'Gio-2.0'], + header: join_paths(meson.project_name(), ggit_h), + install: true, + ) if enable_vapi - gnome.generate_vapi(libgit2_glib_api_name, - sources: libgit2_glib_gir[0], - packages: 'gio-2.0', - install: true) + gnome.generate_vapi( + libgit2_glib_api_name, + sources: libgit2_glib_gir[0], + packages: 'gio-2.0', + install: true, + ) endif endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-0.27.7/libgit2-glib.doap new/libgit2-glib-0.27.8/libgit2-glib.doap --- old/libgit2-glib-0.27.7/libgit2-glib.doap 2018-11-04 02:51:54.000000000 +0100 +++ new/libgit2-glib-0.27.8/libgit2-glib.doap 2019-02-13 08:17:38.000000000 +0100 @@ -17,7 +17,7 @@ <foaf:Person> <foaf:name>Alberto Fanjul Alonso</foaf:name> <foaf:mbox rdf:resource="mailto:alb...@gnome.org" /> - <gnome:userid>icq</gnome:userid> + <gnome:userid>albfan</gnome:userid> </foaf:Person> </maintainer> <maintainer> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-0.27.7/meson.build new/libgit2-glib-0.27.8/meson.build --- old/libgit2-glib-0.27.7/meson.build 2018-11-04 02:51:54.000000000 +0100 +++ new/libgit2-glib-0.27.8/meson.build 2019-02-13 08:17:38.000000000 +0100 @@ -1,10 +1,10 @@ -project('libgit2-glib', 'c', - version: '0.27.7', - default_options: [ - 'buildtype=debugoptimized' - ], - license: 'LGPL2+', - meson_version: '>= 0.43.0') +project( + 'libgit2-glib', 'c', + version: '0.27.8', + default_options: 'buildtype=debugoptimized', + license: 'LGPL2+', + meson_version: '>= 0.48.0', +) libgit2_glib_version = meson.project_version() version_array = libgit2_glib_version.split('.') @@ -37,11 +37,15 @@ libversion = '@0@.@1@.@2@'.format(soversion, current, revision) libgit2_glib_prefix = get_option('prefix') -libgit2_glib_libdir = join_paths(libgit2_glib_prefix, get_option('libdir')) -libgit2_glib_includedir = join_paths(libgit2_glib_prefix, get_option('includedir')) -libgit2_glib_datadir = join_paths(libgit2_glib_prefix, get_option('datadir')) +libgit2_glib_libdir = get_option('libdir') +libgit2_glib_datadir = get_option('datadir') -libgit2_glib_pkgincludedir = join_paths(libgit2_glib_includedir, libgit2_glib_api_name, meson.project_name()) +libgit2_glib_pkgincludedir = join_paths(get_option('includedir'), libgit2_glib_api_name, meson.project_name()) + +gnome = import('gnome') +pkg = import('pkgconfig') + +top_inc = include_directories('.') cc = meson.get_compiler('c') @@ -51,7 +55,7 @@ # in GLib, based on _Win32_Programming_ by Rector and Newcomer common_flags = ['-FImsvc_recommended_pragmas.h'] else - test_cflags = [ + common_flags = cc.get_supported_arguments([ '-ffast-math', '-fstrict-aliasing', '-Wpointer-arith', @@ -77,29 +81,27 @@ '-Werror=missing-braces', '-Werror=return-type', '-Werror=array-bounds', - '-Werror=write-strings' - ] - - common_flags = cc.get_supported_arguments(test_cflags) + '-Werror=write-strings', + ]) endif if libgit2_glib_buildtype.contains('debug') - common_flags += [ '-DLIBGIT2_GLIB_ENABLE_DEBUG' ] + common_flags += ['-DLIBGIT2_GLIB_ENABLE_DEBUG'] if libgit2_glib_buildtype.contains('optimized') - common_flags += [ '-DG_DISABLE_CAST_CHECKS' ] + common_flags += ['-DG_DISABLE_CAST_CHECKS'] endif else common_flags += [ '-DG_DISABLE_CAST_CHECKS', - '-DG_DISABLE_CHECKS' + '-DG_DISABLE_CHECKS', ] endif # Workaround for meson's bug # https://github.com/mesonbuild/meson/pull/1896 -if get_option('b_ndebug') == true - common_flags += [ '-DG_DISABLE_ASSERT' ] +if get_option('b_ndebug') == 'true' + common_flags += ['-DG_DISABLE_ASSERT'] endif add_project_arguments(common_flags, language: 'c') @@ -107,24 +109,19 @@ # Termios have_termios = cc.has_header('termios.h') -extra_args= [] - -core_inc = include_directories('.') - # Required dependencies -git2_req = '0.25.0' glib_req = '2.44.0' glib_dep = dependency('glib-2.0', version: '>=' + glib_req) gobject_dep = dependency('gobject-2.0', version: '>=' + glib_req) gio_dep = dependency('gio-2.0', version: '>=' + glib_req) -libgit2_dep = dependency('libgit2', version: '>=' + git2_req) +libgit2_dep = dependency('libgit2', version: '>= 0.25.0') enable_gir = get_option('introspection') if enable_gir # XXX: Not nice, but probably our best option - enable_gir = find_program('g-ir-scanner', required: false).found() and not meson.is_cross_build() + enable_gir = find_program('g-ir-scanner', required: false).found() endif enable_vapi = get_option('vapi') @@ -164,9 +161,6 @@ meson.add_install_script('meson_python_compile.py', libgit2_glib_libdir) endif -gnome = import('gnome') -pkg = import('pkgconfig') - subdir('libgit2-glib') subdir('examples') subdir('tests') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-0.27.7/meson_python_compile.py new/libgit2-glib-0.27.8/meson_python_compile.py --- old/libgit2-glib-0.27.7/meson_python_compile.py 2018-11-04 02:51:54.000000000 +0100 +++ new/libgit2-glib-0.27.8/meson_python_compile.py 2019-02-13 08:17:38.000000000 +0100 @@ -5,7 +5,9 @@ import sys if not os.environ.get('DESTDIR'): - libdir = sys.argv[1] + prefix = os.environ['MESON_INSTALL_PREFIX'] + + libdir = os.path.join(prefix, sys.argv[1]) print('Byte-compiling python modules...') subprocess.call(['python', '-m', 'compileall', '-f', '-q', libdir]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-0.27.7/meson_vapi_link.py new/libgit2-glib-0.27.8/meson_vapi_link.py --- old/libgit2-glib-0.27.7/meson_vapi_link.py 2018-11-04 02:51:54.000000000 +0100 +++ new/libgit2-glib-0.27.8/meson_vapi_link.py 2019-02-13 08:17:38.000000000 +0100 @@ -4,10 +4,7 @@ import subprocess import sys -vapidir = os.path.join(sys.argv[1], 'vala', 'vapi') - -destdir = os.environ.get('DESTDIR', '') -dest_vapidir = os.path.normpath(destdir + os.sep + vapidir) +vapidir = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], sys.argv[1], 'vala', 'vapi') # FIXME: meson will not track the creation of these files # https://github.com/mesonbuild/meson/blob/master/mesonbuild/scripts/uninstall.py#L39 @@ -15,7 +12,7 @@ new = 'libgit2-glib-1.0' wd = os.getcwd() -os.chdir(dest_vapidir) +os.chdir(vapidir) for ext in ['vapi', 'deps']: src = os.path.join('{}.{}'.format(new, ext)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgit2-glib-0.27.7/tests/meson.build new/libgit2-glib-0.27.8/tests/meson.build --- old/libgit2-glib-0.27.7/tests/meson.build 2018-11-04 02:51:54.000000000 +0100 +++ new/libgit2-glib-0.27.8/tests/meson.build 2019-02-13 08:17:38.000000000 +0100 @@ -1,10 +1,14 @@ -unit_tests = [ - 'repository' -] +unit_test = 'repository' -foreach unit: unit_tests - exe = executable(unit, unit + '.c', - dependencies: libgit2_glib_dep, - include_directories: libgit2_glib_inc) - test(unit, exe, args: [ '--tap', '-k' ]) -endforeach +exe = executable( + unit_test, + unit_test + '.c', + include_directories: top_inc, + dependencies: libgit2_glib_dep, +) + +test( + unit_test, + exe, + args: ['--tap', '-k'], +) ++++++ libgit2-glib-libgit2_028-compat.patch ++++++ >From b4a8f481cca67e45c793d2615addbfd5b5c45d50 Mon Sep 17 00:00:00 2001 From: maxice8 <thinkabit.u...@gmail.com> Date: Mon, 11 Feb 2019 23:30:10 -0200 Subject: [PATCH] Compatibility with libgit2 0.28 The git_buf_free API is deprecated; it has been renamed to git_buf_dispose for consistency. The git_buf_free API will be retained for backward compatibility for the foreseeable future. The error functions and enumeration values have been renamed for consistency. The giterr_ functions and values prefix have been renamed to be prefixed with git_error_; similarly, the GITERR_ constants have been renamed to be prefixed with GIT_ERROR_. The old enumerations and macros will be retained for backward compatibility for the foreseeable future. --- libgit2-glib/ggit-clone-options.c | 4 ++-- libgit2-glib/ggit-config.c | 4 ++-- libgit2-glib/ggit-diff.c | 4 ++-- libgit2-glib/ggit-error.c | 2 +- libgit2-glib/ggit-message.c | 2 +- libgit2-glib/ggit-patch.c | 2 +- libgit2-glib/ggit-remote-callbacks.c | 2 +- libgit2-glib/ggit-repository.c | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/libgit2-glib/ggit-clone-options.c b/libgit2-glib/ggit-clone-options.c index 1288a82..9234efc 100644 --- a/libgit2-glib/ggit-clone-options.c +++ b/libgit2-glib/ggit-clone-options.c @@ -149,7 +149,7 @@ create_repository_wrapper (git_repository **out, if (error != NULL) { - giterr_set_str (GIT_ERROR, error->message); + git_error_set_str (GIT_ERROR, error->message); g_error_free (error); if (repository != NULL) @@ -187,7 +187,7 @@ create_remote_wrapper (git_remote **out, if (error) { - giterr_set_str (GIT_ERROR, error->message); + git_error_set_str (GIT_ERROR, error->message); g_error_free (error); if (remote != NULL) diff --git a/libgit2-glib/ggit-config.c b/libgit2-glib/ggit-config.c index acdad95..06431ed 100644 --- a/libgit2-glib/ggit-config.c +++ b/libgit2-glib/ggit-config.c @@ -191,7 +191,7 @@ ggit_config_find_global (void) if (git_config_find_global (&buf) == GIT_OK) { path = g_file_new_for_path (buf.ptr); - git_buf_free (&buf); + git_buf_dispose (&buf); } return path; @@ -220,7 +220,7 @@ ggit_config_find_system (void) if (git_config_find_system (&buf) == GIT_OK) { path = g_file_new_for_path (buf.ptr); - git_buf_free (&buf); + git_buf_dispose (&buf); } return path; diff --git a/libgit2-glib/ggit-diff.c b/libgit2-glib/ggit-diff.c index db9361d..536b143 100644 --- a/libgit2-glib/ggit-diff.c +++ b/libgit2-glib/ggit-diff.c @@ -786,13 +786,13 @@ ggit_diff_format_email (GgitDiff *diff, if (ret != GIT_OK) { - git_buf_free (&buf); + git_buf_dispose (&buf); _ggit_error_set (error, ret); return NULL; } retval = g_strndup (buf.ptr, buf.size); - git_buf_free (&buf); + git_buf_dispose (&buf); return retval; } diff --git a/libgit2-glib/ggit-error.c b/libgit2-glib/ggit-error.c index 06a21a7..acc1eb2 100644 --- a/libgit2-glib/ggit-error.c +++ b/libgit2-glib/ggit-error.c @@ -51,7 +51,7 @@ _ggit_error_set (GError **error, g_return_if_fail (err < 0); /* TODO: add more kind of errors, see git_error_t */ - git2_err = giterr_last (); + git2_err = git_error_last (); g_set_error_literal (error, GGIT_ERROR, err, git2_err == NULL ? "" : git2_err->message); diff --git a/libgit2-glib/ggit-message.c b/libgit2-glib/ggit-message.c index 0fa9e8c..6b0fac4 100644 --- a/libgit2-glib/ggit-message.c +++ b/libgit2-glib/ggit-message.c @@ -46,7 +46,7 @@ ggit_message_prettify (const gchar *message, git_message_prettify (&buf, message, strip_comments, comment_char); d = g_strdup (buf.ptr); - git_buf_free (&buf); + git_buf_dispose (&buf); return d; } diff --git a/libgit2-glib/ggit-patch.c b/libgit2-glib/ggit-patch.c index ee04e4d..29c69df 100644 --- a/libgit2-glib/ggit-patch.c +++ b/libgit2-glib/ggit-patch.c @@ -194,7 +194,7 @@ ggit_patch_to_string (GgitPatch *patch, if (ret == GIT_OK) { result = g_strdup (buf.ptr); - git_buf_free (&buf); + git_buf_dispose (&buf); } return result; diff --git a/libgit2-glib/ggit-remote-callbacks.c b/libgit2-glib/ggit-remote-callbacks.c index a4bc130..03064eb 100644 --- a/libgit2-glib/ggit-remote-callbacks.c +++ b/libgit2-glib/ggit-remote-callbacks.c @@ -160,7 +160,7 @@ credentials_wrap (git_cred **cred, { if (error) { - giterr_set_str (GIT_ERROR, error->message); + git_error_set_str (GIT_ERROR, error->message); g_error_free (error); return GIT_ERROR; diff --git a/libgit2-glib/ggit-repository.c b/libgit2-glib/ggit-repository.c index b9bd2b7..d7eb20b 100644 --- a/libgit2-glib/ggit-repository.c +++ b/libgit2-glib/ggit-repository.c @@ -1013,7 +1013,7 @@ ggit_repository_discover_full (GFile *location, if (ret == GIT_OK) { rep = g_file_new_for_path (buf.ptr); - git_buf_free (&buf); + git_buf_dispose (&buf); } else { @@ -3680,7 +3680,7 @@ ggit_repository_get_default_notes_ref (GgitRepository *repository, } ref = g_strdup (buf.ptr); - git_buf_free (&buf); + git_buf_dispose (&buf); return ref; } -- 2.18.1