diff options
author | wiz <wiz@pkgsrc.org> | 2014-08-26 10:44:15 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2014-08-26 10:44:15 +0000 |
commit | 5c9f1ce2b9c6b27bd5e58e8bbe57c0b3de421c14 (patch) | |
tree | ee5adcfc9ad7ef5d28540414d19720d186b5d95d /audio/libopenmpt | |
parent | adb857bbc5da0a2d8b5b9852c08e8d2f049fa284 (diff) | |
download | pkgsrc-5c9f1ce2b9c6b27bd5e58e8bbe57c0b3de421c14.tar.gz |
Import libopenmpt-0.2.4115beta5 as audio/libopenmpt.
OpenMPT based module player library and libopenmpt based command-line
player
libopenmpt is a cross-platform C++ and C library to decode tracked
music files (modules) into a raw PCM audio stream.
openmpt123 is a cross-platform command-line or terminal based module
file player.
libopenmpt is based on the player code of the Open ModPlug Tracker
project (OpenMPT, http://openmpt.org/). In order to avoid code base
fragmentation, libopenmpt is developed in the same source code
repository as OpenMPT.
Diffstat (limited to 'audio/libopenmpt')
-rw-r--r-- | audio/libopenmpt/DESCR | 13 | ||||
-rw-r--r-- | audio/libopenmpt/Makefile | 30 | ||||
-rw-r--r-- | audio/libopenmpt/PLIST | 21 | ||||
-rw-r--r-- | audio/libopenmpt/distinfo | 8 | ||||
-rw-r--r-- | audio/libopenmpt/options.mk | 19 | ||||
-rw-r--r-- | audio/libopenmpt/patches/patch-Makefile | 16 | ||||
-rw-r--r-- | audio/libopenmpt/patches/patch-common_Endianness.h | 26 | ||||
-rw-r--r-- | audio/libopenmpt/patches/patch-openmpt123_openmpt123.hpp | 35 |
8 files changed, 168 insertions, 0 deletions
diff --git a/audio/libopenmpt/DESCR b/audio/libopenmpt/DESCR new file mode 100644 index 00000000000..eb3379e67ee --- /dev/null +++ b/audio/libopenmpt/DESCR @@ -0,0 +1,13 @@ +OpenMPT based module player library and libopenmpt based command-line +player + +libopenmpt is a cross-platform C++ and C library to decode tracked +music files (modules) into a raw PCM audio stream. + +openmpt123 is a cross-platform command-line or terminal based module +file player. + +libopenmpt is based on the player code of the Open ModPlug Tracker +project (OpenMPT, http://openmpt.org/). In order to avoid code base +fragmentation, libopenmpt is developed in the same source code +repository as OpenMPT. diff --git a/audio/libopenmpt/Makefile b/audio/libopenmpt/Makefile new file mode 100644 index 00000000000..536cd71a3f9 --- /dev/null +++ b/audio/libopenmpt/Makefile @@ -0,0 +1,30 @@ +# $NetBSD: Makefile,v 1.1 2014/08/26 10:44:15 wiz Exp $ + +DISTNAME= libopenmpt-0.2.4115-beta5 +PKGNAME= ${DISTNAME:S/-beta/beta/} +CATEGORIES= audio +MASTER_SITES= http://lib.openmpt.org/files/libopenmpt/src/ + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://lib.openmpt.org/libopenmpt/ +COMMENT= Library to decode tracked music files into a raw PCM audio stream +LICENSE= modified-bsd + +BUILD_DEPENDS+= help2man-[0-9]*:../../converters/help2man + +WRKSRC= ${WRKDIR}/${DISTNAME:C/-beta.*//} +USE_LANGUAGES= c c++ +USE_TOOLS= gmake pkg-config + +# installation uses non-portable 'install -D' +# http://bugs.openmpt.org/view.php?id=581 +MAKE_FLAGS+= INSTALL_PROGRAM=${INSTALL_PROGRAM:Q} +MAKE_FLAGS+= INSTALL_DATA=${INSTALL_DATA:Q} +MAKE_FLAGS+= PKGMANDIR=${PKGMANDIR:Q} +INSTALLATION_DIRS= bin include/libopenmpt lib/pkgconfig ${PKGMANDIR}/man1 share/doc/libopenmpt/examples + +.include "options.mk" + +.include "../../devel/SDL/buildlink3.mk" +.include "../../devel/zlib/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/audio/libopenmpt/PLIST b/audio/libopenmpt/PLIST new file mode 100644 index 00000000000..d7066cb34be --- /dev/null +++ b/audio/libopenmpt/PLIST @@ -0,0 +1,21 @@ +@comment $NetBSD: PLIST,v 1.1 2014/08/26 10:44:15 wiz Exp $ +bin/openmpt123 +include/libopenmpt/libopenmpt.h +include/libopenmpt/libopenmpt.hpp +include/libopenmpt/libopenmpt_config.h +include/libopenmpt/libopenmpt_stream_callbacks_fd.h +include/libopenmpt/libopenmpt_stream_callbacks_file.h +include/libopenmpt/libopenmpt_version.h +lib/libopenmpt.so +lib/libopenmpt.so.0 +lib/libopenmpt_modplug.so +lib/openmpt.a +lib/pkgconfig/libopenmpt.pc +man/man1/openmpt123.1 +share/doc/libopenmpt/LICENSE +share/doc/libopenmpt/README.md +share/doc/libopenmpt/TODO +share/doc/libopenmpt/examples/libopenmpt_example_c.c +share/doc/libopenmpt/examples/libopenmpt_example_c_mem.c +share/doc/libopenmpt/examples/libopenmpt_example_c_stdout.c +share/doc/libopenmpt/examples/libopenmpt_example_cxx.cpp diff --git a/audio/libopenmpt/distinfo b/audio/libopenmpt/distinfo new file mode 100644 index 00000000000..f9ed5e0eddf --- /dev/null +++ b/audio/libopenmpt/distinfo @@ -0,0 +1,8 @@ +$NetBSD: distinfo,v 1.1 2014/08/26 10:44:15 wiz Exp $ + +SHA1 (libopenmpt-0.2.4115-beta5.tar.gz) = 5659a8472d5c332d000c9516b40b530dbfe1454f +RMD160 (libopenmpt-0.2.4115-beta5.tar.gz) = 0dd16f17ab61dce568fd6df27c289ac301e37c7c +Size (libopenmpt-0.2.4115-beta5.tar.gz) = 818283 bytes +SHA1 (patch-Makefile) = aed1e11c42225d4de2248d684a5277c09764444f +SHA1 (patch-common_Endianness.h) = 9619885d5c26b885a28e80efaeabcf27d1581799 +SHA1 (patch-openmpt123_openmpt123.hpp) = 3a4ca5f286ed484faf1921d7a2416dd5bd0e0ad5 diff --git a/audio/libopenmpt/options.mk b/audio/libopenmpt/options.mk new file mode 100644 index 00000000000..292aa4c78f1 --- /dev/null +++ b/audio/libopenmpt/options.mk @@ -0,0 +1,19 @@ +# $NetBSD: options.mk,v 1.1 2014/08/26 10:44:15 wiz Exp $ + +PKG_OPTIONS_VAR= PKG_OPTIONS.libopenmpt +PKG_SUPPORTED_OPTIONS= flac sndfile wavpack +PKG_SUGGESTED_OPTIONS= sndfile + +.include "../../mk/bsd.options.mk" + +.if !empty(PKG_OPTIONS:Mflac) +.include "../../audio/flac/buildlink3.mk" +.endif + +.if !empty(PKG_OPTIONS:Msndfile) +.include "../../audio/libsndfile/buildlink3.mk" +.endif + +.if !empty(PKG_OPTIONS:Mwavpack) +.include "../../audio/wavpack/buildlink3.mk" +.endif diff --git a/audio/libopenmpt/patches/patch-Makefile b/audio/libopenmpt/patches/patch-Makefile new file mode 100644 index 00000000000..5694f129d3f --- /dev/null +++ b/audio/libopenmpt/patches/patch-Makefile @@ -0,0 +1,16 @@ +$NetBSD: patch-Makefile,v 1.1 2014/08/26 10:44:15 wiz Exp $ + +Fix man page installation path. +http://bugs.openmpt.org/view.php?id=577 + +--- Makefile.orig 2014-06-03 11:21:46.000000000 +0000 ++++ Makefile +@@ -598,7 +598,7 @@ endif + ifeq ($(OPENMPT123),1) + $(INSTALL_PROGRAM) bin/openmpt123$(EXESUFFIX).norpath $(DESTDIR)$(PREFIX)/bin/openmpt123$(EXESUFFIX) + ifeq ($(MPT_WITH_HELP2MAN),1) +- $(INSTALL_DATA) bin/openmpt123.1 $(DESTDIR)$(PREFIX)/share/man/man.1/openmpt123.1 ++ $(INSTALL_DATA) bin/openmpt123.1 $(DESTDIR)$(PREFIX)/${PKGMANDIR}/man1/openmpt123.1 + endif + endif + $(INSTALL_DATA) LICENSE $(DESTDIR)$(PREFIX)/share/doc/libopenmpt/LICENSE diff --git a/audio/libopenmpt/patches/patch-common_Endianness.h b/audio/libopenmpt/patches/patch-common_Endianness.h new file mode 100644 index 00000000000..87ebd6cba9a --- /dev/null +++ b/audio/libopenmpt/patches/patch-common_Endianness.h @@ -0,0 +1,26 @@ +$NetBSD: patch-common_Endianness.h,v 1.1 2014/08/26 10:44:15 wiz Exp $ + +Avoid bswap32 re-definition on NetBSD. + +In file included from ./soundlib/plugins/PlugInterface.h:25:0, + from ./soundlib/Sndfile.h:47, + from libopenmpt/libopenmpt_impl.cpp:28: +./soundlib/plugins/../../common/Endianness.h:26:0: warning: "bswap32" redefined [enabled by default] + #define bswap32 __builtin_bswap32 + ^ + +http://bugs.openmpt.org/view.php?id=579 + +--- common/Endianness.h.orig 2014-06-10 16:27:31.000000000 +0000 ++++ common/Endianness.h +@@ -23,8 +23,10 @@ OPENMPT_NAMESPACE_BEGIN + + #if MPT_COMPILER_GCC + #if MPT_GCC_AT_LEAST(4,3,0) ++#ifndef bswap32 + #define bswap32 __builtin_bswap32 + #endif ++#endif + #elif MPT_COMPILER_MSVC + #include <intrin.h> + #define bswap16 _byteswap_ushort diff --git a/audio/libopenmpt/patches/patch-openmpt123_openmpt123.hpp b/audio/libopenmpt/patches/patch-openmpt123_openmpt123.hpp new file mode 100644 index 00000000000..967a49390c7 --- /dev/null +++ b/audio/libopenmpt/patches/patch-openmpt123_openmpt123.hpp @@ -0,0 +1,35 @@ +$NetBSD: patch-openmpt123_openmpt123.hpp,v 1.1 2014/08/26 10:44:15 wiz Exp $ + +NetBSD defines both TIOCGSIZE and TIOCGWINSZ, but struct ttysize does not +contain the referenced members. + +http://bugs.openmpt.org/view.php?id=580 + +--- openmpt123/openmpt123.hpp.orig 2014-02-01 16:52:29.000000000 +0000 ++++ openmpt123/openmpt123.hpp +@@ -336,18 +336,18 @@ struct commandlineflags { + terminal_height = tmp; + } + } +- #if defined(TIOCGSIZE) +- struct ttysize ts; +- if ( ioctl( STDERR_FILENO, TIOCGSIZE, &ts ) >= 0 ) { +- terminal_width = ts.ts_cols; +- terminal_height = ts.ts_rows; +- } +- #elif defined(TIOCGWINSZ) ++ #if defined(TIOCGWINSZ) + struct winsize ts; + if ( ioctl( STDERR_FILENO, TIOCGWINSZ, &ts ) >= 0 ) { + terminal_width = ts.ws_col; + terminal_height = ts.ws_row; + } ++ #elif defined(TIOCGSIZE) ++ struct ttysize ts; ++ if ( ioctl( STDERR_FILENO, TIOCGSIZE, &ts ) >= 0 ) { ++ terminal_width = ts.ts_cols; ++ terminal_height = ts.ts_rows; ++ } + #endif + } + #endif |