- 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
This commit is contained in:
Guido Falsi 2012-10-09 22:04:23 +00:00
parent 5aa5be3671
commit 2ebe0e0a90
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=305606
6 changed files with 65 additions and 32 deletions

View file

@ -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

View file

@ -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-va-va_trace.c
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>

View file

@ -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

View file

@ -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)); \

View file

@ -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);
}

View file

@ -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