OBS User unknown 2007-01-23 00:13:25 +00:00 committed by Git OBS Bridge
parent d450890623
commit a97547cbc9
11 changed files with 96 additions and 293 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5b20bd5a97bf5ac7584b0fa786a2db1834ceac3b5000e157697c4a4ea1acb7b3
size 1116589

3
Csound5.04-src.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0d6c511f4e983b078e2c4787507b2594e625cbbf8895b2f2b9a87bef285a87be
size 11088842

View File

@ -1,13 +1,16 @@
Plugin Directories Plugin Directories
================== ==================
The plugin binaries are installed under /usr/lib/Csound The plugin binaries are installed under /usr/lib/csound/plugins
(/usr/lib64/Csound in x86_64). Please set the environment variable (/usr/lib64/csound/plugins in x86_64). Please set the environment variable
"OPCDIR" to this direcrory before starting csound. "OPCODEDIR" to this direcrory before starting csound.
in bash style, in bash style,
export OPCDIR=/usr/lib/Csound export OPCODEDIR=/usr/lib/csound/plugins
in tcsh style, in tcsh style,
setenv OPCDIR /usr/lib/Csound setenv OPCODEDIR /usr/lib/csound/plugins
Also, set CSSTRINGS variable such as
export CSSTRINGS=/usr/share/csound/xmg
Binary Renaming Binary Renaming

View File

