Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Mar 2014 03:26:10 +0900
From:      KATO Tsuguru <tkato432@yahoo.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/187759: multimedia/gmerlin: Fix build with clang
Message-ID:  <20140320032610.69d2032bce78e3f70448ec4b@yahoo.com>
Resent-Message-ID: <201403191840.s2JIe7Rb002608@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         187759
>Category:       ports
>Synopsis:       multimedia/gmerlin: Fix build with clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 19 18:40:07 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 8.4-RELEASE-p7 i386
>Organization:
>Environment:
>Description:
- Fix build with clang

New file:
files/patch-plugins__videofilters__bgyadif.c

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/multimedia/gmerlin/Makefile multimedia/gmerlin/Makefile
--- /usr/ports/multimedia/gmerlin/Makefile	2013-11-06 21:59:44.000000000 +0900
+++ multimedia/gmerlin/Makefile	2014-03-20 00:00:00.000000000 +0900
@@ -3,6 +3,7 @@
 
 PORTNAME=	gmerlin
 PORTVERSION=	1.2.0
+PORTREVISION=	1
 CATEGORIES=	multimedia
 MASTER_SITES=	SF
 
@@ -10,25 +11,20 @@
 COMMENT=	Multimedia framework
 
 LICENSE=	GPLv3
-LICENSE_FILE=	${WRKSRC}/COPYING
 
-LIB_DEPENDS=	fontconfig.1:${PORTSDIR}/x11-fonts/fontconfig \
-		gavl.1:${PORTSDIR}/multimedia/gavl
+LIB_DEPENDS=	libexif.so:${PORTSDIR}/graphics/libexif \
+		libgavl.so:${PORTSDIR}/multimedia/gavl \
+		libfontconfig.so:${PORTSDIR}/x11-fonts/fontconfig
 
-OPTIONS_DEFINE= ALSA CDDB CDIO ESOUND JACK JPEG LIBVISUAL \
-		OPTIMIZED_CFLAGS PNG PULSEAUDIO QUICKTIME \
-		TIFF
-OPTIONS_DEFAULT=	CDDB CDIO JACK JPEG LIBVISUAL \
-		OPTIMIZED_CFLAGS PNG PULSEAUDIO QUICKTIME \
-		TIFF
-
-GNU_CONFIGURE=	yes
-CONFIGURE_ARGS=	--disable-v4l --disable-v4l2 --disable-v4lconvert \
-		--without-doxygen --with-cpuflags=none --disable-musicbrainz
-USES=		pathfix gettext pkgconfig
+USES=		gettext pathfix pkgconfig
 USE_GNOME=	gtk20 libxml2
 USE_XORG=	x11 xext xfixes xinerama xv
 USE_GL=		gl
+USE_SQLITE=	yes
+GNU_CONFIGURE=	yes
+CONFIGURE_ENV=	ac_cv_func_inotify_init=no
+CONFIGURE_ARGS=	--disable-v4l --disable-v4l2 --disable-v4lconvert \
+		--without-doxygen --with-cpuflags=none --disable-musicbrainz
 USE_LDCONFIG=	yes
 INSTALL_ICONS=	yes
 
@@ -36,134 +32,55 @@
 LDFLAGS+=	-L${LOCALBASE}/lib
 
 INFO=		gmerlin
