cvs commit: ports/multimedia/mencoder Makefile

Mario Sergio Fujikawa Ferreira lioux at FreeBSD.org
Tue Jul 26 03:20:22 UTC 2011


On Mon, Jul 25, 2011 at 11:55:58PM -0300, Mario Sergio Fujikawa Ferreira wrote:
> Date: Mon, 25 Jul 2011 23:56:22 -0300
> From: Mario Sergio Fujikawa Ferreira <lioux at FreeBSD.org>
> To: "Philip M. Gollucci" <pgollucci at p6m7g8.com>
> Cc: Doug Barton <dougb at FreeBSD.org>, bf1783 at gmail.com, "b. f."
>  <bf1783 at googlemail.com>, ports-committers at FreeBSD.org,
>  cvs-ports at FreeBSD.org, cvs-all at FreeBSD.org, riggs at rrr.de
> Subject: Re: cvs commit: ports/multimedia/mencoder Makefile
> User-Agent: Mutt/1.5.21 (2010-09-15)
> 
> On Mon, Jul 25, 2011 at 02:33:56PM +0000, Philip M. Gollucci wrote:
> > Date: Mon, 25 Jul 2011 14:34:20 +0000
> > From: "Philip M. Gollucci" <pgollucci at p6m7g8.com>
> > To: Doug Barton <dougb at FreeBSD.org>
> > CC: bf1783 at gmail.com, "b. f." <bf1783 at googlemail.com>, Mario Sergio
> >  Fujikawa Ferreira <lioux at FreeBSD.org>, ports-committers at FreeBSD.org,
> >  cvs-ports at FreeBSD.org, cvs-all at FreeBSD.org, riggs at rrr.de
> > Subject: Re: cvs commit: ports/multimedia/mencoder Makefile
> > User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.16)
> >  Gecko/20110507 Thunderbird/3.0.11
> > 
> > On 07/23/11 20:13, Doug Barton wrote:
> > > On 07/22/2011 23:07, b. f. wrote:
> > > 
> > >> I must renew my plea to avoid these "fixes".  When a user sets
> > >> WITH/WITHOUT_FOO, he means precisely "build this port
> > >> WITH/WITHOUT_FOO", and not "build this port WITH/WITHOUT_FOO, except
> > >> if package X is installed, and, if it is, silently do something else",
> > >> and we should not be adding code to do the latter. We should instead
> > >> patch the broken distribution configure scripts and Makefiles, so that
> > >> the problem does not occur.  If a lack of time or another problem
> > >> prevents this from being done initially, then as a temporary
> > >> workaround, we should add something like:
> > >>
> > >> .if exists(${LOCALBASE}/lib/libass.so) && defined(WITHOUT_ASS)
> > >> BROKEN= libass is installed, so broken mplayer scripts will ignore WITHOUT_ASS
> > >> .endif
> > >>
> > >> so that the user will know that his choice of options cannot be used,
> > >> and he can take the appropriate action -- and he will not be misled
> > >> into thinking that his choice of options are used when they are not.
> > > 
> > > +1
> > > 
> > Yes, I agree violently too.  I even remember removing about 10
> > occurrences in the past.
> 
>   Okay, I agree in principle. Whatever the user decides should be
> upheld. I hate when a port disagrees with me. However, the reality
> is that mplayer configure structure is broken and we can build it
> with this.
> 
>   The situation is as follows for those who might not be following:
> 
> ---
> A) if multimedia/libass is not installed:
>   1. mplayer/mencoder build just fine with the internal code supplied
> 
> B) if multimedia/libass is installed:
>   2. mplayer/mencoder only builds if we fix configure script and
>      force port dependend on multimedia/libass because mplayer's
>      configure is broken.
> ---
> 
>   Is multimedia/libass easily available? Yeah, because multimedia/vlc
> depends on it and lots (if not most) users building mplayer, should
> have already built vlc. So this problem is pretty standard for many
> users.
> 
>   The suggestion I've been reading is that we mark the port as
> BROKEN? Well, then first we need to decide some other things (and
> this has been an age long discussion on the institution of ports):
> 
> 1) What should be our standard policy for ports? What is the main
> reason we have ports?
> 
>   I believe we have ports to have applications working on FreeBSD
> out of the box with as many options as we want, not just the packaged
> standard options. We back port as much fixes as possible so that
> we don't have to keep fixing. However, the foremost reason for ports
> is having things WORKING out of the box. That's just my 2 cents. I
> know how to build-fix-tweak my way around a broken 'portupgrade -a'
> but that's not the average user .... and we also want the average
> user.
> 
>   Ports do not exist to teach the user. They exist to work.
> 
>   Maintainers and developers exist to teach each other. And, we try
> to educate the user whenever the opportunity presents itself.
> 
> 2) Do we have policy exceptions on ports standards? Or, does the
> same policy apply to every single situation?
> 
>   We do have policy exceptions today which I will not name and we
> will keep having them because not all ports are born equal. And,
> that is that. Some ports are more important than others and they
> are entitled to special treatment (I am not making a case for
> mplayer, just making a point).
> 
> 
>   I apologize if the email seems to be inflamatory. I read it twice
> to try working out more subtle wording but I think I couldn't. I
> apologize again.
> 
>   To sum up. My point is this: Is the ports system a community
> service or a user teaching ground? Do we give mplayer special
> dispensation on this or do we devise/appy a policy here?
> 
>   We need a middle ground: the port should uphold the user but it
> should also build if it's not too difficult. Marking it BROKEN when
> it's so easily "fixable" is too harsh a decision.
> 
>   Please, revert the commit if that's the overall decision.
> Nonetheless, let's keep up this thread because I still believe we
> can reach common ground.
> 

  I have a simple suggestion that eluded me on my previous email
