From 309b7aed38ffda3b9c2851ef0675ef8c027638f1 Mon Sep 17 00:00:00 2001 From: Piraty Date: Thu, 13 Sep 2018 22:17:42 +0200 Subject: [PATCH] arcan: update to 0.5.5. + enable build on all arches (succesfully tested on an rpi3 on aarch64-musl, using durden) --- srcpkgs/arcan/patches/ffmpeg4.patch | 62 ----------------------------- srcpkgs/arcan/template | 50 ++++++++++++++--------- srcpkgs/xarcan/template | 1 + 3 files changed, 33 insertions(+), 80 deletions(-) delete mode 100644 srcpkgs/arcan/patches/ffmpeg4.patch diff --git a/srcpkgs/arcan/patches/ffmpeg4.patch b/srcpkgs/arcan/patches/ffmpeg4.patch deleted file mode 100644 index 27b94424f9..0000000000 --- a/srcpkgs/arcan/patches/ffmpeg4.patch +++ /dev/null @@ -1,62 +0,0 @@ ---- src/frameserver/encode/default/encode.c 2018-04-15 11:19:51.000000000 +0200 -+++ src/frameserver/encode/default/encode.c 2018-04-15 11:19:51.000000000 +0200 -@@ -285,8 +285,8 @@ - /* - * for the flush case, we may have a little bit of buffers left, both in the - * encoder and the resampler, -- * CODEC_CAP_DELAY = pframe can be NULL and encode audio is used to flush -- * CODEC_CAP_SMALL_LAST_FRAME or CODEC_CAP_VARIABLE_FRAME_SIZE = -+ * AV_CODEC_CAP_DELAY = pframe can be NULL and encode audio is used to flush -+ * AV_CODEC_CAP_SMALL_LAST_FRAME or AV_CODEC_CAP_VARIABLE_FRAME_SIZE = - * we can the last few buffer bytes can be stored as well otherwise those - * will be discarded - */ -@@ -298,8 +298,8 @@ - * and then re-use the encode / conversion code - */ - if (!forcetog && -- ((ctx->flags & CODEC_CAP_SMALL_LAST_FRAME) > 0 || -- (ctx->flags & CODEC_CAP_VARIABLE_FRAME_SIZE) > 0)){ -+ ((ctx->flags & AV_CODEC_CAP_SMALL_LAST_FRAME) > 0 || -+ (ctx->flags & AV_CODEC_CAP_VARIABLE_FRAME_SIZE) > 0)){ - recctx.aframe_insz = recctx.encabuf_ofs; - recctx.aframe_smplcnt = recctx.aframe_insz >> 2; - frame = av_frame_alloc(); -@@ -309,7 +309,7 @@ - goto forceencode; - } - -- if ( (ctx->flags & CODEC_CAP_DELAY) > 0 ){ -+ if ( (ctx->flags & AV_CODEC_CAP_DELAY) > 0 ){ - int gotpkt; - do { - AVPacket flushpkt = {0}; -@@ -638,7 +638,7 @@ - * for float conversion, we need to double afterwards - */ - -- if ( (recctx.acodec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE) > 0){ -+ if ( (recctx.acodec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE) > 0){ - recctx.aframe_smplcnt = recctx.acontext->frame_size ? - recctx.acontext->frame_size : round( samplerate / fps ); - } ---- src/frameserver/encode/default/encode_presets.c 2018-04-15 11:19:51.000000000 +0200 -+++ src/frameserver/encode/default/encode_presets.c 2018-04-15 11:19:51.000000000 +0200 -@@ -379,7 +379,7 @@ - - a.storage.video.context = avcodec_alloc_context3( a.storage.video.codec ); - if (flags & AVFMT_GLOBALHEADER) -- a.storage.video.context->flags |= CODEC_FLAG_GLOBAL_HEADER; -+ a.storage.video.context->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; - - return a; - } -@@ -397,7 +397,7 @@ - - res.storage.audio.context = avcodec_alloc_context3( res.storage.audio.codec); - if ( (flags & AVFMT_GLOBALHEADER) > 0){ -- res.storage.audio.context->flags |= CODEC_FLAG_GLOBAL_HEADER; -+ res.storage.audio.context->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; - } - - return res; diff --git a/srcpkgs/arcan/template b/srcpkgs/arcan/template index 323b61d857..071017eb6c 100644 --- a/srcpkgs/arcan/template +++ b/srcpkgs/arcan/template @@ -1,43 +1,57 @@ # Template file for 'arcan' pkgname=arcan -version=0.5.4.6 -revision=3 +version=0.5.5 +revision=1 build_style=cmake build_wrksrc=src +configure_args="-DDISTR_TAG='Void Linux' -DVIDEO_PLATFORM=egl-dri" +makedepends="ffmpeg-devel harfbuzz-devel liblzma-devel + libopenal-devel libusb-devel libvncserver-devel libxkbcommon-devel sqlite-devel + $(vopt_if tesseract tesseract-ocr-devel) vlc-devel" short_desc="Combined display server, multimedia framework and game engine" maintainer="Piraty " -license="GPL-2.0-or-later" +license="GPL-2.0-or-later, LGPL-2.0-or-later, BSD-3-Clause" homepage="https://arcan-fe.com/" _versionOpenal=0.5.4 distfiles="https://github.com/letoram/${pkgname}/archive/${version}.tar.gz https://github.com/letoram/openal/archive/${_versionOpenal}.tar.gz>openal_arcan.${_versionOpenal}.tar.gz" -checksum="b42d765610e9e791ab196a904758f42446ea116b1e3bc2a6ca788ebe494f5c55 +checksum="578ed860a99a02cf1cf963efac830eb8af08093e4322832b2be6554d8c922ff2 3a50a87c05b67c466a868cc77f8dc7f9cfc9466aeeafcd823daca0d108c504da" -# the _lwa part of the build relies on a patched openAL implementation -# that is statically linked - -only_for_archs="i686 i686-musl x86_64 x86_64-musl" - -configure_args=" -DDISTR_TAG='Void Linux' - -DCMAKE_BUILD_TYPE=Release -DBUILD_TAG='release' -DSTATIC_SQLITE3=Off - -DSTATIC_OPENAL=Off -DSTATIC_FREETYPE=Off - -DVIDEO_PLATFORM=egl-dri -DENABLE_SIMD=On -DENABLE_LTO=Off" - -makedepends="LuaJIT-devel ffmpeg-devel harfbuzz-devel liblzma-devel - libopenal-devel libusb-devel libvncserver-devel libxkbcommon-devel sqlite-devel - tesseract-ocr-devel vlc-devel" +case "${XBPS_TARGET_MACHINE}" in + i686*|x86_64*) + makedepends+=" LuaJIT-devel" + ;; + armv7*|aarch64*) + configure_args+=" -DDISABLE_JIT=ON" + makedepends+=" MesaLib-devel lua51-devel" + ;; + armv[56]*) + configure_args+=" -DDISABLE_JIT=ON" + makedepends+=" MesaLib-devel lua51-devel libatomic-devel" + CFLAGS+=" -latomic" + ;; +esac build_options="tesseract" desc_option_tesseract="Enable support for OCR via tesseract" build_options_default="tesseract" -post_extract() { +# the _lwa part of the build relies on a patched openAL implementation +# that is statically linked + +pre_configure() { # provide patched openAL ln -s ${XBPS_BUILDDIR}/openal-${_versionOpenal} ${XBPS_BUILDDIR}/arcan-${version}/external/git/openal } post_install() { + vdoc ../README.md + vlicense ../COPYING + for _l in BSD GPL LGPL; do + vlicense ../data/distr/LICENSE.${_l} + done + # need suid for drmMaster, dropped immediately after open+master chmod u+s ${DESTDIR}/usr/bin/arcan } diff --git a/srcpkgs/xarcan/template b/srcpkgs/xarcan/template index 8be18b3696..0f2ed6d774 100644 --- a/srcpkgs/xarcan/template +++ b/srcpkgs/xarcan/template @@ -1,3 +1,4 @@ +# Template file for 'xarcan' pkgname=xarcan version=0.5.4 revision=4