!2 初始化仓库
From: @wangtaozhi Reviewed-by: @tangjie02 Signed-off-by: @tangjie02
This commit is contained in:
commit
736527ef59
22
gtksourceview-2.11-add-libs.patch
Normal file
22
gtksourceview-2.11-add-libs.patch
Normal file
@ -0,0 +1,22 @@
|
||||
--- gtksourceview-2.11.2/gtksourceview/Makefile.am.orig 2011-12-12 15:37:53.674460066 +0000
|
||||
+++ gtksourceview-2.11.2/gtksourceview/Makefile.am 2011-12-12 15:40:54.795452873 +0000
|
||||
@@ -166,7 +166,7 @@
|
||||
INTROSPECTION_SCANNER_ARGS = -I$(top_srcdir) $(DEP_CFLAGS) -lgio-2.0 -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -lglib-2.0
|
||||
GtkSource_2_0_gir_NAMESPACE = GtkSource
|
||||
GtkSource_2_0_gir_VERSION = 2.0
|
||||
-GtkSource_2_0_gir_LIBS = libgtksourceview-2.0.la
|
||||
+GtkSource_2_0_gir_LIBS = libgtksourceview-2.0.la gio-2.0 gobject-2.0 gmodule-2.0 gthread-2.0 glib-2.0
|
||||
GtkSource_2_0_gir_FILES = $(libgtksourceview_headers) $(libgtksourceview_c_files)
|
||||
GtkSource_2_0_gir_INCLUDES = $(GTK_TYPELIB)
|
||||
GtkSource_2_0_gir_PACKAGES = gtksourceview-2.0
|
||||
--- gtksourceview-2.11.2/gtksourceview/Makefile.in.orig 2011-12-12 15:37:53.677460066 +0000
|
||||
+++ gtksourceview-2.11.2/gtksourceview/Makefile.in 2011-12-12 15:40:54.799452554 +0000
|
||||
@@ -462,7 +462,7 @@
|
||||
@HAVE_INTROSPECTION_TRUE@INTROSPECTION_SCANNER_ARGS = -I$(top_srcdir) $(DEP_CFLAGS) -lgio-2.0 -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -lglib-2.0
|
||||
@HAVE_INTROSPECTION_TRUE@GtkSource_2_0_gir_NAMESPACE = GtkSource
|
||||
@HAVE_INTROSPECTION_TRUE@GtkSource_2_0_gir_VERSION = 2.0
|
||||
-@HAVE_INTROSPECTION_TRUE@GtkSource_2_0_gir_LIBS = libgtksourceview-2.0.la
|
||||
+@HAVE_INTROSPECTION_TRUE@GtkSource_2_0_gir_LIBS = libgtksourceview-2.0.la gio-2.0 gobject-2.0 gmodule-2.0 gthread-2.0 glib-2.0
|
||||
@HAVE_INTROSPECTION_TRUE@GtkSource_2_0_gir_FILES = $(libgtksourceview_headers) $(libgtksourceview_c_files)
|
||||
@HAVE_INTROSPECTION_TRUE@GtkSource_2_0_gir_INCLUDES = $(GTK_TYPELIB)
|
||||
@HAVE_INTROSPECTION_TRUE@GtkSource_2_0_gir_PACKAGES = gtksourceview-2.0
|
||||
110
gtksourceview-2.11-fix-GCONST-def.patch
Normal file
110
gtksourceview-2.11-fix-GCONST-def.patch
Normal file
@ -0,0 +1,110 @@
|
||||
--- gtksourceview-2.11.2/gtksourceview/gtksourcelanguagemanager.c 2011-06-29 14:17:02.417251696 +0200
|
||||
+++ gtksourceview-2.11.2/gtksourceview/gtksourcelanguagemanager.c 2011-06-29 14:21:54.888666004 +0200
|
||||
@@ -274,7 +274,7 @@ gtk_source_language_manager_set_search_p
|
||||
* containg a list of language files directories.
|
||||
* The array is owned by @lm and must not be modified.
|
||||
*/
|
||||
-G_CONST_RETURN gchar* G_CONST_RETURN *
|
||||
+const gchar* const *
|
||||
gtk_source_language_manager_get_search_path (GtkSourceLanguageManager *lm)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_SOURCE_LANGUAGE_MANAGER (lm), NULL);
|
||||
@@ -392,7 +392,7 @@ ensure_languages (GtkSourceLanguageManag
|
||||
* available languages or %NULL if no language is available. The array
|
||||
* is owned by @lm and must not be modified.
|
||||
*/
|
||||
-G_CONST_RETURN gchar* G_CONST_RETURN *
|
||||
+const gchar* const *
|
||||
gtk_source_language_manager_get_language_ids (GtkSourceLanguageManager *lm)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_SOURCE_LANGUAGE_MANAGER (lm), NULL);
|
||||
--- gtksourceview-2.11.2/gtksourceview/gtksourcelanguagemanager.h 2011-06-29 14:04:04.670270338 +0200
|
||||
+++ gtksourceview-2.11.2/gtksourceview/gtksourcelanguagemanager.h 2011-06-29 14:04:46.002746893 +0200
|
||||
@@ -62,14 +62,12 @@ GtkSourceLanguageManager *gtk_source_lan
|
||||
|
||||
GtkSourceLanguageManager *gtk_source_language_manager_get_default (void);
|
||||
|
||||
-G_CONST_RETURN gchar* G_CONST_RETURN *
|
||||
- gtk_source_language_manager_get_search_path (GtkSourceLanguageManager *lm);
|
||||
+const gchar* const* gtk_source_language_manager_get_search_path (GtkSourceLanguageManager *lm);
|
||||
|
||||
void gtk_source_language_manager_set_search_path (GtkSourceLanguageManager *lm,
|
||||
gchar **dirs);
|
||||
|
||||
-G_CONST_RETURN gchar* G_CONST_RETURN *
|
||||
- gtk_source_language_manager_get_language_ids (GtkSourceLanguageManager *lm);
|
||||
+const gchar* const* gtk_source_language_manager_get_language_ids (GtkSourceLanguageManager *lm);
|
||||
|
||||
GtkSourceLanguage *gtk_source_language_manager_get_language (GtkSourceLanguageManager *lm,
|
||||
const gchar *id);
|
||||
--- gtksourceview-2.11.2/gtksourceview/gtksourcestylescheme.c 2011-06-29 14:17:24.801512364 +0200
|
||||
+++ gtksourceview-2.11.2/gtksourceview/gtksourcestylescheme.c 2011-06-29 14:22:13.798887363 +0200
|
||||
@@ -310,7 +310,7 @@ gtk_source_style_scheme_get_description
|
||||
*
|
||||
* Since: 2.0
|
||||
*/
|
||||
-G_CONST_RETURN gchar* G_CONST_RETURN *
|
||||
+const gchar* const *
|
||||
gtk_source_style_scheme_get_authors (GtkSourceStyleScheme *scheme)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_SOURCE_STYLE_SCHEME (scheme), NULL);
|
||||
@@ -318,7 +318,7 @@ gtk_source_style_scheme_get_authors (Gtk
|
||||
if (scheme->priv->authors == NULL)
|
||||
return NULL;
|
||||
|
||||
- return (G_CONST_RETURN gchar* G_CONST_RETURN *)scheme->priv->authors->pdata;
|
||||
+ return (const gchar* const *)scheme->priv->authors->pdata;
|
||||
}
|
||||
|
||||
/**
|
||||
--- gtksourceview-2.11.2/gtksourceview/gtksourcestylescheme.h 2010-03-29 15:02:56.000000000 +0200
|
||||
+++ gtksourceview-2.11.2/gtksourceview/gtksourcestylescheme.h 2011-06-29 14:01:07.442115911 +0200
|
||||
@@ -61,8 +61,7 @@ const gchar *gtk_source_styl
|
||||
const gchar *gtk_source_style_scheme_get_name (GtkSourceStyleScheme *scheme);
|
||||
const gchar *gtk_source_style_scheme_get_description(GtkSourceStyleScheme *scheme);
|
||||
|
||||
-G_CONST_RETURN gchar* G_CONST_RETURN *
|
||||
- gtk_source_style_scheme_get_authors (GtkSourceStyleScheme *scheme);
|
||||
+const gchar* const* gtk_source_style_scheme_get_authors (GtkSourceStyleScheme *scheme);
|
||||
|
||||
const gchar *gtk_source_style_scheme_get_filename (GtkSourceStyleScheme *scheme);
|
||||
|
||||
--- gtksourceview-2.11.2/gtksourceview/gtksourcestyleschememanager.c 2011-06-29 14:16:27.856849457 +0200
|
||||
+++ gtksourceview-2.11.2/gtksourceview/gtksourcestyleschememanager.c 2011-06-29 14:22:33.335116123 +0200
|
||||
@@ -515,7 +515,7 @@ gtk_source_style_scheme_manager_prepend_
|
||||
* of string containing the search path.
|
||||
* The array is owned by the @manager and must not be modified.
|
||||
*/
|
||||
-G_CONST_RETURN gchar* G_CONST_RETURN *
|
||||
+const gchar* const *
|
||||
gtk_source_style_scheme_manager_get_search_path (GtkSourceStyleSchemeManager *manager)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_SOURCE_STYLE_SCHEME_MANAGER (manager), NULL);
|
||||
@@ -554,7 +554,7 @@ gtk_source_style_scheme_manager_force_re
|
||||
* of string containing the ids of the available style schemes or %NULL if no
|
||||
* style scheme is available. The array is owned by the @manager and must not be modified.
|
||||
*/
|
||||
-G_CONST_RETURN gchar* G_CONST_RETURN *
|
||||
+const gchar* const *
|
||||
gtk_source_style_scheme_manager_get_scheme_ids (GtkSourceStyleSchemeManager *manager)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_SOURCE_STYLE_SCHEME_MANAGER (manager), NULL);
|
||||
--- gtksourceview-2.11.2/gtksourceview/gtksourcestyleschememanager.h 2011-06-29 14:04:21.008460977 +0200
|
||||
+++ gtksourceview-2.11.2/gtksourceview/gtksourcestyleschememanager.h 2011-06-29 14:06:38.768039315 +0200
|
||||
@@ -73,13 +73,11 @@ void gtk_source_style_scheme_manager
|
||||
void gtk_source_style_scheme_manager_prepend_search_path (GtkSourceStyleSchemeManager *manager,
|
||||
const gchar *path);
|
||||
|
||||
-G_CONST_RETURN gchar* G_CONST_RETURN *
|
||||
- gtk_source_style_scheme_manager_get_search_path (GtkSourceStyleSchemeManager *manager);
|
||||
+const gchar* const* gtk_source_style_scheme_manager_get_search_path (GtkSourceStyleSchemeManager *manager);
|
||||
|
||||
void gtk_source_style_scheme_manager_force_rescan (GtkSourceStyleSchemeManager *manager);
|
||||
|
||||
-G_CONST_RETURN gchar* G_CONST_RETURN *
|
||||
- gtk_source_style_scheme_manager_get_scheme_ids (GtkSourceStyleSchemeManager *manager);
|
||||
+const gchar* const* gtk_source_style_scheme_manager_get_scheme_ids (GtkSourceStyleSchemeManager *manager);
|
||||
|
||||
GtkSourceStyleScheme *gtk_source_style_scheme_manager_get_scheme (GtkSourceStyleSchemeManager *manager,
|
||||
const gchar *scheme_id);
|
||||
|
||||
13
gtksourceview-2.11-glib-unicode-constant.patch
Normal file
13
gtksourceview-2.11-glib-unicode-constant.patch
Normal file
@ -0,0 +1,13 @@
|
||||
Index: gtksourceview-2.11.2/gtksourceview/gtksourceiter.c
|
||||
===================================================================
|
||||
--- gtksourceview-2.11.2.orig/gtksourceview/gtksourceiter.c
|
||||
+++ gtksourceview-2.11.2/gtksourceview/gtksourceiter.c
|
||||
@@ -80,7 +80,7 @@ exact_prefix_cmp (const gchar *string,
|
||||
/* If string contains prefix, check that prefix is not followed
|
||||
* by a unicode mark symbol, e.g. that trailing 'a' in prefix
|
||||
* is not part of two-char a-with-hat symbol in string. */
|
||||
- return type != G_UNICODE_COMBINING_MARK &&
|
||||
+ return type != G_UNICODE_SPACING_MARK &&
|
||||
type != G_UNICODE_ENCLOSING_MARK &&
|
||||
type != G_UNICODE_NON_SPACING_MARK;
|
||||
}
|
||||
24
gtksourceview-2.11.2-cflags.patch
Normal file
24
gtksourceview-2.11.2-cflags.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff -up gtksourceview-2.11.2/gtksourceview/Makefile.am.cflags gtksourceview-2.11.2/gtksourceview/Makefile.am
|
||||
--- gtksourceview-2.11.2/gtksourceview/Makefile.am.cflags 2010-12-21 17:05:03.000000000 +0100
|
||||
+++ gtksourceview-2.11.2/gtksourceview/Makefile.am 2010-12-21 17:05:17.000000000 +0100
|
||||
@@ -163,7 +163,7 @@ if HAVE_INTROSPECTION
|
||||
INTROSPECTION_GIRS = GtkSource-2.0.gir
|
||||
|
||||
GtkSource-2.0.gir: libgtksourceview-2.0.la
|
||||
-INTROSPECTION_SCANNER_ARGS = -I$(top_srcdir)
|
||||
+INTROSPECTION_SCANNER_ARGS = -I$(top_srcdir) $(DEP_CFLAGS)
|
||||
GtkSource_2_0_gir_NAMESPACE = GtkSource
|
||||
GtkSource_2_0_gir_VERSION = 2.0
|
||||
GtkSource_2_0_gir_LIBS = libgtksourceview-2.0.la
|
||||
diff -up gtksourceview-2.11.2/gtksourceview/Makefile.in.cflags gtksourceview-2.11.2/gtksourceview/Makefile.in
|
||||
--- gtksourceview-2.11.2/gtksourceview/Makefile.in.cflags 2010-12-21 17:05:07.000000000 +0100
|
||||
+++ gtksourceview-2.11.2/gtksourceview/Makefile.in 2010-12-21 17:05:32.000000000 +0100
|
||||
@@ -459,7 +459,7 @@ EXTRA_DIST = \
|
||||
CLEANFILES = $(BUILT_SOURCES) stamp-gtksourceview-typebuiltins.h \
|
||||
stamp-gtksourceview-typebuiltins.c $(am__append_1)
|
||||
@HAVE_INTROSPECTION_TRUE@INTROSPECTION_GIRS = GtkSource-2.0.gir
|
||||
-@HAVE_INTROSPECTION_TRUE@INTROSPECTION_SCANNER_ARGS = -I$(top_srcdir)
|
||||
+@HAVE_INTROSPECTION_TRUE@INTROSPECTION_SCANNER_ARGS = -I$(top_srcdir) $(DEP_CFLAGS)
|
||||
@HAVE_INTROSPECTION_TRUE@GtkSource_2_0_gir_NAMESPACE = GtkSource
|
||||
@HAVE_INTROSPECTION_TRUE@GtkSource_2_0_gir_VERSION = 2.0
|
||||
@HAVE_INTROSPECTION_TRUE@GtkSource_2_0_gir_LIBS = libgtksourceview-2.0.la
|
||||
BIN
gtksourceview-2.11.2.tar.bz2
Normal file
BIN
gtksourceview-2.11.2.tar.bz2
Normal file
Binary file not shown.
91
gtksourceview2.spec
Normal file
91
gtksourceview2.spec
Normal file
@ -0,0 +1,91 @@
|
||||
%define glib2_version 2.13.6
|
||||
%define gtk2_version 2.12.0
|
||||
|
||||
%define po_package gtksourceview-2.0
|
||||
|
||||
Summary: A library for viewing source files
|
||||
Name: gtksourceview2
|
||||
Version: 2.11.2
|
||||
Release: 1
|
||||
License: LGPLv2+ and GPLv2+
|
||||
# the library itself is LGPL, some .lang files are GPL
|
||||
URL: http://gtksourceview.sourceforge.net/
|
||||
#VCS: git:git://git.gnome.org/gtksourceview
|
||||
Source0: http://download.gnome.org/sources/gtksourceview/2.11/gtksourceview-%{version}.tar.bz2
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=661068
|
||||
Patch0: gtksourceview-2.11.2-cflags.patch
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=672823
|
||||
Patch1: gtksourceview-2.11-fix-GCONST-def.patch
|
||||
Patch2: gtksourceview-2.11-add-libs.patch
|
||||
Patch3: gtksourceview-2.11-glib-unicode-constant.patch
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: GConf2-devel
|
||||
BuildRequires: glib2-devel >= %{glib2_version}
|
||||
BuildRequires: gtk2-devel >= %{gtk2_version}
|
||||
BuildRequires: intltool >= 0.35
|
||||
BuildRequires: gettext
|
||||
BuildRequires: gobject-introspection-devel
|
||||
|
||||
%description
|
||||
GtkSourceView is a text widget that extends the standard GTK+
|
||||
GtkTextView widget. It improves GtkTextView by implementing
|
||||
syntax highlighting and other features typical of a source code editor.
|
||||
|
||||
This package contains version 2 of GtkSourceView. The older version
|
||||
1 is contains in the gtksourceview package.
|
||||
|
||||
%package devel
|
||||
Summary: Files to compile applications that use gtksourceview2
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: gtk2-devel >= %{gtk2_version}
|
||||
Requires: libxml2-devel
|
||||
|
||||
%description devel
|
||||
gtksourceview2-devel contains the files required to compile
|
||||
applications which use GtkSourceView 2.x.
|
||||
|
||||
%prep
|
||||
%setup -q -n gtksourceview-%{version}
|
||||
%patch0 -p1 -b .cflags
|
||||
%patch1 -p1 -b .gconst
|
||||
#%%patch2 -p1 -b .addlibs
|
||||
%patch3 -p1 -b .glib-deprecated
|
||||
|
||||
# Explictly use gtk+-2.0
|
||||
sed -i.gtk configure -e '\@gtk+-3.0@s|2.90|9999|'
|
||||
|
||||
%build
|
||||
# Add pkgconfig search path to find out generated pc file
|
||||
export PKG_CONFIG_PATH=%{_datadir}/pkgconfig:%{_libdir}/pkgconfig:$(pwd)
|
||||
%configure --disable-gtk-doc --disable-static --disable-deprecations --disable-silent-rules
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
|
||||
# remove unwanted files
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
||||
rm -f $RPM_BUILD_ROOT%{_datadir}/gtksourceview-2.0/language-specs/check.sh
|
||||
rm -f $RPM_BUILD_ROOT%{_datadir}/gtksourceview-2.0/language-specs/convert.py
|
||||
|
||||
%find_lang %{po_package}
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%files -f %{po_package}.lang
|
||||
%doc README AUTHORS COPYING NEWS MAINTAINERS
|
||||
%{_datadir}/gtksourceview-2.0
|
||||
%{_libdir}/*.so.*
|
||||
%{_libdir}/girepository-1.0/GtkSource-2.0.typelib
|
||||
|
||||
%files devel
|
||||
%{_includedir}/gtksourceview-2.0
|
||||
%{_datadir}/gtk-doc/html/*
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
%{_libdir}/*.so
|
||||
%{_datadir}/gir-1.0/GtkSource-2.0.gir
|
||||
|
||||
%changelog
|
||||
* Wed May 24 2023 wangtaozhi <wangtaozhi@kylinsec.com.cn> -2.11.2-1
|
||||
- Package init
|
||||
4
gtksourceview2.yaml
Normal file
4
gtksourceview2.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
version_control: gitlab
|
||||
src_repo: https://gitlab.gnome.org/GNOME/gtksourceviewmm/
|
||||
tag_prefix: "v"
|
||||
separator: "."
|
||||
Loading…
x
Reference in New Issue
Block a user