and could have prevented the rant I wrote. :(

  Let's remove the OPTIONS ASS (for libass) entry AND let's simply
depend on multimedia/libass.

  It is simple and fulfills every criteria:

  1) port is going to build

  2) no option will be ignored

  3) POLA is upheld since the port was built with ASS subtitle
     support before and it will continue to be. The only difference
     is that it will always use an external library instead of the
     internal one.

  Let me know what you think. A multimedia/mencoder patch is attached
as a suggestion. Is this compromise acceptable?

  Best regards,

-- 
Mario S F Ferreira - DF - Brazil - "I guess this is a signature."
feature, n: a documented bug | bug, n: an undocumented feature
-------------- next part --------------
--- Makefile.orig	2011-07-26 00:12:17.000000000 -0300
+++ Makefile	2011-07-26 00:14:00.000000000 -0300
@@ -6,7 +6,7 @@
 
 PORTNAME=	mencoder
 PORTVERSION=	${MPLAYER_PORT_VERSION}
-PORTREVISION=	1
+PORTREVISION=	2
 COMMENT=	Convenient video file and movie encoder
 RESTRICTED=	Port has restricted dependencies
 
@@ -41,7 +41,6 @@
 OPTIONS+=	VPX "Enable VP8 video via libvpx" off
 OPTIONS+=	DIRAC "Enable dirac video codec support" off
 OPTIONS+=	SCHROEDINGER "Dirac codec via libschroedinger" off
-OPTIONS+=	ASS "Enable ASS/SSA subtitle rendering" Off
 OPTIONS+=	REALPLAYER "Enable real player plugin" off
 OPTIONS+=	LIVEMEDIA "Enable LIVE555 streaming support" off
 OPTIONS+=	SMB "Enable Samba input support" off
@@ -65,12 +64,6 @@
 		psnr-video.sh qepdvcd.sh subedit.pl \
 		subsearch.sh w32codec_dl.pl wma2ogg.pl \
 
-# fix for bug when libass is installed, mplayer configure does not
-# uphold --disable-ass
-.if exists(${LOCALBASE}/lib/libass.so)
-WITH_ASS=	yes
-.endif
-
 .include <bsd.port.pre.mk>
 
 LIB_DEPENDS+=	mp3lame.0:${PORTSDIR}/audio/lame
@@ -95,16 +88,12 @@
 
 ALL_TARGET=	mencoder
 
-.include "${.CURDIR}/../mplayer/Makefile.options"
-
-.if defined(WITH_ASS)
+# multimedia/libass
+BUILD_DEPENDS+=  pkg-config:${PORTSDIR}/devel/pkg-config
 LIB_DEPENDS+=	ass.5:${PORTSDIR}/multimedia/libass
-USE_GNOME+=	pkgconfig
 LIBASS_PKGCONFIG_CFLAGS=	pkg-config --cflags --silence-errors libass
-.else
-CONFIGURE_ARGS+=	--disable-ass --disable-ass-internal
-LIBASS_PKGCONFIG_CFLAGS=	${ECHO_CMD}
-.endif
+
+.include "${.CURDIR}/../mplayer/Makefile.options"
 
 .if defined(WITH_FONTCONFIG)
 LIB_DEPENDS+=	fontconfig.1:${PORTSDIR}/x11-fonts/fontconfig


More information about the cvs-all mailing list