New port: opusfile-0.2 opusfile is a library for decoding *.opus files, including seeking support. http://www.opus-codec.org/ This package does not contain online manual, but you can install API document in HTML (optional). NOTE for ports directors: I decided using autoconf tools to detect libssl.so without help of Pkgconfig, and to capture libcompat.so too. If it costs too much against its purpose, or something wrong in changes of configure.ac, please tell me. Then I would write patch to replace generated configure script than modifying configure.ac file because I am not sure about autoconf tools. Fix: Patch attached with submission follows:
Bug fix: remove openssl from .pc --- audio/opusfile/Makefile +++ audio/opusfile/Makefile @@ -44,6 +44,8 @@ DIST_DOCS= AUTHORS README.txt post-patch: @${REINPLACE_CMD} -e 's|%%PACKAGE_VERSION%%|${PORTVERSION}|' \ ${WRKSRC}/configure.ac + @${REINPLACE_CMD} -e 's| @openssl@||' \ + ${WRKSRC}/opusfile.pc.in ${WRKSRC}/opusfile-uninstalled.pc.in pre-configure: @${REINPLACE_CMD} -e 's|^\(dist_doc_DATA =\).*|\1 ${DIST_DOCS}|' \
----- Forwarded message from RyÅTa SimaMoto <liangtai.s4@gmail.com> ----- Date: Tue, 23 Apr 2013 16:57:58 +0900 From: RyÅTa SimaMoto <liangtai.s4@gmail.com> To: freebsd-ports-bugs@freebsd.org Subject: Re: ports/177370: New port: audio/opusfile This shar file is re-created to follow the latest rule of replacing USE_PKGCONFIG with USES. Please ignore all previous files. # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # audio/opusfile # audio/opusfile/Makefile # audio/opusfile/distinfo # audio/opusfile/files # audio/opusfile/files/patch-configure.ac # audio/opusfile/pkg-descr # audio/opusfile/pkg-plist # echo c - audio/opusfile mkdir -p audio/opusfile > /dev/null 2>&1 echo x - audio/opusfile/Makefile sed 's/^X//' >audio/opusfile/Makefile << 'dc923892a36dc107d7984e71d2d7558c' X# $FreeBSD$ X XPORTNAME= opusfile XPORTVERSION= 0.2 XCATEGORIES= audio XMASTER_SITES= http://downloads.xiph.org/releases/opus/ \ X ${MASTER_SITE_MOZILLA_EXTENDED} XMASTER_SITE_SUBDIR= opus X XMAINTAINER= liangtai.s4@gmail.com XCOMMENT= Opus playback library X XLICENSE= BSD X XLIB_DEPENDS= ogg:${PORTSDIR}/audio/libogg \ X opus:${PORTSDIR}/audio/opus X XUSES= pkgconfig XUSE_GZIP= yes XUSE_GMAKE= yes XUSE_LDCONFIG= yes XGNU_CONFIGURE= yes XUSE_AUTOTOOLS= autoconf:env aclocal:env automake:env libtool XPATCH_STRIP= -p1 XMAKE_JOBS_UNSAFE= yes X XOPTIONS_DEFINE= APIDOC DOCS XOPTIONS_DEFAULT= XAPIDOC_DESC= Install Doxygen generated doc (libopusfile) X X.include <bsd.port.options.mk> X X.if ${PORT_OPTIONS:MAPIDOC} XCONFIGURE_ARGS+= --enable-doc XBUILD_DEPENDS+= doxygen:${PORTSDIR}/devel/doxygen X.else XCONFIGURE_ARGS+= --disable-doc X.endif X X.if ${PORT_OPTIONS:MDOCS} XDIST_DOCS= AUTHORS README.txt X.endif X Xpost-patch: X @${REINPLACE_CMD} -e 's|%%PACKAGE_VERSION%%|${PORTVERSION}|' \ X ${WRKSRC}/configure.ac X @${REINPLACE_CMD} -e 's| @openssl@||' \ X ${WRKSRC}/opusfile.pc.in ${WRKSRC}/opusfile-uninstalled.pc.in X Xpre-configure: X @${REINPLACE_CMD} -e 's|^\(dist_doc_DATA =\).*|\1 ${DIST_DOCS}|' \ X -e 's|^\(pkgconfigdir =\).*|\1 ${PREFIX}/libdata/pkgconfig|' \ X ${WRKSRC}/Makefile.am X @(cd ${WRKSRC} && ${AUTORECONF} -fi) X Xpost-install: X.if ${PORT_OPTIONS:MAPIDOC} X @${RM} -f ${WRKDIR}/PLIST.doc ; \ X ${FIND} ${DOCSDIR}/html -type f | ${SED} 's|${PREFIX}/||' \ X >> ${WRKDIR}/PLIST.doc ; \ X ${FIND} ${DOCSDIR}/html -type d | ${SED} 's|${PREFIX}/|@dirrm |' \ X | ${SORT} -r >> ${WRKDIR}/PLIST.doc ; \ X (cd ${WRKDIR} ; ${SED} -i -e '/PLIST.doc/ r PLIST.doc' ${TMPPLIST}) X.endif X X.include <bsd.port.mk> dc923892a36dc107d7984e71d2d7558c echo x - audio/opusfile/distinfo sed 's/^X//' >audio/opusfile/distinfo << 'b6ba950745df1c6714a9c8ed9088dd0c' XSHA256 (opusfile-0.2.tar.gz) = b4a678b3b6c4adfb6aff1f67ef658becfe146ea7c7ff228e99543762171557f9 XSIZE (opusfile-0.2.tar.gz) = 399527 b6ba950745df1c6714a9c8ed9088dd0c echo c - audio/opusfile/files mkdir -p audio/opusfile/files > /dev/null 2>&1 echo x - audio/opusfile/files/patch-configure.ac sed 's/^X//' >audio/opusfile/files/patch-configure.ac << 'f05de535f1a05e26f8fecc524204f524' XFrom b70517b768e8f546427a745c5e834bb0b0e98e0c Mon Sep 17 00:00:00 2001 XFrom: =?UTF-8?q?SimaMoto=2CRy=C5=8DTa?= <liangtai.s4@gmail.com> XDate: Sun, 3 Mar 2013 12:42:23 +0900 XSubject: [PATCH] Detect openssl without using pkgconfig X X* Allow to run on FreeBSD that don't have openssl.pc while it has X libssl.so X* Detect libcompat.so to use ftime(3) X* Allow to specify PACKAGE_VERSION out of GIT repository X--- X configure.ac | 8 ++++++-- X 1 file changed, 6 insertions(+), 2 deletions(-) X Xdiff --git a/configure.ac b/configure.ac Xindex 3133b7f..dd508e3 100644 X--- a/configure.ac X+++ b/configure.ac X@@ -1,6 +1,6 @@ X # autoconf source script for generating configure X X-AC_INIT([opusfile], m4_esyscmd([doc/git-version.sh])) X+AC_INIT([opusfile], %%PACKAGE_VERSION%%) X X AC_USE_SYSTEM_EXTENSIONS X AC_SYS_LARGEFILE X@@ -53,8 +53,12 @@ AS_IF([test "x$enable_http" != "xno"], [ X AC_DEFINE([OP_ENABLE_HTTP], [1], [Enable HTTP support]) X ]) X AC_SUBST(openssl) X+AC_CHECK_LIB(ssl,SSL_read, X+ [AC_CHECK_HEADERS(openssl/ssl.h,LIBS="$LIBS -lssl -lcrypto",,)],, X+ -lcrypto -lssl) X X-PKG_CHECK_MODULES([DEPS], [ogg >= 1.3 opus >= 1.0.1 ${openssl}]) X+PKG_CHECK_MODULES([DEPS], [ogg >= 1.3 opus >= 1.0.1]) X+AC_CHECK_LIB(compat,ftime) X X AC_ARG_ENABLE([fixed-point], X AS_HELP_STRING([--enable-fixed-point], [Enable fixed-point calculation]),, X-- X1.8.1.3 X f05de535f1a05e26f8fecc524204f524 echo x - audio/opusfile/pkg-descr sed 's/^X//' >audio/opusfile/pkg-descr << 'f4c9bfd160261d8dbc20d912bdc5ebc3' XLibrary for decoding .opus files, including seeking support. X XWWW: http://www.opus-codec.org/ f4c9bfd160261d8dbc20d912bdc5ebc3 echo x - audio/opusfile/pkg-plist sed 's/^X//' >audio/opusfile/pkg-plist << '8237c198d64d206873c535aa067941a4' Xinclude/opus/opusfile.h Xlib/libopusfile.a Xlib/libopusfile.la Xlib/libopusfile.so Xlib/libopusfile.so.0 Xlibdata/pkgconfig/opusfile.pc X@comment Insert PLIST.doc here X@dirrmtry include/opus 8237c198d64d206873c535aa067941a4 exit _______________________________________________ freebsd-ports-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs To unsubscribe, send any mail to "freebsd-ports-bugs-unsubscribe@freebsd.org" ----- End forwarded message -----
Last patch presents errors on build, take a look at: https://redports.org/~lippe/20130703204200-30782-130849/opusfile-0.2.log
// Re: ports/177370: New port: audio/opusfile This re-generated port on the attached shar file follows the latest upstream version 0.4, and avoids the libcompat.so issue by adding a copy of /usr/src/lib/libcompat/4.1/ftime.c to the WRKSRC. My former google account <liangtai.s4@gmail.com> was banned for uncertain reason. Very sad.
Re-generated shar archive that is almost same as the second shar archive but the Makefile uses the new options framework and uses pathfix macro properly.
opusfile-0.5 has been released.
Responsible Changed From-To: freebsd-ports-bugs->makc I'll take it.
Author: makc Date: Mon Jan 27 21:21:51 2014 New Revision: 341456 URL: http://svnweb.freebsd.org/changeset/ports/341456 QAT: https://qat.redports.org/buildarchive/r341456/ Log: 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> Added: head/audio/opusfile/ head/audio/opusfile/Makefile (contents, props changed) head/audio/opusfile/distinfo (contents, props changed) head/audio/opusfile/files/ head/audio/opusfile/files/ftime.c (contents, props changed) head/audio/opusfile/files/patch-configure.ac (contents, props changed) head/audio/opusfile/pkg-descr (contents, props changed) head/audio/opusfile/pkg-plist (contents, props changed) Modified: head/audio/Makefile Modified: head/audio/Makefile ============================================================================== --- head/audio/Makefile Mon Jan 27 21:20:21 2014 (r341455) +++ head/audio/Makefile Mon Jan 27 21:21:51 2014 (r341456) @@ -535,6 +535,7 @@ SUBDIR += optimfrog SUBDIR += opus SUBDIR += opus-tools + SUBDIR += opusfile SUBDIR += osalp SUBDIR += osd-lyrics SUBDIR += osdmixer Added: head/audio/opusfile/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/opusfile/Makefile Mon Jan 27 21:21:51 2014 (r341456) @@ -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> Added: head/audio/opusfile/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/opusfile/distinfo Mon Jan 27 21:21:51 2014 (r341456) @@ -0,0 +1,2 @@ +SHA256 (opusfile-0.5.tar.gz) = 2ce52d006aeeec9f10260dbe3073c4636954a1ab19c82b8baafefe0180aa4a39 +SIZE (opusfile-0.5.tar.gz) = 437671 Added: head/audio/opusfile/files/ftime.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/opusfile/files/ftime.c Mon Jan 27 21:21:51 2014 (r341456) @@ -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); +} Added: head/audio/opusfile/files/patch-configure.ac ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/opusfile/files/patch-configure.ac Mon Jan 27 21:21:51 2014 (r341456) @@ -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]) + Added: head/audio/opusfile/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/opusfile/pkg-descr Mon Jan 27 21:21:51 2014 (r341456) @@ -0,0 +1,3 @@ +Library for decoding .opus files, including seeking support. + +WWW: http://www.opus-codec.org/ Added: head/audio/opusfile/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/opusfile/pkg-plist Mon Jan 27 21:21:51 2014 (r341456) @@ -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 _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed New port added, with minor changes. Thanks!