Skip to content

Commit 01cd504

Browse files
author
System Administrator
committed
Copy the libsndfile portfile from trunk to here
So I can add a variant that uses my branch
1 parent bd3ef6f commit 01cd504

4 files changed

Lines changed: 180 additions & 0 deletions

File tree

audio/libsndfile/Portfile

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2+
# $Id: Portfile 102452 2013-02-03 15:01:23Z larryv@macports.org $
3+
4+
PortSystem 1.0
5+
6+
name libsndfile
7+
version 1.0.25
8+
revision 1
9+
categories audio
10+
maintainers stare.cz:hans
11+
platforms darwin
12+
13+
description libsndfile is a C library for reading and writing files \
14+
containing sampled sound (such as MS Windows WAV and the \
15+
Apple/SGI AIFF format) through one standard library \
16+
interface.
17+
long_description ${description}
18+
license LGPL-2.1+
19+
homepage http://www.mega-nerd.com/libsndfile/
20+
21+
livecheck.regex {Updates for (\d+\.\d+\.\d+)}
22+
livecheck.type regex
23+
livecheck.url ${homepage}ChangeLog
24+
25+
depends_build port:pkgconfig
26+
depends_lib port:flac port:libogg port:libvorbis
27+
28+
master_sites ${homepage}files/
29+
30+
checksums rmd160 7330ea9fc1cfa3809fa7d2a6e2a0593b6e0233c7 \
31+
sha256 59016dbd326abe7e2366ded5c344c853829bebfd1702ef26a07ef662d6aa4882
32+
33+
patchfiles fix-include.patch configure.patch
34+
35+
configure.args \
36+
--disable-alsa \
37+
--disable-octave \
38+
--disable-silent-rules \
39+
--disable-sqlite \
40+
--enable-external-libs
41+
42+
post-configure {
43+
system "ed - ${worksrcpath}/src/config.h < ${filespath}/src__config.h.ed"
44+
}
45+
46+
if {[variant_isset no_external_libs] && ![variant_isset sqlite]} {
47+
depends_build-delete port:pkgconfig
48+
}
49+
50+
variant no_external_libs description {Disable support for FLAC, Ogg and Vorbis} {
51+
depends_lib-delete port:flac port:libogg port:libvorbis
52+
53+
configure.args-append --disable-external-libs
54+
configure.args-delete --enable-external-libs
55+
}
56+
57+
variant octave description {Enable support for Octave} {
58+
depends_build-append port:gsed
59+
depends_lib-append path:bin/octave:octave
60+
61+
configure.args-append --enable-octave
62+
configure.args-delete --disable-octave
63+
}
64+
65+
variant sqlite description {Enable support for SQLite} {
66+
depends_lib-append port:sqlite3
67+
68+
configure.args-append --enable-sqlite
69+
configure.args-delete --disable-sqlite
70+
}
71+
72+
variant egallager description {Use my personal fork} {
73+
PortGroup github 1.0
74+
github.setup cooljeanius libsndfile 0.1.1 v
75+
maintainers-append gwmail.gwu.edu:egall
76+
fetch.type git
77+
git.url git://github.com/cooljeanius/libsndfile.git
78+
79+
# Couldn't get these patches to apply correctly against my fork.
80+
patchfiles-delete fix-include.patch configure.patch
81+
82+
depends_build-append port:autogen \
83+
port:autoconf \
84+
port:automake \
85+
port:libtool \
86+
path:bin/python:swig-python \
87+
path:bin/ranlib:cctools \
88+
path:bin/awk:gawk \
89+
path:bin/make:gmake \
90+
path:bin/install:coreutils \
91+
port:endian
92+
93+
pre-configure {
94+
system -W ${worksrcpath} "sh ./autogen.sh"
95+
}
96+
97+
configure.args-delete --enable-silent-rules
98+
}
99+
100+
variant experimental conflicts no_external_libs description {Enable experimental code} {
101+
depends_lib-append path:bin/speexenc:speex
102+
configure.args-append --enable-experimental
103+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--- configure.orig 2011-07-13 19:00:09.000000000 +1000
2+
+++ configure 2012-09-25 16:50:54.000000000 +1000
3+
@@ -18770,7 +18770,6 @@
4+
case "$host_os" in
5+
darwin* | rhapsody*)
6+
os_is_macosx=1
7+
- OS_SPECIFIC_CFLAGS="-I/Developer/Headers/FlatCarbon"
8+
OS_SPECIFIC_LINKS="-framework CoreAudio"
9+
;;
10+
mingw*)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--- programs/sndfile-play.c.orig 2012-03-09 17:55:23.000000000 -0800
2+
+++ programs/sndfile-play.c 2012-03-09 17:55:39.000000000 -0800
3+
@@ -58,7 +58,6 @@
4+
#include <sys/soundcard.h>
5+
6+
#elif (defined (__MACH__) && defined (__APPLE__))
7+
- #include <Carbon.h>
8+
#include <CoreAudio/AudioHardware.h>
9+
10+
#elif defined (HAVE_SNDIO_H)
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/CPU_CLIPS_NEGATIVE/c
2+
#ifdef __LP64__
3+
#define CPU_CLIPS_NEGATIVE 0
4+
#else
5+
#define CPU_CLIPS_NEGATIVE 1
6+
#endif
7+
.
8+
/CPU_CLIPS_POSITIVE/c
9+
#ifdef __LP64__
10+
#define CPU_CLIPS_POSITIVE 0
11+
#else
12+
#define CPU_CLIPS_POSITIVE 1
13+
#endif
14+
.
15+
/CPU_IS_BIG_ENDIAN/c
16+
#ifdef __BIG_ENDIAN__
17+
#define CPU_IS_BIG_ENDIAN 1
18+
#else
19+
#define CPU_IS_BIG_ENDIAN 0
20+
#endif
21+
.
22+
/CPU_IS_LITTLE_ENDIAN/c
23+
#ifdef __BIG_ENDIAN__
24+
#define CPU_IS_LITTLE_ENDIAN 0
25+
#else
26+
#define CPU_IS_LITTLE_ENDIAN 1
27+
#endif
28+
.
29+
/SIZEOF_LONG/c
30+
#ifdef __LP64__
31+
#define SIZEOF_LONG 8
32+
#else
33+
#define SIZEOF_LONG 4
34+
#endif
35+
.
36+
/SIZEOF_SIZE_T/c
37+
#ifdef __LP64__
38+
#define SIZEOF_SIZE_T 8
39+
#else
40+
#define SIZEOF_SIZE_T 4
41+
#endif
42+
.
43+
/SIZEOF_SSIZE_T/c
44+
#ifdef __LP64__
45+
#define SIZEOF_SSIZE_T 8
46+
#else
47+
#define SIZEOF_SSIZE_T 4
48+
#endif
49+
.
50+
/SIZEOF_VOIDP/c
51+
#ifdef __LP64__
52+
#define SIZEOF_VOIDP 8
53+
#else
54+
#define SIZEOF_VOIDP 4
55+
#endif
56+
.
57+
w

0 commit comments

Comments
 (0)