-MAN1=		gmerlin.1 \
-		gmerlin_play.1 \
-		gmerlin_remote.1 \
-		gmerlin_transcoder.1 \
-		gmerlin_transcoder_remote.1 \
-		gmerlin-record.1
-
-NO_STAGE=	yes
-.include <bsd.port.pre.mk>
-
-.if ${PORT_OPTIONS:MALSA}
-LIB_DEPENDS+=	asound.2:${PORTSDIR}/audio/alsa-lib
-PLIST_SUB+=	ALSA=""
-.else
-CONFIGURE_ARGS+=--disable-alsa
-PLIST_SUB+=	ALSA="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MPULSEAUDIO}
-LIB_DEPENDS+=	pulse.0:${PORTSDIR}/audio/pulseaudio
-PLIST_SUB+=	PULSEAUDIO=""
-.else
-CONFIGURE_ARGS+=--disable-pulseaudio
-PLIST_SUB+=	PULSEAUDIO="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MQUICKTIME}
-LIB_DEPENDS+=	quicktime.0:${PORTSDIR}/multimedia/libquicktime
-PLIST_SUB+=	QUICKTIME=""
-.else
-CONFIGURE_ARGS+=--disable-lqt
-PLIST_SUB+=	QUICKTIME="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MLIBVISUAL}
-LIB_DEPENDS+=	visual-0.4:${PORTSDIR}/graphics/libvisual04
-.else
-CONFIGURE_ARGS+=--disable-libvisual
-.endif
-
-.if ${PORT_OPTIONS:MCDIO}
-LIB_DEPENDS+=	cdio.13:${PORTSDIR}/sysutils/libcdio
-PLIST_SUB+=	CDIO=""
-.else
-CONFIGURE_ARGS+=--disable-libcdio
-PLIST_SUB+=	CDIO="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MCDDB}
-LIB_DEPENDS+=	cddb.4:${PORTSDIR}/audio/libcddb
-.else
-CONFIGURE_ARGS+=--disable-cddb
-.endif
-
-.if ${PORT_OPTIONS:MESOUND}
-LIB_DEPENDS+=	esd.2:${PORTSDIR}/audio/esound
-PLIST_SUB+=	ESOUND=""
-.else
-CONFIGURE_ARGS+=--disable-esd
-PLIST_SUB+=	ESOUND="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MJACK}
-LIB_DEPENDS+=	jack.0:${PORTSDIR}/audio/jack
-PLIST_SUB+=	JACK=""
-.else
-CONFIGURE_ARGS+=--disable-jack
-PLIST_SUB+=	JACK="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MJPEG}
-LIB_DEPENDS+=	jpeg.11:${PORTSDIR}/graphics/jpeg
-PLIST_SUB+=	JPEG=""
-.else
-CONFIGURE_ARGS+=--disable-libjpeg
-PLIST_SUB+=	JPEG="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MPNG}
-LIB_DEPENDS+=	png15:${PORTSDIR}/graphics/png
-PLIST_SUB+=	PNG=""
-.else
-CONFIGURE_ARGS+=--disable-libpng
-PLIST_SUB+=	PNG="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MTIFF}
-LIB_DEPENDS+=	tiff.4:${PORTSDIR}/graphics/tiff
-PLIST_SUB+=	TIFF=""
-.else
-CONFIGURE_ARGS+=--disable-libtiff
-PLIST_SUB+=	TIFF="@comment "
-.endif
-
-# applications
-.if ${PORT_OPTIONS:MALSA}
-PLIST_SUB+=	ALSAMIXER=""
-.else
-CONFIGURE_ARGS+=--disable-alsamixer
-PLIST_SUB+=	ALSAMIXER="@comment "
-.endif
-
-# vendor ocflags from configure
-.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
-CFLAGS+=	-O3 -funroll-all-loops -fomit-frame-pointer -ffast-math
-CXXFLAGS+=	-O3 -funroll-all-loops -fomit-frame-pointer -ffast-math
-.endif
+
+OPTIONS_DEFINE= 	ALSA CDDB CDIO ESOUND JACK JPEG LIBVISUAL \
+			OPTIMIZED_CFLAGS PNG PULSEAUDIO QUICKTIME TIFF
+OPTIONS_DEFAULT=	CDDB CDIO JACK JPEG LIBVISUAL \
+			OPTIMIZED_CFLAGS PNG PULSEAUDIO QUICKTIME TIFF
+OPTIONS_SUB=		yes
+
+ALSA_LIB_DEPENDS=	libasound.so:${PORTSDIR}/audio/alsa-lib
+ALSA_CONFIGURE_OFF=	--disable-alsa --disable-alsamixer
+CDDB_LIB_DEPENDS=	libcddb.so:${PORTSDIR}/audio/libcddb
+CDDB_CONFIGURE_ARGS=	--disable-cddb
+CDIO_LIB_DEPENDS=	libcdio.so:${PORTSDIR}/sysutils/libcdio
+CDIO_CONFIGURE_OFF=	--disable-libcdio
+ESOUND_USE=		gnome=esound
+ESOUND_CONFIGURE_OFF=	--disable-esd
+JACK_LIB_DEPENDS=	libjack.so:${PORTSDIR}/audio/jack
+JACK_CONFIGURE_OFF=	--disable-jack
+JPEG_LIB_DEPENDS=	libjpeg.so:${PORTSDIR}/graphics/jpeg
+JPEG_CONFIGURE_OFF=	--disable-libjpeg
+LIBVISUAL_LIB_DEPENDS=	libvisual-0.4.so:${PORTSDIR}/graphics/libvisual04
+LIBVISUAL_CONFIGURE_OFF=--disable-libvisual
+OPTIMIZED_CFLAGS_CFLAGS=-O3 -funroll-loops -fomit-frame-pointer -ffast-math
+PNG_LIB_DEPENDS=	libpng15.so:${PORTSDIR}/graphics/png
+PNG_CONFIGURE_OFF=	--disable-libpng
+PULSEAUDIO_LIB_DEPENDS=	libpulse.so:${PORTSDIR}/audio/pulseaudio
+PULSEAUDIO_CONFIGURE_OFF=--disable-pulseaudio
+QUICKTIME_LIB_DEPENDS=	libquicktime.so:${PORTSDIR}/multimedia/libquicktime
+QUICKTIME_CONFIGURE_OFF=--disable-lqt
+TIFF_LIB_DEPENDS=	libtiff.so:${PORTSDIR}/graphics/tiff
+TIFF_CONFIGURE_OFF=	--disable-libtiff
 
 post-patch:
 	@${REINPLACE_CMD} -e \
