Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jun 2016 12:44:33 +0000 (UTC)
From:      John Marino <marino@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r417824 - in head/multimedia/libva: . files
Message-ID:  <201606301244.u5UCiX2V042467@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marino
Date: Thu Jun 30 12:44:33 2016
New Revision: 417824
URL: https://svnweb.freebsd.org/changeset/ports/417824

Log:
  multimedia/libva: USES-= alias, augment patches
  
  Threading is still broken on DragonFly when alias is used, so fix by
  augmenting the same patches FreeBSD uses.  These are no-op pre-processor
  changes for FreeBSD.
  
  Approved by:	non-invasive DF support blanket

Modified:
  head/multimedia/libva/Makefile
  head/multimedia/libva/files/patch-test__v4l_h264__encode__capture.cpp
  head/multimedia/libva/files/patch-va_va__trace.c

Modified: head/multimedia/libva/Makefile
==============================================================================
--- head/multimedia/libva/Makefile	Thu Jun 30 12:23:47 2016	(r417823)
+++ head/multimedia/libva/Makefile	Thu Jun 30 12:44:33 2016	(r417824)
@@ -14,7 +14,7 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 BUILD_DEPENDS=	${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat
 LIB_DEPENDS=	libdrm.so:graphics/libdrm
 
-USES=		alias autoreconf gmake libtool localbase pkgconfig tar:bzip2
+USES=		autoreconf gmake libtool localbase pkgconfig tar:bzip2
 USE_XORG=	glproto pciaccess xext xfixes
 USE_GL=		gl
 GNU_CONFIGURE=	yes

Modified: head/multimedia/libva/files/patch-test__v4l_h264__encode__capture.cpp
==============================================================================
--- head/multimedia/libva/files/patch-test__v4l_h264__encode__capture.cpp	Thu Jun 30 12:23:47 2016	(r417823)
+++ head/multimedia/libva/files/patch-test__v4l_h264__encode__capture.cpp	Thu Jun 30 12:44:33 2016	(r417824)
@@ -1,4 +1,4 @@
---- test/v4l_h264/encode/capture.cpp.orig	2015-07-01 07:54:24 UTC
+--- test/v4l_h264/encode/capture.cpp.orig	2016-06-21 01:29:25 UTC
 +++ test/v4l_h264/encode/capture.cpp
 @@ -30,6 +30,7 @@
  */
@@ -12,7 +12,7 @@
  #include <fcntl.h> /* low-level i/o */
  #include <errno.h>
  #include <unistd.h>
-+#ifdef __FreeBSD__
++#if defined __FreeBSD__ || defined __DragonFly__
 +#include <stdlib.h>
 +#else
  #include <malloc.h>
@@ -24,7 +24,7 @@
      }
      for (n_buffers = 0; n_buffers < 4; ++n_buffers) {
          buffers[n_buffers].length = buffer_size;
-+#ifdef __FreeBSD__
++#if defined __FreeBSD__ || defined __DragonFly__
 +	if(posix_memalign(&buffers[n_buffers].start, page_size, buffer_size))
 +	{
 +#else

Modified: head/multimedia/libva/files/patch-va_va__trace.c
==============================================================================
--- head/multimedia/libva/files/patch-va_va__trace.c	Thu Jun 30 12:23:47 2016	(r417823)
+++ head/multimedia/libva/files/patch-va_va__trace.c	Thu Jun 30 12:44:33 2016	(r417824)
@@ -10,60 +10,70 @@
  #include <unistd.h>
  #include <time.h>
  #include <errno.h>
-@@ -294,7 +297,11 @@ static void add_trace_config_info(
+@@ -294,7 +297,13 @@ static void add_trace_config_info(
  {
      struct trace_config_info *pconfig_info;
      int idx = 0;
 +#ifdef __FreeBSD__
 +    pid_t thd_id = pthread_getthreadid_np();
++#elif defined __DragonFly__
++    pid_t thd_id = syscall(SYS_lwp_gettid);
 +#else
      pid_t thd_id = syscall(__NR_gettid);
 +#endif
  
      LOCK_RESOURCE(pva_trace);
  
-@@ -318,7 +325,11 @@ static void delete_trace_config_info(
+@@ -318,7 +327,13 @@ static void delete_trace_config_info(
  {
      struct trace_config_info *pconfig_info;
      int idx = 0;
 +#ifdef __FreeBSD__
 +    pid_t thd_id = pthread_getthreadid_np();
++#elif defined __DragonFly__
++    pid_t thd_id = syscall(SYS_lwp_gettid);
 +#else
      pid_t thd_id = syscall(__NR_gettid);
 +#endif
  
      LOCK_RESOURCE(pva_trace);
  
-@@ -663,7 +674,11 @@ static struct trace_log_file *start_trac
+@@ -663,7 +678,13 @@ static struct trace_log_file *start_trac
  {
      struct trace_log_files_manager *plog_files_mgr = NULL;
      struct trace_log_file *plog_file = NULL;
 +#ifdef __FreeBSD__
 +    pid_t thd_id = pthread_getthreadid_np();
++#elif defined __DragonFly__
++    pid_t thd_id = syscall(SYS_lwp_gettid);
 +#else
      pid_t thd_id = syscall(__NR_gettid);
 +#endif
      int i = 0;
  
      LOCK_RESOURCE(pva_trace);
-@@ -702,7 +717,11 @@ static void refresh_log_file(
+@@ -702,7 +723,13 @@ static void refresh_log_file(
      struct trace_context *ptra_ctx)
  {
      struct trace_log_file *plog_file = NULL;
 +#ifdef __FreeBSD__
 +    pid_t thd_id = pthread_getthreadid_np();
++#elif defined __DragonFly__
++    pid_t thd_id = syscall(SYS_lwp_gettid);
 +#else
      pid_t thd_id = syscall(__NR_gettid);
 +#endif
      int i = 0;
  
      plog_file = ptra_ctx->plog_file;
-@@ -1226,7 +1245,11 @@ static void internal_TraceUpdateContext 
+@@ -1226,7 +1253,13 @@ static void internal_TraceUpdateContext 
  {
      struct trace_context *trace_ctx = NULL;
      int i = 0, delete = 1;
 +#ifdef __FreeBSD__
 +    pid_t thd_id = pthread_getthreadid_np();
++#elif defined __DragonFly__
++    pid_t thd_id = syscall(SYS_lwp_gettid);
 +#else
      pid_t thd_id = syscall(__NR_gettid);
 +#endif



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