#!/bin/sh
# This is a shell archive
echo x loudgain
mkdir -p loudgain > /dev/null 2>&1
echo x loudgain/Makefile
sed 's/^X//' > loudgain/Makefile << 'SHAR_END'
X# $FreeBSD$
X
XPORTNAME=	loudgain
XDISTVERSIONPREFIX=	v
XDISTVERSION=	0.6.8
XCATEGORIES=	audio
X
XMAINTAINER=	none@FreeBSD.org
XCOMMENT=	ReplayGain 2.0 loudness normalizer
X
XLICENSE=	BSD2CLAUSE
XLICENSE_FILE=	${WRKSRC}/COPYING
X
XLIB_DEPENDS=	libavcodec.so:multimedia/ffmpeg \
X		libavformat.so:multimedia/ffmpeg \
X		libavutil.so:multimedia/ffmpeg \
X		libswresample.so:multimedia/ffmpeg \
X		libebur128.so:audio/libebur128 \
X		libtag.so:audio/taglib
X
XUSES=	cmake
X
XUSE_GITHUB=	yes
XGH_ACCOUNT=	Moonbase59
X
XPLIST_FILES=	bin/loudgain \
X		share/man/man1/loudgain.1.gz
X
Xpost-extract:
X	${RM} -v ${WRKSRC}/bin/loudgain*.deb ${WRKSRC}/bin/loudgain.static
X
X.include <bsd.port.mk>
SHAR_END
echo x loudgain/distinfo
sed 's/^X//' > loudgain/distinfo << 'SHAR_END'
XTIMESTAMP = 1583097822
XSHA256 (Moonbase59-loudgain-v0.6.8_GH0.tar.gz) = 1137c193ad941b366e87c5d84ccc95a7aa8571affc060db0bd1cf72c489aeaee
XSIZE (Moonbase59-loudgain-v0.6.8_GH0.tar.gz) = 27351854
SHAR_END
echo x loudgain/pkg-descr
sed 's/^X//' > loudgain/pkg-descr << 'SHAR_END'
Xloudgain is a versatile ReplayGain 2.0 loudness normalizer, based on the
XEBU R128/ITU BS.1770 standard (-18 LUFS) and supports
XFLAC/Ogg/MP2/MP3/MP4/M4A/ALAC/Opus/ASF/WMA/WAV/WavPack/AIFF/APE audio files.
XIt uses the well-known mp3gain commandline syntax but will never modify the
Xactual audio data.
X
XWWW: https://github.com/Moonbase59/loudgain
SHAR_END
echo x loudgain/files
mkdir -p loudgain/files > /dev/null 2>&1
echo x loudgain/files/patch-src_printf.c
sed 's/^X//' > loudgain/files/patch-src_printf.c << 'SHAR_END'
X--- src/printf.c.orig	2019-09-06 15:31:19 UTC
X+++ src/printf.c
X@@ -42,7 +42,7 @@
X #ifdef HAVE_PTY_H
X 	#include <pty.h>
X #else
X-	#include <util.h>
X+	#include <libutil.h>
X #endif
X 
X #include <sys/ioctl.h>
SHAR_END
echo x loudgain/files/patch-CMakeLists.txt
sed 's/^X//' > loudgain/files/patch-CMakeLists.txt << 'SHAR_END'
X--- CMakeLists.txt.orig	2019-09-06 15:31:19 UTC
X+++ CMakeLists.txt
X@@ -18,10 +18,7 @@ SET(INSTALL_PREFIX ${CMAKE_INSTALL_PREFI
X 
X INCLUDE(FindPkgConfig)
X 
X-IF (APPLE)
X-  # Fix linking on 10.14+. See https://stackoverflow.com/questions/54068035
X-  LINK_DIRECTORIES(/usr/local/lib)
X-ENDIF (APPLE)
X+LINK_DIRECTORIES(/usr/local/lib)
X 
X 
X PKG_CHECK_MODULES(LAVC libavcodec REQUIRED)
SHAR_END
exit