-		's|-O3.*-ffast-math||g ; \
-		 s|-DGTK_DISABLE_DEPRECATED||g ; \
-		 /LIBS/ s|-ldl||g ; \
-		 s|^LDFLAGS="|&$${LDFLAGS} |g' ${WRKSRC}/configure
+		'/LIBS/s|-ldl || ; \
+		 s|^LDFLAGS="|&$${LDFLAGS} | ; \
+		 s|-DGTK_DISABLE_DEPRECATED|| ; \
+		 s|-lpthread|-pthread| ; \
+		 s|-O3.*-ffast-math||' ${WRKSRC}/configure
 	@${REINPLACE_CMD} -e \
-		's|-ldl||g ; \
-		 s|-lpthread|${PTHREAD_LIBS}|g ; \
-		 /^LIBS = / s|$$| @LIBINTL@ ${PTHREAD_LIBS}|g' \
-		${WRKSRC}/lib/Makefile.am ${WRKSRC}/lib/Makefile.in \
-		${WRKSRC}/tests/Makefile.am ${WRKSRC}/tests/Makefile.in \
-		${WRKSRC}/apps/*/Makefile.am ${WRKSRC}/apps/*/Makefile.in
+		's|^texinfo_|#texinfo_|g' ${WRKSRC}/doc/Makefile.in
 	@${REINPLACE_CMD} -e \
-		 's|^texinfo_|#texinfo_|g' ${WRKSRC}/doc/Makefile.in
+		's|ln -sf $$(DESTDIR)|ln -sf |' ${WRKSRC}/icons/Makefile.in
+	@${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${REINPLACE_CMD} -e \
+		's|-ldl||g ; \
+		 s|-lpthread|-pthread|g ; \
+		 /^LIBS = /s|$$| @LIBINTL@ -pthread|g'
 
 post-install:
-.if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
-.endif
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	(cd ${WRKSRC} && ${INSTALL_DATA} README ${STAGEDIR}${DOCSDIR})
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff -urN /usr/ports/multimedia/gmerlin/files/patch-configure multimedia/gmerlin/files/patch-configure
--- /usr/ports/multimedia/gmerlin/files/patch-configure	2014-01-23 05:09:17.000000000 +0900
+++ multimedia/gmerlin/files/patch-configure	2014-03-20 00:00:00.000000000 +0900
@@ -1,6 +1,6 @@
---- configure.orig	2011-01-08 09:50:08.000000000 +0900
-+++ configure	2011-06-29 01:06:34.000000000 +0900
-@@ -1042,6 +1042,7 @@
+--- configure.orig	2014-03-18 03:42:33.000000000 +0900
++++ configure	2014-03-18 03:57:27.000000000 +0900
+@@ -1048,6 +1048,7 @@
  with_x
  enable_pulseaudio
  enable_lqt
@@ -8,7 +8,43 @@
  enable_libvisual
  enable_libcdio
  enable_musicbrainz
-@@ -15115,9 +15116,9 @@
+@@ -6324,7 +6325,7 @@
+   rm -rf conftest*
+   ;;
+ 
+-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
++amd64-*freebsd*|x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+   # Find out which ABI we are using.
+   echo 'int i;' > conftest.$ac_ext
+@@ -6336,7 +6337,7 @@
+     case `/usr/bin/file conftest.o` in
+       *32-bit*)
+ 	case $host in
+-	  x86_64-*kfreebsd*-gnu)
++	  amd64-*freebsd*|x86_64-*kfreebsd*-gnu)
+ 	    LD="${LD-ld} -m elf_i386_fbsd"
+ 	    ;;
+ 	  x86_64-*linux*)
+@@ -6355,7 +6356,7 @@
+ 	;;
+       *64-bit*)
+ 	case $host in
+-	  x86_64-*kfreebsd*-gnu)
++	  amd64-*freebsd*|x86_64-*kfreebsd*-gnu)
+ 	    LD="${LD-ld} -m elf_x86_64_fbsd"
+ 	    ;;
+ 	  x86_64-*linux*)
+@@ -11240,7 +11241,7 @@
+ 	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+ 	 if test -n "$ac_prev"; then
+ 	   case $ac_word in
+-	     i?86 | x86_64 | ppc | ppc64)
++	     amd64 | i?86 | x86_64 | ppc | ppc64)
+ 	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+ 		 ac_arch=$ac_word
+ 	       else
+@@ -15396,9 +15397,9 @@
  V4LCONVERT_REQUIRED="0.5.7"
  have_v4lconvert=false
  
