diff --git a/vala-0.1.5-gen-project.patch b/vala-0.1.5-gen-project.patch new file mode 100644 index 0000000..2a1b96f --- /dev/null +++ b/vala-0.1.5-gen-project.patch @@ -0,0 +1,52 @@ +--- 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); + diff --git a/vala.spec b/vala.spec index 28d98a3..7856be6 100644 --- a/vala.spec +++ b/vala.spec @@ -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 @@ Group: Development/Languages 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 @@ Summary: Tools for creating projects and bindings for %{name} 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 @@ This package contains documentation in a devhelp HTML book. %prep %setup -q +%patch0 -p1 -b .gen-project %build @@ -130,6 +134,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Dec 4 2007 Michel Salim - 0.1.5-4 +- Backport patch to autodetect location of automake shared files + * Tue Dec 4 2007 Michel Salim - 0.1.5-3 - Add build dependency on gtk2-devel