mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-21 00:25:50 +00:00
Bandaid fix after alsa update until I get to update the vdr ports properly.
Reported by: antoine
This commit is contained in:
parent
78495d4431
commit
0112fd156b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=364486
@ -16,7 +16,7 @@ LIB_DEPENDS+= libavcodec0.so:${PORTSDIR}/multimedia/ffmpeg0 \
|
||||
libxcb-keysyms.so:${PORTSDIR}/x11/xcb-util-keysyms \
|
||||
libasound.so:${PORTSDIR}/audio/alsa-lib
|
||||
|
||||
USES= pkgconfig tar:tgz
|
||||
USES= compiler:features pkgconfig tar:tgz
|
||||
USE_XORG+= xv x11 xcb xinerama
|
||||
USE_GL+= gl glu
|
||||
PATCH_STRIP= -p1
|
||||
@ -33,17 +33,25 @@ WRKSRC= ${WRKDIR}/${PLUGIN}-${PORTVERSION}
|
||||
OPTIONS_DEFINE= VAAPI DOCS NLS
|
||||
VAAPI_DESC= Enable vaapi support (experimental)
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MVAAPI}
|
||||
LIB_DEPENDS+= libva.so:${PORTSDIR}/multimedia/libva
|
||||
CONFIG+= -DUSE_VAAPI
|
||||
.endif
|
||||
|
||||
.if !(${COMPILER_TYPE} == clang)
|
||||
USE_GCC= yes
|
||||
.endif
|
||||
|
||||
post-patch: post-patch-plugin
|
||||
@${REINPLACE_CMD} \
|
||||
-e 's,libavcodec,libavcodec0,g' \
|
||||
${WRKSRC}/Makefile
|
||||
@${CP} ${FILESDIR}/iatomic.h ${WRKSRC}
|
||||
@${REINPLACE_CMD} \
|
||||
-e 's,<alsa/iatomic.h>,"iatomic.h",' \
|
||||
${WRKSRC}/*.c ${WRKSRC}/*.cpp
|
||||
|
||||
pre-install:
|
||||
${MKDIR} ${STAGEDIR}${PREFIX}/lib/vdr
|
||||
@ -54,4 +62,4 @@ post-install: post-install-pluginlocales
|
||||
(cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR})
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
.include <bsd.port.post.mk>
|
||||
|
97
multimedia/vdr-plugin-softhddevice/files/iatomic.h
Normal file
97
multimedia/vdr-plugin-softhddevice/files/iatomic.h
Normal file
@ -0,0 +1,97 @@
|
||||
///
|
||||
/// @file iatomic.h @brief Misc function header file
|
||||
///
|
||||
/// Copyright (c) 2014 by Johns. All Rights Reserved.
|
||||
///
|
||||
/// Contributor(s):
|
||||
///
|
||||
/// License: AGPLv3
|
||||
///
|
||||
/// This program is free software: you can redistribute it and/or modify
|
||||
/// it under the terms of the GNU Affero General Public License as
|
||||
/// published by the Free Software Foundation, either version 3 of the
|
||||
/// License.
|
||||
///
|
||||
/// This program is distributed in the hope that it will be useful,
|
||||
/// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
/// GNU Affero General Public License for more details.
|
||||
///
|
||||
/// $Id$
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/// @addtogroup iatomic
|
||||
/// @{
|
||||
|
||||
#define GCC_VERSION (__GNUC__ * 10000 \
|
||||
+ __GNUC_MINOR__ * 100 \
|
||||
+ __GNUC_PATCHLEVEL__)
|
||||
|
||||
// gcc before 4.7 didn't support atomic builtins,
|
||||
// use alsa atomic functions.
|
||||
#if 0 // GCC_VERSION < 40700
|
||||
|
||||
#include <alsa/iatomic.h>
|
||||
|
||||
#else
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Defines
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Declares
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///
|
||||
/// atomic type, 24 bit useable,
|
||||
///
|
||||
typedef volatile int atomic_t;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Prototypes
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Inlines
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///
|
||||
/// Set atomic value.
|
||||
///
|
||||
#define atomic_set(ptr, val) \
|
||||
__atomic_store_n(ptr, val, __ATOMIC_SEQ_CST)
|
||||
|
||||
///
|
||||
/// Read atomic value.
|
||||
///
|
||||
#define atomic_read(ptr) \
|
||||
__atomic_load_n(ptr, __ATOMIC_SEQ_CST)
|
||||
|
||||
///
|
||||
/// Increment atomic value.
|
||||
///
|
||||
#define atomic_inc(ptr) \
|
||||
__atomic_add_fetch(ptr, 1, __ATOMIC_SEQ_CST)
|
||||
|
||||
///
|
||||
/// Decrement atomic value.
|
||||
///
|
||||
#define atomic_dec(ptr) \
|
||||
__atomic_sub_fetch(ptr, 1, __ATOMIC_SEQ_CST)
|
||||
|
||||
///
|
||||
/// Add to atomic value.
|
||||
///
|
||||
#define atomic_add(val, ptr) \
|
||||
__atomic_add_fetch(ptr, val, __ATOMIC_SEQ_CST)
|
||||
|
||||
///
|
||||
/// Subtract from atomic value.
|
||||
///
|
||||
#define atomic_sub(val, ptr) \
|
||||
__atomic_sub_fetch(ptr, val, __ATOMIC_SEQ_CST)
|
||||
|
||||
#endif
|
||||
|
||||
/// @}
|
Loading…
Reference in New Issue
Block a user