Skip to content

Instantly share code, notes, and snippets.

View 1480c1's full-sized avatar
🍊
Dying from oranges (on campus)

Christopher Degawa 1480c1

🍊
Dying from oranges (on campus)
View GitHub Profile
From 031f67b288bf8078c080d36633b7532a666173b2 Mon Sep 17 00:00:00 2001
From: Christopher Degawa <ccom@randomderp.com>
Date: Sat, 4 Mar 2023 21:44:24 -0500
Subject: [PATCH 1/5] meson: template SEARCH_PATH for msys2
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
---
meson.build | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
@1480c1
1480c1 / Dockerfile
Last active February 17, 2023 23:35
msys2 on archlinux, maybe. Needs https://github.com/git-for-windows/git/pull/3875 and a few fixes
FROM archlinux:latest
ENV WINEARCH=win64 \
WINEPATH=C:/cmd;C:/mingw64/bin;C:/usr/bin \
WINEPREFIX=/msys64 \
WINEDEBUG=-all \
MSYS2_PREFIX=/msys64/drive_c/ \
PATH=/cmd:/msys64/drive_c/mingw64/bin:/msys64/drive_c/usr/bin:$PATH
RUN mkdir -p /etc/X11/xorg.conf.d/ && \
From 968413df1fa8e534d6c10c0ce56724c7f72c549c Mon Sep 17 00:00:00 2001
From: Christopher Degawa <ccom@randomderp.com>
Date: Mon, 20 Dec 2021 12:31:13 -0600
Subject: [PATCH] third_party: set INSTALL variables as cache
this would give the option to install only shaderc if they already have
the third party repos in their system
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
---
@1480c1
1480c1 / cargoc.sh
Created June 27, 2021 21:48
cargo-c+rav1e stuff
#!/usr/bin/bash
pacman -Syu --noconfirm
pacman -S --noconfirm $MINGW_PACKAGE_PREFIX-rust
git clone https://github.com/lu-zero/cargo-c.git
git -C cargo-c pull origin master
cargo install --target x86_64-pc-windows-gnu --jobs="$(nproc)" --path=cargo-c
git clone https://github.com/xiph/rav1e.git
git -C rav1e pull origin master
cd rav1e
From 45b4f838eb4314b27d44983eb5ce054e565ea121 Mon Sep 17 00:00:00 2001
From: Christopher Degawa <ccom@randomderp.com>
Date: Wed, 23 Jun 2021 21:50:28 -0500
Subject: [PATCH] deps: use pkg-config instead of find_package
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Change-Id: I1e415a04064c451a988e1544485569d6c9483a85
---
cmake/deps.cmake | 30 ++++++++----------------------
1 file changed, 8 insertions(+), 22 deletions(-)
@1480c1
1480c1 / morestuff.diff
Last active June 17, 2021 19:47
vf_libvmaf.c stuff
diff --git a/libavfilter/vf_libvmaf.c b/libavfilter/vf_libvmaf.c
index 4c99a32e8c..eb006fb2f2 100644
--- a/libavfilter/vf_libvmaf.c
+++ b/libavfilter/vf_libvmaf.c
@@ -503,24 +503,24 @@ static av_cold void uninit(AVFilterContext *ctx)
ff_framesync_uninit(&s->fs);
- if (!s->frame_cnt) return;
-
#!/usr/bin/bash
# Replace --target with your own, it seems it's recommended to have it there
# explicitly according to rust's docs
# normal build
cargo build --release --target=x86_64-unknown-linux-gnu
# compile with profile-generate
mkdir -p pgo-profile
From 6c3a91d5d48fd9faf7ba96051a0dbb8ac7005edb Mon Sep 17 00:00:00 2001
From: Christopher Degawa <ccom@randomderp.com>
Date: Fri, 12 Mar 2021 22:42:50 -0600
Subject: [PATCH] configure.ac: use pkg-config for regex and iconv
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@1480c1
1480c1 / gpac.diff
Last active February 27, 2021 19:31
gpac
diff --git a/src/utils/downloader.c b/src/utils/downloader.c
index 39708d97c..3dd7e15bd 100644
--- a/src/utils/downloader.c
+++ b/src/utils/downloader.c
@@ -44,8 +44,7 @@
#endif
#ifdef GPAC_HAS_HTTP2
-#if defined(_MSC_VER)
-typedef SSIZE_T ssize_t;
@1480c1
1480c1 / urlencode.sh
Last active December 29, 2022 03:08
posix shell urlencode and urldecode that handles multiline strings from both stdin and from arguments
urlencode() (
string=${*:-$(
cat -
printf x
)}
[ -n "$*" ] || string=${string%x}
# Zero index, + 1 to start from 1 since sed starts from 1
lines=$(($(printf %s "$string" | wc -l) + 1))
lineno=1
while [ $lineno -le $lines ]; do