summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2012-08-07 02:33:07 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2012-08-07 02:33:07 +0000
commit26d7866cd8814b5769ea9282369caeaadc9f8a80 (patch)
tree4293824ea3c0deccb9e4c4eb70179257ca5c6203 /sci-visualization
parentStable arm, bug #419269 (diff)
downloadhistorical-26d7866cd8814b5769ea9282369caeaadc9f8a80.tar.gz
historical-26d7866cd8814b5769ea9282369caeaadc9f8a80.tar.bz2
historical-26d7866cd8814b5769ea9282369caeaadc9f8a80.zip
Fixed for reading RIFF/WAV files on amd64, thanks to Ilya Gordeev, bug #428644
Package-Manager: portage-2.2.01.20796-prefix/cvs/Linux x86_64
Diffstat (limited to 'sci-visualization')
-rw-r--r--sci-visualization/spectromatic/ChangeLog8
-rw-r--r--sci-visualization/spectromatic/Manifest24
-rw-r--r--sci-visualization/spectromatic/files/spectromatic-1.0-gentoo.diff23
-rw-r--r--sci-visualization/spectromatic/files/spectromatic-1.0-makefile.patch5
-rw-r--r--sci-visualization/spectromatic/files/spectromatic-1.0-waveheaderstruct-amd64.patch103
-rw-r--r--sci-visualization/spectromatic/spectromatic-1.0-r2.ebuild14
6 files changed, 139 insertions, 38 deletions
diff --git a/sci-visualization/spectromatic/ChangeLog b/sci-visualization/spectromatic/ChangeLog
index 4c763c072f61..21f62209cc23 100644
--- a/sci-visualization/spectromatic/ChangeLog
+++ b/sci-visualization/spectromatic/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sci-visualization/spectromatic
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-visualization/spectromatic/ChangeLog,v 1.11 2012/05/04 08:07:00 jdhore Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-visualization/spectromatic/ChangeLog,v 1.12 2012/08/07 02:33:07 bicatali Exp $
+
+ 07 Aug 2012; SĂ©bastien Fabbro <bicatali@gentoo.org>
+ +files/spectromatic-1.0-waveheaderstruct-amd64.patch,
+ -files/spectromatic-1.0-gentoo.diff, files/spectromatic-1.0-makefile.patch,
+ spectromatic-1.0-r2.ebuild:
+ Fixed for reading RIFF/WAV files on amd64, thanks to Ilya Gordeev, bug #428644
04 May 2012; Jeff Horelick <jdhore@gentoo.org> spectromatic-1.0-r2.ebuild:
dev-util/pkgconfig -> virtual/pkgconfig
diff --git a/sci-visualization/spectromatic/Manifest b/sci-visualization/spectromatic/Manifest
index 5e5391f4391e..ca0d862240eb 100644
--- a/sci-visualization/spectromatic/Manifest
+++ b/sci-visualization/spectromatic/Manifest
@@ -1,7 +1,17 @@
-AUX spectromatic-1.0-gentoo.diff 603 RMD160 ec538bfe07d5db5c1612e7a167e7a3befc14ea74 SHA1 334547beff15dde2429a583e937c59ea78b84f38 SHA256 f4aaf93a836b1169cea6e1069fc012e7800116f1df237579a84447864417e865
-AUX spectromatic-1.0-makefile.patch 1128 RMD160 4a71ba7bae0e178cbc43000023b7e46b64a14c45 SHA1 34232915f064cc87fee1101dc4c1c4882516acb6 SHA256 e5ff3481ccd4282c7f8b3ddd260f49589ced9c2cbfec2f2263ab773c58843dab
-AUX spectromatic-1.0-stringliteral.patch 2217 RMD160 8d78c644fa90850c3849ace2ffd6872d4ffb1f39 SHA1 1fd5d609b88e8d48bbd14a1e4c883b1f62afb29d SHA256 9f44677c651584acd5b01b25c94639d6349803a341af99fb348311433c3abd79
-DIST spectromatic_1.0-1.tar.gz 13724 RMD160 bd9294639745b1f95cc9523fe5619e7b1517c0eb SHA1 a3c571f8a03c625a3d9f26c1ad9ef8ec9035ce0e SHA256 5ed057c6c37cc7c5a6a1c8975cb0a74085baa8b18467f4643d40c0986fc45fd4
-EBUILD spectromatic-1.0-r2.ebuild 791 RMD160 ab8359aeeece9db1516d1ac4aa33e9db9f9e8de3 SHA1 30bb920ae7a1cb40891e26942c98fbb4d3c76629 SHA256 20eb4f6f728d3657d0c956c5a53db7aeaa35424992f2a38ac08b964012d32e02
-MISC ChangeLog 2815 RMD160 fe7055ec70966930cc61b9fce9eb7ef7830cbb3a SHA1 db13e619697cb15d37217db91898837aa703ed29 SHA256 cfd6add6f12623025d07fd8579e68b6a2378c8a089aab866ccce37d2eea7d823
-MISC metadata.xml 782 RMD160 8b1a3572979590ff70b3ea293d4529ec28dc2354 SHA1 c8dd1848e055fea62d2a4737c99a7d691516d51b SHA256 330bd71f2be64f790ffb5cdf585ddeb872105ab68a52a8276ad20ff4b3b206cb
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+AUX spectromatic-1.0-makefile.patch 1151 SHA256 9ce9938d68d1e0249ead85c645cd382e8479c76ccecae81f4d4cd31c7b1852a0 SHA512 b78a8d594be1f58a37146c895bf2354a33c18016618bd7d685bddc8bbda9ee61315eec020192ae91fd6cd11e2a010c7d40137bf5244cc0b8f067ae35da14a63e WHIRLPOOL f744322b48e388952be1c1f4e9624ba143d0717cc65a815866ebc34d1f906a1823b79b639bb8ec8a704e8f2396b1dab9ab18b947e1e29ba042633d5557efda79
+AUX spectromatic-1.0-stringliteral.patch 2217 SHA256 9f44677c651584acd5b01b25c94639d6349803a341af99fb348311433c3abd79 SHA512 4a4b45f4810398af85267ae08813a5a9d2ebd593849f7e9bfee31ca4bfe5f332aa9e28fa99d9e205f1e227ded4808e15d18d79d8898af99863642bfd584e33a5 WHIRLPOOL 0e60d20ab21f0248bd6644dea8e28774185ae1b8f460918b4e20e16b0dfa74249f0a27f65742047d055b95953fba972253751a82e6cceaa32c97456947fac93b
+AUX spectromatic-1.0-waveheaderstruct-amd64.patch 4040 SHA256 8cfd47b91080f88a0fe1451f5edecc826a2de5023e1bd8f2af99d181d98213fc SHA512 ac0c98f73d61c14d85570c726ea1d6cf4212b5f070e9ece512967d196eebbd507842ba8de1002645c5380f6877bd01823ad9247db18775b67a1797715cdd08cf WHIRLPOOL 12a400afd8603cb6813e599ce71785acc181564b09b8b71ae3dce550d4fab5f1632185be4e0822417b7d66dcb23645ebd282984198c4f5c478b64f9848848643
+DIST spectromatic_1.0-1.tar.gz 13724 SHA256 5ed057c6c37cc7c5a6a1c8975cb0a74085baa8b18467f4643d40c0986fc45fd4 SHA512 b83acaacd21f7eb12ee3fd955073e8f95c02649de833a6087cf62786b20d8d1bf9a5b62920c17435510237797c6bc3a378921c4c1c2c4e4f74acbca49becfd6c WHIRLPOOL e724a8159624979980241f14bd72010431ad3c51382b9f29a2b5676b3e0585db2dbcb5341fb1fe599706024ece95d290a6aabd6aa5ac64e837640cdaf52a90fe
+EBUILD spectromatic-1.0-r2.ebuild 904 SHA256 8128a6a4588b84ab67d4d009982c5776f51142cbf8f1d0022cecc4dc387c533c SHA512 ca41cad8363ef148fc8d7d9a0af9c55b4f842c2ff7b8ea260c691a1db62f3fe1d644e24af0db223b80d5adacac2d579a76508e5422dd851423c5f8e611ae928e WHIRLPOOL 9cb426073a98b598132f1ca9c9a4a06488fc104db0a3cd36b34041fad49c9ad5968ea1257bc6c681eac766ccdf6d4fa5a2cbadb61a885c358bc3304b9bfa5a10
+MISC ChangeLog 3118 SHA256 8d15d83dcffbc691d761de2a33e82dae5e7179009dfd940aab6d9c77c8c1df19 SHA512 9a53a2202fdff19950009e888c5e67c882b3108732041ce34d1bc9443bf4aeb21c70b00b5fa18257c6474f5cd0674e8da6e2a59d6a6907d0c276172bf884097c WHIRLPOOL b3ca947a1f6bb4a30a5f6a3793123695ec7a8c80ba9d2c30bacef8ecd8f79e5723ef6ce43cee6e49ede6804217529157f4e9dfcd481358d4a6505c04af62a164
+MISC metadata.xml 782 SHA256 330bd71f2be64f790ffb5cdf585ddeb872105ab68a52a8276ad20ff4b3b206cb SHA512 fed9d81362152bb26070db662fe3d45aa4d3f555ce0107b9a5d3c36377747df61b5b611244cc279e78adc23c21136670fd20026722e6daac2ef50243516d53bf WHIRLPOOL 7fb76ba6a6fd4130765ea9faa04076db2bcc17ac5ec370ae0e480a9aadead6855e41db103497b79a508fbc6d3392c6922ad85ec2547373efa5b88e53b3ca8d3a
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.19 (GNU/Linux)
+
+iEYEAREIAAYFAlAgfmwACgkQ1ycZbhPLE2D/pgCff9CqAxXsUPsnj2a5VUQwgqUj
+7m4AoIZJRPAc2fF7STVbstIoji3o4Z0X
+=rJbC
+-----END PGP SIGNATURE-----
diff --git a/sci-visualization/spectromatic/files/spectromatic-1.0-gentoo.diff b/sci-visualization/spectromatic/files/spectromatic-1.0-gentoo.diff
deleted file mode 100644
index 9fef68467dfe..000000000000
--- a/sci-visualization/spectromatic/files/spectromatic-1.0-gentoo.diff
+++ /dev/null
@@ -1,23 +0,0 @@
---- Makefile.orig 2002-12-10 21:25:31.000000000 +0100
-+++ Makefile 2002-12-10 21:25:20.000000000 +0100
-@@ -13,15 +13,16 @@
-
- TARGET = spectromatic
-
--install: all
-+all: $(OBJ)
-+ $(CC) -o $(TARGET) $(OBJ) $(LIBS)
-+ strip $(TARGET)
-+
-+install:
- mkdir -p $(DESTDIR)$(TOPLEVEL_HOME)/bin
- mkdir -p $(DESTDIR)$(TOPLEVEL_HOME)/man/man1
- install -o root -g root -m 0755 spectromatic $(DESTDIR)$(TOPLEVEL_HOME)/bin
- install -o root -g root -m 0644 man/spectromatic.1 $(DESTDIR)$(TOPLEVEL_HOME)/man/man1
-
--all: $(OBJ)
-- $(CC) -o $(TARGET) $(OBJ) $(LIBS)
-- strip $(TARGET)
-
- clean:
- $(RM) $(TARGET) $(OBJ)
diff --git a/sci-visualization/spectromatic/files/spectromatic-1.0-makefile.patch b/sci-visualization/spectromatic/files/spectromatic-1.0-makefile.patch
index 6636484f876e..48f9d9023358 100644
--- a/sci-visualization/spectromatic/files/spectromatic-1.0-makefile.patch
+++ b/sci-visualization/spectromatic/files/spectromatic-1.0-makefile.patch
@@ -10,7 +10,8 @@ Fix install paths
-LIBS = -lgsl -lgslcblas -lpng -lm
+LIBS = -lpng `pkg-config --libs gsl`
DESTDIR =
- TOPLEVEL_HOME = /usr
+-TOPLEVEL_HOME = /usr
++TOPLEVEL_HOME ?= /usr
-CC = gcc -I.
-
@@ -29,7 +30,7 @@ Fix install paths
all: $(OBJ)
- $(CC) -o $(TARGET) $(OBJ) $(LIBS)
- strip $(TARGET)
-+ $(CC) $(LDFLAGS) -o $(TARGET) $(OBJ) $(LIBS)
++ $(CC) $(LDFLAGS) $(OBJ) $(LIBS) -o $(TARGET)
+
+install: $(TARGET)
+ mkdir -p $(DESTDIR)$(TOPLEVEL_HOME)/bin
diff --git a/sci-visualization/spectromatic/files/spectromatic-1.0-waveheaderstruct-amd64.patch b/sci-visualization/spectromatic/files/spectromatic-1.0-waveheaderstruct-amd64.patch
new file mode 100644
index 000000000000..edfb7af8c4b3
--- /dev/null
+++ b/sci-visualization/spectromatic/files/spectromatic-1.0-waveheaderstruct-amd64.patch
@@ -0,0 +1,103 @@
+--- wave.c.orig 2012-08-06 18:54:21.829756875 -0700
++++ wave.c 2012-08-06 19:04:35.818049655 -0700
+@@ -1,11 +1,26 @@
+ #include <stdio.h>
+ #include <string.h>
++#include <endian.h>
+ #include "wave.h"
+
+ int read_header (FILE *f, waveheaderstruct *header)
+ {
++ waveheaderstruct h;
+ fseek (f, 0, SEEK_SET);
+- return fread (header, 1, sizeof (waveheaderstruct), f);
++ size_t red = fread (&h, 1, sizeof (waveheaderstruct), f);
++
++ h.length = le32toh(h.length);
++ h.length_chunk = le32toh(h.length_chunk);
++ h.format = le16toh(h.format);
++ h.modus = le16toh(h.modus);
++ h.sample_fq = le32toh(h.sample_fq);
++ h.byte_p_sec = le32toh(h.byte_p_sec);
++ h.byte_p_spl = le16toh(h.byte_p_spl);
++ h.bit_p_spl = le16toh(h.bit_p_spl);
++ h.data_length = le32toh(h.data_length);
++
++ *header = h;
++ return red;
+ }
+
+ int read_frames (FILE *f, int start, int length, char *data)
+@@ -52,12 +67,12 @@
+
+ read_header (f, &header);
+
+- printf ("Length: %lu\n", header.length);
+- printf ("Length Chunk: %lu\n", header.length_chunk);
++ printf ("Length: %lu\n", (unsigned long)header.length);
++ printf ("Length Chunk: %lu\n", (unsigned long)header.length_chunk);
+ printf ("Format: %u\n", header.format);
+ printf ("Modus: %u\n", header.modus);
+- printf ("Sample Frequency: %lu\n", header.sample_fq);
+- printf ("Bytes per Second: %lu\n", header.byte_p_sec);
++ printf ("Sample Frequency: %lu\n", (unsigned long)header.sample_fq);
++ printf ("Bytes per Second: %lu\n", (unsigned long)header.byte_p_sec);
+ printf ("Bytes per Sample: %u\n", header.byte_p_spl);
+- printf ("Data Length: %lu\n", header.data_length);
++ printf ("Data Length: %lu\n", (unsigned long)header.data_length);
+ }
+--- wave.h.orig 2012-08-06 18:55:38.009165756 -0700
++++ wave.h 2012-08-06 18:55:50.377232324 -0700
+@@ -22,24 +22,25 @@
+ #ifndef WAVE_H
+ #define WAVE_H
+
+-typedef unsigned long ulongT;
+-typedef unsigned short ushortT;
++#include <stdint.h>
+
++#pragma pack(push,1)
+ typedef struct { /* header for WAV-Files */
+- char main_chunk[4]; /* 'RIFF' */
+- unsigned long length; /* length of file */
+- char chunk_type[4]; /* 'WAVE' */
+- char sub_chunk[4]; /* 'fmt' */
+- unsigned long length_chunk; /* length sub_chunk, always 16 bytes */
+- unsigned short format; /* always 1 = PCM-Code */
+- unsigned short modus; /* 1 = Mono, 2 = Stereo */
+- unsigned long sample_fq; /* Sample Freq */
+- unsigned long byte_p_sec; /* Data per sec */
+- unsigned short byte_p_spl; /* Bytes per sample */
+- unsigned short bit_p_spl; /* bits per sample, 8, 12, 16 */
+- char data_chunk[4]; /* 'data' */
+- unsigned long data_length; /* length of data */
+-} waveheaderstruct;
++ uint8_t main_chunk[4]; /* 'RIFF' */
++ uint32_t length; /* length of file */
++ uint8_t chunk_type[4]; /* 'WAVE' */
++ uint8_t sub_chunk[4]; /* 'fmt' */
++ uint32_t length_chunk; /* length sub_chunk, always 16 bytes */
++ uint16_t format; /* always 1 = PCM-Code */
++ uint16_t modus; /* 1 = Mono, 2 = Stereo */
++ uint32_t sample_fq; /* Sample Freq */
++ uint32_t byte_p_sec; /* Data per sec */
++ uint16_t byte_p_spl; /* Bytes per sample */
++ uint16_t bit_p_spl; /* bits per sample, 8, 12, 16 */
++ uint8_t data_chunk[4]; /* 'data' */
++ uint32_t data_length; /* length of data */
++} __attribute__ ((__packed__)) waveheaderstruct;
++#pragma pack(pop)
+
+ int read_header (FILE *f, waveheaderstruct *header);
+ int read_frames (FILE *f, int start, int length, char *data);
+--- spectromatic.c.orig 2012-08-06 18:54:05.260668605 -0700
++++ spectromatic.c 2012-08-06 19:28:18.637679446 -0700
+@@ -217,7 +217,7 @@
+ if (header.modus == 2)
+ ch2 = (double*) malloc (window_size * sizeof (double));
+
+- fprintf (stderr, "samples = %li, step_size = %i, window_size = %i\n", header.data_length / header.byte_p_spl, step_size, window_size);
++ fprintf (stderr, "samples = %lu, step_size = %i, window_size = %i\n", (unsigned long)header.data_length / header.byte_p_spl, step_size, window_size);
+
+ for (i = -window_size; i < window_size + (int)(header.data_length / header.byte_p_spl); i += step_size) {
+ read_frames (f, i, window_size, data);
diff --git a/sci-visualization/spectromatic/spectromatic-1.0-r2.ebuild b/sci-visualization/spectromatic/spectromatic-1.0-r2.ebuild
index 4b9f5c8ec929..7e696e4cf506 100644
--- a/sci-visualization/spectromatic/spectromatic-1.0-r2.ebuild
+++ b/sci-visualization/spectromatic/spectromatic-1.0-r2.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-visualization/spectromatic/spectromatic-1.0-r2.ebuild,v 1.4 2012/05/04 08:07:00 jdhore Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-visualization/spectromatic/spectromatic-1.0-r2.ebuild,v 1.5 2012/08/07 02:33:07 bicatali Exp $
-EAPI=2
+EAPI=4
inherit base toolchain-funcs
@@ -13,7 +13,7 @@ HOMEPAGE="http://ieee.uow.edu.au/~daniel/software/spectromatic/"
SRC_URI="http://ieee.uow.edu.au/~daniel/software/spectromatic/dist/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="amd64 ~ppc x86"
+KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux"
IUSE=""
RDEPEND="media-libs/libpng
@@ -22,9 +22,13 @@ DEPEND="${RDEPEND}
virtual/pkgconfig"
DOCS=( README )
-PATCHES=( "${FILESDIR}/${P}-makefile.patch"
- "${FILESDIR}/${P}-stringliteral.patch" )
+PATCHES=(
+ "${FILESDIR}"/${P}-makefile.patch
+ "${FILESDIR}"/${P}-stringliteral.patch
+ "${FILESDIR}"/${P}-waveheaderstruct-amd64.patch
+)
pkg_setup() {
tc-export CC
+ export TOPLEVEL_HOME="${EROOT}/usr"
}