@@ -21,3 +57,21 @@
                   yes) test_v4lconvert=true ;;
                   no) test_v4lconvert=false ;;
                 esac
+@@ -17345,7 +17346,7 @@
+ case $host_cpu in
+   i[3-7]86)
+     lqt_cpu_family=x86;;
+-  x86_64*)
++  amd64* | x86_64*)
+     lqt_cpu_family=x86;;
+   powerpc | powerpc64)
+     lqt_cpu_family=ppc;;
+@@ -17520,7 +17521,7 @@
+ $as_echo "IA32" >&6; }
+     ARCH_X86=true
+     ;;
+-  x86_64*)
++  amd64* | x86_64*)
+     { $as_echo "$as_me:${as_lineno-$LINENO}: result: x86_64" >&5
+ $as_echo "x86_64" >&6; }
+     ARCH_X86=true
diff -urN /usr/ports/multimedia/gmerlin/files/patch-plugins__videofilters__bgyadif.c multimedia/gmerlin/files/patch-plugins__videofilters__bgyadif.c
--- /usr/ports/multimedia/gmerlin/files/patch-plugins__videofilters__bgyadif.c	1970-01-01 09:00:00.000000000 +0900
+++ multimedia/gmerlin/files/patch-plugins__videofilters__bgyadif.c	2014-03-20 00:00:00.000000000 +0900
@@ -0,0 +1,11 @@
+--- plugins/videofilters/bgyadif.c.orig
++++ plugins/videofilters/bgyadif.c
+@@ -704,7 +704,7 @@
+ \
+             /* if(p->mode<2) ... */\
+             "movq    %[tmp3], %%mm6 \n\t" /* diff */\
+-            "cmp       $2, %[mode] \n\t"\
++            "cmpl      $2, %[mode] \n\t"\
+             "jge       1f \n\t"\
+             LOAD4("(%["prev2"],%[mrefs],2)", %%mm2) /* prev2[x-2*refs] */\
+             LOAD4("(%["next2"],%[mrefs],2)", %%mm4) /* next2[x-2*refs] */\
diff -urN /usr/ports/multimedia/gmerlin/pkg-plist multimedia/gmerlin/pkg-plist
--- /usr/ports/multimedia/gmerlin/pkg-plist	2014-01-23 05:09:17.000000000 +0900
+++ multimedia/gmerlin/pkg-plist	2014-03-20 00:00:00.000000000 +0900
@@ -1,8 +1,9 @@
 bin/album2m3u
 bin/album2pls
 bin/gmerlin
+bin/gmerlin-record
 bin/gmerlin-video-thumbnailer
-%%ALSAMIXER%%bin/gmerlin_alsamixer
+%%ALSA%%bin/gmerlin_alsamixer
 bin/gmerlin_imgconvert
 bin/gmerlin_imgdiff
 bin/gmerlin_kbd
@@ -11,7 +12,6 @@
 bin/gmerlin_play
 bin/gmerlin_plugincfg
 bin/gmerlin_psnr
-bin/gmerlin-record
 bin/gmerlin_recorder
 bin/gmerlin_remote
 bin/gmerlin_ssim
@@ -221,7 +221,13 @@
 lib/libgmerlin_gtk.so.0
 libdata/pkgconfig/gmerlin-gtk.pc
 libdata/pkgconfig/gmerlin.pc
-%%ALSAMIXER%%share/applications/gmerlin-alsamixer.desktop
+man/man1/gmerlin-record.1.gz
+man/man1/gmerlin.1.gz
+man/man1/gmerlin_play.1.gz
+man/man1/gmerlin_remote.1.gz
+man/man1/gmerlin_transcoder.1.gz
+man/man1/gmerlin_transcoder_remote.1.gz
+%%ALSA%%share/applications/gmerlin-alsamixer.desktop
 share/applications/gmerlin-kbd.desktop
 share/applications/gmerlin-player.desktop
 share/applications/gmerlin-plugincfg.desktop
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140320032610.69d2032bce78e3f70448ec4b>