-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ctx: 0.pre+date=2021-10-09 -> unstable-2023-06-05
- Loading branch information
1 parent
7dce19a
commit 324c3bc
Showing
2 changed files
with
111 additions
and
7 deletions.
There are no files selected for viewing
86 changes: 86 additions & 0 deletions
86
...plications/terminal-emulators/ctx/0001-Make-arch-detection-optional-and-fix-targets.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
From 5c41e49b79ef85e7e23748fbeeaf65df8b769263 Mon Sep 17 00:00:00 2001 | ||
From: Tobias Mayer <tobim@fastmail.fm> | ||
Date: Sat, 10 Jun 2023 14:17:16 +0200 | ||
Subject: [PATCH] Make arch detection optional and fix targets | ||
|
||
--- | ||
Makefile | 6 +++--- | ||
configure.sh | 22 +++++++++++++--------- | ||
2 files changed, 16 insertions(+), 12 deletions(-) | ||
|
||
diff --git a/Makefile b/Makefile | ||
index d21c53bf..fe982b24 100644 | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -205,8 +205,8 @@ stuff/%.o: stuff/%.c ctx.h stuff/*.h stuff/*.inc Makefile build.conf | ||
libctx.a: itk.o deps.o $(CTX_OBJS) build.conf Makefile | ||
$(AR) rcs $@ $(CTX_OBJS) deps.o itk.o | ||
libctx.so: $(CTX_OBJS) deps.o itk.o build.conf Makefile | ||
- $(LD) -shared $(LIBS) $(CTX_OBJS) deps.o itk.o $(CTX_LIBS) -o $@ | ||
- #$(LD) --retain-symbols-file=symbols -shared $(LIBS) $? $(CTX_LIBS) -o $@ | ||
+ $(CCC) -shared $(LIBS) $(CTX_OBJS) deps.o itk.o $(CTX_LIBS) -o $@ | ||
+ #$(CCC) --retain-symbols-file=symbols -shared $(LIBS) $? $(CTX_LIBS) -o $@ | ||
|
||
ctx: main.c ctx.h build.conf Makefile $(TERMINAL_OBJS) $(MEDIA_HANDLERS_OBJS) libctx.a | ||
$(CCC) main.c $(TERMINAL_OBJS) $(MEDIA_HANDLERS_OBJS) -o $@ $(CFLAGS) libctx.a $(LIBS) $(CTX_CFLAGS) $(OFLAGS_LIGHT) -lpthread $(CTX_LIBS) | ||
@@ -276,5 +276,5 @@ itk/w3c-constants.h: itk/css.h Makefile squoze/squoze | ||
for a in `cat itk/css.h | tr ';' ' ' | tr ',' ' ' | tr ')' ' '|tr ':' ' ' | tr '{' ' ' | tr ' ' '\n' | grep 'SQZ_[a-z][0-9a-zA-Z_]*'| sort | uniq`;do b=`echo $$a|tail -c+5|tr '_' '-'`;echo "#define $$a `./squoze/squoze -33 $$b`u // \"$$b\"";done \ | ||
>> $@ | ||
echo '#endif' >> $@ | ||
-static.inc: static/* static/*/* tools/gen_fs.sh | ||
+static.inc: static/* tools/gen_fs.sh | ||
./tools/gen_fs.sh static > $@ | ||
diff --git a/configure.sh b/configure.sh | ||
index ad388a5d..fd9d3b96 100755 | ||
--- a/configure.sh | ||
+++ b/configure.sh | ||
@@ -43,16 +43,20 @@ ENABLE_FAST_FILL_RECT=1 | ||
ENABLE_SWITCH_DISPATCH=1 | ||
|
||
pkg-config sdl2 && HAVE_SDL=1 | ||
-pkg-config babl && HAVE_BABL=1 | ||
-pkg-config cairo && HAVE_CAIRO=1 | ||
-pkg-config libcurl && HAVE_LIBCURL=1 | ||
-pkg-config alsa && HAVE_ALSA=1 | ||
-pkg-config libdrm && HAVE_KMS=1 | ||
+# https://github.com/GNOME/gimp/blob/828a8a7fe7ecd1825387f37a42922bc50fa32be9/meson.build#L349 | ||
+pkg-config babl-0.1 && { HAVE_BABL=1; BABL_NAME=babl-0.1; } | ||
+if [ $HAVE_BABL != 1 ];then | ||
+ pkg-config babl && { HAVE_BABL=1; BABL_NAME=babl; } | ||
+fi | ||
+pkg-config cairo && HAVE_CAIRO=1 | ||
+pkg-config libcurl && HAVE_LIBCURL=1 | ||
+pkg-config alsa && HAVE_ALSA=1 | ||
+pkg-config libdrm && HAVE_KMS=1 | ||
#pkg-config harfbuzz && HAVE_HARFBUZZ=1 | ||
|
||
|
||
|
||
-ARCH=`uname -m` | ||
+: "${ARCH:="$(uname -m)"}" | ||
|
||
case "$ARCH" in | ||
"x86_64") HAVE_SIMD=1 ;; | ||
@@ -229,8 +233,8 @@ echo >> build.conf | ||
if [ $HAVE_BABL = 1 ];then | ||
echo "#define CTX_BABL 1 " >> local.conf | ||
echo "#define CTX_ENABLE_CM 1 " >> local.conf | ||
- echo "CTX_CFLAGS+= `pkg-config babl --cflags`" >> build.conf | ||
- echo "CTX_LIBS+= `pkg-config babl --libs` " >> build.conf | ||
+ echo "CTX_CFLAGS+= `pkg-config "$BABL_NAME" --cflags`" >> build.conf | ||
+ echo "CTX_LIBS+= `pkg-config "$BABL_NAME" --libs` " >> build.conf | ||
else | ||
echo "#define CTX_BABL 0 " >> local.conf | ||
echo "#define CTX_ENABLE_CM 0 " >> local.conf | ||
@@ -348,7 +352,7 @@ echo "LIBS=$LIBS" >> build.conf | ||
#echo "Generating build.deps" | ||
#make build.deps 2>/dev/null | ||
|
||
-echo -n "configuration summary, architecture $(arch)" | ||
+echo -n "configuration summary, architecture $ARCH" | ||
[ $HAVE_SIMD = 1 ] && echo " SIMD multi-pass" | ||
echo "" | ||
echo "Backends:" | ||
-- | ||
2.40.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters