diff --git a/audio/faad/Makefile b/audio/faad/Makefile index 0732b9f6ed8..ba48667c107 100644 --- a/audio/faad/Makefile +++ b/audio/faad/Makefile @@ -1,15 +1,15 @@ -# $OpenBSD: Makefile,v 1.37 2008/07/25 20:25:59 sthen Exp $ +# $OpenBSD: Makefile,v 1.38 2008/09/15 21:58:19 jakemsr Exp $ -COMMENT-main= MPEG2 and MPEG-4 AAC decoder +COMMENT-main= MPEG-2 and MPEG-4 AAC decoder COMMENT-xmms= XMMS input plugin for AAC files -DISTNAME= faad2-2.0 -PKGNAME-main= faad-2.0p7 -PKGNAME-xmms= faad-xmms-2.0p7 +V= 2.6.1 +DISTNAME= faad2-${V} +PKGNAME-main= faad-${V} +PKGNAME-xmms= faad-xmms-${V} CATEGORIES= audio -MASTER_SITES= http://mirrors.protection.cx/~jolan/ -SHARED_LIBS += faad 1.0 # .0.0 -SHARED_LIBS += mp4v2 2.0 # .0.0 -SHARED_LIBS += mp4ff 0.0 # .0.0 +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=faac/} +SHARED_LIBS += faad 2.0 # .0.0 +SHARED_LIBS += mp4ff 1.0 # .0.0 HOMEPAGE= http://www.audiocoding.com/ @@ -18,7 +18,7 @@ PERMIT_PACKAGE_CDROM= Patents PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Patents PERMIT_DISTFILES_FTP= Yes -WANTLIB= m stdc++ +WANTLIB= m BUILD_DEPENDS+= ${MODGNU_AUTOCONF_DEPENDS} USE_GMAKE= Yes @@ -27,11 +27,12 @@ USE_LIBTOOL= Yes WRKDIST= ${WRKDIR}/faad2 CONFIGURE_STYLE= automake AUTOCONF_VERSION=2.59 +AUTOMAKE_VERSION=1.9 CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib" \ LIBS="-lm" \ - AUTOCONF_VERSION=${AUTOCONF_VERSION} -CONFIGURE_ARGS+=--with-mp4v2 + AUTOCONF_VERSION=${AUTOCONF_VERSION} \ + AUTOMAKE_VERSION=${AUTOMAKE_VERSION} PSEUDO_FLAVORS= no_xmms FLAVOR?= @@ -47,7 +48,7 @@ CONFIGURE_ARGS+= --without-xmms .endif LIB_DEPENDS-xmms= xmms.>=3::audio/xmms \ - faad,mp4v2::audio/faad + faad,mp4ff::audio/faad RUN_DEPENDS-xmms= ::audio/xmms WANTLIB-xmms= ${WANTLIB} \ X11 Xau Xdmcp Xext Xi iconv intl glib \ @@ -60,9 +61,6 @@ post-patch: AUTOMAKE_VERSION=${AUTOMAKE_VERSION} PATH=${PORTPATH} \ sh bootstrap -pre-configure: - @perl -pi -e 's/--no-verify//g' ${WRKSRC}/configure - post-configure: @cp ${WRKSRC}/config.h ${WRKSRC}/faadconfig.h diff --git a/audio/faad/distinfo b/audio/faad/distinfo index 21d582209f7..912e013ef4a 100644 --- a/audio/faad/distinfo +++ b/audio/faad/distinfo @@ -1,5 +1,5 @@ -MD5 (faad2-2.0.tar.gz) = X3USrfTUUADYxgZw8n221g== -RMD160 (faad2-2.0.tar.gz) = tLVheImo8njNskX3dGZmTNDHiZA= -SHA1 (faad2-2.0.tar.gz) = s4RoRhXTN9nXhO4omMuQYhfnBjc= -SHA256 (faad2-2.0.tar.gz) = ARNKavrY1WEBZYA/cqbhaM1Vbd2A1gcFkN64aLTohcQ= -SIZE (faad2-2.0.tar.gz) = 771223 +MD5 (faad2-2.6.1.tar.gz) = dOkt9AwnDyFqgwX8h2A8ig== +RMD160 (faad2-2.6.1.tar.gz) = rVWZM9rWplV2qZR4GRkPBMs7HBY= +SHA1 (faad2-2.6.1.tar.gz) = tK0z08TfptvzARo9o0xjGSbKv60= +SHA256 (faad2-2.6.1.tar.gz) = itLC4MCbeHqUPi74McHIRTTjqHJswesavE2p6zA4KFw= +SIZE (faad2-2.6.1.tar.gz) = 839410 diff --git a/audio/faad/patches/patch-Makefile_am b/audio/faad/patches/patch-Makefile_am deleted file mode 100644 index a38ca17d45e..00000000000 --- a/audio/faad/patches/patch-Makefile_am +++ /dev/null @@ -1,12 +0,0 @@ -$OpenBSD: patch-Makefile_am,v 1.1 2004/04/28 01:30:00 jolan Exp $ ---- Makefile.am.orig 2004-02-06 10:04:39.000000000 -0600 -+++ Makefile.am 2004-04-24 20:56:12.000000000 -0500 -@@ -1,8 +1,3 @@ - SUBDIRS = libfaad common frontend plugins - - EXTRA_DIST = faad2.spec -- --rpm: Makefile -- make dist -- $(RPMBUILD) -ta $(PACKAGE)-$(VERSION).tar.gz -- rm $(PACKAGE)-$(VERSION).tar.gz diff --git a/audio/faad/patches/patch-common_mp4ff_Makefile_am b/audio/faad/patches/patch-common_mp4ff_Makefile_am new file mode 100644 index 00000000000..80e57283c93 --- /dev/null +++ b/audio/faad/patches/patch-common_mp4ff_Makefile_am @@ -0,0 +1,9 @@ +$OpenBSD: patch-common_mp4ff_Makefile_am,v 1.1 2008/09/15 21:58:19 jakemsr Exp $ +--- common/mp4ff/Makefile.am.orig Fri Jul 11 14:17:17 2008 ++++ common/mp4ff/Makefile.am Fri Jul 11 14:17:37 2008 +@@ -1,4 +1,4 @@ +-noinst_LTLIBRARIES = libmp4ff.la ++lib_LTLIBRARIES = libmp4ff.la + + libmp4ff_la_CFLAGS = -DUSE_TAGGING=1 + diff --git a/audio/faad/patches/patch-common_mp4ff_mp4ff_int_types_h b/audio/faad/patches/patch-common_mp4ff_mp4ff_int_types_h deleted file mode 100644 index ec82d3bde5f..00000000000 --- a/audio/faad/patches/patch-common_mp4ff_mp4ff_int_types_h +++ /dev/null @@ -1,16 +0,0 @@ -$OpenBSD: patch-common_mp4ff_mp4ff_int_types_h,v 1.1 2004/04/28 01:30:00 jolan Exp $ ---- common/mp4ff/mp4ff_int_types.h.orig 2003-12-13 16:26:56.000000000 -0600 -+++ common/mp4ff/mp4ff_int_types.h 2004-04-24 20:58:29.000000000 -0500 -@@ -15,9 +15,9 @@ typedef unsigned __int64 uint64_t; - - #else - --#include -+#include - - #endif - - --#endif -\ No newline at end of file -+#endif diff --git a/audio/faad/patches/patch-common_mp4v2_systems_h b/audio/faad/patches/patch-common_mp4v2_systems_h deleted file mode 100644 index c6380f72b16..00000000000 --- a/audio/faad/patches/patch-common_mp4v2_systems_h +++ /dev/null @@ -1,12 +0,0 @@ -$OpenBSD: patch-common_mp4v2_systems_h,v 1.1 2004/12/13 05:40:55 jcs Exp $ ---- common/mp4v2/systems.h.orig Sun Dec 12 23:00:22 2004 -+++ common/mp4v2/systems.h Sun Dec 12 23:00:28 2004 -@@ -31,7 +31,7 @@ - #else - #undef PACKAGE - #undef VERSION --#include -+#include - #endif - - diff --git a/audio/faad/patches/patch-configure_in b/audio/faad/patches/patch-configure_in deleted file mode 100644 index 81ca5b5da7f..00000000000 --- a/audio/faad/patches/patch-configure_in +++ /dev/null @@ -1,15 +0,0 @@ -$OpenBSD: patch-configure_in,v 1.4 2007/06/29 06:01:42 jakemsr Exp $ ---- configure.in.orig Fri Feb 6 08:04:39 2004 -+++ configure.in Thu May 31 14:07:32 2007 -@@ -67,10 +67,7 @@ MY_CHECK_TYPEDEF_FROM_INCLUDE([fpos_t foo; foo.__pos = - [HAVE_FPOS_T_POS]) - - --external_mp4v2=yes --AC_CHECK_LIB(mp4v2, MP4Create, , external_mp4v2=no, -lstdc++) --AC_CHECK_LIB(mp4v2, MP4MetadataDelete, , external_mp4v2=no, -lstdc++) --AC_CHECK_HEADER(mp4.h, , external_mp4v2=no) -+external_mp4v2=no - - AM_CONDITIONAL(WITH_MP4V2, false) - diff --git a/audio/faad/patches/patch-frontend_Makefile_am b/audio/faad/patches/patch-frontend_Makefile_am index 6c298cbdc19..9215d87a6d6 100644 --- a/audio/faad/patches/patch-frontend_Makefile_am +++ b/audio/faad/patches/patch-frontend_Makefile_am @@ -1,12 +1,10 @@ -$OpenBSD: patch-frontend_Makefile_am,v 1.2 2004/04/28 01:30:00 jolan Exp $ ---- frontend/Makefile.am.orig 2003-11-06 05:04:13.000000000 -0600 -+++ frontend/Makefile.am 2004-04-24 20:51:42.000000000 -0500 -@@ -1,7 +1,6 @@ - bin_PROGRAMS = faad +$OpenBSD: patch-frontend_Makefile_am,v 1.3 2008/09/15 21:58:19 jakemsr Exp $ +--- frontend/Makefile.am.orig Sat Jun 28 22:34:28 2008 ++++ frontend/Makefile.am Sat Jun 28 22:34:57 2008 +@@ -7,5 +7,4 @@ faad_LDADD = $(top_builddir)/libfaad/libfaad.la \ + $(top_builddir)/common/mp4ff/libmp4ff.la --faad_SOURCES = main.c audio.c $(top_srcdir)/common/faad/getopt.c \ -- audio.h -+faad_SOURCES = main.c audio.c audio.h - - AM_CFLAGS = -O2 - INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/common/faad \ + faad_SOURCES = main.c \ +- audio.c audio.h \ +- $(top_srcdir)/common/faad/getopt.c ++ audio.c audio.h diff --git a/audio/faad/patches/patch-frontend_main_c b/audio/faad/patches/patch-frontend_main_c index 67ed9789ce2..c4ac85ece06 100644 --- a/audio/faad/patches/patch-frontend_main_c +++ b/audio/faad/patches/patch-frontend_main_c @@ -1,52 +1,33 @@ -$OpenBSD: patch-frontend_main_c,v 1.5 2007/06/29 06:01:42 jakemsr Exp $ ---- frontend/main.c.orig Tue Jan 6 03:59:47 2004 -+++ frontend/main.c Thu May 31 18:00:02 2007 -@@ -37,6 +37,7 @@ - #include +$OpenBSD: patch-frontend_main_c,v 1.6 2008/09/15 21:58:19 jakemsr Exp $ +--- frontend/main.c.orig Thu Nov 1 05:33:29 2007 ++++ frontend/main.c Sun Aug 31 01:55:23 2008 +@@ -41,6 +41,7 @@ + #include #include #include +#include - #include + #include #include -@@ -52,10 +53,10 @@ - - /* FAAD file buffering routines */ - typedef struct { -- long bytes_into_buffer; -- long bytes_consumed; -- long file_offset; -- unsigned char *buffer; -+ uint32_t bytes_into_buffer; -+ uint32_t bytes_consumed; -+ uint32_t file_offset; -+ uint8_t *buffer; - int at_eof; - FILE *infile; - } aac_buffer; -@@ -377,8 +378,8 @@ int decodeAACfile(char *aacfile, char *sndfile, char * +@@ -399,7 +400,7 @@ int decodeAACfile(char *aacfile, char *sndfile, char * float *song_length) { int tagsize; - unsigned long samplerate; -- unsigned char channels; -+ uint32_t samplerate; -+ uint8_t channels; ++ unsigned int samplerate; + unsigned char channels; void *sample_buffer; - audio_file *aufile; -@@ -687,8 +688,8 @@ int decodeMP4file(char *mp4file, char *sndfile, char * +@@ -709,7 +710,7 @@ int decodeMP4file(char *mp4file, char *sndfile, char * int infoOnly, int adts_out, float *song_length) { int track; - unsigned long samplerate; -- unsigned char channels; -+ uint32_t samplerate; -+ uint8_t channels; ++ unsigned int samplerate; + unsigned char channels; void *sample_buffer; - mp4ff_t *infile; -@@ -1080,7 +1081,7 @@ int main(int argc, char *argv[]) +@@ -1085,7 +1086,7 @@ int main(int argc, char *argv[]) if (optarg) { char dr[10]; @@ -55,7 +36,7 @@ $OpenBSD: patch-frontend_main_c,v 1.5 2007/06/29 06:01:42 jakemsr Exp $ def_srate = 0; } else { def_srate = atoi(dr); -@@ -1091,7 +1092,7 @@ int main(int argc, char *argv[]) +@@ -1096,7 +1097,7 @@ int main(int argc, char *argv[]) if (optarg) { char dr[10]; @@ -64,7 +45,7 @@ $OpenBSD: patch-frontend_main_c,v 1.5 2007/06/29 06:01:42 jakemsr Exp $ { format = 1; } else { -@@ -1105,7 +1106,7 @@ int main(int argc, char *argv[]) +@@ -1110,7 +1111,7 @@ int main(int argc, char *argv[]) if (optarg) { char dr[10]; @@ -73,7 +54,7 @@ $OpenBSD: patch-frontend_main_c,v 1.5 2007/06/29 06:01:42 jakemsr Exp $ { outputFormat = FAAD_FMT_16BIT; /* just use default */ } else { -@@ -1119,7 +1120,7 @@ int main(int argc, char *argv[]) +@@ -1124,7 +1125,7 @@ int main(int argc, char *argv[]) if (optarg) { char dr[10]; diff --git a/audio/faad/patches/patch-include_faad_h b/audio/faad/patches/patch-include_faad_h index f71cc05f920..733171b7f95 100644 --- a/audio/faad/patches/patch-include_faad_h +++ b/audio/faad/patches/patch-include_faad_h @@ -1,166 +1,12 @@ -$OpenBSD: patch-include_faad_h,v 1.1 2007/06/29 06:01:42 jakemsr Exp $ ---- include/faad.h.orig Fri Feb 6 02:23:28 2004 -+++ include/faad.h Thu May 31 15:17:35 2007 -@@ -43,6 +43,10 @@ extern "C" { - #endif - #endif +$OpenBSD: patch-include_faad_h,v 1.2 2008/09/15 21:58:19 jakemsr Exp $ +--- include/faad.h.orig Tue Jul 22 03:15:57 2008 ++++ include/faad.h Tue Jul 22 03:16:11 2008 +@@ -29,7 +29,7 @@ + **/ -+/* needed for standard integer types */ -+#define __STDC_LIMIT_MACROS -+#include -+ - #define FAAD2_VERSION "2.0 " + /* warn people for update */ +-#pragma message("please update faad2 include filename and function names!") ++// #pragma message("please update faad2 include filename and function names!") - /* object types for AAC */ -@@ -112,99 +116,99 @@ typedef void *faacDecHandle; - typedef struct mp4AudioSpecificConfig - { - /* Audio Specific Info */ -- unsigned char objectTypeIndex; -- unsigned char samplingFrequencyIndex; -- unsigned long samplingFrequency; -- unsigned char channelsConfiguration; -+ uint8_t objectTypeIndex; -+ uint8_t samplingFrequencyIndex; -+ uint32_t samplingFrequency; -+ uint8_t channelsConfiguration; - - /* GA Specific Info */ -- unsigned char frameLengthFlag; -- unsigned char dependsOnCoreCoder; -- unsigned short coreCoderDelay; -- unsigned char extensionFlag; -- unsigned char aacSectionDataResilienceFlag; -- unsigned char aacScalefactorDataResilienceFlag; -- unsigned char aacSpectralDataResilienceFlag; -- unsigned char epConfig; -+ uint8_t frameLengthFlag; -+ uint8_t dependsOnCoreCoder; -+ uint16_t coreCoderDelay; -+ uint8_t extensionFlag; -+ uint8_t aacSectionDataResilienceFlag; -+ uint8_t aacScalefactorDataResilienceFlag; -+ uint8_t aacSpectralDataResilienceFlag; -+ uint8_t epConfig; - -- char sbr_present_flag; -- char forceUpSampling; -+ int8_t sbr_present_flag; -+ int8_t forceUpSampling; - } mp4AudioSpecificConfig; - - typedef struct faacDecConfiguration - { -- unsigned char defObjectType; -- unsigned long defSampleRate; -- unsigned char outputFormat; -- unsigned char downMatrix; -- unsigned char useOldADTSFormat; -- unsigned char dontUpSampleImplicitSBR; -+ uint8_t defObjectType; -+ uint32_t defSampleRate; -+ uint8_t outputFormat; -+ uint8_t downMatrix; -+ uint8_t useOldADTSFormat; -+ uint8_t dontUpSampleImplicitSBR; - } faacDecConfiguration, *faacDecConfigurationPtr; - - typedef struct faacDecFrameInfo - { -- unsigned long bytesconsumed; -- unsigned long samples; -- unsigned char channels; -- unsigned char error; -- unsigned long samplerate; -+ uint32_t bytesconsumed; -+ uint32_t samples; -+ uint8_t channels; -+ uint8_t error; -+ uint32_t samplerate; - - /* SBR: 0: off, 1: on; upsample, 2: on; downsampled, 3: off; upsampled */ -- unsigned char sbr; -+ uint8_t sbr; - - /* MPEG-4 ObjectType */ -- unsigned char object_type; -+ uint8_t object_type; - - /* AAC header type; MP4 will be signalled as RAW also */ -- unsigned char header_type; -+ uint8_t header_type; - - /* multichannel configuration */ -- unsigned char num_front_channels; -- unsigned char num_side_channels; -- unsigned char num_back_channels; -- unsigned char num_lfe_channels; -- unsigned char channel_position[64]; -+ uint8_t num_front_channels; -+ uint8_t num_side_channels; -+ uint8_t num_back_channels; -+ uint8_t num_lfe_channels; -+ uint8_t channel_position[64]; - } faacDecFrameInfo; - --char* FAADAPI faacDecGetErrorMessage(unsigned char errcode); -+int8_t* FAADAPI faacDecGetErrorMessage(uint8_t errcode); - --unsigned long FAADAPI faacDecGetCapabilities(void); -+uint32_t FAADAPI faacDecGetCapabilities(void); - - faacDecHandle FAADAPI faacDecOpen(void); - - faacDecConfigurationPtr FAADAPI faacDecGetCurrentConfiguration(faacDecHandle hDecoder); - --unsigned char FAADAPI faacDecSetConfiguration(faacDecHandle hDecoder, -+uint8_t FAADAPI faacDecSetConfiguration(faacDecHandle hDecoder, - faacDecConfigurationPtr config); - - /* Init the library based on info from the AAC file (ADTS/ADIF) */ --long FAADAPI faacDecInit(faacDecHandle hDecoder, -- unsigned char *buffer, -- unsigned long buffer_size, -- unsigned long *samplerate, -- unsigned char *channels); -+int32_t FAADAPI faacDecInit(faacDecHandle hDecoder, -+ uint8_t *buffer, -+ uint32_t buffer_size, -+ uint32_t *samplerate, -+ uint8_t *channels); - - /* Init the library using a DecoderSpecificInfo */ --char FAADAPI faacDecInit2(faacDecHandle hDecoder, unsigned char *pBuffer, -- unsigned long SizeOfDecoderSpecificInfo, -- unsigned long *samplerate, unsigned char *channels); -+int8_t FAADAPI faacDecInit2(faacDecHandle hDecoder, uint8_t *pBuffer, -+ uint32_t SizeOfDecoderSpecificInfo, -+ uint32_t *samplerate, uint8_t *channels); - - /* Init the library for DRM */ --char FAADAPI faacDecInitDRM(faacDecHandle hDecoder, unsigned long samplerate, -- unsigned char channels); -+int8_t FAADAPI faacDecInitDRM(faacDecHandle hDecoder, uint32_t samplerate, -+ uint8_t channels); - --void FAADAPI faacDecPostSeekReset(faacDecHandle hDecoder, long frame); -+void FAADAPI faacDecPostSeekReset(faacDecHandle hDecoder, int32_t frame); - - void FAADAPI faacDecClose(faacDecHandle hDecoder); - - void* FAADAPI faacDecDecode(faacDecHandle hDecoder, - faacDecFrameInfo *hInfo, -- unsigned char *buffer, -- unsigned long buffer_size); -+ uint8_t *buffer, -+ uint32_t buffer_size); - --char FAADAPI AudioSpecificConfig(unsigned char *pBuffer, -- unsigned long buffer_size, -- mp4AudioSpecificConfig *mp4ASC); -+int8_t FAADAPI AudioSpecificConfig(uint8_t *pBuffer, -+ uint32_t buffer_size, -+ mp4AudioSpecificConfig *mp4ASC); - - #ifdef _WIN32 - #pragma pack(pop) + /* Backwards compatible link */ + #include "neaacdec.h" diff --git a/audio/faad/patches/patch-include_neaacdec_h b/audio/faad/patches/patch-include_neaacdec_h new file mode 100644 index 00000000000..c3216f41451 --- /dev/null +++ b/audio/faad/patches/patch-include_neaacdec_h @@ -0,0 +1,70 @@ +$OpenBSD: patch-include_neaacdec_h,v 1.1 2008/09/15 21:58:19 jakemsr Exp $ +--- include/neaacdec.h.orig Thu Nov 1 05:33:29 2007 ++++ include/neaacdec.h Tue Jul 15 23:59:41 2008 +@@ -141,7 +141,7 @@ typedef struct mp4AudioSpecificConfig + /* Audio Specific Info */ + unsigned char objectTypeIndex; + unsigned char samplingFrequencyIndex; +- unsigned long samplingFrequency; ++ unsigned int samplingFrequency; + unsigned char channelsConfiguration; + + /* GA Specific Info */ +@@ -162,7 +162,7 @@ typedef struct mp4AudioSpecificConfig + typedef struct NeAACDecConfiguration + { + unsigned char defObjectType; +- unsigned long defSampleRate; ++ unsigned int defSampleRate; + unsigned char outputFormat; + unsigned char downMatrix; + unsigned char useOldADTSFormat; +@@ -171,11 +171,11 @@ typedef struct NeAACDecConfiguration + + typedef struct NeAACDecFrameInfo + { +- unsigned long bytesconsumed; +- unsigned long samples; ++ unsigned int bytesconsumed; ++ unsigned int samples; + unsigned char channels; + unsigned char error; +- unsigned long samplerate; ++ unsigned int samplerate; + + /* SBR: 0: off, 1: on; upsample, 2: on; downsampled, 3: off; upsampled */ + unsigned char sbr; +@@ -199,7 +199,7 @@ typedef struct NeAACDecFrameInfo + + char* NEAACDECAPI NeAACDecGetErrorMessage(unsigned char errcode); + +-unsigned long NEAACDECAPI NeAACDecGetCapabilities(void); ++unsigned int NEAACDECAPI NeAACDecGetCapabilities(void); + + NeAACDecHandle NEAACDECAPI NeAACDecOpen(void); + +@@ -209,19 +209,19 @@ unsigned char NEAACDECAPI NeAACDecSetConfiguration(NeA + NeAACDecConfigurationPtr config); + + /* Init the library based on info from the AAC file (ADTS/ADIF) */ +-long NEAACDECAPI NeAACDecInit(NeAACDecHandle hDecoder, ++int NEAACDECAPI NeAACDecInit(NeAACDecHandle hDecoder, + unsigned char *buffer, +- unsigned long buffer_size, +- unsigned long *samplerate, ++ unsigned int buffer_size, ++ unsigned int *samplerate, + unsigned char *channels); + + /* Init the library using a DecoderSpecificInfo */ + char NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder, unsigned char *pBuffer, + unsigned long SizeOfDecoderSpecificInfo, +- unsigned long *samplerate, unsigned char *channels); ++ unsigned int *samplerate, unsigned char *channels); + + /* Init the library for DRM */ +-char NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hDecoder, unsigned long samplerate, ++char NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hDecoder, unsigned int samplerate, + unsigned char channels); + + void NEAACDECAPI NeAACDecPostSeekReset(NeAACDecHandle hDecoder, long frame); diff --git a/audio/faad/patches/patch-libfaad_Makefile_am b/audio/faad/patches/patch-libfaad_Makefile_am deleted file mode 100644 index 264425bea58..00000000000 --- a/audio/faad/patches/patch-libfaad_Makefile_am +++ /dev/null @@ -1,18 +0,0 @@ -$OpenBSD: patch-libfaad_Makefile_am,v 1.3 2007/06/29 06:01:42 jakemsr Exp $ ---- libfaad/Makefile.am.orig Fri Feb 6 05:12:28 2004 -+++ libfaad/Makefile.am Thu May 31 14:07:32 2007 -@@ -15,10 +15,10 @@ ms.h output.h pns.h pulse.h rvlc.h sine_win.h ssr.h ss - ssr_win.h specrec.h syntax.h structs.h tns.h \ - sbr_dct.h sbr_dec.h sbr_e_nf.h sbr_fbt.h sbr_hfadj.h sbr_hfgen.h \ - sbr_huff.h sbr_noise.h sbr_qmf.h sbr_syntax.h sbr_tf_grid.h \ --sbr_qmf_c.h codebook/hcb.h \ --codebook/hcb_1.h codebook/hcb_2.h codebook/hcb_3.h codebook/hcb_4.h \ --codebook/hcb_5.h codebook/hcb_6.h codebook/hcb_7.h codebook/hcb_8.h \ --codebook/hcb_9.h codebook/hcb_10.h codebook/hcb_11.h codebook/hcb_sf.h -+sbr_qmf_c.h hcb.h \ -+hcb_1.h hcb_2.h hcb_3.h hcb_4.h \ -+hcb_5.h hcb_6.h hcb_7.h hcb_8.h \ -+hcb_9.h hcb_10.h hcb_11.h hcb_sf.h - - LIBTOOL_DEPS = - LIBS = diff --git a/audio/faad/patches/patch-libfaad_common_h b/audio/faad/patches/patch-libfaad_common_h deleted file mode 100644 index 7b0b8770c52..00000000000 --- a/audio/faad/patches/patch-libfaad_common_h +++ /dev/null @@ -1,12 +0,0 @@ -$OpenBSD: patch-libfaad_common_h,v 1.1 2005/11/21 08:58:15 jolan Exp $ ---- libfaad/common.h.orig Fri Feb 6 06:55:24 2004 -+++ libfaad/common.h Mon Nov 21 02:50:20 2005 -@@ -307,7 +307,7 @@ char *strchr(), *strrchr(); - } - return i; - } -- #elif (defined(__i386__) && defined(__GNUC__)) -+ #elif (defined(__i386__) && defined(__GNUC__)) && !defined(__OpenBSD__) - #define HAS_LRINTF - // from http://www.stereopsis.com/FPU.html - static INLINE int lrintf(float f) diff --git a/audio/faad/patches/patch-libfaad_structs_h b/audio/faad/patches/patch-libfaad_structs_h new file mode 100644 index 00000000000..06af9a3a5c4 --- /dev/null +++ b/audio/faad/patches/patch-libfaad_structs_h @@ -0,0 +1,36 @@ +$OpenBSD: patch-libfaad_structs_h,v 1.3 2008/09/15 21:58:19 jakemsr Exp $ +--- libfaad/structs.h.orig Thu Nov 1 05:33:40 2007 ++++ libfaad/structs.h Tue Jul 15 23:47:02 2008 +@@ -317,7 +317,7 @@ typedef struct mp4AudioSpecificConfig + /* Audio Specific Info */ + /*uint8_t*/ unsigned char objectTypeIndex; + /*uint8_t*/ unsigned char samplingFrequencyIndex; +- /*uint32_t*/ unsigned long samplingFrequency; ++ /*uint32_t*/ unsigned int samplingFrequency; + /*uint8_t*/ unsigned char channelsConfiguration; + + /* GA Specific Info */ +@@ -338,7 +338,7 @@ typedef struct mp4AudioSpecificConfig + typedef struct NeAACDecConfiguration + { + /*uint8_t*/ unsigned char defObjectType; +- /*uint32_t*/ unsigned long defSampleRate; ++ /*uint32_t*/ unsigned int defSampleRate; + /*uint8_t*/ unsigned char outputFormat; + /*uint8_t*/ unsigned char downMatrix; + /*uint8_t*/ unsigned char useOldADTSFormat; +@@ -347,11 +347,11 @@ typedef struct NeAACDecConfiguration + + typedef struct NeAACDecFrameInfo + { +- /*uint32_t*/ unsigned long bytesconsumed; +- /*uint32_t*/ unsigned long samples; ++ /*uint32_t*/ unsigned int bytesconsumed; ++ /*uint32_t*/ unsigned int samples; + /*uint8_t*/ unsigned char channels; + /*uint8_t*/ unsigned char error; +- /*uint32_t*/ unsigned long samplerate; ++ /*uint32_t*/ unsigned int samplerate; + + /* SBR: 0: off, 1: on; normal, 2: on; downsampled */ + /*uint8_t*/ unsigned char sbr; diff --git a/audio/faad/patches/patch-plugins_mpeg4ip_aa_file_cpp b/audio/faad/patches/patch-plugins_mpeg4ip_aa_file_cpp deleted file mode 100644 index 7980ef99a30..00000000000 --- a/audio/faad/patches/patch-plugins_mpeg4ip_aa_file_cpp +++ /dev/null @@ -1,14 +0,0 @@ -$OpenBSD: patch-plugins_mpeg4ip_aa_file_cpp,v 1.1 2007/06/29 06:01:42 jakemsr Exp $ ---- plugins/mpeg4ip/aa_file.cpp.orig Mon Jan 5 06:05:12 2004 -+++ plugins/mpeg4ip/aa_file.cpp Thu May 31 14:10:25 2007 -@@ -56,8 +56,8 @@ codec_data_t *aac_file_check (lib_message_func_t messa - aac->m_buffer_size_max, - aac->m_ifile); - -- unsigned long freq; -- unsigned char chans; -+ uint32_t freq; -+ uint8_t chans; - - faacDecInit(aac->m_info, (unsigned char *)aac->m_buffer, - aac->m_buffer_size, &freq, &chans); diff --git a/audio/faad/patches/patch-plugins_mpeg4ip_faad2_cpp b/audio/faad/patches/patch-plugins_mpeg4ip_faad2_cpp deleted file mode 100644 index 866672275c8..00000000000 --- a/audio/faad/patches/patch-plugins_mpeg4ip_faad2_cpp +++ /dev/null @@ -1,43 +0,0 @@ -$OpenBSD: patch-plugins_mpeg4ip_faad2_cpp,v 1.1 2007/06/29 06:01:42 jakemsr Exp $ ---- plugins/mpeg4ip/faad2.cpp.orig Mon Jan 5 06:05:12 2004 -+++ plugins/mpeg4ip/faad2.cpp Thu May 31 14:12:18 2007 -@@ -76,8 +76,8 @@ static codec_data_t *aac_codec_create (const char *com - } - - aac->m_info = faacDecOpen(); -- unsigned long srate; -- unsigned char chan; -+ uint32_t srate; -+ uint8_t chan; - if ((userdata == NULL && fmtp == NULL) || - (faacDecInit2(aac->m_info, - (uint8_t *)userdata, -@@ -156,7 +156,7 @@ static int aac_decode (codec_data_t *ptr, - void *userdata) - { - aac_codec_t *aac = (aac_codec_t *)ptr; -- unsigned long bytes_consummed; -+ uint32_t bytes_consummed; - int bits = -1; - // struct timezone tz; - -@@ -188,8 +188,8 @@ static int aac_decode (codec_data_t *ptr, - * If not initialized, do so. - */ - abort(); -- unsigned long freq; -- unsigned char chans; -+ uint32_t freq; -+ uint8_t chans; - - faacDecInit(aac->m_info, - (unsigned char *)buffer, -@@ -202,7 +202,7 @@ static int aac_decode (codec_data_t *ptr, - } - - uint8_t *buff; -- unsigned long samples; -+ uint32_t samples; - bytes_consummed = buflen; - //aa_message(LOG_DEBUG, aaclib, "decoding %d bits", buflen * 8); - faacDecFrameInfo frame_info; diff --git a/audio/faad/patches/patch-plugins_xmms_src_Makefile_am b/audio/faad/patches/patch-plugins_xmms_src_Makefile_am index 5ff9f359438..4237d06bed4 100644 --- a/audio/faad/patches/patch-plugins_xmms_src_Makefile_am +++ b/audio/faad/patches/patch-plugins_xmms_src_Makefile_am @@ -1,19 +1,11 @@ -$OpenBSD: patch-plugins_xmms_src_Makefile_am,v 1.2 2007/12/11 11:00:37 jakemsr Exp $ ---- plugins/xmms/src/Makefile.am.orig Fri Feb 6 08:05:07 2004 -+++ plugins/xmms/src/Makefile.am Sun Oct 21 02:19:37 2007 -@@ -1,7 +1,7 @@ - libdir = `$(XMMS_CONFIG) --input-plugin-dir` - lib_LTLIBRARIES = libmp4.la +$OpenBSD: patch-plugins_xmms_src_Makefile_am,v 1.3 2008/09/15 21:58:19 jakemsr Exp $ +--- plugins/xmms/src/Makefile.am.orig Sat Jun 28 22:56:19 2008 ++++ plugins/xmms/src/Makefile.am Sat Jun 28 22:57:03 2008 +@@ -9,6 +9,6 @@ libmp4_la_CFLAGS = $(local_CFLAGS) -Wall \ + libmp4_la_LIBADD = $(top_builddir)/libfaad/libfaad.la \ + $(top_builddir)/common/mp4ff/libmp4ff.la --libmp4_la_CFLAGS = `$(XMMS_CONFIG) --cflags` -Wall \ -+CFLAGS = `$(XMMS_CONFIG) --cflags` -Wall \ - `$(GTK_CONFIG) --cflags` -DHAVE_GLIB_H=1 \ - -I$(top_srcdir)/include -I$(top_srcdir)/common/mp4v2 +-libmp4_la_LDFLAGS = -module -avoid-version $(local_LDFLAGS) -lpthread ++libmp4_la_LDFLAGS = -module -avoid-version $(local_LDFLAGS) -@@ -9,5 +9,5 @@ libmp4_la_LIBADD = $(top_builddir)/libfaad/libfaad.la - $(top_builddir)/common/mp4v2/libmp4v2.la - - libmp4_la_LDFLAGS = -module -avoid-version `$(XMMS_CONFIG) --libs` \ -- `$(GTK_CONFIG) --libs` -lpthread -lstdc++ -+ `$(GTK_CONFIG) --libs` -lstdc++ libmp4_la_SOURCES = libmp4.c mp4_utils.c aac_utils.c diff --git a/audio/faad/patches/patch-plugins_xmms_src_libmp4_c b/audio/faad/patches/patch-plugins_xmms_src_libmp4_c index db8c84d4875..338bd0e4b12 100644 --- a/audio/faad/patches/patch-plugins_xmms_src_libmp4_c +++ b/audio/faad/patches/patch-plugins_xmms_src_libmp4_c @@ -1,48 +1,32 @@ -$OpenBSD: patch-plugins_xmms_src_libmp4_c,v 1.1 2007/06/29 06:01:42 jakemsr Exp $ ---- plugins/xmms/src/libmp4.c.orig Wed Dec 3 10:37:56 2003 -+++ plugins/xmms/src/libmp4.c Thu May 31 14:42:02 2007 -@@ -22,6 +22,9 @@ - #define MP4_ABOUT "Written by ciberfred" - #define BUFFER_SIZE FAAD_MIN_STREAMSIZE*64 - -+extern void getMP4info(char* file); -+extern int getAACTrack(MP4FileHandle file); -+ - static void mp4_init(void); - static void mp4_about(void); - static void mp4_play(char *); -@@ -113,9 +116,9 @@ static int mp4_isFile(char *filename) - - extention = strrchr(filename, '.'); - if (extention && -- !strcasecmp(extention, ".mp4") || // official extention -- !strcasecmp(extention, ".m4a") || // Apple mp4 extention -- !strcasecmp(extention, ".aac") // old MPEG2/4-AAC extention -+ (!strcasecmp(extention, ".mp4") || // official extention -+ !strcasecmp(extention, ".m4a") || // Apple mp4 extention -+ !strcasecmp(extention, ".aac")) // old MPEG2/4-AAC extention - ){ - return (1); - } -@@ -202,8 +205,8 @@ static void *mp4Decode(void *args) - faacDecHandle decoder; +$OpenBSD: patch-plugins_xmms_src_libmp4_c,v 1.2 2008/09/15 21:58:19 jakemsr Exp $ +--- plugins/xmms/src/libmp4.c.orig Tue Jun 5 12:00:18 2007 ++++ plugins/xmms/src/libmp4.c Wed Jul 16 00:12:57 2008 +@@ -290,7 +290,7 @@ static void *mp4Decode(void *args) + NeAACDecHandle decoder; unsigned char *buffer = NULL; guint bufferSize = 0; - gulong samplerate; -- guchar channels; -+ guint32 samplerate; -+ guint8 channels; - guint avgBitrate; - MP4Duration duration; - gulong msDuration; -@@ -330,8 +333,8 @@ static void *mp4Decode(void *args) - faacDecHandle decoder = 0; ++ guint samplerate; + guchar channels; + //guint avgBitrate; + //MP4Duration duration; +@@ -339,7 +339,7 @@ static void *mp4Decode(void *args) + mp4_ip.output->open_audio(FMT_S16_NE, samplerate, channels); + mp4_ip.output->flush(0); + mp4_ip.set_info(xmmstitle, msDuration, -1, samplerate/1000, channels); +- g_print("MP4 - %d channels @ %ld Hz\n", channels, samplerate); ++ g_print("MP4 - %d channels @ %d Hz\n", channels, samplerate); + + while(bPlaying){ + void* sampleBuffer; +@@ -414,8 +414,8 @@ end: + FILE *file = NULL; + NeAACDecHandle decoder = 0; guchar *buffer = 0; - gulong bufferconsumed = 0; +- gulong bufferconsumed = 0; - gulong samplerate = 0; -- guchar channels; -+ guint32 samplerate = 0; -+ guint8 channels; ++ gint bufferconsumed = 0; ++ guint samplerate = 0; + guchar channels; gulong buffervalid = 0; TitleInput* input; - gchar *temp = g_strdup(args); diff --git a/audio/faad/pkg/PFRAG.shared-main b/audio/faad/pkg/PFRAG.shared-main index c283ad240c9..b377291158d 100644 --- a/audio/faad/pkg/PFRAG.shared-main +++ b/audio/faad/pkg/PFRAG.shared-main @@ -1,4 +1,3 @@ -@comment $OpenBSD: PFRAG.shared-main,v 1.1 2006/11/25 17:04:32 espie Exp $ +@comment $OpenBSD: PFRAG.shared-main,v 1.2 2008/09/15 21:58:19 jakemsr Exp $ @lib lib/libfaad.so.${LIBfaad_VERSION} @lib lib/libmp4ff.so.${LIBmp4ff_VERSION} -@lib lib/libmp4v2.so.${LIBmp4v2_VERSION} diff --git a/audio/faad/pkg/PLIST-main b/audio/faad/pkg/PLIST-main index e26be336151..b4b1aaeb7a4 100644 --- a/audio/faad/pkg/PLIST-main +++ b/audio/faad/pkg/PLIST-main @@ -1,18 +1,13 @@ -@comment $OpenBSD: PLIST-main,v 1.1 2006/11/25 17:04:32 espie Exp $ +@comment $OpenBSD: PLIST-main,v 1.2 2008/09/15 21:58:19 jakemsr Exp $ @conflict playfair-* @pkgpath audio/faad @pkgpath audio/faad,no_xmms -bin/faad +%%SHARED%% +@bin bin/faad include/faad.h include/faadconfig.h -include/mp4.h -include/mp4ff.h -include/mpeg4ip.h -include/systems.h +include/neaacdec.h lib/libfaad.a lib/libfaad.la lib/libmp4ff.a lib/libmp4ff.la -lib/libmp4v2.a -lib/libmp4v2.la -%%SHARED%%