Date: Wed, 4 Aug 2004 18:13:19 +0400 (MSD) From: Seva Gluschenko <gvs@rinet.ru> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/70001: MPlayer-1.0pre5 port can be built with GTK2, finally. Message-ID: <200408041413.i74EDJA7038075@road.yandex.ru> Resent-Message-ID: <200408041410.i74EAOCV067638@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 70001 >Category: ports >Synopsis: MPlayer-1.0pre5 port can be built with GTK2, finally. >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Wed Aug 04 14:10:24 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Seva Gluschenko >Release: FreeBSD 5.2-CURRENT i386 >Organization: Yandex LLC >Environment: System: FreeBSD road.yandex.ru 5.2-CURRENT FreeBSD 5.2-CURRENT #8: Fri Jun 4 13:37:30 MSD 2004 gvs@road.yandex.ru:/local/obj/local/usr/src/sys/ROAD i386 >Description: The multimedia/mplayer port has ditto WITH_GTK2 knob which does nothing but complains it's unavailable. That's not true. I found the patch here: http://homepages.ius.edu/CJEZELL/patches/mplayer1.0pre5-gtk2-20040730.patch.bz2 the description is at http://homepages.ius.edu/CJEZELL/projects.html I have no clue how to specify master site for extra patchfile, so I downloaded it in files/ and adjusted Makefile appropriately. >How-To-Repeat: CVSup and cd to latest multimedia/mplayer. Download the patch specified and place it to files/ subdir of multimedia/mplayer port. Then apply the patch below: --- Makefile.orig Wed Aug 4 18:01:24 2004 +++ Makefile Wed Aug 4 18:04:23 2004 @@ -43,8 +43,6 @@ # gui capabilities. # The GTK2 patches are not official ones, so they should be considered as # experimental. -# Note: GTK2 patches are not included at the moment. So defining this knob has -# no effect until new working patches are available # # WITHOUT_GUI # default: undefined @@ -372,30 +370,31 @@ .if !defined(WITHOUT_GUI) PLIST_SUB+= GMPLAYER="" +RUN_DEPENDS+= ${LOCALBASE}/share/mplayer/Skin:${PORTSDIR}/multimedia/mplayer-skins +CONFIGURE_ARGS+= --enable-gui .else PLIST_SUB+= GMPLAYER="@comment " .endif -#.if defined(WITH_GTK2) && !defined(WITHOUT_GUI) -#USE_GNOME+= gtk20 -#RUN_DEPENDS+= ${LOCALBASE}/share/mplayer/Skin:${PORTSDIR}/multimedia/mplayer-skins -#.if defined(PKGNAMESUFFIX) -#PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-gtk2 -#.else -#PKGNAMESUFFIX= -gtk2 -#.endif -#CONFIGURE_ARGS+= --enable-gui -#.endif +.if defined(WITH_GTK2) && !defined(WITHOUT_GUI) +USE_GNOME+= gtk20 +.if defined(PKGNAMESUFFIX) +PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-gtk2 +.else +PKGNAMESUFFIX= -gtk2 +.endif +.if defined(WITH_LANG) +WITH_LANG= "" +.endif +.endif .if defined(WITH_GTK1) && !defined(WITHOUT_GUI) USE_GNOME+= gtk12 -RUN_DEPENDS+= ${LOCALBASE}/share/mplayer/Skin:${PORTSDIR}/multimedia/mplayer-skins .if defined(PKGNAMESUFFIX) PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-gtk .else PKGNAMESUFFIX= -gtk .endif -CONFIGURE_ARGS+= --enable-gui .endif .if defined(WITHOUT_GUI) @@ -420,7 +419,7 @@ PLIST_SUB+= MENCODER="@comment " .endif -.if defined(WITH_ARTS) && (!defined(WITH_GTK1) || defined(WITHOUT_GUI)) +.if defined(WITH_ARTS) && (!defined(WITH_GTK1) || defined(WITH_GTK2) || defined(WITHOUT_GUI)) LIB_DEPENDS+= artsc.0:${PORTSDIR}/audio/arts CONFIGURE_ARGS+= --enable-arts @@ -623,9 +622,10 @@ @${ECHO_MSG} "make WITH_GTK1" @${ECHO_MSG} "builds MPlayer with GTK1-GUI support." -.if defined(WITH_GTK2) && !defined(WITHOUT_GUI) - @${ECHO_MSG} "GTK2 plugin is not available at the moment." - @${ECHO_MSG} "Falling back to use GTK1 if installed on the system." +.if defined(WITH_LANG) && defined(WITH_GTK2) + @${ECHO_MSG} "========================== ATTENTION! ============================" + @${ECHO_MSG} "GTK2 has UTF8 compatibility problems. Language selection disabled." + @${ECHO_MSG} "==================================================================" .endif .if !defined(WITHOUT_GUI) @${ECHO_MSG} "If you want to use the GUI, you can either install" @@ -635,9 +635,9 @@ .endif post-patch: -#.if defined(WITH_GTK2) && !defined(WITHOUT_GUI) -# @cd ${WRKSRC} && ${PATCH} < ${PATCHDIR}/extra-patch-gtk2 -#.endif +.if defined(WITH_GTK2) && !defined(WITHOUT_GUI) + @cd ${WRKSRC} && bzcat ${PATCHDIR}/mplayer1.0pre5-gtk2-20040730.patch.bz2 | ${PATCH} -p1 +.endif @${REINPLACE_CMD} -e \ 's|libxmms.so.1|libxmms.so|' \ ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} >Fix: The Makefile's patch is probably needs to be fixed for using either PATCHFILE variable or the patch mentioned needs to be placed to ports tree. The known issue of WITH_GTK2 is language problems: trying it with WITH_LANG=ru resulted to empty menus and many debug complains to the console: ** (<unknown>:24529): WARNING **: Invalid UTF8 string passed to pango_layout_set_text() So that I put some message to Makefile and disabled using WITH_LANG together with WITH_GTK2. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408041413.i74EDJA7038075>