Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Oct 2012 22:04:24 +0000 (UTC)
From:      Guido Falsi <madpilot@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r305606 - in head: Mk multimedia/libva multimedia/libva/files
Message-ID:  <201210092204.q99M4OXj093903@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: madpilot
Date: Tue Oct  9 22:04:23 2012
New Revision: 305606
URL: http://svn.freebsd.org/changeset/ports/305606

Log:
  - Update to 1.1.0
  - Take maintainership
  - Strip Makefile headers
  - Patch software to install with correct ABI version number
  - Convert to new options framework
  - Remove ABI version number from LIB_DEPENDS
  - Add global option description

Added:
  head/multimedia/libva/files/patch-test-v4l_h264-encode-capture.cpp   (contents, props changed)
Modified:
  head/Mk/bsd.options.desc.mk
  head/multimedia/libva/Makefile   (contents, props changed)
  head/multimedia/libva/distinfo   (contents, props changed)
  head/multimedia/libva/files/extra-patch-va-va_trace.c   (contents, props changed)
  head/multimedia/libva/pkg-plist   (contents, props changed)

Modified: head/Mk/bsd.options.desc.mk
==============================================================================
--- head/Mk/bsd.options.desc.mk	Tue Oct  9 21:02:14 2012	(r305605)
+++ head/Mk/bsd.options.desc.mk	Tue Oct  9 22:04:23 2012	(r305606)
@@ -287,6 +287,7 @@ SSE_DESC?=		Use SSE optimized routines
 SSH_DESC?=		SSH protocol
 SSL_DESC?=		SSL protocol
 STATIC_DESC?=		Build static executables/libraries
+STRIP_DESC?=		Strip binaries before installation
 SVG_DESC?=		SVG vector image format
 SVGALIB_DESC?=		SVGA graphics
 SVN_DESC?=		Subversion support

Modified: head/multimedia/libva/Makefile
==============================================================================
--- head/multimedia/libva/Makefile	Tue Oct  9 21:02:14 2012	(r305605)
+++ head/multimedia/libva/Makefile	Tue Oct  9 22:04:23 2012	(r305606)
@@ -1,23 +1,18 @@
-# New ports collection makefile for:	libva
-# Date created:				5 Jan 2011
-# Whom:					Anonymous
-#
 # $FreeBSD$
-#
 
 PORTNAME=	libva
-PORTVERSION=	1.0.14
+PORTVERSION=	1.1.0
 CATEGORIES=	multimedia
 MASTER_SITES=	http://cgit.freedesktop.org/${PORTNAME}/snapshot/
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	madpilot@FreeBSD.org
 COMMENT=	VAAPI wrapper and dummy driver
 
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/COPYING
 
 BUILD_DEPENDS=	${LOCALBASE}/include/linux/videodev2.h:${PORTSDIR}/multimedia/v4l_compat
-LIB_DEPENDS=	drm.2:${PORTSDIR}/graphics/libdrm
+LIB_DEPENDS=	drm:${PORTSDIR}/graphics/libdrm
 
 USE_BZIP2=	yes
 USE_XORG=	pciaccess xext xfixes
@@ -33,7 +28,9 @@ LDFLAGS+=	-L${LOCALBASE}/lib
 # prevent types conflict: videodev2.h vs. drm.h
 CFLAGS+=	-DHAVE_LINUX_INTEGER_TYPES
 
-.include <bsd.port.pre.mk>
+OPTIONS_DEFINE=	DEBUG STRIP
+
+.include <bsd.port.options.mk>
 
 # add strnlen(3) from head/lib/libc/string/strnlen.c
 .if ${OSVERSION} < 800067
@@ -44,27 +41,31 @@ EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-
 BROKEN=		glXCreateContext fails during configure
 .endif
 
-.if !defined(WITH_DEBUG)
-CFLAGS+=	-DNDEBUG
-.else
+.if ${PORT_OPTIONS:MDEBUG}
 CFLAGS+=	-D_DEBUG
+.else
+CFLAGS+=	-DNDEBUG
 .endif
 
-.if defined(STRIP) && ${STRIP} != ""
+.if {PORT_OPTIONS:MSTRIP}
 INSTALL_TARGET=	install-strip
 .endif
 
 post-patch:	.SILENT
 	${REINPLACE_CMD} -e 's|\($$libdir\)/dri|\1/va|' \
 		-e 's|$${libdir}/\(pkgconfig\)|$${prefix}/libdata/\1|' \
+		-e 's/\(LIBVA_LT_CURRENT\)=libva_lt_current/\1=1/' \
+		-e 's/\(LIBVA_LT_REV\)=libva_lt_revision/\1=3300/' \
+		-e 's/\(LIBVA_LT_AGE\)=libva_lt_age/\1=0/' \
 		${WRKSRC}/configure.ac
-	${REINPLACE_CMD} 's/va\(info\)/\1/' \
+	${REINPLACE_CMD} -e 's/va\(info\)/\1/g' -e 's/info\.c/vainfo\.c/' \
 		${WRKSRC}/test/vainfo/Makefile.am
+	${REINPLACE_CMD} '/^export VA_HEADER_/d' \
+		${WRKSRC}/doc/Makefile.am
 	${REINPLACE_CMD} 's/-ldl//' ${WRKSRC}/va/Makefile.am
 
 post-configure:	.SILENT
 	${REINPLACE_CMD} 's/-lpthread/${PTHREAD_LIBS}/' \
