diff --git a/.gitignore b/.gitignore index 6fe792f..93b9fe9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/valencia-0.3.0-e8a0f500555be.tar.xz +/valencia-0.3.0-97087fc.tar.xz diff --git a/gedit-valencia.spec b/gedit-valencia.spec index 0a0fdfa..6b489e6 100644 --- a/gedit-valencia.spec +++ b/gedit-valencia.spec @@ -9,12 +9,13 @@ %global debug_package %{nil} %global major_ver 0.3 -%global commit_hash e8a0f500555be -%global alphatag 20120430git%{commit_hash} +# git rev-parse --short ... +%global commit_hash 97087fc +%global alphatag 20120919git%{commit_hash} Name: gedit-valencia Version: %{major_ver}.0 -Release: 13.%{alphatag}%{?dist} +Release: 14.%{alphatag}%{?dist} Summary: A gedit plugin providing lightweight Vala IDE Group: Development/Tools @@ -23,11 +24,20 @@ URL: http://yorba.org/valencia # git archive --format=tar --prefix=valencia-%%{version}-%%{commit_hash}/ %%{commit_hash} | xz > ../valencia-%%{version}-%%{commit_hash}.tar.xz Source0: valencia-%{version}-%{commit_hash}.tar.xz #Source0: http://yorba.org/download/valencia/%{major_ver}/valencia-%{version}.tar.bz2 +%if 0%{?fedora} > 18 +Patch0: valencia-Compile-against-Vala-API-level-0.20.patch +%endif +# http://redmine.yorba.org/issues/6505 +Patch1: valencia-Replace-the-deprecated-Gedit.App.get_default-removed.patch BuildRequires: pkgconfig(gedit) BuildRequires: pkgconfig(gee-1.0) BuildRequires: pkgconfig(gtksourceview-3.0) +%if 0%{?fedora} > 18 +BuildRequires: pkgconfig(libvala-0.20) +%else BuildRequires: pkgconfig(libvala-0.18) +%endif BuildRequires: pkgconfig(vte-2.90) Requires: gedit >= %{gedit_version} @@ -41,6 +51,10 @@ suggestions by invoking autocomplete in the appropriate context. %prep %setup -q -n valencia-%{version}-%{commit_hash} +%if 0%{?fedora} > 18 +%patch0 -p1 -b .vala20 +%endif +%patch1 -p1 -b .gedit38 %build @@ -74,6 +88,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sun Mar 17 2013 Michel Salim - 0.3.0-14.20120919git97087fc +- Update to fix build problems with newer Vala versions + * Wed Feb 13 2013 Fedora Release Engineering - 0.3.0-13.20120430gite8a0f500555be - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild diff --git a/sources b/sources index 4b7a72b..ed1e2cb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a5becf5e87b823fb5ee6a83ee87427e7 valencia-0.3.0-e8a0f500555be.tar.xz +e44803affb41f93af05ec365c622e8d3 valencia-0.3.0-97087fc.tar.xz diff --git a/valencia-Compile-against-Vala-API-level-0.20.patch b/valencia-Compile-against-Vala-API-level-0.20.patch new file mode 100644 index 0000000..926ffde --- /dev/null +++ b/valencia-Compile-against-Vala-API-level-0.20.patch @@ -0,0 +1,33 @@ +From d2dce4a4e1e3bf8b16c33df7218f36835c69ed9d Mon Sep 17 00:00:00 2001 +From: Michel Alexandre Salim +Date: Sat, 9 Mar 2013 12:45:40 +0700 +Subject: [PATCH] Compile against Vala API level 0.20 + +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 9ba2023..8899e84 100644 +--- a/Makefile ++++ b/Makefile +@@ -9,14 +9,14 @@ SOURCES = autocomplete.vala browser.vala expression.vala gtk_util.vala parser.va + scanner.vala settings.vala util.vala valencia.vala + + PACKAGES = --pkg gedit --pkg gee-1.0 --pkg gtk+-3.0 --pkg gtksourceview-3.0 \ +- --pkg libpeas-1.0 --pkg libvala-0.18 --pkg vte-2.90 ++ --pkg libpeas-1.0 --pkg libvala-0.20 --pkg vte-2.90 + + PACKAGE_VERSIONS = \ + gedit >= 2.91.0 \ + gee-1.0 >= 0.1.3 \ + gtksourceview-3.0 >= 3.0.0 \ + gtk+-3.0 >= 3.0.0 \ +- libvala-0.18 >= 0.17.1 \ ++ libvala-0.20 >= 0.17.1 \ + vte-2.90 >= 0.27.90 + + OUTPUTS = libvalencia.so valencia.plugin +-- +1.8.1.4 + diff --git a/valencia-Replace-the-deprecated-Gedit.App.get_default-removed.patch b/valencia-Replace-the-deprecated-Gedit.App.get_default-removed.patch new file mode 100644 index 0000000..cac9430 --- /dev/null +++ b/valencia-Replace-the-deprecated-Gedit.App.get_default-removed.patch @@ -0,0 +1,50 @@ +From b04473ff020faf2c00f0a356c616cd78996b13eb Mon Sep 17 00:00:00 2001 +From: Michel Alexandre Salim +Date: Sat, 16 Mar 2013 20:31:15 +0700 +Subject: [PATCH] Replace the deprecated Gedit.App.get_default (removed from + Gedit 3.7.x), with Application.get_default + +--- + gtk_util.vala | 3 ++- + valencia.vala | 4 ++-- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/gtk_util.vala b/gtk_util.vala +index e57f47e..0318802 100644 +--- a/gtk_util.vala ++++ b/gtk_util.vala +@@ -521,7 +521,8 @@ string? document_filename(Gedit.Document document) { + Gedit.Tab? find_tab(string filename, out Gedit.Window window) { + File location = File.new_for_path(filename); + +- foreach (Gedit.Window w in Gedit.App.get_default().get_windows()) { ++ foreach (Gtk.Window gtk_w in ((Gedit.App)Application.get_default()).get_windows()) { ++ Gedit.Window w = (Gedit.Window)gtk_w; + Gedit.Tab tab = w.get_tab_from_location(location); + if (tab != null) { + window = w; +diff --git a/valencia.vala b/valencia.vala +index 4356c8c..2a05513 100644 +--- a/valencia.vala ++++ b/valencia.vala +@@ -738,7 +738,7 @@ public class Instance : Peas.ExtensionBase, Gedit.WindowActivatable { + } + + void on_build() { +- foreach (Gedit.Document d in Gedit.App.get_default().get_documents()) ++ foreach (Gedit.Document d in ((Gedit.App)Application.get_default()).get_documents()) + if (!d.is_untitled() && d.get_modified()) { + ++saving; + Signal.connect(d, "saved", (Callback) saved_callback, this); +@@ -916,7 +916,7 @@ public class Instance : Peas.ExtensionBase, Gedit.WindowActivatable { + public void reparse_modified_documents(string filename) { + Program program = Program.find_containing(filename, true); + +- foreach (Gedit.Document document in Gedit.App.get_default().get_documents()) { ++ foreach (Gedit.Document document in ((Gedit.App)Application.get_default()).get_documents()) { + assert(documents_modified_state.has_key(document)); + bool previously_modified = documents_modified_state.get(document); + bool currently_modified = document.get_modified(); +-- +1.8.1.4 +