Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Oct 2017 12:33:35 +0000 (UTC)
From:      Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r451870 - head/multimedia/ffmpeg/files
Message-ID:  <201710121233.v9CCXZJL075230@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sunpoet
Date: Thu Oct 12 12:33:35 2017
New Revision: 451870
URL: https://svnweb.freebsd.org/changeset/ports/451870

Log:
  Fix build with openjpeg 2.3.0
  
  Reported by:	mat

Modified:
  head/multimedia/ffmpeg/files/patch-configure
  head/multimedia/ffmpeg/files/patch-libavcodec_libopenjpegdec.c
  head/multimedia/ffmpeg/files/patch-libavcodec_libopenjpegenc.c

Modified: head/multimedia/ffmpeg/files/patch-configure
==============================================================================
--- head/multimedia/ffmpeg/files/patch-configure	Thu Oct 12 12:27:45 2017	(r451869)
+++ head/multimedia/ffmpeg/files/patch-configure	Thu Oct 12 12:33:35 2017	(r451870)
@@ -1,14 +1,15 @@
---- configure.orig	2017-07-29 17:49:29 UTC
+--- configure.orig	2017-09-12 00:51:31 UTC
 +++ configure
-@@ -1875,6 +1875,7 @@ HEADERS_LIST="
+@@ -1875,6 +1875,8 @@ HEADERS_LIST="
      machine_ioctl_meteor_h
      malloc_h
      opencv2_core_core_c_h
++    openjpeg_2_3_openjpeg_h
 +    openjpeg_2_2_openjpeg_h
      openjpeg_2_1_openjpeg_h
      openjpeg_2_0_openjpeg_h
      openjpeg_1_5_openjpeg_h
-@@ -3262,12 +3263,7 @@ target_os_default=$(tolower $(uname -s))
+@@ -3262,12 +3264,7 @@ target_os_default=$(tolower $(uname -s))
  host_os=$target_os_default
  
  # machine
@@ -22,7 +23,7 @@
  cpu="generic"
  intrinsics="none"
  