-		${WRKSRC}/i965_drv_video/Makefile \
 		${WRKSRC}/test/putsurface/Makefile
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/multimedia/libva/distinfo
==============================================================================
--- head/multimedia/libva/distinfo	Tue Oct  9 21:02:14 2012	(r305605)
+++ head/multimedia/libva/distinfo	Tue Oct  9 22:04:23 2012	(r305606)
@@ -1,2 +1,2 @@
-SHA256 (libva-1.0.14.tar.bz2) = b15ab93b549651a07664ced831b20e559e0f7edabb57169af8049b3e761ea764
-SIZE (libva-1.0.14.tar.bz2) = 769706
+SHA256 (libva-1.1.0.tar.bz2) = 4505200f7fdf862c832448662b7c14133ff984313e7d4f2530f7184bb3821353
+SIZE (libva-1.1.0.tar.bz2) = 539195

Modified: head/multimedia/libva/files/extra-patch-va-va_trace.c
==============================================================================
--- head/multimedia/libva/files/extra-patch-va-va_trace.c	Tue Oct  9 21:02:14 2012	(r305605)
+++ head/multimedia/libva/files/extra-patch-va-va_trace.c	Tue Oct  9 22:04:23 2012	(r305606)
@@ -1,6 +1,6 @@
---- va/va_trace.c~
-+++ va/va_trace.c
-@@ -140,6 +140,17 @@ VAStatus vaUnlockSurface(VADisplay dpy,
+--- va/va_trace.c.orig	2012-10-04 15:30:51.000000000 +0200
++++ va/va_trace.c	2012-10-09 23:12:35.888197737 +0200
+@@ -137,6 +137,18 @@
                           VASurfaceID surface
                           );
  
@@ -15,6 +15,7 @@
 +	}
 +	return (len);
 +}
- 
- void va_TraceInit(VADisplay dpy)
- {
++
+ #define FILE_NAME_SUFFIX(env_value)                      \
+ do {                                                    \
+     int tmp = strnlen(env_value, sizeof(env_value));    \

Added: head/multimedia/libva/files/patch-test-v4l_h264-encode-capture.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/libva/files/patch-test-v4l_h264-encode-capture.cpp	Tue Oct  9 22:04:23 2012	(r305606)
@@ -0,0 +1,30 @@
+--- test/v4l_h264/encode/capture.cpp.orig	2012-10-04 15:30:51.000000000 +0200
++++ test/v4l_h264/encode/capture.cpp	2012-10-08 22:31:01.067189237 +0200
+@@ -37,7 +37,11 @@
+ #include <fcntl.h> /* low-level i/o */
+ #include <errno.h>
+ #include <unistd.h>
++#ifdef __FreeBSD__
++#include <stdlib.h>
++#else
+ #include <malloc.h>
++#endif
+ #include <sys/stat.h>
+ #include <sys/mman.h>
+ #include <sys/ioctl.h>
+@@ -451,10 +455,15 @@
+     }
+     for (n_buffers = 0; n_buffers < 4; ++n_buffers) {
+         buffers[n_buffers].length = buffer_size;
++#ifdef __FreeBSD__
++	if(posix_memalign(&buffers[n_buffers].start, page_size, buffer_size))
++	{
++#else
+         buffers[n_buffers].start = memalign (/* boundary */ page_size,
+             buffer_size);
+ 
+         if (!buffers[n_buffers].start) {
++#endif
+             std::cerr << "Out of memory\n";
+             exit (EXIT_FAILURE);
+         }

Modified: head/multimedia/libva/pkg-plist
==============================================================================
--- head/multimedia/libva/pkg-plist	Tue Oct  9 21:02:14 2012	(r305605)
+++ head/multimedia/libva/pkg-plist	Tue Oct  9 22:04:23 2012	(r305606)
@@ -1,25 +1,25 @@
 bin/vaavcenc
 bin/vah264encode
 bin/vainfo
+bin/valoadjpeg
 bin/vampeg2vldemo
 bin/vaputsurface
 include/va/va.h
 include/va/va_backend.h
-include/va/va_backend_egl.h
 include/va/va_backend_glx.h
 include/va/va_backend_tpi.h
-include/va/va_dri.h
+include/va/va_dec_jpeg.h
 include/va/va_dri2.h
 include/va/va_dricommon.h
-include/va/va_dummy.h
-include/va/va_egl.h
+include/va/va_drm.h
+include/va/va_drmcommon.h
 include/va/va_glx.h
 include/va/va_tpi.h
 include/va/va_version.h
 include/va/va_x11.h
-lib/libva-egl.la
-lib/libva-egl.so
-lib/libva-egl.so.1
+lib/libva-drm.la
+lib/libva-drm.so
+lib/libva-drm.so.1
 lib/libva-glx.la
 lib/libva-glx.so
 lib/libva-glx.so.1
@@ -34,7 +34,7 @@ lib/libva.so
 lib/libva.so.1
 lib/va/dummy_drv_video.la
 lib/va/dummy_drv_video.so
-libdata/pkgconfig/libva-egl.pc
+libdata/pkgconfig/libva-drm.pc
 libdata/pkgconfig/libva-glx.pc
 libdata/pkgconfig/libva-tpi.pc
 libdata/pkgconfig/libva-x11.pc



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