mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-21 00:25:50 +00:00
- Add option PULSEADUIO default to off, package links to
libpulse when availble on system - Don't reset options to just LAME when not building on package server - Convert to new LID_DEPENDS format, use option helpers PR: ports/182838 Submitted by: me Approved by: maintainer timeout
This commit is contained in:
parent
bde46ec0cc
commit
cd5b7e32eb
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=336436
@ -3,6 +3,7 @@
|
||||
|
||||
PORTNAME= sox
|
||||
PORTVERSION= 14.4.1
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= audio
|
||||
MASTER_SITES= SF
|
||||
|
||||
@ -20,11 +21,11 @@ USE_LDCONFIG= yes
|
||||
USE_AUTOTOOLS= aclocal autoconf automake libltdl
|
||||
|
||||
OPTIONS_DEFINE= ALSA AO AMRNB AMRWB FFMPEG FLAC GSM ID3TAG LADSPA LAME \
|
||||
MAD PNG SNDFILE VORBIS WAVPACK
|
||||
MAD PNG PULSEAUDIO SNDFILE VORBIS WAVPACK
|
||||
OPTIONS_DEFAULT= AO FFMPEG FLAC GSM ID3TAG MAD PNG SNDFILE VORBIS
|
||||
# Default LAME to off for packages so we don't end up RESTRICTED
|
||||
.if !defined(PACKAGE_BUILDING)
|
||||
OPTIONS_DEFAULT= LAME
|
||||
OPTIONS_DEFAULT+= LAME
|
||||
.endif
|
||||
|
||||
AMRNB_DESC= AMR Speech Codec (Narrowband)
|
||||
@ -32,124 +33,70 @@ AMRWB_DESC= AMR Speech Codec (Wideband)
|
||||
GSM_DESC= Use libgsm from ports (else use bundled lib)
|
||||
PNG_DESC= PNG spectrogram creation
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
CPPFLAGS+= -I${LOCALBASE}/include
|
||||
LDFLAGS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS}
|
||||
CONFIGURE_ARGS+= --with-pkgconfigdir="${PREFIX}/libdata/pkgconfig"
|
||||
CONFIGURE_ARGS+= --with-distro="${CONFIGURE_TARGET} ${PKGNAME}"
|
||||
CONFIGURE_ARGS+= --with-distro="${CONFIGURE_TARGET} ${PKGNAME}" \
|
||||
--with-gsm
|
||||
|
||||
.if ${PORT_OPTIONS:MALSA}
|
||||
LIB_DEPENDS+= libasound.so:${PORTSDIR}/audio/alsa-lib
|
||||
RUN_DEPENDS+= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:${PORTSDIR}/audio/alsa-plugins
|
||||
CONFIGURE_ARGS+= --with-alsa
|
||||
.else
|
||||
CONFIGURE_ARGS+= --without-alsa
|
||||
.endif
|
||||
ALSA_CONFIGURE_WITH= alsa
|
||||
ALSA_LIB_DEPENDS= libasound.so:${PORTSDIR}/audio/alsa-lib
|
||||
ALSA_RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:${PORTSDIR}/audio/alsa-plugins
|
||||
|
||||
.if ${PORT_OPTIONS:MAO}
|
||||
CONFIGURE_ARGS+= --with-ao
|
||||
LIB_DEPENDS+= libao.so:${PORTSDIR}/audio/libao
|
||||
.else
|
||||
CONFIGURE_ARGS+= --without-ao
|
||||
.endif
|
||||
AO_CONFIGURE_WITH= ao
|
||||
AO_LIB_DEPENDS= libao.so:${PORTSDIR}/audio/libao
|
||||
|
||||
.if ${PORT_OPTIONS:MAMRNB}
|
||||
CONFIGURE_ARGS+= --with-amrnb
|
||||
LIB_DEPENDS+= libamrnb.so:${PORTSDIR}/audio/libamrnb
|
||||
.else
|
||||
CONFIGURE_ARGS+= --without-amrnb
|
||||
.endif
|
||||
AMRNB_CONFIGURE_WITH= amrnb
|
||||
AMRNB_LIB_DEPENDS= libamrnb.so:${PORTSDIR}/audio/libamrnb
|
||||
|
||||
.if ${PORT_OPTIONS:MAMRWB}
|
||||
CONFIGURE_ARGS+= --with-amrwb
|
||||
LIB_DEPENDS+= libamrwb.so:${PORTSDIR}/audio/libamrwb
|
||||
.else
|
||||
CONFIGURE_ARGS+= --without-amrwb
|
||||
.endif
|
||||
AMRWB_CONFIGURE_WITH= amrwb
|
||||
AMRWB_LIB_DEPENDS= libamrwb.so:${PORTSDIR}/audio/libamrwb
|
||||
|
||||
.if ${PORT_OPTIONS:MFFMPEG}
|
||||
CONFIGURE_ARGS+= --with-ffmpeg
|
||||
LIB_DEPENDS+= libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
|
||||
.else
|
||||
CONFIGURE_ARGS+= --without-ffmpeg
|
||||
.endif
|
||||
FFMPEG_CONFIGURE_WITH= ffmpeg
|
||||
FFMPEG_LIB_DEPENDS= libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
|
||||
|
||||
.if ${PORT_OPTIONS:MVORBIS}
|
||||
CONFIGURE_ARGS+= --with-oggvorbis
|
||||
LIB_DEPENDS+= libvorbis.so:${PORTSDIR}/audio/libvorbis
|
||||
.else
|
||||
CONFIGURE_ARGS+= --without-oggvorbis
|
||||
.endif
|
||||
VORBIS_CONFIGURE_WITH= oggvorbis
|
||||
VORBIS_LIB_DEPENDS= libvorbis.so:${PORTSDIR}/audio/libvorbis
|
||||
|
||||
.if ${PORT_OPTIONS:MSNDFILE}
|
||||
CONFIGURE_ARGS+= --with-sndfile
|
||||
LIB_DEPENDS+= libsndfile.so:${PORTSDIR}/audio/libsndfile
|
||||
.else
|
||||
CONFIGURE_ARGS+= --without-sndfile
|
||||
.endif
|
||||
SNDFILE_CONFIGURE_WITH= sndfile
|
||||
SNDFILE_LIB_DEPENDS= libsndfile.so:${PORTSDIR}/audio/libsndfile
|
||||
|
||||
.if ${PORT_OPTIONS:MLADSPA}
|
||||
CONFIGURE_ARGS+= --with-ladspa
|
||||
RUN_DEPENDS+= ${LOCALBASE}/lib/ladspa/filter.so:${PORTSDIR}/audio/ladspa
|
||||
BUILD_DEPENDS+= ${LOCALBASE}/lib/ladspa/filter.so:${PORTSDIR}/audio/ladspa
|
||||
.else
|
||||
CONFIGURE_ARGS+= --without-ladspa
|
||||
.endif
|
||||
LADSPA_CONFIGURE_WITH= ladspa
|
||||
LADSPA_RUN_DEPENDS= ${LOCALBASE}/lib/ladspa/filter.so:${PORTSDIR}/audio/ladspa
|
||||
LADSPA_BUILD_DEPENDS= ${LOCALBASE}/lib/ladspa/filter.so:${PORTSDIR}/audio/ladspa
|
||||
|
||||
.if ${PORT_OPTIONS:MLAME}
|
||||
CONFIGURE_ARGS+= --with-lame
|
||||
LIB_DEPENDS+= libmp3lame.so:${PORTSDIR}/audio/lame
|
||||
.else
|
||||
CONFIGURE_ARGS+= --without-lame
|
||||
.endif
|
||||
LAME_CONFIGURE_WITH= lame
|
||||
LAME_LIB_DEPENDS= libmp3lame.so:${PORTSDIR}/audio/lame
|
||||
|
||||
.if ${PORT_OPTIONS:MFLAC}
|
||||
CONFIGURE_ARGS+= --with-flac
|
||||
LIB_DEPENDS+= libFLAC.so:${PORTSDIR}/audio/flac
|
||||
.else
|
||||
CONFIGURE_ARGS+= --without-flac
|
||||
.endif
|
||||
FLAC_CONFIGURE_WITH= flac
|
||||
FLAC_LIB_DEPENDS= libFLAC.so:${PORTSDIR}/audio/flac
|
||||
|
||||
.if ${PORT_OPTIONS:MMAD}
|
||||
CONFIGURE_ARGS+= --with-mad
|
||||
LIB_DEPENDS+= libmad.so:${PORTSDIR}/audio/libmad
|
||||
.else
|
||||
CONFIGURE_ARGS+= --without-mad
|
||||
.endif
|
||||
MAD_CONFIGURE_WITH= mad
|
||||
MAD_LIB_DEPENDS= libmad.so:${PORTSDIR}/audio/libmad
|
||||
|
||||
.if ${PORT_OPTIONS:MPNG}
|
||||
CONFIGURE_ARGS+= --with-png
|
||||
LIB_DEPENDS+= libpng15.so:${PORTSDIR}/graphics/png
|
||||
.else
|
||||
CONFIGURE_ARGS+= --without-png
|
||||
.endif
|
||||
PNG_CONFIGURE_WITH= png
|
||||
PNG_LIB_DEPENDS= libpng15.so:${PORTSDIR}/graphics/png
|
||||
|
||||
.if ${PORT_OPTIONS:MGSM}
|
||||
CONFIGURE_ARGS+= --with-gsm
|
||||
LIB_DEPENDS+= libgsm.so:${PORTSDIR}/audio/gsm
|
||||
.else
|
||||
CONFIGURE_ARGS+= --with-gsm
|
||||
PULSEAUDIO_CONFIGURE_WITH= pulseaudio
|
||||
PULSEAUDIO_LIB_DEPENDS= libpulse.so:${PORTSDIR}/audio/pulseaudio
|
||||
|
||||
GSM_LIB_DEPENDS= libgsm.so:${PORTSDIR}/audio/gsm
|
||||
|
||||
ID3TAG_CONFIGURE_WITH= id3tag
|
||||
ID3TAG_LIB_DEPENDS= libid3tag.so:${PORTSDIR}/audio/libid3tag
|
||||
|
||||
WAVPACK_CONFIGURE_WITH= wavpack
|
||||
WAVPACK_LIB_DEPENDS= libwavpack.so:${PORTSDIR}/audio/wavpack
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ! ${PORT_OPTIONS:MGSM}
|
||||
# We cannot ask for gsm to be enabled without it trying to use external gsm,
|
||||
# so force the autoconf checks to fail
|
||||
CONFIGURE_ENV+= ac_cv_header_gsm_h=no ac_cv_header_gsm_gsm_h=no \
|
||||
ac_cv_lib_gsm_gsm_create=no
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MID3TAG}
|
||||
CONFIGURE_ARGS+= --with-id3tag
|
||||
LIB_DEPENDS+= libid3tag.so:${PORTSDIR}/audio/libid3tag
|
||||
.else
|
||||
CONFIGURE_ARGS+= --without-id3tag
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MWAVPACK}
|
||||
CONFIGURE_ARGS+= --with-wavpack
|
||||
LIB_DEPENDS+= libwavpack.so:${PORTSDIR}/audio/wavpack
|
||||
.else
|
||||
CONFIGURE_ARGS+= --without-wavpack
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's/ CODEC_ID/ AV_CODEC_ID/g' \
|
||||
-e 's/ CodecID/ AVCodecID/g' \
|
||||
|
Loading…
Reference in New Issue
Block a user