Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Feb 2014 01:52:28 GMT
From:      Jamie Landeg-Jones <jamie@dyslexicfish.net>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/186785: port multimedia/ffmpeg fails with gnutls3 (fix patch included)
Message-ID:  <201402150152.s1F1qS8o010186@catnip.dyslexicfish.net>
Resent-Message-ID: <201402150200.s1F200PB054408@freefall.freebsd.org>

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

>Number:         186785
>Category:       ports
>Synopsis:       port multimedia/ffmpeg fails with gnutls3 (fix patch included)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 15 02:00:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Jamie Landeg-Jones
>Release:        FreeBSD 10.0-STABLE amd64
>Organization:
>Environment:
System: FreeBSD catnip.dyslexicfish.net 10.0-STABLE FreeBSD 10.0-STABLE #0: Wed Jan 22 09:10:20 GMT 2014 root@catflap.dyslexicfish.net:/usr/obj/usr/src/sys/CATFLAP amd64


	
>Description:

If multimedia/ffmpeg is configured with gnutls, and port security/gnutls3
is installed, the lib-check in Makefile passes the dependency check,
and therefore doesn't pull in dependency security/gnutls .

I think this is OK in itself (even though it appears security/gnutls and
security/gnutls3 can coexist, ffmpeg compiles fine against gnutls3)

However, if security/gnutls isn't also installed, the port fails due to
the configure script checking for package 'gnutls' rather than 'gnutls3'

Obviously this problem will go away when/if gnutls3 becomes gnutls, but
in the meantime, this patch fixes the issue - configure will now first
search for gnutls and if not found, search for gnutls3 before failing.

	
>How-To-Repeat:
1) Install security/gnutls3
2) Delete, or don't install security/gnutls
3) Configure multimedia/ffmpeg with 'gnutls' option, then try to build.

	
>Fix:

See applied patch. NB: There is already a files/patch-configure.
The patch below includes those changes, therefore is a drop-in replacement.

I haven't looked at multimedia/ffmpeg0 but it's probably affected similarly.

Cheers,
 Jamie
	

--- patch-configure begins here ---
--- configure.orig	2014-02-15 00:54:29.000000000 +0000
+++ configure	2014-02-15 00:59:27.000000000 +0000
@@ -1102,6 +1102,17 @@
     add_extralibs $(get_safe ${pkg}_libs)
 }
 
+require_pkg_config_gnutls(){
+    if check_pkg_config gnutls "$@"; then
+      add_cflags    $(get_safe gnutls_cflags)
+      add_extralibs $(get_safe gnutls_libs)
+    else
+      check_pkg_config gnutls3 "$@" || die "ERROR: gnutls/gnutls3 not found"
+      add_cflags    $(get_safe gnutls3_cflags)
+      add_extralibs $(get_safe gnutls3_libs)
+    fi
+}
+
 hostcc_o(){
     eval printf '%s\\n' $HOSTCC_O
 }
@@ -2316,7 +2327,7 @@
 nogas=":"
 
 # machine
-arch_default=$(uname -m)
+arch_default=$(uname -p)
 cpu="generic"
 
 # OS
@@ -4228,7 +4239,7 @@
                                die "ERROR: LoadLibrary/dlopen not found for avisynth"; }
 enabled fontconfig        && require_pkg_config fontconfig "fontconfig/fontconfig.h" FcInit
 enabled frei0r            && { check_header frei0r.h || die "ERROR: frei0r.h header not found"; }
-enabled gnutls            && require_pkg_config gnutls gnutls/gnutls.h gnutls_global_init
+enabled gnutls            && require_pkg_config_gnutls gnutls/gnutls.h gnutls_global_init
 enabled ladspa            && { check_header ladspa.h || die "ERROR: ladspa.h header not found"; }
 enabled libiec61883       && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
 enabled libaacplus        && require "libaacplus >= 2.0.0" aacplus.h aacplusEncOpen -laacplus
@@ -4349,10 +4360,10 @@
 pod2man --help > /dev/null 2>&1 && enable pod2man || disable pod2man
 rsync --help 2> /dev/null | grep -q 'contimeout' && enable rsync_contimeout || disable rsync_contimeout
 
-check_header linux/fb.h
-check_header linux/videodev.h
-check_header linux/videodev2.h
-check_code cc linux/videodev2.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_safe struct_v4l2_frmivalenum_discrete
+#check_header linux/fb.h
+#check_header linux/videodev.h
+#check_header linux/videodev2.h
+#check_code cc linux/videodev2.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_safe struct_v4l2_frmivalenum_discrete
 
 check_header sys/videoio.h
 
@@ -4753,7 +4764,7 @@
 SRC_PATH:=\$(SRC_PATH:.%=..%)
 endif
 CC_IDENT=$cc_ident
-ARCH=$arch
+FFMPEG_ARCH=$arch
 CC=$cc
 CXX=$cxx
 AS=$as
@@ -4941,7 +4952,7 @@
 libdir=$libdir
 includedir=$incdir
 
-Name: $name
+Name: ${name}${build_suffix}
 Description: $comment
 Version: $version
 Requires: $(enabled shared || echo $requires)
@@ -4955,10 +4966,10 @@
 mkdir -p doc/examples/pc-uninstalled
 includedir=${source_path}
 [ "$includedir" = . ] && includedir="\${pcfiledir}/../../.."
-    cat <<EOF > doc/examples/pc-uninstalled/$name.pc
+    cat <<EOF > doc/examples/pc-uninstalled/${name}${build_suffix}.pc
 prefix=
 exec_prefix=
-libdir=\${pcfiledir}/../../../$name
+libdir=\${pcfiledir}/../../../${name}${build_suffix}
 includedir=${includedir}
 
 Name: $name
--- patch-configure ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



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