diff options
author | Jeremy Messenger <mezz@FreeBSD.org> | 2007-08-25 22:56:26 +0000 |
---|---|---|
committer | Jeremy Messenger <mezz@FreeBSD.org> | 2007-08-25 22:56:26 +0000 |
commit | eeeb87cfa964a8e003203fc6a71ea6e0449c04db (patch) | |
tree | 0b2b8a0babb5421977dc8951b290628cae2da453 | |
parent | 4bd0655288b64ea7667c1f1306ff9c474ea742d5 (diff) | |
download | ports-eeeb87cfa964a8e003203fc6a71ea6e0449c04db.tar.gz ports-eeeb87cfa964a8e003203fc6a71ea6e0449c04db.zip |
- Add support for FLAC metadata. [1]
- Remove sqlite3 option and disable it by default, since it's only for
regression tests.
- Bump the PORTREVISION.
PR: ports/114524 ports/115805
Suggested by: Ed Schouten <ed@fxq.nl>
Obtained from: https://lists.hoeg.nl/archives/herrie-users/2007-July/000053.html [1]
Notes
Notes:
svn path=/head/; revision=198313
-rw-r--r-- | audio/libsndfile/Makefile | 15 | ||||
-rw-r--r-- | audio/libsndfile/files/patch-flac_metadata_support | 44 |
2 files changed, 49 insertions, 10 deletions
diff --git a/audio/libsndfile/Makefile b/audio/libsndfile/Makefile index a0145823ec07..fce92d46f306 100644 --- a/audio/libsndfile/Makefile +++ b/audio/libsndfile/Makefile @@ -1,4 +1,3 @@ -# ex:ts=8 # New ports collection makefile for: libsndfile # Date created: Jul 20, 2001 # Whom: ijliao @@ -8,6 +7,7 @@ PORTNAME= libsndfile PORTVERSION= 1.0.17 +PORTREVISION= 1 CATEGORIES= audio MASTER_SITES= http://www.mega-nerd.com/libsndfile/ @@ -16,24 +16,19 @@ COMMENT= Reading and writing files containing sampled sound (like WAV or AIFF) USE_GNOME= gnomehack gnometarget pkgconfig GNU_CONFIGURE= yes -CONFIGURE_ARGS= --enable-justsrc --disable-gcc-pipe +CONFIGURE_ARGS= --enable-justsrc \ + --disable-gcc-pipe \ + --disable-sqlite CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib" USE_LDCONFIG= yes MAN1= sndfile-convert.1 sndfile-info.1 sndfile-play.1 -OPTIONS= FLAC "Enable flac support" On \ - SQLITE3 "Enable Sqlite3 support" Off +OPTIONS= FLAC "Enable flac support" On .include <bsd.port.pre.mk> -.if defined(WITH_SQLITE3) -LIB_DEPENDS+= sqlite3.8:${PORTSDIR}/databases/sqlite3 -.else -CONFIGURE_ARGS= --disable-sqlite -.endif - .if !defined(WITHOUT_FLAC) || exists(${LOCALBASE}/lib/libFLAC.a) LIB_DEPENDS+= FLAC.7:${PORTSDIR}/audio/flac .endif diff --git a/audio/libsndfile/files/patch-flac_metadata_support b/audio/libsndfile/files/patch-flac_metadata_support new file mode 100644 index 000000000000..b65273e4b085 --- /dev/null +++ b/audio/libsndfile/files/patch-flac_metadata_support @@ -0,0 +1,44 @@ +--- src/flac.c 2006-08-31 11:22:19.000000000 +0200 ++++ src/flac.c 2007-07-10 21:16:47.000000000 +0200 +@@ -353,6 +353,22 @@ + } /* sf_flac_write_callback */ + + static void ++sf_flac_meta_getvorbiscomment (SF_PRIVATE *psf, int str_type, const FLAC__StreamMetadata *metadata, const char *tag) ++{ ++ int i; ++ const char *value, *s; ++ ++ i = FLAC__metadata_object_vorbiscomment_find_entry_from(metadata, 0, tag); ++ if (i >= 0) { ++ value = metadata->data.vorbis_comment.comments[i].entry; ++ if ((s = strchr(value, '=')) != NULL) ++ value = s + 1; ++ ++ psf_store_string (psf, str_type, value); ++ } ++} ++ ++static void + sf_flac_meta_callback (const FLAC__SeekableStreamDecoder * UNUSED (decoder), const FLAC__StreamMetadata *metadata, void *client_data) + { SF_PRIVATE *psf = (SF_PRIVATE*) client_data ; + +@@ -378,6 +394,10 @@ + } ; + break ; + ++ case FLAC__METADATA_TYPE_VORBIS_COMMENT : ++ sf_flac_meta_getvorbiscomment (psf, SF_STR_ARTIST, metadata, "artist"); ++ sf_flac_meta_getvorbiscomment (psf, SF_STR_TITLE, metadata, "title"); ++ break; + default : + psf_log_printf (psf, "sf_flac_meta_callback : metadata-type %d not yet implemented.\n", metadata->type) ; + break ; +@@ -603,6 +623,7 @@ + FLAC__seekable_stream_decoder_set_eof_callback (pflac->fsd, sf_flac_eof_callback) ; + FLAC__seekable_stream_decoder_set_write_callback (pflac->fsd, sf_flac_write_callback) ; + FLAC__seekable_stream_decoder_set_metadata_callback (pflac->fsd, sf_flac_meta_callback) ; ++ FLAC__seekable_stream_decoder_set_metadata_respond(pflac->fsd, FLAC__METADATA_TYPE_VORBIS_COMMENT); + FLAC__seekable_stream_decoder_set_error_callback (pflac->fsd, sf_flac_error_callback) ; + FLAC__seekable_stream_decoder_set_client_data (pflac->fsd, psf) ; + |