import gtksourceview4-4.8.1-5.el9

i9c-beta changed/i9c-beta/gtksourceview4-4.8.1-5.el9
MSVSphere Packaging Team 2 years ago
commit aa95f26191

1
.gitignore vendored

@ -0,0 +1 @@
SOURCES/gtksourceview-4.8.1.tar.xz

@ -0,0 +1 @@
b277f87dd22ef620d30bcae6ba0e083825c9e02f SOURCES/gtksourceview-4.8.1.tar.xz

@ -0,0 +1,147 @@
From fa324fc228691cd2b1aa86dbbde43f37a5dd7758 Mon Sep 17 00:00:00 2001
From: Christian Hergert <chergert@redhat.com>
Date: Sun, 7 Mar 2021 08:54:15 -0800
Subject: [PATCH 1/1] build: ensure access to resources in corelib build
This should help with some transient build failures in dependent projects.
---
gtksourceview/meson.build | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/gtksourceview/meson.build b/gtksourceview/meson.build
index fd080a9c..b6192604 100644
--- a/gtksourceview/meson.build
+++ b/gtksourceview/meson.build
@@ -145,122 +145,123 @@ core_enums_header = '''
#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
# error "Only <gtksourceview/gtksource.h> can be included directly."
#endif
#include <gtksourceview/gtksourceversion.h>
'''
core_enums = gnome.mkenums_simple('gtksource-enumtypes',
sources: core_public_h,
identifier_prefix: 'GtkSource',
symbol_prefix: 'gtk_source',
header_prefix: core_enums_header,
decorator: 'GTK_SOURCE_ENUM_EXTERN',
install_header: true,
install_dir: join_paths(pkgincludedir, 'gtksourceview'),
)
version_h = configuration_data()
version_h.set('GTK_SOURCE_MAJOR_VERSION', version_major)
version_h.set('GTK_SOURCE_MINOR_VERSION', version_minor)
version_h.set('GTK_SOURCE_MICRO_VERSION', version_micro)
gtksourceversion_h = configure_file(
input: 'gtksourceversion.h.in',
output: 'gtksourceversion.h',
configuration: version_h,
install_dir: join_paths(pkgincludedir, 'gtksourceview'),
)
+gtksource_res = gnome.compile_resources(
+ 'gtksourceview-gresources',
+ 'gtksourceview.gresource.xml'
+)
+
core_sources = [
core_public_c,
core_private_c,
core_enums,
gtksourceversion_h,
core_marshallers,
+ gtksource_res,
]
install_headers(
core_public_h,
install_dir: join_paths(pkgincludedir, 'gtksourceview'),
)
core_enums_h = core_enums.get(1)
# Unfortunately, Visual Studio builds must build the core
# sources twice, once for the GtkSourceView DLL, and once for
# the tests (static core lib), so that we can ensure that
# all the items from the core sources are properly linked into
# the final GtkSourceView DLL and exported from it.
core_lib = static_library(package_string + 'core', core_sources,
include_directories: gtksourceview_include_dirs,
dependencies: core_deps,
c_args: core_c_args,
install: false
)
core_dep = declare_dependency(
link_with: core_lib,
include_directories: rootdir,
dependencies: core_deps,
sources: [core_enums_h]
)
gtksource_deps = [
core_dep,
]
gtksource_libs = [core_lib]
extra_public_sources = []
subdir('completion-providers')
-gtksource_res = gnome.compile_resources(
- 'gtksourceview-gresources',
- 'gtksourceview.gresource.xml'
-)
-
# We can't use the static libs on Visual Studio builds
# to form our DLL here directly, so we must use
# extract_all_objects() to extract all the core and word
# completion provider objects that we previously built
# into static .lib's and link them into the main DLL
# instead
gtksource_objs = []
foreach int_lib : gtksource_libs
gtksource_objs += int_lib.extract_all_objects()
endforeach
-gtksource_lib = shared_library(package_string, gtksource_res,
+gtksource_lib = shared_library(package_string,
version: lib_version,
darwin_versions: lib_osx_version,
include_directories: gtksourceview_include_dirs,
dependencies: cc.get_id() == 'msvc' ? core_deps : gtksource_deps,
objects: cc.get_id() == 'msvc' ? gtksource_objs : [],
link_whole: cc.get_id() == 'msvc' ? [] : gtksource_libs,
c_args: core_c_args,
link_args: release_link_args,
install: true,
gnu_symbol_visibility: 'hidden',
)
gtksource_dep_sources = [
core_enums_h,
]
if generate_gir
gtksource_gir_sources = [
core_public_c,
core_public_h,
core_enums_h,
extra_public_sources,
]
gtksource_gir = gnome.generate_gir(gtksource_lib,
sources: gtksource_gir_sources,
nsversion: api_version,
namespace: 'GtkSource',
symbol_prefix: 'gtk_source',
identifier_prefix: 'GtkSource',
--
2.39.1

@ -0,0 +1,90 @@
From d33ed342af50b66c7c49c2843d7495febfd663e9 Mon Sep 17 00:00:00 2001
From: Christian Hergert <chergert@redhat.com>
Date: Wed, 28 Jul 2021 17:49:40 -0700
Subject: [PATCH 1/1] view: fix decrement of negative numbers
Fixes #117
---
gtksourceview/gtksourceview.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/gtksourceview/gtksourceview.c b/gtksourceview/gtksourceview.c
index e10584aa..377cdd8d 100644
--- a/gtksourceview/gtksourceview.c
+++ b/gtksourceview/gtksourceview.c
@@ -360,61 +360,72 @@ gtk_source_view_move_to_matching_bracket (GtkSourceView *view,
gtk_text_buffer_move_mark (buffer, insert_mark, &bracket_match);
}
else
{
gtk_text_buffer_place_cursor (buffer, &bracket_match);
}
gtk_text_view_scroll_mark_onscreen (text_view, insert_mark);
}
}
static void
gtk_source_view_change_number (GtkSourceView *view,
gint count)
{
GtkTextView *text_view = GTK_TEXT_VIEW (view);
GtkTextBuffer *buffer;
GtkTextIter start, end;
gchar *str;
buffer = gtk_text_view_get_buffer (text_view);
if (!GTK_SOURCE_IS_BUFFER (buffer))
{
return;
}
if (!gtk_text_buffer_get_selection_bounds (buffer, &start, &end))
{
if (!gtk_text_iter_starts_word (&start))
{
+ GtkTextIter prev;
+
gtk_text_iter_backward_word_start (&start);
+
+ /* Include the negative sign if there is one.
+ * https://gitlab.gnome.org/GNOME/gtksourceview/-/issues/117
+ */
+ prev = start;
+ if (gtk_text_iter_backward_char (&prev) && gtk_text_iter_get_char (&prev) == '-')
+ {
+ start = prev;
+ }
}
if (!gtk_text_iter_ends_word (&end))
{
gtk_text_iter_forward_word_end (&end);
}
}
str = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
if (str != NULL && *str != '\0')
{
gchar *p;
gint64 n;
glong len;
len = gtk_text_iter_get_offset (&end) - gtk_text_iter_get_offset (&start);
g_assert (len > 0);
n = g_ascii_strtoll (str, &p, 10);
/* do the action only if strtoll succeeds (p != str) and
* the whole string is the number, e.g. not 123abc
*/
if ((p - str) == len)
{
gchar *newstr;
newstr = g_strdup_printf ("%"G_GINT64_FORMAT, (n + count));
--
2.39.1

@ -0,0 +1,172 @@
%global glib_version 2.48
%global gtk_version 3.22
Name: gtksourceview4
Version: 4.8.1
Release: 5%{?dist}
Summary: Source code editing widget
License: LGPLv2+
URL: https://wiki.gnome.org/Projects/GtkSourceView
Source0: https://download.gnome.org/sources/gtksourceview/4.8/gtksourceview-%{version}.tar.xz
BuildRequires: gcc
BuildRequires: gettext
BuildRequires: git
BuildRequires: gtk-doc
BuildRequires: itstool
BuildRequires: meson
BuildRequires: pkgconfig(gdk-pixbuf-2.0)
BuildRequires: pkgconfig(gladeui-2.0)
BuildRequires: pkgconfig(glib-2.0) >= %{glib_version}
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(gtk+-3.0) >= %{gtk_version}
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(pango)
BuildRequires: vala
Requires: glib2%{?_isa} >= %{glib_version}
Requires: gtk3%{?_isa} >= %{gtk_version}
# Fixes build and test suite on single cpu VMs
Patch10001: 0001-build-ensure-access-to-resources-in-corelib-build.patch
Patch20001: 0001-view-fix-decrement-of-negative-numbers.patch
%description
GtkSourceView is a GNOME library that extends GtkTextView, the standard GTK+
widget for multiline text editing. GtkSourceView adds support for syntax
highlighting, undo/redo, file loading and saving, search and replace, a
completion system, printing, displaying line numbers, and other features
typical of a source code editor.
This package contains version 4 of GtkSourceView.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package tests
Summary: Tests for the %{name} package
Requires: %{name}%{?_isa} = %{version}-%{release}
%description tests
The %{name}-tests package contains tests that can be used to verify
the functionality of the installed %{name} package.
%prep
%autosetup -n gtksourceview-%{version} -S git
%build
%meson -Dgtk_doc=true -Dglade_catalog=true -Dinstall_tests=true
%meson_build
%install
%meson_install
%find_lang gtksourceview-4
%files -f gtksourceview-4.lang
%license COPYING
%dir %{_libdir}/girepository-1.0
%{_libdir}/girepository-1.0/GtkSource-4.typelib
%{_libdir}/libgtksourceview-4.so.0*
%{_datadir}/gtksourceview-4/
%files devel
%{_includedir}/gtksourceview-4/
%{_libdir}/pkgconfig/*.pc
%{_libdir}/libgtksourceview-4.so
%dir %{_datadir}/gir-1.0
%{_datadir}/gir-1.0/GtkSource-4.gir
%dir %{_datadir}/glade
%dir %{_datadir}/glade/catalogs
%{_datadir}/glade/catalogs/gtksourceview.xml
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%{_datadir}/gtk-doc/html/*
%dir %{_datadir}/vala
%dir %{_datadir}/vala/vapi
%{_datadir}/vala/vapi/gtksourceview-4.deps
%{_datadir}/vala/vapi/gtksourceview-4.vapi
%files tests
%dir %{_libexecdir}/installed-tests
%{_libexecdir}/installed-tests/gtksourceview-4/
%dir %{_datadir}/installed-tests
%{_datadir}/installed-tests/gtksourceview-4/
%changelog
* Fri Apr 14 2023 MSVSphere Packaging Team <packager@msvsphere.ru> - 4.8.1-5
- Rebuilt for MSVSphere 9.2 beta
* Thu Jan 26 2023 Ray Strode <rstrode@redhat.com> - 4.8.1-5
- Add build and test suite fix for single core VMs
Related: #2062786
* Wed Jan 25 2023 Ray Strode <rstrode@redhat.com - 4.8.1-4
- Fix decrement number feature
Resolves: #2062786
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 4.8.1-3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 4.8.1-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Mar 02 2021 Kalev Lember <klember@redhat.com> - 4.8.1-1
- Update to 4.8.1
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.8.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sat Sep 12 2020 Kalev Lember <klember@redhat.com> - 4.8.0-1
- Update to 4.8.0
* Mon Aug 17 2020 Kalev Lember <klember@redhat.com> - 4.7.90-1
- Update to 4.7.90
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.6.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 20 2020 Kalev Lember <klember@redhat.com> - 4.6.1-1
- Update to 4.6.1
* Sat Mar 07 2020 Kalev Lember <klember@redhat.com> - 4.6.0-1
- Update to 4.6.0
* Mon Feb 17 2020 Kalev Lember <klember@redhat.com> - 4.5.91-1
- Update to 4.5.91
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Sep 10 2019 Kalev Lember <klember@redhat.com> - 4.4.0-1
- Update to 4.4.0
* Wed Sep 04 2019 Kalev Lember <klember@redhat.com> - 4.3.92-1
- Update to 4.3.92
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Mon Apr 29 2019 Phil Wyett <philwyett@kathenas.org> - 4.3.1-1
- Update to 4.3.1
- Convert to meson
* Sat Mar 16 2019 Kalev Lember <klember@redhat.com> - 4.2.0-1
- Update to 4.2.0
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Sep 07 2018 Kalev Lember <klember@redhat.com> - 4.0.3-2
- Rebuilt against fixed atk (#1626575)
* Fri Sep 07 2018 Pete Walter <pwalter@fedoraproject.org> - 4.0.3-1
- Initial packaging of GtkSourceView 4
Loading…
Cancel
Save