Add new port audio/opusfile:
Library for decoding .opus files, including seeking support. WWW: http://www.opus-codec.org/ PR: ports/177370 Submitted by: RyoTa SimaMoto <liangtai.s16 at gmail.com>
This commit is contained in:
parent
4e652d7e20
commit
c07908cbe3
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=341456
7 changed files with 145 additions and 0 deletions
|
@ -535,6 +535,7 @@
|
|||
SUBDIR += optimfrog
|
||||
SUBDIR += opus
|
||||
SUBDIR += opus-tools
|
||||
SUBDIR += opusfile
|
||||
SUBDIR += osalp
|
||||
SUBDIR += osd-lyrics
|
||||
SUBDIR += osdmixer
|
||||
|
|
57
audio/opusfile/Makefile
Normal file
57
audio/opusfile/Makefile
Normal file
|
@ -0,0 +1,57 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= opusfile
|
||||
PORTVERSION= 0.5
|
||||
CATEGORIES= audio
|
||||
MASTER_SITES= http://downloads.xiph.org/releases/opus/ \
|
||||
${MASTER_SITE_MOZILLA_EXTENDED}
|
||||
MASTER_SITE_SUBDIR= opus
|
||||
|
||||
MAINTAINER= liangtai.s16@gmail.com
|
||||
COMMENT= Opus playback library
|
||||
|
||||
LICENSE= BSD3CLAUSE
|
||||
|
||||
LIB_DEPENDS= libogg.so:${PORTSDIR}/audio/libogg \
|
||||
libopus.so:${PORTSDIR}/audio/opus
|
||||
|
||||
USES= gmake pkgconfig pathfix
|
||||
USE_LDCONFIG= yes
|
||||
GNU_CONFIGURE= yes
|
||||
USE_AUTOTOOLS= autoconf:env aclocal:env automake:env libtool
|
||||
MAKE_JOBS_UNSAFE= yes
|
||||
PATHFIX_MAKEFILEIN= Makefile.am
|
||||
|
||||
PORTDOCS= AUTHORS README.txt
|
||||
|
||||
OPTIONS_DEFINE= DOXYGEN DOCS
|
||||
OPTIONS_DEFAULT= # empty
|
||||
|
||||
DOXYGEN_CONFIGURE_ENABLE= doc
|
||||
DOXYGEN_BUILD_DEPENDS= doxygen:${PORTSDIR}/devel/doxygen
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's| @openssl@||' \
|
||||
${WRKSRC}/opusfile.pc.in ${WRKSRC}/opusurl.pc.in
|
||||
@${REINPLACE_CMD} -e '/libopusurl_la_SOURCES/s/http.c/& src\/ftime.c/' \
|
||||
${WRKSRC}/Makefile.am
|
||||
@${CP} ${FILESDIR}/ftime.c ${WRKSRC}/src/
|
||||
|
||||
pre-configure:
|
||||
@(cd ${WRKSRC} && ${AUTORECONF} -fi)
|
||||
|
||||
post-install:
|
||||
.if ${PORT_OPTIONS:MDOXYGEN}
|
||||
@${RM} -f ${WRKDIR}/PLIST.doc ; \
|
||||
${FIND} ${STAGEDIR}${DOCSDIR}/html -type f | \
|
||||
${SED} 's|${STAGEDIR}${PREFIX}/||' \
|
||||
>> ${WRKDIR}/PLIST.doc ; \
|
||||
${FIND} ${STAGEDIR}${DOCSDIR}/html -type d | \
|
||||
${SED} 's|${STAGEDIR}${PREFIX}/|@dirrm |' \
|
||||
| ${SORT} -r >> ${WRKDIR}/PLIST.doc ; \
|
||||
(cd ${WRKDIR} ; ${SED} -i -e '/PLIST.doc/ r PLIST.doc' ${TMPPLIST})
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
2
audio/opusfile/distinfo
Normal file
2
audio/opusfile/distinfo
Normal file
|
@ -0,0 +1,2 @@
|
|||
SHA256 (opusfile-0.5.tar.gz) = 2ce52d006aeeec9f10260dbe3073c4636954a1ab19c82b8baafefe0180aa4a39
|
||||
SIZE (opusfile-0.5.tar.gz) = 437671
|
53
audio/opusfile/files/ftime.c
Normal file
53
audio/opusfile/files/ftime.c
Normal file
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* Copyright (c) 1994 Christopher G. Demetriou
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Christopher G. Demetriou.
|
||||
* 4. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$FreeBSD$";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/timeb.h>
|
||||
|
||||
int
|
||||
ftime(struct timeb *tbp)
|
||||
{
|
||||
struct timezone tz;
|
||||
struct timeval t;
|
||||
|
||||
if (gettimeofday(&t, &tz) < 0)
|
||||
return (-1);
|
||||
tbp->millitm = t.tv_usec / 1000;
|
||||
tbp->time = t.tv_sec;
|
||||
tbp->timezone = tz.tz_minuteswest;
|
||||
tbp->dstflag = tz.tz_dsttime;
|
||||
|
||||
return (0);
|
||||
}
|
16
audio/opusfile/files/patch-configure.ac
Normal file
16
audio/opusfile/files/patch-configure.ac
Normal file
|
@ -0,0 +1,16 @@
|
|||
--- ./configure.ac.orig 2014-01-09 22:35:34.000000000 +0000
|
||||
+++ ./configure.ac 2014-01-17 17:25:40.113916574 +0000
|
||||
@@ -90,10 +90,12 @@
|
||||
AS_IF([test "$enable_http" != "no"], [
|
||||
openssl="openssl"
|
||||
AC_DEFINE([OP_ENABLE_HTTP], [1], [Enable HTTP support])
|
||||
- PKG_CHECK_MODULES([URL_DEPS], [openssl])
|
||||
])
|
||||
AM_CONDITIONAL(OP_ENABLE_HTTP, [test "$enable_http" != "no"])
|
||||
AC_SUBST([openssl])
|
||||
+AC_CHECK_LIB(ssl, SSL_read,
|
||||
+ [AC_CHECK_HEADERS(openssl/ssl.h, LIBS="$LIBS -lssl -lcrypto",,)],,
|
||||
+ -lcrypto -lssl)
|
||||
|
||||
PKG_CHECK_MODULES([DEPS], [ogg >= 1.3 opus >= 1.0.1])
|
||||
|
3
audio/opusfile/pkg-descr
Normal file
3
audio/opusfile/pkg-descr
Normal file
|
@ -0,0 +1,3 @@
|
|||
Library for decoding .opus files, including seeking support.
|
||||
|
||||
WWW: http://www.opus-codec.org/
|
13
audio/opusfile/pkg-plist
Normal file
13
audio/opusfile/pkg-plist
Normal file
|
@ -0,0 +1,13 @@
|
|||
include/opus/opusfile.h
|
||||
lib/libopusfile.a
|
||||
lib/libopusfile.la
|
||||
lib/libopusfile.so
|
||||
lib/libopusfile.so.3
|
||||
lib/libopusurl.a
|
||||
lib/libopusurl.la
|
||||
lib/libopusurl.so
|
||||
lib/libopusurl.so.3
|
||||
libdata/pkgconfig/opusfile.pc
|
||||
libdata/pkgconfig/opusurl.pc
|
||||
@comment Insert PLIST.doc here
|
||||
@dirrmtry include/opus
|
Loading…
Reference in a new issue