Bug 185880 - [PATCH] audio/moc: options VORBIS and FLAC not honored when devel/pkgconf isn't installed
Summary: [PATCH] audio/moc: options VORBIS and FLAC not honored when devel/pkgconf isn...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-19 15:20 UTC by Jean-Sébastien Pédron
Modified: 2014-01-26 18:50 UTC (History)
0 users

See Also:


Attachments
file.diff (433 bytes, patch)
2014-01-19 15:20 UTC, Jean-Sébastien Pédron
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Sébastien Pédron freebsd_committer freebsd_triage 2014-01-19 15:20:00 UTC
When devel/pkgconfig isn't installed, the configure script fails to find libvorbis and libflac but doesn't complain. This leads to a player without Vorbis/FLAC formats support, even if the user selected those options.

The official binary package is affected by this problem.

Fix: The attached patch fixes it by adding pkgconfig to USES.

Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-01-19 15:20:08 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2014-01-19 15:20:08 UTC
Maintainer of audio/moc,

Please note that PR ports/185880 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/185880

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 dfilter service freebsd_committer freebsd_triage 2014-01-26 18:42:51 UTC
Author: antoine
Date: Sun Jan 26 18:42:43 2014
New Revision: 341257
URL: http://svnweb.freebsd.org/changeset/ports/341257
QAT: https://qat.redports.org/buildarchive/r341257/

Log:
  - Add explicit dependency on pkgconf so that some options are properly handled [1]
  - Use OPTIONS helpers
  - Stage support
  
  PR:		ports/185880 [1]
  Submitted by:	dumbbell [1]

Modified:
  head/audio/moc/Makefile
  head/audio/moc/pkg-plist

Modified: head/audio/moc/Makefile
==============================================================================
--- head/audio/moc/Makefile	Sun Jan 26 18:35:10 2014	(r341256)
+++ head/audio/moc/Makefile	Sun Jan 26 18:42:43 2014	(r341257)
@@ -3,21 +3,18 @@
 
 PORTNAME=	moc
 PORTVERSION=	2.4.4
-PORTREVISION=	11
+PORTREVISION=	12
 CATEGORIES=	audio
 MASTER_SITES=	ftp://ftp.daper.net/pub/soft/moc/stable/
 
 MAINTAINER=	rzinkov@gmail.com
 COMMENT=	Console audio player designed to be powerful and easy to use
 
-USES=		gmake
-NO_STAGE=	yes
+USES=		gmake pkgconfig
 USE_BZIP2=	yes
 USE_LDCONFIG=	yes
 GNU_CONFIGURE=	yes
 
-MAN1=		mocp.1
-
 CPPFLAGS+=	-I${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
 
@@ -26,96 +23,61 @@ OPTIONS_DEFAULT=	MP3 VORBIS FLAC CURL
 CURL_DESC=	curl support (Internet streams)
 RCC_DESC=	RCC support
 
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MJACK}
-LIB_DEPENDS+=	libjack.so:${PORTSDIR}/audio/jack
-.else
-CONFIGURE_ARGS+=	--without-jack
-.endif
+JACK_LIB_DEPENDS=	libjack.so:${PORTSDIR}/audio/jack
+JACK_CONFIGURE_OFF=	--without-jack
 
-.if ${PORT_OPTIONS:MMP3}
-LIB_DEPENDS+=	libmad.so:${PORTSDIR}/audio/libmad \
+MP3_LIB_DEPENDS=	libmad.so:${PORTSDIR}/audio/libmad \
 		libid3tag.so:${PORTSDIR}/audio/libid3tag
-PLIST_FILES+=	lib/moc/decoder_plugins/libmp3_decoder.a \
+MP3_PLIST_FILES=	lib/moc/decoder_plugins/libmp3_decoder.a \
 		lib/moc/decoder_plugins/libmp3_decoder.la \
 		lib/moc/decoder_plugins/libmp3_decoder.so
-.else
-CONFIGURE_ARGS+=	--without-mp3
-.endif
-
-.if ${PORT_OPTIONS:MMUSEPACK}
-LIB_DEPENDS+=	libmpcdec.so:${PORTSDIR}/audio/musepack \
-		tag_c.0:${PORTSDIR}/audio/taglib
-PLIST_FILES+=	lib/moc/decoder_plugins/libmusepack_decoder.a \
+MP3_CONFIGURE_OFF=	--without-mp3
+
+MUSEPACK_LIB_DEPENDS=	libmpcdec.so:${PORTSDIR}/audio/musepack \
+		libtag_c.so:${PORTSDIR}/audio/taglib
+MUSE_PACK_PLIST_FILES=	lib/moc/decoder_plugins/libmusepack_decoder.a \
 		lib/moc/decoder_plugins/libmusepack_decoder.la \
 		lib/moc/decoder_plugins/libmusepack_decoder.so
-.else
-CONFIGURE_ARGS+=	--without-musepack
-.endif
-
-.if ${PORT_OPTIONS:MVORBIS}
-LIB_DEPENDS+=	libvorbis.so:${PORTSDIR}/audio/libvorbis
-PLIST_FILES+=	lib/moc/decoder_plugins/libvorbis_decoder.a \
+MUSEPACK_CONFIGURE_OFF=	--without-musepack
+
+VORBIS_LIB_DEPENDS=	libvorbis.so:${PORTSDIR}/audio/libvorbis
+VORBIS_PLIST_FILES=	lib/moc/decoder_plugins/libvorbis_decoder.a \
 		lib/moc/decoder_plugins/libvorbis_decoder.la \
 		lib/moc/decoder_plugins/libvorbis_decoder.so
