Download raw body.
[update] graphics/arcan to 0.7.1
Arcan has seen quite a bit of action lately! Here's an update to
0.7.1. I am currently using this with greetd as my window environment
(durden) without issue!
OK?
diff --git a/graphics/arcan/Makefile b/graphics/arcan/Makefile
index 6b265314800..0561adc943a 100644
--- a/graphics/arcan/Makefile
+++ b/graphics/arcan/Makefile
@@ -7,12 +7,10 @@ SHARED_LIBS += arcan_shmif_intext 0.0 # 0.15
SHARED_LIBS += arcan_shmif_server 0.0 # 0.15
SHARED_LIBS += arcan_tui 0.0 # 0.15
-DIST_TUPLE = codeberg letoram arcan 0.6.2 .
+DIST_TUPLE = codeberg letoram arcan 0.7.1 .
WRKDIST = ${WRKDIR}/arcan
WRKSRC = ${WRKDIST}/src
-REVISION = 2
-
CATEGORIES = graphics devel
HOMEPAGE = https://arcan-fe.com
@@ -20,10 +18,11 @@ HOMEPAGE = https://arcan-fe.com
PERMIT_PACKAGE = Yes
# uses pledge()
-WANTLIB += ${COMPILER_LIBCXX} EGL GL SDL2 archive avcodec avdevice
-WANTLIB += avfilter avformat avutil bz2 c curl drm espeak-ng freetype
-WANTLIB += gbm iconv ${MODLUA_WANTLIB} lzma m magic openal sqlite3 swresample
-WANTLIB += swscale tesseract util vlc vncclient vncserver wayland-server
+WANTLIB += ${COMPILER_LIBCXX} ${MODLUA_WANTLIB} EGL GL SDL2 archive
+WANTLIB += avcodec avdevice avfilter avformat avutil bz2 c curl
+WANTLIB += display-info drm espeak-ng freetype gbm hunspell-1.7
+WANTLIB += iconv lzma m magic openal sqlite3 swresample swscale
+WANTLIB += tesseract util vlc vncclient vncserver wayland-server
WANTLIB += xcb xcb-composite xcb-icccm xcb-util xcb-xfixes xkbcommon
WANTLIB += z
@@ -44,6 +43,8 @@ LIB_DEPENDS = archivers/bzip2 \
graphics/ffmpeg \
graphics/tesseract/tesseract \
net/libvncserver \
+ sysutils/libdisplay-info \
+ textproc/hunspell \
wayland/wayland \
x11/vlc \
x11/xkbcommon
diff --git a/graphics/arcan/distinfo b/graphics/arcan/distinfo
index a3dd81868ce..9ca0e5ef221 100644
--- a/graphics/arcan/distinfo
+++ b/graphics/arcan/distinfo
@@ -1,2 +1,2 @@
-SHA256 (letoram-arcan-0.6.2.tar.gz) = P1wkvdLB38b8d17yfb1TBGChe8dkjgWTBc9KNxl2Gmg=
-SIZE (letoram-arcan-0.6.2.tar.gz) = 11801875
+SHA256 (letoram-arcan-0.7.1.tar.gz) = sBXbqTel3D71JdCdB81Z+K7rgXPjei9RT/XRn3vB7Qw=
+SIZE (letoram-arcan-0.7.1.tar.gz) = 13392556
diff --git a/graphics/arcan/patches/patch-src_frameserver_encode_default_encode_ffmpeg_c b/graphics/arcan/patches/patch-src_frameserver_encode_default_encode_ffmpeg_c
deleted file mode 100644
index 00a6c2997f3..00000000000
--- a/graphics/arcan/patches/patch-src_frameserver_encode_default_encode_ffmpeg_c
+++ /dev/null
@@ -1,74 +0,0 @@
-https://github.com/letoram/arcan/commit/e717c1b5833bdc2dea7dc6f64eeaf39c683ebd26
-
-Index: src/frameserver/encode/default/encode_ffmpeg.c
---- src/frameserver/encode/default/encode_ffmpeg.c.orig
-+++ src/frameserver/encode/default/encode_ffmpeg.c
-@@ -22,6 +22,8 @@
- #include <libavcodec/version.h>
- #include <libavutil/opt.h>
- #include <libavutil/imgutils.h>
-+#include <libavutil/channel_layout.h>
-+
- #include <libavformat/avformat.h>
- #include <libswscale/swscale.h>
- #include <libswresample/swresample.h>
-@@ -70,7 +72,8 @@ static struct {
- const AVCodec* acodec;
- AVStream* astream;
- AVPacket* apacket;
-- int channel_layout;
-+ int64_t anext_pts;
-+
- int apts_ofs; /* used to roughly displace A/V
- synchronisation in encoded frames */
- int silence_samples; /* used to dynamically drop or insert
-@@ -218,18 +221,6 @@ static uint8_t* s16swrconv(int* size, int* nsamp)
- static uint8_t** resamp_outbuf = NULL;
-
- if (!resampler){
-- resampler =
-- swr_alloc_set_opts(
-- NULL,
-- AV_CH_LAYOUT_STEREO,
-- recctx.acontext->sample_fmt,
-- recctx.acontext->sample_rate,
-- AV_CH_LAYOUT_STEREO,
-- AV_SAMPLE_FMT_S16,
-- ARCAN_SHMIF_SAMPLERATE, 0, NULL);
--
--/*
-- * This is intended to be the 'coming interface' versus the factory above..
- resampler = swr_alloc();
- av_opt_set_chlayout(resampler, "in_chlayout", &recctx.acontext->ch_layout, 0);
- av_opt_set_int(resampler, "in_sample_rate", recctx.acontext->sample_rate, 0);
-@@ -237,7 +228,6 @@ static uint8_t* s16swrconv(int* size, int* nsamp)
- av_opt_set_chlayout(resampler, "out_chlayout", &recctx.acontext->ch_layout, 0);
- av_opt_set_int(resampler, "out_sample_rate", recctx.acontext->sample_rate, 0);
- av_opt_set_sample_fmt(resampler, "out_sample_fmt", recctx.acontext->sample_fmt, 0);
-- */
-
- resamp_outbuf = av_malloc(sizeof(uint8_t*) * ARCAN_SHMIF_ACHANNELS);
- av_samples_alloc(resamp_outbuf, NULL, ARCAN_SHMIF_ACHANNELS,
-@@ -312,7 +302,7 @@ static bool encode_audio(bool flush)
- exit(EXIT_FAILURE);
- }
-
-- frame->channel_layout = audio->channel_layout;
-+ av_channel_layout_copy(&frame->ch_layout, &audio->ch_layout);
- /*
- * same as with setup above, this the direct assignment will be
- * deprecated ..
-@@ -400,10 +390,9 @@ void arcan_frameserver_stepframe()
- /* interleave audio / video */
- if (recctx.astream && recctx.vstream){
- while(1){
-- apts = av_stream_get_end_pts(recctx.astream);
-- vpts = av_stream_get_end_pts(recctx.vstream);
--
-- if (apts < vpts){
-+ if (av_compare_ts(
-+ recctx.aframe_ptscnt, recctx.acontext->time_base,
-+ recctx.framecount, recctx.vcontext->time_base) <= 0){
- if (!encode_audio(false))
- break;
- }
diff --git a/graphics/arcan/patches/patch-src_frameserver_encode_default_encode_presets_c b/graphics/arcan/patches/patch-src_frameserver_encode_default_encode_presets_c
deleted file mode 100644
index ca2e337da24..00000000000
--- a/graphics/arcan/patches/patch-src_frameserver_encode_default_encode_presets_c
+++ /dev/null
@@ -1,52 +0,0 @@
-https://github.com/letoram/arcan/commit/e717c1b5833bdc2dea7dc6f64eeaf39c683ebd26
-
-Index: src/frameserver/encode/default/encode_presets.c
---- src/frameserver/encode/default/encode_presets.c.orig
-+++ src/frameserver/encode/default/encode_presets.c
-@@ -63,7 +63,7 @@ static bool default_vcodec_setup(struct codec_ent* dst
- dst->storage.video.codec, NULL) != 0){
- dst->storage.video.codec = NULL;
- dst->storage.video.context = NULL;
-- avcodec_close(dst->storage.video.context);
-+ avcodec_free_context(&dst->storage.video.context);
- return false;
- }
-
-@@ -91,12 +91,18 @@ static bool default_acodec_setup(
-
- if (avcodec_open2(
- dst->storage.audio.context, dst->storage.audio.codec, NULL) != 0){
-- avcodec_close(dst->storage.audio.context);
-+ avcodec_free_context(&dst->storage.audio.context);
- dst->storage.audio.context = NULL;
- dst->storage.audio.codec = NULL;
- return false;
- }
-
-+ av_channel_layout_copy(
-+ &ctx->ch_layout,
-+ &(AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO);
-+
-+/* should sweep codec and find best match for number of channels */
-+
- return true;
- }
-
-@@ -175,7 +181,7 @@ static bool setup_cb_x264(struct codec_ent* dst, unsig
-
- if (avcodec_open2(dst->storage.video.context,
- dst->storage.video.codec, &opts) != 0){
-- avcodec_close(dst->storage.video.context);
-+ avcodec_free_context(&dst->storage.video.context);
- dst->storage.video.context = NULL;
- dst->storage.video.codec = NULL;
- return false;
-@@ -241,7 +247,7 @@ static bool setup_cb_vp8(struct codec_ent* dst, unsign
- width, height, fps, vbr / 1024);
- if (avcodec_open2(dst->storage.video.context,
- dst->storage.video.codec, &opts) != 0){
-- avcodec_close(dst->storage.video.context);
-+ avcodec_free_context(&dst->storage.video.context);
- dst->storage.video.context = NULL;
- dst->storage.video.codec = NULL;
- return false;
diff --git a/graphics/arcan/patches/patch-src_frameserver_encode_default_encode_presets_h b/graphics/arcan/patches/patch-src_frameserver_encode_default_encode_presets_h
deleted file mode 100644
index e6a910b4b7c..00000000000
--- a/graphics/arcan/patches/patch-src_frameserver_encode_default_encode_presets_h
+++ /dev/null
@@ -1,14 +0,0 @@
-https://github.com/letoram/arcan/commit/e717c1b5833bdc2dea7dc6f64eeaf39c683ebd26
-
-Index: src/frameserver/encode/default/encode_presets.h
---- src/frameserver/encode/default/encode_presets.h.orig
-+++ src/frameserver/encode/default/encode_presets.h
-@@ -29,7 +29,7 @@ struct codec_ent
- } video, audio;
-
- struct {
-- AVOutputFormat* format;
-+ const AVOutputFormat* format;
- AVFormatContext* context;
- } container;
-
diff --git a/graphics/arcan/patches/patch-src_shmif_arcan_shmif_interop_h b/graphics/arcan/patches/patch-src_shmif_arcan_shmif_interop_h
index 1540be1178d..66a2b7446fb 100644
--- a/graphics/arcan/patches/patch-src_shmif_arcan_shmif_interop_h
+++ b/graphics/arcan/patches/patch-src_shmif_arcan_shmif_interop_h
@@ -1,15 +1,12 @@
-no point pledging tmppath (which is no longer available) if also pledging
-rpath wpath cpath
-
Index: src/shmif/arcan_shmif_interop.h
--- src/shmif/arcan_shmif_interop.h.orig
+++ src/shmif/arcan_shmif_interop.h
-@@ -285,7 +285,7 @@ void arg_cleanup(struct arg_arr*);
+@@ -294,7 +294,7 @@ char* arg_serialize(struct arg_arr* arr);
* futex- only as the set now is too permissive to be comfortable
*/
#define SHMIF_PLEDGE_PREFIX \
-- "stdio unix sendfd recvfd proc ps rpath wpath cpath tmppath unveil video"
-+ "stdio unix sendfd recvfd proc ps rpath wpath cpath unveil video"
+- "stdio unix sendfd recvfd proc ps rpath wpath cpath tmppath video"
++ "stdio unix sendfd recvfd proc ps rpath wpath cpath video"
/*
* Attempt to reduce the exposed set of privileges and whitelist accessible
diff --git a/graphics/arcan/patches/patch-src_shmif_arcan_shmif_privsep_c b/graphics/arcan/patches/patch-src_shmif_arcan_shmif_privsep_c
new file mode 100644
index 00000000000..8176fcb7dd2
--- /dev/null
+++ b/graphics/arcan/patches/patch-src_shmif_arcan_shmif_privsep_c
@@ -0,0 +1,11 @@
+Index: src/shmif/arcan_shmif_privsep.c
+--- src/shmif/arcan_shmif_privsep.c.orig
++++ src/shmif/arcan_shmif_privsep.c
+@@ -1,3 +1,7 @@
++#ifdef __OpenBSD__
++#include <pthread.h>
++#endif
++
+ #include <arcan_shmif.h>
+
+ #ifdef __OpenBSD__
[update] graphics/arcan to 0.7.1