Date: Thu, 6 Sep 2007 01:14:14 +0200 From: Danny Pansters <danny@ricin.com> To: freebsd-multimedia@freebsd.org Cc: Pawel Pekala <c0rn@o2.pl> Subject: Re: [patch] multimedia/kmplayer update to 0.9.4a Message-ID: <200709060114.15244.danny@ricin.com> In-Reply-To: <200709042112.07555.fbsd.multimedia@rachie.is-a-geek.net> References: <1188929661.62988@caprica.slowicza.org> <200709042112.07555.fbsd.multimedia@rachie.is-a-geek.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--Boundary-00=_Hhz3GoCRdAnaKmF Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tuesday 04 September 2007 21:12:06 Mel wrote: > Hi, > > sorry to intrude, but... > > On Tuesday 04 September 2007 20:14:21 Pawel Pekala wrote: > > -### > > -## Lib Detection > > -### > > -# gstreamer > > -.if exists(${X11BASE}/lib/libgstplay-0.8.so) > > -WITH_GSTREAMER=yes > > -.endif > > -# xine > > -.if exists(${X11BASE}/lib/libxine.so) > > -WITH_XINE=yes > > -.endif > > Is it really necessary to do this automagical detection without > user-override? It happens frequently that I try some library for a few > days/weeks, in between ports get upgraded and uninstalling that library > suddenly reports 10 more dependencies. > Would be nice if these constructs were at least created as: > .if exists(${X11BASE}/lib/libgstplay-0.8.so) && !defined(WITHOUT_GSTREAMER) Looks to me that this patch is wrong, but mostly so is the original port. If you use OPTIONS, you shouldn't use constructs like exists() at all, but rather only have the proper LIB_DEPENDS (or USE_*) added if the option is set to on. Even if, for example, xinelib is present, if the user keeps the option unset it should *not* build or install kxineplayer. Or remove the OPTIONS if it's not possible to use them as intended. If you have OPTIONS they should override anything else (POLA). Attached is a reworked diff for the port update plus proper OPTIONS handling and removing non essential comments. Special flags for gcc42 don't seem to be needed (anymore?). Besides, disabling the standard -O2 flag should only be done as the very last resort IMHO because if that goes wrong there must be some underlying problem. I don't see -pedantic when building with either g++34 or g++42. If needed, I don't mind removing that. Tested on -STABLE with both gcc34 and gcc42, ack'd that kgstplayer, kxineplayer are installed when asked for, and that runtime switching between backends is possible (I apparently don't have the proper formats enabled withy xine, gst to actually see and hear anything when testing but that's most likely a local thing). Not tested on tinderbox (but I did test deinstall/plist on my -STABLE box). I use kmplayer a lot as my principal KDE video player, and so if multimedia@ would rather not maintain it or doesn't have the manpower, I'm willing to add kmplayer maintainership to my workload. CC'd original submitter and the person who commented on it (to whose mail this is a reply). Cheers, Dan --Boundary-00=_Hhz3GoCRdAnaKmF Content-Type: text/x-diff; charset="iso-8859-1"; name="multimedia::kmplayer.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="multimedia::kmplayer.diff" diff -ruN multimedia/kmplayer.old/Makefile multimedia/kmplayer/Makefile --- multimedia/kmplayer.old/Makefile 2007-09-05 23:14:23.000000000 +0200 +++ multimedia/kmplayer/Makefile 2007-09-06 00:12:10.000000000 +0200 @@ -6,12 +6,11 @@ # PORTNAME= kmplayer -DISTVERSION= 0.9.3 -PORTREVISION= 2 +DISTVERSION= 0.9.4 +PORTREVISION= # zero PORTEPOCH= 2 CATEGORIES= multimedia audio kde MASTER_SITES= http://kmplayer.kde.org/pkgs/ -#DISTNAME= ${PORTNAME}-${PORTVERSION:C/\.r/-rc/} MAINTAINER= multimedia@FreeBSD.org COMMENT= KDE frontend to mplayer @@ -22,58 +21,35 @@ USE_KDEBASE_VER=3 USE_XLIB= yes USE_GMAKE= yes +USE_LDCONFIG= yes +INSTALLS_ICONS= yes USE_AUTOTOOLS= libtool:15 -CONFIGURE_ARGS+=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL} -CONFIGURE_TARGET= -CONFIGURE_ARGS+=--with-x=${X11BASE} --disable-debug - -OPTIONS= GSTREAMER "Enable support for video playback using gstreamer" off \ - XINE "Enable support for video playback using libxine" off - -WANT_GSTREAMER= yes - -### -## Lib Detection -### -# gstreamer -.if exists(${X11BASE}/lib/libgstplay-0.8.so) -WITH_GSTREAMER=yes -.endif -# xine -.if exists(${X11BASE}/lib/libxine.so) -WITH_XINE=yes -.endif +USE_GETTEXT= yes -post-patch: -# remove -pedantic where possible to fix build errors on -CURRENT -# remove optimizations - @${REINPLACE_CMD} -e \ - 's|-O2||; s|-pedantic ||' \ - ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} -# do not try to roll our own mimetypes - @${REINPLACE_CMD} -E -e \ - 's|^(SUBDIRS.*)mimetypes|\1|' \ - ${WRKSRC}/Makefile.in +CONFIGURE_ARGS+=--with-x=${LOCALBASE} --disable-debug + +OPTIONS= GSTREAMER "Enable gstreamer support (kgstplayer)" off \ + XINE "Enable libxine support (kxineplayer)" off .include <bsd.port.pre.mk> -### -## Support Activation -### -# gstreamer -#.undef WITH_GSTREAMER .if defined(WITH_GSTREAMER) -USE_GSTREAMER+= yes - +USE_GSTREAMER= yes PLIST_FILES+= bin/kgstplayer .else -CONFIGURE_ARGS+= --without-gstreamer +CONFIGURE_ARGS+=--without-gstreamer .endif -# xine .if defined(WITH_XINE) LIB_DEPENDS+= xine:${PORTSDIR}/multimedia/libxine - PLIST_FILES+= bin/kxineplayer +.else +CONFIGURE_ARGS+=--without-xine .endif +post-patch: +# do not try to roll our own mimetypes + @${REINPLACE_CMD} -E -e \ + 's|^(SUBDIRS.*)mimetypes|\1|' \ + ${WRKSRC}/Makefile.in + .include <bsd.port.post.mk> diff -ruN multimedia/kmplayer.old/distinfo multimedia/kmplayer/distinfo --- multimedia/kmplayer.old/distinfo 2007-09-05 23:14:23.000000000 +0200 +++ multimedia/kmplayer/distinfo 2007-09-05 23:29:12.000000000 +0200 @@ -1,3 +1,3 @@ -MD5 (kmplayer-0.9.3.tar.bz2) = b5866658c62995185f3fb63f3804cfa2 -SHA256 (kmplayer-0.9.3.tar.bz2) = 1b10a7162f305da974dc30bf4ffdea2cfd7a03dc69e2749c8366e0ce78732247 -SIZE (kmplayer-0.9.3.tar.bz2) = 943240 +MD5 (kmplayer-0.9.4.tar.bz2) = 0d2a199290f7d4c470ea89df42d527ec +SHA256 (kmplayer-0.9.4.tar.bz2) = 63b604ab5d92261af202f078e8397b9c08aefe03ffde353071958b38e317d260 +SIZE (kmplayer-0.9.4.tar.bz2) = 965254 --Boundary-00=_Hhz3GoCRdAnaKmF--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200709060114.15244.danny>