-.else
-CONFIGURE_ARGS+=	--without-ogg
-.endif
-
-.if ${PORT_OPTIONS:MFLAC}
-LIB_DEPENDS+=	libFLAC.so:${PORTSDIR}/audio/flac
-PLIST_FILES+=	lib/moc/decoder_plugins/libflac_decoder.a \
+VORBIS_CONFIGURE_OFF=	--without-ogg
+
+FLAC_LIB_DEPENDS=	libFLAC.so:${PORTSDIR}/audio/flac
+FLAC_PLIST_FILES=	lib/moc/decoder_plugins/libflac_decoder.a \
 		lib/moc/decoder_plugins/libflac_decoder.la \
 		lib/moc/decoder_plugins/libflac_decoder.so
-.else
-CONFIGURE_ARGS+=	--without-flac
-.endif
-
-.if ${PORT_OPTIONS:MFFMPEG}
-LIB_DEPENDS+=	libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
-PLIST_FILES+=   lib/moc/decoder_plugins/libffmpeg_decoder.a \
+FLAC_CONFIGURE_OFF=	--without-flac
+
+FFMPEG_LIB_DEPENDS=	libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
+FFMPEG_PLIST_FILES=   lib/moc/decoder_plugins/libffmpeg_decoder.a \
 		lib/moc/decoder_plugins/libffmpeg_decoder.la \
 		lib/moc/decoder_plugins/libffmpeg_decoder.so
-.else
-CONFIGURE_ARGS+=	--without-ffmpeg
-.endif
-
-.if ${PORT_OPTIONS:MSNDFILE}
-LIB_DEPENDS+=	libsndfile.so:${PORTSDIR}/audio/libsndfile
-PLIST_FILES+=	lib/moc/decoder_plugins/libsndfile_formats_decoder.a \
+FFMPEG_CONFIGURE_OFF=	--without-ffmpeg
+
+SNDFILE_LIB_DEPENDS=	libsndfile.so:${PORTSDIR}/audio/libsndfile
+SNDFILE_PLIST_FILES=	lib/moc/decoder_plugins/libsndfile_formats_decoder.a \
 		lib/moc/decoder_plugins/libsndfile_formats_decoder.la \
 		lib/moc/decoder_plugins/libsndfile_formats_decoder.so
-.else
-CONFIGURE_ARGS+=	--without-sndfile
-.endif
-
-.if ${PORT_OPTIONS:MSPEEX}
-LIB_DEPENDS+=	libspeex.so:${PORTSDIR}/audio/speex
-PLIST_FILES+=	lib/moc/decoder_plugins/libspeex_decoder.a \
+SNDFILE_CONFIGURE_OFF=	--without-sndfile
+
+SPEEX_LIB_DEPENDS=	libspeex.so:${PORTSDIR}/audio/speex
+SPEEX_PLIST_FILES=	lib/moc/decoder_plugins/libspeex_decoder.a \
 		lib/moc/decoder_plugins/libspeex_decoder.la \
 		lib/moc/decoder_plugins/libspeex_decoder.so
-.else
-CONFIGURE_ARGS+=	--without-speex
-.endif
-
-.if ${PORT_OPTIONS:MSAMPLERATE}
-LIB_DEPENDS+=	libsamplerate.so:${PORTSDIR}/audio/libsamplerate
-.else
-CONFIGURE_ARGS+=	--without-samplerate
-.endif
-
-.if ${PORT_OPTIONS:MCURL}
-LIB_DEPENDS+=	libcurl.so:${PORTSDIR}/ftp/curl
-.else
-CONFIGURE_ARGS+=	--without-curl
-.endif
+SPEEX_CONFIGURE_OFF=	--without-speex
+
+SAMPLERATE_LIB_DEPENDS=	libsamplerate.so:${PORTSDIR}/audio/libsamplerate
+SAMPLERATE_CONFIGURE_OFF=	--without-samplerate
+
+CURL_LIB_DEPENDS=	libcurl.so:${PORTSDIR}/ftp/curl
+CURL_CONFIGURE_OFF=	--without-curl
 
-.if ${PORT_OPTIONS:MRCC}
-LIB_DEPENDS+=	librcc.so:${PORTSDIR}/devel/librcc \
+RCC_LIB_DEPENDS=	librcc.so:${PORTSDIR}/devel/librcc \
 		librcd.so:${PORTSDIR}/devel/librcd
-.else
-CONFIGURE_ARGS+=	--without-rcc
-.endif
+RCC_CONFIGURE_OFF=	--without-rcc
 
 .include <bsd.port.mk>

Modified: head/audio/moc/pkg-plist
==============================================================================
--- head/audio/moc/pkg-plist	Sun Jan 26 18:35:10 2014	(r341256)
+++ head/audio/moc/pkg-plist	Sun Jan 26 18:42:43 2014	(r341257)
@@ -1,4 +1,5 @@
 bin/mocp
+man/man1/mocp.1.gz
 share/doc/moc/config.example
 share/doc/moc/THANKS
 share/doc/moc/README
_______________________________________________
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"
Comment 4 Antoine Brodin freebsd_committer freebsd_triage 2014-01-26 18:43:14 UTC
State Changed
From-To: feedback->closed

Patch committed, thanks!