[FFmpeg-devel] [RFC] make distclean doesn't remove the libswscale pc files

Stefano Sabatini stefano.sabatini-lala
Tue Sep 2 20:04:07 CEST 2008


On date Friday 2008-08-29 20:50:29 +0200, Stefano Sabatini encoded:
> On date Wednesday 2008-08-27 23:12:14 +0200, Stefano Sabatini encoded:
> > On date Tuesday 2008-08-26 20:35:27 +0200, Stefano Sabatini encoded:
> > > Hi all,
> > > 
> > > as discussed in this thread:
> > > http://thread.gmane.org/gmane.comp.video.ffmpeg.user/18003/
> > > 
> > > make distclean doesn't remove the libswscale pc files.
> > > 
> > > In order to fix the glitch I have three proposals, in order of
> > > complexity:
> > > 
> > > 1) to force the Makefile to always remove those files, even when the
> > > libswscale Makefile isn't included
> > > 
> > > 2) to remove from configure the part which generates unconditionally
> > > the libswscale pc files
> > > 
> > > 3) to implement in the Makefile the creation of the pc files, in this
> > > way the Makefile would be aware of the created pc files and would
> > > delete it in the distclean rule. This has been suggested some time ago
> > > by M?ns.
> > > 
> > > I prefer solutions 2 or 3 in that order, but I'm not sure about the
> > > correctness of 2, I indeed wonder about why is necessary to have those
> > > files if libswscale isn't neither installed neither compiled.
> > > 
> > > If we agree on the preferred method I'll provide the corresponding
> > > implementation to fix the issue.
> > 
> > After more inspection I undestood the utility of the libswscale.pc
> > file being installed even if there isn't libswscale (resuming, suppose
> > that there is an application installed which uses the libswscale API
> > but without libswscale installed, the libswscale pc file in this case
> > requires the presence of libavcodec which provides a compatible API).
> > 
> > Since ffmpeg currently doesn't install the libswscale pc file if
> > libswscale isn't enabled, then this is a bug (which will broke
> > applications requiring libswscale functionality on systems without
> > libswscale).
> > 
> > Otherwise, if we don't care about that (afterall they can always
> > install libswscale if they want) we can drop libswscale pc generation
> > when libswscale isn't enabled and fix the issue of the subject.
> > 
> > Opinions?
> > 
> > Patch for the second option included, regards.
> [...]
> > Index: configure
> > ===================================================================
> > --- configure	(revision 14991)
> > +++ configure	(working copy)
> > @@ -2262,9 +2262,5 @@
> >      pkgconfig_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" "$pkg_requires libavutil = $LIBAVUTIL_VERSION"
> >  enabled postproc &&
> >      pkgconfig_generate libpostproc "FFmpeg post processing library" "$LIBPOSTPROC_VERSION"
> > -if enabled swscale; then
> > +enabled swscale &&
> >      pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "" "libavutil = $LIBAVUTIL_VERSION"
> > -else
> > -    pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "" "$pkg_requires libavcodec = $LIBAVCODEC_VERSION"
> > -    apply libswscale/libswscale.pc sed s/^Libs:.*$/Libs:/
> > -fi
> 
> Ping?

Does someone care about this? Currently the libswscale .pc file is not
installed if libswscale isn't enabled, no one apparently complained
about that so I think it should be quite safe to remove those lines
from the configure script and don't generate that file at all.

I'll apply it in three days if no one has objections.

Regards.
-- 
FFmpeg = Foolish Frenzy Mean Proud Entertaining God




More information about the ffmpeg-devel mailing list