-@@ -5803,10 +5799,12 @@ enabled libopencore_amrwb && require lib
+@@ -5803,10 +5800,14 @@ enabled libopencore_amrwb && require lib
  enabled libopencv         && { check_header opencv2/core/core_c.h &&
                                 { use_pkg_config opencv opencv2/core/core_c.h cvCreateImageHeader ||
                                   require opencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
@@ -33,10 +34,12 @@
                                 check_lib openjpeg-2.1/openjpeg.h opj_version -lopenjp2 ||
 +			       { check_lib openjpeg-2.2/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
 +                               check_lib openjpeg-2.2/openjpeg.h opj_version -lopenjp2 ||
++			       { check_lib openjpeg-2.3/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
++                               check_lib openjpeg-2.3/openjpeg.h opj_version -lopenjp2 ||
                                 { check_lib openjpeg-2.0/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
                                 { check_lib openjpeg-1.5/openjpeg.h opj_version -lopenjpeg -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
                                 { check_lib openjpeg.h opj_version -lopenjpeg -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
-@@ -6295,6 +6293,9 @@ elif enabled llvm_gcc; then
+@@ -6295,6 +6296,9 @@ elif enabled llvm_gcc; then
  elif enabled clang; then
      check_cflags -mllvm -stack-alignment=16
      check_cflags -mstack-alignment=16
@@ -46,7 +49,7 @@
      check_cflags -Qunused-arguments
      check_cflags -Werror=implicit-function-declaration
      check_cflags -Werror=missing-prototypes
-@@ -6900,7 +6901,7 @@ exec_prefix=\${prefix}
+@@ -6900,7 +6904,7 @@ exec_prefix=\${prefix}
  libdir=$libdir
  includedir=$incdir
  
@@ -55,7 +58,7 @@
  Description: $comment
  Version: $version
  Requires: $(enabled shared || echo $requires)
-@@ -6914,10 +6915,10 @@ EOF
+@@ -6914,10 +6918,10 @@ EOF
  mkdir -p doc/examples/pc-uninstalled
  includedir=${source_path}
  [ "$includedir" = . ] && includedir="\${pcfiledir}/../../.."

Modified: head/multimedia/ffmpeg/files/patch-libavcodec_libopenjpegdec.c
==============================================================================
--- head/multimedia/ffmpeg/files/patch-libavcodec_libopenjpegdec.c	Thu Oct 12 12:27:45 2017	(r451869)
+++ head/multimedia/ffmpeg/files/patch-libavcodec_libopenjpegdec.c	Thu Oct 12 12:33:35 2017	(r451870)
@@ -1,31 +1,33 @@
---- libavcodec/libopenjpegdec.c.orig	2017-07-29 17:49:30 UTC
+--- libavcodec/libopenjpegdec.c.orig	2017-09-12 00:51:33 UTC
 +++ libavcodec/libopenjpegdec.c
-@@ -34,7 +34,9 @@
+@@ -34,7 +34,11 @@
  #include "internal.h"
  #include "thread.h"
  
 -#if HAVE_OPENJPEG_2_1_OPENJPEG_H
-+#if HAVE_OPENJPEG_2_2_OPENJPEG_H
++#if HAVE_OPENJPEG_2_3_OPENJPEG_H
++#  include <openjpeg-2.3/openjpeg.h>
++#elif HAVE_OPENJPEG_2_2_OPENJPEG_H
 +#  include <openjpeg-2.2/openjpeg.h>
 +#elif HAVE_OPENJPEG_2_1_OPENJPEG_H
  #  include <openjpeg-2.1/openjpeg.h>
  #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
  #  include <openjpeg-2.0/openjpeg.h>
-@@ -44,7 +46,7 @@
+@@ -44,7 +48,7 @@
  #  include <openjpeg.h>
  #endif
  
 -#if HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H
-+#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H
++#if HAVE_OPENJPEG_2_3_OPENJPEG_H || HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H
  #  define OPENJPEG_MAJOR_VERSION 2
  #  define OPJ(x) OPJ_##x
  #else
-@@ -429,7 +431,7 @@ static int libopenjpeg_decode_frame(AVCo
+@@ -429,7 +433,7 @@ static int libopenjpeg_decode_frame(AVCo
      opj_stream_set_read_function(stream, stream_read);
      opj_stream_set_skip_function(stream, stream_skip);
      opj_stream_set_seek_function(stream, stream_seek);
 -#if HAVE_OPENJPEG_2_1_OPENJPEG_H
-+#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H
++#if HAVE_OPENJPEG_2_3_OPENJPEG_H || HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H
      opj_stream_set_user_data(stream, &reader, NULL);
  #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
      opj_stream_set_user_data(stream, &reader);

Modified: head/multimedia/ffmpeg/files/patch-libavcodec_libopenjpegenc.c
==============================================================================
--- head/multimedia/ffmpeg/files/patch-libavcodec_libopenjpegenc.c	Thu Oct 12 12:27:45 2017	(r451869)
+++ head/multimedia/ffmpeg/files/patch-libavcodec_libopenjpegenc.c	Thu Oct 12 12:33:35 2017	(r451870)
@@ -1,40 +1,42 @@
---- libavcodec/libopenjpegenc.c.orig	2017-07-29 17:49:30 UTC
+--- libavcodec/libopenjpegenc.c.orig	2017-09-12 00:51:33 UTC
 +++ libavcodec/libopenjpegenc.c
-@@ -32,7 +32,9 @@
+@@ -32,7 +32,11 @@
  #include "avcodec.h"
  #include "internal.h"
  
 -#if HAVE_OPENJPEG_2_1_OPENJPEG_H
-+#if HAVE_OPENJPEG_2_2_OPENJPEG_H
++#if HAVE_OPENJPEG_2_3_OPENJPEG_H
++#  include <openjpeg-2.3/openjpeg.h>
++#elif HAVE_OPENJPEG_2_2_OPENJPEG_H
 +#  include <openjpeg-2.2/openjpeg.h>
 +#elif HAVE_OPENJPEG_2_1_OPENJPEG_H
  #  include <openjpeg-2.1/openjpeg.h>
  #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
  #  include <openjpeg-2.0/openjpeg.h>
-@@ -42,7 +44,7 @@
+@@ -42,7 +46,7 @@
  #  include <openjpeg.h>
  #endif
  
 -#if HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H
-+#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H
++#if HAVE_OPENJPEG_2_3_OPENJPEG_H || HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H
  #  define OPENJPEG_MAJOR_VERSION 2
  #  define OPJ(x) OPJ_##x
  #else
-@@ -305,7 +307,7 @@ static av_cold int libopenjpeg_encode_in
+@@ -305,7 +309,7 @@ static av_cold int libopenjpeg_encode_in
  
      opj_set_default_encoder_parameters(&ctx->enc_params);
  
 -#if HAVE_OPENJPEG_2_1_OPENJPEG_H
-+#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H
++#if HAVE_OPENJPEG_2_3_OPENJPEG_H || HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H
      switch (ctx->cinema_mode) {
      case OPJ_CINEMA2K_24:
          ctx->enc_params.rsiz = OPJ_PROFILE_CINEMA_2K;
-@@ -769,7 +771,7 @@ static int libopenjpeg_encode_frame(AVCo
+@@ -769,7 +773,7 @@ static int libopenjpeg_encode_frame(AVCo
      opj_stream_set_write_function(stream, stream_write);
      opj_stream_set_skip_function(stream, stream_skip);
      opj_stream_set_seek_function(stream, stream_seek);
 -#if HAVE_OPENJPEG_2_1_OPENJPEG_H
-+#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H
++#if HAVE_OPENJPEG_2_3_OPENJPEG_H || HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H
      opj_stream_set_user_data(stream, &writer, NULL);
  #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
      opj_stream_set_user_data(stream, &writer);



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