[calf] gcc-4.7 compile fix remove parts of the spec file that are no longer required by the guidelines

Orcan Ogetbil oget at fedoraproject.org
Tue Jan 10 01:55:17 UTC 2012


commit 4ad5c9aaba3fb9cc490e7e1aa7154e3f0d220b63
Author: Orcan Ogetbil <oget.fedora at gmail.com>
Date:   Mon Jan 9 20:55:15 2012 -0500

    gcc-4.7 compile fix
    remove parts of the spec file that are no longer required by the guidelines

 calf-gcc47.patch |   33 +++++++++++++++++++++++++++++++++
 calf.spec        |   17 ++++++++---------
 2 files changed, 41 insertions(+), 9 deletions(-)
---
diff --git a/calf-gcc47.patch b/calf-gcc47.patch
new file mode 100644
index 0000000..9f6e034
--- /dev/null
+++ b/calf-gcc47.patch
@@ -0,0 +1,33 @@
+diff -rupN calf-0.0.18.6.old/src/calf/benchmark.h calf-0.0.18.6/src/calf/benchmark.h
+--- calf-0.0.18.6.old/src/calf/benchmark.h	2010-08-22 17:25:15.000000000 -0400
++++ calf-0.0.18.6/src/calf/benchmark.h	2012-01-09 20:20:07.129170053 -0500
+@@ -24,6 +24,7 @@
+ #include <time.h>
+ #include <sys/time.h>
+ #include <sys/resource.h>
++#include <unistd.h>
+ #include "primitives.h"
+ #include <algorithm>
+ #include <typeinfo>
+diff -rupN calf-0.0.18.6.old/src/osctlnet.cpp calf-0.0.18.6/src/osctlnet.cpp
+--- calf-0.0.18.6.old/src/osctlnet.cpp	2010-08-22 17:25:15.000000000 -0400
++++ calf-0.0.18.6/src/osctlnet.cpp	2012-01-09 20:19:31.969352998 -0500
+@@ -23,6 +23,7 @@
+ #include <assert.h>
+ #include <arpa/inet.h>
+ #include <sys/socket.h>
++#include <unistd.h>
+ #include <stdlib.h>
+ #include <sstream>
+ #include <stdio.h>
+diff -rupN calf-0.0.18.6.old/src/preset.cpp calf-0.0.18.6/src/preset.cpp
+--- calf-0.0.18.6.old/src/preset.cpp	2010-08-22 17:25:15.000000000 -0400
++++ calf-0.0.18.6/src/preset.cpp	2012-01-09 20:19:47.025274677 -0500
+@@ -25,6 +25,7 @@
+ #include <errno.h>
+ #include <string.h>
+ #include <sys/stat.h>
++#include <unistd.h>
+ 
+ #include <expat.h>
+ #include <calf/preset.h>
diff --git a/calf.spec b/calf.spec
index 47331ca..9599dcc 100644
--- a/calf.spec
+++ b/calf.spec
@@ -1,6 +1,6 @@
 Name:		calf
 Version:	0.0.18.6
-Release:	4%{?dist}
+Release:	5%{?dist}
 Summary:	Audio plugins pack
 Group:		Applications/Multimedia
 # The jackhost code is GPLv2+ 
@@ -15,6 +15,8 @@ Source1:	%{name}-dssi.desktop
 # LV2: use correct LADSPA URIs
 # http://repo.or.cz/w/calf.git/commit/fb526c311c4ab401986b7d559d32732d6acd7cde
 Patch0:		%{name}.git-fb526c311c4ab401986b7d559d32732d6acd7cde.patch
+# Fix gcc-4.7 compilation error. Sent upstream via email
+Patch1:		calf-gcc47.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:	desktop-file-utils
@@ -80,6 +82,7 @@ This package contains DSSI synthesizers and effects, also GUI extensions.
 %prep
 %setup -q
 %patch0 -p1 -b .ladspa_uri
+%patch1 -p1 -b .gcc47
 
 # Make sure that optflags are not overriden.
 sed -i 's|-O3||' configure
@@ -96,7 +99,6 @@ make %{?_smp_mflags}
 
 
 %install
-rm -rf $RPM_BUILD_ROOT
 make install DESTDIR=$RPM_BUILD_ROOT
 
 # The Jack host
@@ -115,9 +117,6 @@ desktop-file-install \
 # We don't need this file:
 rm -f $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/icon-theme.cache
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
 %post
 touch --no-create %{_datadir}/icons/hicolor &>/dev/null
 update-mime-database %{_datadir}/mime &> /dev/null || :
@@ -134,7 +133,6 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 
 %files
-%defattr(-,root,root,-)
 %doc AUTHORS ChangeLog COPYING* README TODO
 %{_bindir}/%{name}jackhost
 %{_datadir}/applications/%{name}.desktop
@@ -144,22 +142,23 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %{_mandir}/man7/%{name}*
 
 %files -n ladspa-%{name}-plugins
-%defattr(-,root,root,-)
 %{_libdir}/ladspa/%{name}.so
 %{_datadir}/ladspa/rdf/%{name}.rdf
 
 %files -n lv2-%{name}-plugins
-%defattr(-,root,root,-)
 %{_libdir}/lv2/%{name}.lv2/
 
 %files -n dssi-%{name}-plugins
-%defattr(-,root,root,-)
 %{_bindir}/%{name}
 %{_datadir}/applications/%{name}-dssi.desktop
 %{_libdir}/dssi/%{name}/
 %{_libdir}/dssi/%{name}.so
 
 %changelog
+* Mon Jan 09 2012 Orcan Ogetbil <oget[DOT]fedora[AT]gmail[DOT]com> - 0.0.18.6-5
+- gcc-4.7 compile fix
+- remove parts of the spec file that are no longer required by the guidelines
+
 * Tue Dec 06 2011 Adam Jackson <ajax at redhat.com> - 0.0.18.6-4
 - Rebuild for new libpng
 


More information about the scm-commits mailing list