rpms/libzzub/F-7 libzzub-buildfix.patch, NONE, 1.1 libzzub-internalflacfix.patch, NONE, 1.1 libzzub-sonamefix.patch, NONE, 1.1 libzzub.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Alexander Kahl (akahl)
fedora-extras-commits at redhat.com
Mon Sep 17 07:53:59 UTC 2007
Author: akahl
Update of /cvs/pkgs/rpms/libzzub/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25390/F-7
Modified Files:
.cvsignore sources
Added Files:
libzzub-buildfix.patch libzzub-internalflacfix.patch
libzzub-sonamefix.patch libzzub.spec
Log Message:
initial import
libzzub-buildfix.patch:
--- NEW FILE libzzub-buildfix.patch ---
diff -up libzzub-0.2.3/SConstruct.buildfix libzzub-0.2.3/SConstruct
--- libzzub-0.2.3/SConstruct.buildfix 2007-09-11 21:51:01.000000000 +0200
+++ libzzub-0.2.3/SConstruct 2007-09-11 21:51:30.000000000 +0200
@@ -70,6 +70,7 @@ opts.Add("LUNARTARGET", 'Target for Luna
opts.Add("SSE", "Support SSE instructions", False, None, bool_converter)
opts.Add("SSE2", "Support SSE2 instructions", False, None, bool_converter)
opts.Add("MP3", "Support loading of MP3 samples", linux, None, bool_converter)
+opts.Add("JOBS", "Number of threads to compile with", '2')
env = Environment(ENV = os.environ, options=opts)
@@ -105,9 +106,12 @@ env['ROOTPATH'] = os.getcwd()
env.Append(CCFLAGS=['-D__SCONS__'])
env.Append(LIBPATH=['${ROOTPATH}/lib'])
+SetOption('num_jobs', env['JOBS'].replace('-j', ''))
+
if posix:
env.Append(CCFLAGS=[
'-DPOSIX',
+ '-fPIC',
])
env.Append(LINKFLAGS=[
'--rpath%s' % str(env.Dir('${PREFIX}${LIBDIR}')),
@@ -139,12 +143,8 @@ cl = env['CC'] == 'cl'
if gcc:
#env['CXXFLAGS'] += ['--no-rtti']
if env['DEBUG'] == False:
- env.Append(CCFLAGS=[
- '-O3',
- '-fomit-frame-pointer',
- '-funroll-loops',
- '-DNDEBUG',
- ])
+ env.Append(CCFLAGS=ARGUMENTS.get('CCFLAGS'))
+ env.Append(CCFLAGS=['-DNDEBUG'])
else:
env.Append(CCFLAGS=[
'-g',
@@ -152,19 +152,11 @@ if gcc:
'-D_DEBUG',
])
if env['SSE2'] == True:
- if not x86_64:
- env.Append(CCFLAGS=[
- '-march=i686',
- ])
env.Append(CCFLAGS=[
'-mfpmath=sse',
'-msse2',
])
elif env['SSE'] == True:
- if not x86_64:
- env.Append(CCFLAGS=[
- '-march=i686',
- ])
env.Append(CCFLAGS=[
'-mfpmath=sse',
'-msse',
libzzub-internalflacfix.patch:
--- NEW FILE libzzub-internalflacfix.patch ---
diff -up libzzub-0.2.3/src/libzzub/SConscript.internalflacfix libzzub-0.2.3/src/libzzub/SConscript
--- libzzub-0.2.3/src/libzzub/SConscript.internalflacfix 2007-09-11 23:40:04.000000000 +0200
+++ libzzub-0.2.3/src/libzzub/SConscript 2007-09-11 23:40:04.000000000 +0200
@@ -54,16 +54,8 @@ files = [
'input.cpp',
]
-# we build from our private flac,
-# since some are using 1.1.3, and that
-# one breaks a few things.
-localenv.Append(CPPPATH=[
- "${ROOTPATH}/src/flac/include"
-])
-localenv.Append(CCFLAGS=[
- '-DFLAC__NO_DLL',
-])
-env.SConscript("${ROOTPATH}/src/flac/src/libFLAC/SConscript")
+# use internal flac support
+localenv.ParseConfig('pkg-config --libs flac')
# minizip, zlib and flac dependencies
files += [
@@ -82,8 +74,8 @@ if win32:
])
localenv.Append(LIBS=[
- 'FLAC',
'z',
+ 'c',
])
localenv.Append(CCFLAGS=['-D_LIB','-D_LIBZZUB'])
diff -up libzzub-0.2.3/src/libzzub/ccm.cpp.internalflacfix libzzub-0.2.3/src/libzzub/ccm.cpp
--- libzzub-0.2.3/src/libzzub/ccm.cpp.internalflacfix 2007-09-11 23:40:04.000000000 +0200
+++ libzzub-0.2.3/src/libzzub/ccm.cpp 2007-09-11 23:40:38.000000000 +0200
@@ -1089,7 +1089,7 @@ bool CcmWriter::save(std::string fileNam
}
-static FLAC__StreamEncoderWriteStatus flac_stream_encoder_write_callback(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], unsigned bytes, unsigned samples, unsigned current_frame, void *client_data) {
+static FLAC__StreamEncoderWriteStatus flac_stream_encoder_write_callback(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], size_t bytes, unsigned samples, unsigned current_frame, void *client_data) {
StreamWriter* writer=(StreamWriter*)client_data;
writer->writeBytes(buffer, sizeof(FLAC__byte)*bytes);
@@ -1126,7 +1126,7 @@ struct DecoderInfo {
// buffer can hold. The callback may choose to supply less data and modify the byte count
// but must be careful not to overflow the buffer. The callback then returns a status code
// chosen from FLAC__StreamDecoderReadStatus.
-static FLAC__StreamDecoderReadStatus flac_stream_decoder_read_callback(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data) {
+static FLAC__StreamDecoderReadStatus flac_stream_decoder_read_callback(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data) {
DecoderInfo* info=(DecoderInfo*)client_data;
StreamReader* reader=info->reader;
@@ -1180,19 +1180,21 @@ void flac_stream_decoder_error_callback(
void decodeFLAC(StreamReader* reader, wave_info_ex& info, int level) {
FLAC__StreamDecoder* stream=FLAC__stream_decoder_new();
- FLAC__stream_decoder_set_read_callback(stream, flac_stream_decoder_read_callback);
- FLAC__stream_decoder_set_write_callback(stream, flac_stream_decoder_write_callback);
- FLAC__stream_decoder_set_metadata_callback(stream, flac_stream_decoder_metadata_callback);
- FLAC__stream_decoder_set_error_callback(stream, flac_stream_decoder_error_callback);
DecoderInfo decoder_info;
decoder_info.reader=reader;
- FLAC__stream_decoder_set_client_data(stream, &decoder_info);
+ //FLAC__stream_decoder_set_client_data(stream, &decoder_info);
// we're not intersted in meitadeita
FLAC__stream_decoder_set_metadata_ignore_all(stream);
- FLAC__stream_decoder_init(stream);
+ FLAC__stream_decoder_init_stream(stream,
+ flac_stream_decoder_read_callback,
+ NULL, NULL, NULL, NULL,
+ flac_stream_decoder_write_callback,
+ flac_stream_decoder_metadata_callback,
+ flac_stream_decoder_error_callback,
+ &decoder_info);
// FLAC__stream_decoder_process_single(stream);
FLAC__stream_decoder_process_until_end_of_stream(stream);
@@ -1255,11 +1257,16 @@ bool encodeFLAC(StreamWriter* writer, wa
FLAC__stream_encoder_set_bits_per_sample(stream, bps);
FLAC__stream_encoder_set_sample_rate(stream, sample_rate);
FLAC__stream_encoder_set_total_samples_estimate(stream, num_samples);
- FLAC__stream_encoder_set_write_callback(stream, flac_stream_encoder_write_callback);
- FLAC__stream_encoder_set_metadata_callback(stream, flac_stream_encoder_metadata_callback);
- FLAC__stream_encoder_set_client_data(stream, writer);
+ // FLAC__stream_encoder_set_write_callback(stream, flac_stream_encoder_write_callback);
+ // FLAC__stream_encoder_set_metadata_callback(stream, flac_stream_encoder_metadata_callback);
+ // FLAC__stream_encoder_set_client_data(stream, writer);
+
+ int result = FLAC__stream_encoder_init_stream(stream,
+ flac_stream_encoder_write_callback,
+ NULL,
+ NULL,
+ flac_stream_encoder_metadata_callback, writer);
- int result = FLAC__stream_encoder_init(stream);
// if this fails, we want it to crash hard - or else will cause dataloss
assert(result == FLAC__STREAM_ENCODER_OK);
libzzub-sonamefix.patch:
--- NEW FILE libzzub-sonamefix.patch ---
diff -up libzzub-0.2.3/src/libzzub/SConscript.sonamefix libzzub-0.2.3/src/libzzub/SConscript
--- libzzub-0.2.3/src/libzzub/SConscript.sonamefix 2007-02-01 04:11:33.000000000 +0100
+++ libzzub-0.2.3/src/libzzub/SConscript 2007-09-03 16:15:02.000000000 +0200
@@ -153,6 +153,10 @@ if posix:
'-DNEWBUFFER'
])
+ localenv.Append(LINKFLAGS=[
+ '-Wl,-soname,libzzub.so.0.2.3'
+ ])
+
elif win32:
localenv.Append(LIBS=[
'portmidi',
--- NEW FILE libzzub.spec ---
Name: libzzub
Version: 0.2.3
Release: 5%{?dist}
Summary: Powerful music sequencing library
Group: System Environment/Libraries
License: GPLv2+
URL: http://trac.zeitherrschaft.org/zzub/
Source0: %{name}-%{version}-fe.tar.bz2
# The original source code is from:
# http://downloads.sourceforge.net/aldrin/%{name}-%{version}.tar.bz2
#
# To comply with Fedora's Free Software Principles, MP3 support parts had to be
# removed:
# - src/libmad: completely removed
# - src/libzzub/libzzub.cpp: removed MP3 support part
Patch0: libzzub-buildfix.patch
Patch1: libzzub-sonamefix.patch
Patch2: libzzub-internalflacfix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ExcludeArch: ppc64
BuildRequires: scons >= 0.96.94
BuildRequires: zlib-devel
BuildRequires: libsndfile-devel >= 1.0.17
BuildRequires: jack-audio-connection-kit-devel
BuildRequires: alsa-lib-devel
BuildRequires: dos2unix
BuildRequires: flac-devel >= 1.1.4
Requires: libsndfile >= 1.0.17
%description
If you are searching for a foundation for your next Soundtracker, libzzub is
what you want. libzzub provides an extensible DSP plugin system, a
wavetable, instruments, a multitrack sequencer and support for major soundcard
APIs.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q
mac2unix SConstruct
%patch0 -p1 -b .buildfix
%patch1 -p1 -b .sonamefix
mac2unix src/libzzub/ccm.cpp src/libzzub/driver.cpp
%patch2 -p1 -b .internalflacfix
%build
find \
-regextype posix-egrep \
-regex '.*\.(h|html|c|cpp)' \
-exec mac2unix '{}' \; \
-exec chmod 644 '{}' \;
iconv --from-code=ISO-8859-1 --to-code=UTF-8 CREDITS.txt > CREDITS
%{__rm} CREDITS.txt
scons configure \
PREFIX=$RPM_BUILD_ROOT%{_prefix} \
LIBDIR=/%{_lib} \
DEBUG=false \
JOBS=%{?_smp_mflags} \
MP3=false
scons CCFLAGS="%{optflags}"
%install
%{__rm} -rf $RPM_BUILD_ROOT
scons install CCFLAGS="%{optflags}"
cd $RPM_BUILD_ROOT%{_docdir}
%{__mv} zzub %{name}-%{version}
%{__mkdir_p} %{name}-devel-%{version}/examples
cd %{name}-devel-%{version}/examples
%{__cp} -a $RPM_BUILD_ROOT%{_libdir}/lunar/fx/* .
%{__rm} -f */*.so
%{__rm} $RPM_BUILD_ROOT%{_libdir}/lunar/fx/*/*.{xml,cpp,h}
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc ChangeLog CREDITS LICENCE REVISION
%{_bindir}/ccmplayer
%{_libdir}/liblunarstd.so
%{_libdir}/*.so.*
%{_libdir}/zzub
%{_libdir}/lunar
%files devel
%defattr(-,root,root,-)
%{_includedir}/*
%{_libdir}/libzzub.so
%{_defaultdocdir}/%{name}-devel-%{version}
%changelog
* Thu Sep 13 2007 Alexander Kahl <akahl at iconmobile.com> - 0.2.3-5
- removed redundant explicit flac requirement
* Mon Sep 10 2007 Alexander Kahl <akahl at iconmobile.com> - 0.2.3-4
- fixed double source definition
- adapted modified source tarball w/ mp3 support removed
- added patch to use internal flac support
- removed INSTALL from %doc
- removed explicit python requirement
- replaced static rm commands with macros
* Mon Sep 10 2007 Alexander Kahl <akahl at iconmobile.com> - 0.2.3-3
- fixed redundant dependencies
- replaced occurence of /usr with prefix macro
- removed manual stripping of binaries
- fixed directory ownership issue
- fixed encoding of CREDITS file
- excluded arch ppc64 due to build failure
- replaced all space occurences with tabs
* Mon Sep 3 2007 Alexander Kahl <akahl at iconmobile.com> - 0.2.3-2
- added flag to remove mp3 support
* Sun Sep 2 2007 Alexander Kahl <akahl at iconmobile.com> - 0.2.3-1
- initial release
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/libzzub/F-7/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 14 Sep 2007 17:56:49 -0000 1.1
+++ .cvsignore 17 Sep 2007 07:53:27 -0000 1.2
@@ -0,0 +1 @@
+libzzub-0.2.3-fe.tar.bz2
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/libzzub/F-7/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 14 Sep 2007 17:56:49 -0000 1.1
+++ sources 17 Sep 2007 07:53:27 -0000 1.2
@@ -0,0 +1 @@
+e524a3cf16500849c988a702918fe33e libzzub-0.2.3-fe.tar.bz2
More information about the fedora-extras-commits
mailing list