rpms/vala/devel vala-0.1.5-gen-project.patch, NONE, 1.1 vala.spec, 1.18, 1.19

Michel Alexandre Salim (salimma) fedora-extras-commits at redhat.com
Tue Dec 4 22:29:09 UTC 2007


Author: salimma

Update of /cvs/pkgs/rpms/vala/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31041/devel

Modified Files:
	vala.spec 
Added Files:
	vala-0.1.5-gen-project.patch 
Log Message:
Backport autodetection of the location of automake shared files


vala-0.1.5-gen-project.patch:

--- NEW FILE vala-0.1.5-gen-project.patch ---
--- vala-0.1.5/gen-project/valaprojectgenerator.vala.orig	2007-11-25 11:50:25.000000000 -0500
+++ vala-0.1.5/gen-project/valaprojectgenerator.vala	2007-12-04 15:59:57.000000000 -0500
@@ -193,16 +193,24 @@
 			FileUtils.set_contents (project_path + "/po/ChangeLog", "", -1);
 
 			string s;
-			FileUtils.get_contents ("/usr/share/automake/INSTALL", out s);
-			FileUtils.set_contents (project_path + "/INSTALL", s, -1);
+			string automake_path = get_automake_path ();
+			if (automake_path != null) {
+				string install_filename = automake_path + "/INSTALL";
+				if (FileUtils.test (install_filename, FileTest.EXISTS)) {
+					FileUtils.get_contents (install_filename, out s);
+					FileUtils.set_contents (project_path + "/INSTALL", s, -1);
+				}
+			}
 
 			string license_filename = null;
 			if (project_license == ProjectLicense.GPL2) {
-				license_filename = "/usr/share/automake/COPYING";
+				if (automake_path != null) {
+					license_filename = automake_path + "/COPYING";
+				}
 			} else if (project_license == ProjectLicense.LGPL2) {
 				license_filename = "/usr/share/libtool/libltdl/COPYING.LIB";
 			}
-			if (license_filename != null) {
+			if (license_filename != null && FileUtils.test (license_filename, FileTest.EXISTS)) {
 				FileUtils.get_contents (license_filename, out s);
 				FileUtils.set_contents (project_path + "/COPYING", s, -1);
 			}
@@ -558,6 +566,20 @@
 		FileUtils.set_contents (project_path + "/MAINTAINERS", s, -1);
 	}
 
+	private string get_automake_path () {
+		var automake_paths = new string[] { "/usr/share/automake",
+		                                    "/usr/share/automake-1.10",
+		                                    "/usr/share/automake-1.9" };
+
+		foreach (string automake_path in automake_paths) {
+			if (FileUtils.test (automake_path, FileTest.IS_DIR)) {
+				return automake_path;
+			}
+		}
+
+		return null;
+	}
+
 	static void main (string[] args) {
 		Gtk.init (ref args);
 


Index: vala.spec
===================================================================
RCS file: /cvs/pkgs/rpms/vala/devel/vala.spec,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- vala.spec	4 Dec 2007 15:59:03 -0000	1.18
+++ vala.spec	4 Dec 2007 22:28:35 -0000	1.19
@@ -1,6 +1,6 @@
 Name:           vala
 Version:        0.1.5
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        A modern programming language for GNOME
 
 Group:          Development/Languages
@@ -8,10 +8,11 @@
 License:        LGPLv2+ and BSD
 URL:            http://live.gnome.org/Vala
 Source0:        http://download.gnome.org/sources/vala/0.1/vala-%{version}.tar.bz2
+Patch0:         vala-0.1.5-gen-project.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  gtk2-devel flex bison devhelp
-#Requires:       
+Requires:       gtk2-devel
 
 %description
 Vala is a new programming language that aims to bring modern programming
@@ -49,6 +50,8 @@
 Group:          Development/Languages
 License:        LGPLv2+
 Requires:       %{name} = %{version}-%{release}
+# automake should be pulled in by gtk2-devel
+#Requires:       automake
 Provides:       %{name}-vapigen = %{version}-%{release}
 Obsoletes:      %{name}-vapigen < %{version}-%{release}
 
@@ -79,6 +82,7 @@
 
 %prep
 %setup -q
+%patch0 -p1 -b .gen-project
 
 
 %build
@@ -130,6 +134,9 @@
 
 
 %changelog
+* Tue Dec  4 2007 Michel Salim <michel.sylvan at gmail.com> - 0.1.5-4
+- Backport patch to autodetect location of automake shared files
+
 * Tue Dec  4 2007 Michel Salim <michel.sylvan at gmail.com> - 0.1.5-3
 - Add build dependency on gtk2-devel
 




More information about the fedora-extras-commits mailing list