@ -1,45 +0,0 @@
--- plugins/rtaudio/rtalsa.c-dist 2004-06-02 16:56:18.000000000 +0200
+++ plugins/rtaudio/rtalsa.c 2004-06-02 17:04:30.000000000 +0200
@@ -141,11 +141,9 @@ static void set_device_params(void *csou
}
dev->sample_size *= devParms->nChannels; /* correct sample size */
/* sample rate, */
- dev->srate =
- (int) snd_pcm_hw_params_set_rate_near(dev->handle, dev->hw_params,
- (int) (devParms->sampleRate + 0.5f),
- 0);
- if (dev->srate < 0) {
+ dev->srate = (int) (devParms->sampleRate + 0.5f);
+ if (snd_pcm_hw_params_set_rate_near(dev->handle, dev->hw_params,
+ &dev->srate, 0) < 0) {
ENGINE->Die(csound, Str("unable to set sample rate on soundcard"));
return;
}
@@ -157,10 +155,9 @@ static void set_device_params(void *csou
}
/* buffer size, */
n = devParms->hwBufSize;
- dev->buffer_smps = (snd_pcm_sframes_t)
- snd_pcm_hw_params_set_buffer_size_near(dev->handle, dev->hw_params,
- (snd_pcm_uframes_t) n);
- if (dev->buffer_smps <= (snd_pcm_sframes_t) 0) {
+ dev->buffer_smps = n;
+ if (snd_pcm_hw_params_set_buffer_size_near(dev->handle, dev->hw_params,
+ &dev->buffer_smps) < 0) {
ENGINE->Die(csound,
Str("failed while trying to set soundcard DMA buffer size"));
return;
@@ -173,10 +170,9 @@ static void set_device_params(void *csou
}
/* and period size */
n = devParms->swBufSize;
- dev->period_smps = (snd_pcm_sframes_t)
- snd_pcm_hw_params_set_period_size_near(dev->handle, dev->hw_params,
- (snd_pcm_uframes_t) n, &dir);
- if (dev->period_smps <= 0) {
+ dev->period_smps = n;
+ if (snd_pcm_hw_params_set_period_size_near(dev->handle, dev->hw_params,
+ &dev->period_smps, &dir) < 0) {
ENGINE->Die(csound,
Str("error setting period time for real-time audio"));
return;

12
csound-alsa-fix.diff Normal file
View File

@ -0,0 +1,12 @@
--- InOut/rtalsa.c-dist 2007-01-22 11:31:00.000000000 +0100
+++ InOut/rtalsa.c 2007-01-22 11:31:28.000000000 +0100
@@ -27,6 +27,9 @@
#ifndef _POSIX_SOURCE
#define _POSIX_SOURCE 1
#endif
+#ifndef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 1
+#endif
#ifndef _BSD_SOURCE
#define _BSD_SOURCE 1
#endif

View File

@ -1,11 +0,0 @@
--- sread.c
+++ sread.c
@@ -465,7 +465,7 @@
c = getscochar(1);
continue;
default:
- printf("read %c(%.2x)\n", c);
+ printf("read %c(%.2x)\n", c, c);
printf(Str("Incorrect evaluation\n"));
longjmp(exitjmp,1);
}

View File

@ -1,151 +0,0 @@
--- one_file.c-dist 2003-07-28 13:23:59.878487232 +0200
+++ one_file.c 2003-07-28 15:31:26.337048840 +0200
@@ -200,12 +200,16 @@
static int createOrchestra(FILE *unf)
{
char *p;
+ int fd;
FILE *orcf;
- tmpnam(orcname); /* Generate orchestra name */
- if ((p=strchr(orcname, '.')) != NULL) *p='\0'; /* with extention */
- strcat(orcname, ".orc");
- orcf = fopen(orcname, "w");
+ /* Generate orchestra name */
+ strcpy(orcname, "/tmp/csoundXXXXXX.orc");
+ if ((fd = mkstemp(orcname)) < 0) {
+ perror(Str("Failed to create\n"));
+ longjmp(exitjmp,1);
+ }
+ orcf = fdopen(fd, "w");
printf(Str("Creating %s (%p)\n"), orcname, orcf);
if (orcf==NULL){
perror(Str("Failed to create\n"));
@@ -219,6 +223,7 @@
}
else fputs(buffer, orcf);
}
+ fclose(orcf);
return FALSE;
}
@@ -226,13 +231,15 @@
static int createScore(FILE *unf)
{
char *p;
+ int fd;
FILE *scof;
- tmpnam(sconame); /* Generate score name */
- if ((p=strchr(sconame, '.')) != NULL) *p='\0'; /* with extention */
- strcat(sconame, ".sco");
- scof = fopen(sconame, "w");
- /*RWD 3:2000*/
+ /* Generate score name */
+ strcpy(sconame, "/tmp/csoundXXXXXX.sco");
+ if ((fd = mkstemp(orcname)) < 0)
+ return FALSE;
+ scof = fdopen(fd, "w");
+ /*RWD 3:2000*/
if (scof==NULL)
return FALSE;
@@ -244,6 +251,7 @@
}
else fputs(buffer, scof);
}
+ fclose(scof);
return FALSE;
}
@@ -251,16 +259,17 @@
{
int size;
char *p;
+ int fd;
FILE *midf;
int c;
- if (tmpnam(midname)==NULL) { /* Generate MIDI file name */
+ /* Generate MIDI file name */
+ strcpy(midname, "/tmp/csoundXXXXXX.mid");
+ if ((fd = mkstemp(midname)) < 0) {
printf(Str("Cannot create temporary file for MIDI subfile\n"));
longjmp(exitjmp,1);
}
- if ((p=strchr(midname, '.')) != NULL) *p='\0'; /* with extention */
- strcat(midname, ".mid");
- midf = fopen(midname, "wb");
+ midf = fdopen(fd, "wb");
if (midf==NULL) {
printf(Str("Cannot open temporary file (%s) for MIDI subfile\n"), midname);
longjmp(exitjmp,1);
@@ -333,15 +342,16 @@
static int createMIDI2(FILE *unf)
{
char *p;
+ int fd;
FILE *midf;
- if (tmpnam(midname)==NULL) { /* Generate MIDI file name */
+ /* Generate MIDI file name */
+ strcpy(midname, "/tmp/csoundXXXXXX.mid");
+ if ((fd = mkstemp(midname)) < 0) {
printf(Str("Cannot create temporary file for MIDI subfile\n"));
longjmp(exitjmp,1);
}
- if ((p=strchr(midname, '.')) != NULL) *p='\0'; /* with extention */
- strcat(midname, ".mid");
- midf = fopen(midname, "wb");
+ midf = fdopen(fd, "wb");
if (midf==NULL) {
printf(Str("Cannot open temporary file (%s) for MIDI subfile\n"),
midname);
--- csmain.c-dist 2003-07-28 13:23:06.867546120 +0200
+++ csmain.c 2003-07-28 15:15:50.720284208 +0200
@@ -407,10 +407,13 @@
FILE *scof;
extern char sconame[];
void deleteScore(void);
- tmpnam(sconame); /* Generate score name */
- if ((p=strchr(sconame, '.')) != NULL) *p='\0'; /* with extention */
- strcat(sconame, ".sco");
- scof = fopen(sconame, "w");
+ int fd;
+ /* Generate score name */
+ strcpy(sconame, "/tmp/csoundXXXXXX.sco");
+ fd = mkstemp(sconame);
+ if (fd < 0)
+ dieu(Str("cannot create temp file"));
+ scof = fdopen(fd, "w");
fprintf(scof, "f0 86400\n");
fclose(scof);
scorename = sconame;
@@ -498,7 +501,12 @@
scorename = "score.srt";
}
else {
- scorename = tmpnam(scnm);
+ int fd;
+ strcpy(scnm, "/tmp/csoundXXXXXX");
+ if ((fd = mkstemp(scnm)) < 0)
+ dieu(Str("cannot create temp file"));
+ close(fd);
+ scorename = scnm;
add_tmpfile(scorename); /* IV - Oct 31 2002 */
}
}
@@ -531,7 +539,12 @@
playscore = sortedscore = "score.srt";
}
else {
- playscore = sortedscore = tmpnam(nme);
+ int fd;
+ strcpy(nme, "/tmp/csoundXXXXXX");
+ if ((fd = mkstemp(nme)) < 0)
+ dieu(Str("cannot create temp file"));
+ close(fd);
+ playscore = sortedscore = nme;
add_tmpfile(playscore); /* IV - Oct 31 2002 */
}
if (!(scorin = fopen(scorename, "r"))) /* else sort it */

24
csound-tmpnam-fix.diff Normal file
View File

@ -0,0 +1,24 @@
--- Top/one_file.c-dist 2006-10-13 12:31:47.000000000 +0200
+++ Top/one_file.c 2007-01-22 12:06:54.000000000 +0100
@@ -24,6 +24,7 @@
#include "csoundCore.h"
#include <ctype.h>
#include <errno.h>
+#include <stdlib.h>
#if defined(LINUX) || defined(__MACH__) || defined(WIN32)
# include <sys/types.h>
# include <sys/stat.h>
@@ -74,8 +75,11 @@ CS_NOINLINE char *csoundTmpFileName(CSOU
do {
#endif
#ifndef WIN32
- if (tmpnam(buf) == NULL)
- csound->Die(csound, Str(" *** cannot create temporary file"));
+ int fd;
+ strcpy(buf, "/tmp/csoundXXXXXX");
+ if ((fd = mkstemp(buf)) < 0)
+ csound->Die(csound, Str(" *** cannot create temporary file"));
+ close(fd);
#else
{
char *s = (char*) csoundGetEnv(csound, "SFDIR");

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jan 22 13:11:02 CET 2007 - tiwai@suse.de
- major update to version 5.04
(not built with fltk due to lack of threading support)
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Mar 27 18:54:23 CEST 2006 - pth@suse.de Mon Mar 27 18:54:23 CEST 2006 - pth@suse.de

View File

@ -1,51 +0,0 @@
--- Makefile.defs-dist 2003-07-28 12:27:26.000000000 +0200
+++ Makefile.defs 2003-07-30 12:48:06.000000000 +0200
@@ -10,7 +10,7 @@
# -----------------------------------------------------------------------------
# installation directories
-INSTDIR = /usr/local
+INSTDIR = /usr
BINDIR = $(INSTDIR)/bin
LIBDIR = $(INSTDIR)/lib
@@ -62,8 +62,8 @@
CXX = g++
LD = gcc
AR = ar rc
-MAKEDLL_L = ld -E -s -shared -O1
-MAKEDLL_P = ld -E -s -shared -O1
+MAKEDLL_L = g++ -shared -O1
+MAKEDLL_P = g++ -shared -O1
RANLIB = ranlib
# -----------------------------------------------------------------------------
@@ -150,7 +150,7 @@
# C++ compiler flags
CXXFLAGS = $(CFLAGS) $(C_FLAGS) -fno-exceptions -fno-rtti \
- -fno-unroll-loops -I/usr/local/FLTK-1.1.0/Linux/include
+ -fno-unroll-loops `fltk-config --cxxflags`
# `fltk-config --cxxflags` try adding this if the compilation of
# FLTK widgets stops with error messages
# related to not finding include files
@@ -164,8 +164,8 @@
# source and object files for FLTK widgets
# FLTKLIB = -lfltk -lpthread -lstdc++
-# FLTKLIB = `fltk-config --libs`
-FLTKLIB = /usr/local/FLTK-1.1.0/Linux/lib/libfltk.a \
+FLTKLIB = `fltk-config --libs` -lstdc++
+# FLTKLIB = /usr/local/FLTK-1.1.0/Linux/lib/libfltk.a \
/usr/local/gcc-3.2.2/lib/libstdc++.a
# libraries required by widgets.cpp
# -lfltk -lpthread -lstdc++ use dynamic libraries
@@ -211,7 +211,7 @@
# winFLTK.o and FL_graph.o for `improved' X graphics
# otherwise leave empty
-WINLIBS = -L/usr/X11R6/lib -lX11
+WINLIBS = -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11
# ;window system libraries
# -lX11 for X window calls
# -L/usr/lib/X11R4 for HP X11 library, v.4

View File

@ -1,7 +1,7 @@
# #
# spec file for package csound (Version 4.24.1) # spec file for package csound (Version 5.04)
# #
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine # This file and all modifications and additions to the pristine
# package are under the same license as the package itself. # package are under the same license as the package itself.
# #
@ -11,19 +11,23 @@
# norootforbuild # norootforbuild
Name: csound Name: csound
BuildRequires: alsa-devel fltk-devel gcc-c++ tk-devel xorg-x11-devel %define support_fltk 0
BuildRequires: alsa-devel fluidsynth-devel gcc-c++ jack-devel liblo-devel libsndfile-devel portaudio-devel python-devel scons swig
%if %support_fltk
BuildRequires: fltk-devel libjpeg-devel libpng-devel xorg-x11-devel
%endif
Summary: Computer Sound Synthesis and Composition Program Summary: Computer Sound Synthesis and Composition Program
Version: 4.24.1 Version: 5.04
Release: 228 Release: 1
License: LGPL License: GNU Library General Public License v. 2.0 and 2.1 (LGPL)
Group: Productivity/Multimedia/Sound/Utilities Group: Productivity/Multimedia/Sound/Utilities
Source: Csound-%{version}.tar.bz2 Source: Csound%{version}-src.tar.bz2
Source1: README.SuSE Source1: README.SuSE
Patch: csound.dif Patch: csound-alsa-fix.diff
Patch1: csound-tmpnam-fix.dif Patch1: csound-tmpnam-fix.diff
Patch2: csound-alsa-fix.dif
Patch3: csound-printf-fix.dif
URL: http://www.csounds.com URL: http://www.csounds.com
Autoreq: on
Autoprov: off
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
@ -35,28 +39,36 @@ For detailed information, refer to http://www.csounds.com.
%prep %prep
%setup -n Csound-%{version} %setup -n csound5
cp %{SOURCE1} .
%patch %patch
%patch1 %patch1
%patch2 cp %{SOURCE1} .
%patch3 # fix encoding
iconv -f latin1 -t utf8 readme-csound5.txt > readme-csound5.txt.utf8
mv readme-csound5.txt.utf8 readme-csound5.txt
%build %build
make C_FLAGS="$RPM_OPT_FLAGS" LIBDIR='$(INSTDIR)/'%_lib PLGNDIR='$(LIBDIR)/Csound' %if %_lib == "lib64"
args="Word64=1"
%else
args=""
%endif
scons PREFIX=%{_prefix} $args \
customCCFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
customCXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%install %install
[ "$RPM_BUILD_ROOT" != "/" -a -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT %if %_lib == "lib64"
make install INSTDIR=$RPM_BUILD_ROOT%{_prefix} LIBDIR='$(INSTDIR)/'%_lib PLGNDIR='$(LIBDIR)/Csound' args="--word64"
# strip setuid bit for security reason %else
chmod 755 $RPM_BUILD_ROOT%{_bindir}/* args=""
# rename sndinfo to csndinfo %endif
./install.py --prefix=%{_prefix} --instdir="$RPM_BUILD_ROOT" $args
rm -f $RPM_BUILD_ROOT%{_prefix}/csound5-*.md5sums
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/csound
# rename conflicting binary names
mv $RPM_BUILD_ROOT%{_bindir}/sndinfo $RPM_BUILD_ROOT%{_bindir}/csndinfo mv $RPM_BUILD_ROOT%{_bindir}/sndinfo $RPM_BUILD_ROOT%{_bindir}/csndinfo
# rename extract to csound-extract
mv $RPM_BUILD_ROOT%{_bindir}/extract $RPM_BUILD_ROOT%{_bindir}/csound-extract mv $RPM_BUILD_ROOT%{_bindir}/extract $RPM_BUILD_ROOT%{_bindir}/csound-extract
# clean up unused directories
rmdir $RPM_BUILD_ROOT/usr/share
rmdir $RPM_BUILD_ROOT/usr/man
%clean %clean
[ "$RPM_BUILD_ROOT" != "/" -a -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT [ "$RPM_BUILD_ROOT" != "/" -a -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT
@ -69,13 +81,17 @@ rmdir $RPM_BUILD_ROOT/usr/man
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%doc COPYING ChangeLog INSTALL readme-csound5.txt README.SuSE
%{_bindir}/* %{_bindir}/*
%{_includedir}/* %{_includedir}/*
%{_libdir}/lib* %{_libdir}/lib*
%{_libdir}/Csound %{_libdir}/csound
%doc doc %{_datadir}/csound
%changelog -n csound %changelog -n csound
* Mon Jan 22 2007 - tiwai@suse.de
- major update to version 5.04
(not built with fltk due to lack of threading support)
* Mon Mar 27 2006 - pth@suse.de * Mon Mar 27 2006 - pth@suse.de
- Add missing parameter in printf call (bug #129676). - Add missing parameter in printf call (bug #129676).
* Wed Jan 25 2006 - mls@suse.de * Wed Jan 25 2006 - mls@suse.de