Changes of Revision 2

gnaural.spec Changed
x
 
1
@@ -22,8 +22,10 @@
2
 Summary:        An opensource binaural-beat generator
3
 License:        GPL-2.0+
4
 Group:          Productivity/Multimedia/Sound/Utilities
5
+ExclusiveArch:  x86_64
6
 Url:            http://gnaural.sourceforge.net
7
 Source0:        http://downloads.sourceforge.net/project/gnaural/Gnaural/%{name}-%{version}.tar.gz
8
+Patch0:         gnaural.patch
9
 BuildRequires:  fdupes
10
 BuildRequires:  pkgconfig
11
 BuildRequires:  portaudio-devel
12
@@ -33,8 +35,8 @@
13
 BuildRequires:  pkgconfig(sndfile)
14
 BuildRequires:  hicolor-icon-theme
15
 BuildRequires:  update-desktop-files
16
-Provides:       %{name}2 = %{version}
17
-Obsoletes:      %{name}2 < %{version}
18
+Provides:       %{name}2 = %{version}-%{release}
19
+Obsoletes:      %{name}2 < %{version}-%{release}
20
 
21
 %description
22
 Gnaural is an audio synthesizer intended for use as a binaural beat
23
@@ -45,15 +47,12 @@
24
 frequencies, as well as in their volume and stereo positioning.
25
 
26
 %prep
27
-%setup -q
28
+%autosetup -p1
29
 
30
 %build
31
-# add -fgnu89-inline flag to build with gcc5
32
-%if 0%{?suse_version} > 1320   
33
-export CFLAGS="%{optflags} -fgnu89-inline"
34
-%endif
35
+CFLAGS='%{optflags} -fgnu89-inline -Wno-deprecated-declarations'
36
 %configure
37
-make %{?_smp_mflags}
38
+%make_build
39
 
40
 %install
41
 %make_install INSTALL="install -p"
42
@@ -69,18 +68,14 @@
43
 %fdupes -s %{buildroot}%{_datadir}
44
 
45
 %post
46
-%if 0%{?suse_version} >= 1140  
47
 %icon_theme_cache_post
48
-%endif
49
 
50
 %postun
51
-%if 0%{?suse_version} >= 1140
52
 %icon_theme_cache_postun
53
-%endif
54
 
55
 %files
56
-%defattr(-,root,root)
57
-%doc AUTHORS ChangeLog COPYING NEWS README
58
+%doc README
59
+%license COPYING
60
 %{_bindir}/%{name}
61
 %{_datadir}/%{name}
62
 %{_datadir}/pixmaps/%{name}.xpm
63
gnaural.patch Added
88
 
1
@@ -0,0 +1,86 @@
2
+--- a/src/BinauralBeat.h
3
++++ b/src/BinauralBeat.h
4
+@@ -166,7 +166,7 @@ int BB_SetupVoice (int VoiceID, // Array
5
+                    int mute,    //TRUE or FALSE
6
+                    int mono,    //TRUE or FALSE [added 20100614]
7
+                    int NumberOfEvents); //how many events in your array
8
+-void (*BB_UserFunc) (int voice);
9
++extern void (*BB_UserFunc) (int voice);
10
+ void BB_Water (int voice, short *array, int arraylen, float Lowcut);
11
+ short *BB_WaterInit (int arraylen, float pitch);
12
+ void BB_WaterVoiceInit (int voice);
13
+--- a/src/gnauralXML.c
14
++++ b/src/gnauralXML.c
15
+@@ -216,7 +216,7 @@ int gxml_XMLEventDataParser (const gchar
16
+  {
17
+   //must add 1, because 0 would look to Restore() like a NULL pointer:
18
+   SG_UndoRedo.DPdata[internal_EntryCount].parent =
19
+-   (void *) (atoi (Value) + 1);
20
++   (void *) (atol (Value) + 1);
21
+   SG_DBGOUT_PNT ("parent:", SG_UndoRedo.DPdata[internal_EntryCount].parent);
22
+   return 0;
23
+  }
24
+--- a/src/gnauralnet.h
25
++++ b/src/gnauralnet.h
26
+@@ -230,7 +230,7 @@ void GN_Time_ProcessOutgoingData (GN_Fri
27
+ void GN_ShowInfo ();
28
+ 
29
+ //Global variables:
30
+-unsigned short GN_ScheduleFingerprint;
31
++extern unsigned short GN_ScheduleFingerprint;
32
+ typedef struct GN_Globals_type
33
+ {
34
+  int State;                     //DO NOT MOVE THIS; it gets initialized in gnauralnet_main
35
+--- a/src/gnauralnet_main.c
36
++++ b/src/gnauralnet_main.c
37
+@@ -103,7 +103,7 @@ int GN_start (int (*main_loop_func) (voi
38
+   GN_ProcessIncomingData = incoming_data_func;
39
+  }
40
+ 
41
+- GN_DBGOUT_INT ("Size of GN_CommBuffer:", sizeof (GN_CommBuffer));
42
++ GN_DBGOUT_INT ("Size of GN_CommBuffer:", (int)sizeof (GN_CommBuffer));
43
+  //init network:
44
+  if (GN_init () != 0)
45
+  {
46
+--- a/src/main.c
47
++++ b/src/main.c
48
+@@ -4447,7 +4447,7 @@ int main_LoadSoundFile_shorts
49
+  SG_DBGOUT_INT ("readcount: ", readcount);
50
+  SG_DBGOUT_INT ("framecount: ", (int) sfinfo.frames);
51
+  SG_DBGOUT_INT ("array sizeof (bytes):",
52
+-                ((int) sfinfo.frames) * sizeof (short) * 2);
53
++                ((int) sfinfo.frames) * (int)sizeof (short) * 2);
54
+  SG_DBGOUT_INT ("array elements: (shorts)", (*size));
55
+  return 0;      //success
56
+  //  Gnaural.wav
57
+@@ -4515,7 +4515,7 @@ int main_LoadSoundFile (char *filename,
58
+  SG_DBGOUT_INT ("readcount: ", readcount);
59
+  SG_DBGOUT_INT ("framecount: ", (int) sfinfo.frames);
60
+  SG_DBGOUT_INT ("array sizeof (bytes):",
61
+-                ((int) sfinfo.frames) * sizeof (int));
62
++                ((int) sfinfo.frames) * (int)sizeof (int));
63
+  SG_DBGOUT_INT ("array elements: (shorts)", (*size));
64
+  return 0;      //success
65
+ }
66
+--- a/src/net/MakeLand.h
67
++++ b/src/net/MakeLand.h
68
+@@ -31,13 +31,13 @@
69
+  //regardless of mask. 021102
70
+ 
71
+ #define ML_SHIFT 10
72
+-int *MakeLand_bmpHeights;
73
+-int *MakeLand_bmpColors;
74
+-int MakeLand_Width;
75
+-int MakeLand_Height;
76
+-int MakeLand_InternallyGeneratedBitapsFlag;
77
++extern int *MakeLand_bmpHeights;
78
++extern int *MakeLand_bmpColors;
79
++extern int MakeLand_Width;
80
++extern int MakeLand_Height;
81
++extern int MakeLand_InternallyGeneratedBitapsFlag;
82
+ typedef int (*MAKELAND_USER_CALLBACK) (int message);    //declaration usage: USER_CALLBACK pUserCallback;
83
+-MAKELAND_USER_CALLBACK MakeLand_UserCallback;
84
++extern MAKELAND_USER_CALLBACK MakeLand_UserCallback;
85
+ 
86
+  /////////////////////////////
87
+  //creates the color and heights bitmap:
88