Bug 187759 - multimedia/gmerlin: Fix build with clang
Summary: multimedia/gmerlin: Fix build with clang
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Martin Wilke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-19 18:40 UTC by tkato432
Modified: 2014-05-17 11:00 UTC (History)
0 users

See Also:


Attachments
file.diff (10.93 KB, patch)
2014-03-19 18:40 UTC, tkato432
no flags Details | Diff
multimedia_gmerlin.diff (10.95 KB, patch)
2014-04-17 18:50 UTC, tkato432
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tkato432 2014-03-19 18:40:07 UTC
- Fix build with clang

New file:
files/patch-plugins__videofilters__bgyadif.c
Comment 1 Edwin Groothuis freebsd_committer 2014-03-19 18:40:54 UTC
Responsible Changed
From-To: freebsd-ports-bugs->miwi

miwi@ wants this submitter's PRs (via the GNATS Auto Assign Tool)
Comment 2 tkato432 2014-04-17 18:50:48 UTC
Remake of the patch against current tree.
Comment 3 Martin Wilke freebsd_committer 2014-05-17 10:52:27 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 4 dfilter service freebsd_committer 2014-05-17 10:52:28 UTC
Author: miwi
Date: Sat May 17 09:52:23 2014
New Revision: 354304
URL: http://svnweb.freebsd.org/changeset/ports/354304
QAT: https://qat.redports.org/buildarchive/r354304/

Log:
  - Fix build with clang
  - Stage support
  - Options helper
  
  PR:		187759
  Submitted by:	Ports Fury

Added:
  head/multimedia/gmerlin/files/patch-plugins__videofilters__bgyadif.c   (contents, props changed)
Modified:
  head/multimedia/gmerlin/Makefile
  head/multimedia/gmerlin/files/patch-configure
  head/multimedia/gmerlin/pkg-plist

Modified: head/multimedia/gmerlin/Makefile
==============================================================================
--- head/multimedia/gmerlin/Makefile	Sat May 17 09:51:11 2014	(r354303)
+++ head/multimedia/gmerlin/Makefile	Sat May 17 09:52:23 2014	(r354304)
@@ -3,7 +3,7 @@
 
 PORTNAME=	gmerlin
 PORTVERSION=	1.2.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	multimedia
 MASTER_SITES=	SF
 
@@ -11,25 +11,20 @@ MAINTAINER=	ports@FreeBSD.org
 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
 
@@ -37,134 +32,55 @@ CPPFLAGS+=	-I${LOCALBASE}/include
 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>

Modified: head/multimedia/gmerlin/files/patch-configure
==============================================================================
--- head/multimedia/gmerlin/files/patch-configure	Sat May 17 09:51:11 2014	(r354303)
+++ head/multimedia/gmerlin/files/patch-configure	Sat May 17 09:52:23 2014	(r354304)
@@ -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

Added: head/multimedia/gmerlin/files/patch-plugins__videofilters__bgyadif.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/gmerlin/files/patch-plugins__videofilters__bgyadif.c	Sat May 17 09:52:23 2014	(r354304)
@@ -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] */\

Modified: head/multimedia/gmerlin/pkg-plist
==============================================================================
--- head/multimedia/gmerlin/pkg-plist	Sat May 17 09:51:11 2014	(r354303)
+++ head/multimedia/gmerlin/pkg-plist	Sat May 17 09:52:23 2014	(r354304)
@@ -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_launcher
 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
 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
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"