Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
aports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
alpine
aports
Commits
05c1bd21
Commit
05c1bd21
authored
4 weeks ago
by
sodface
Committed by
omni
4 weeks ago
Browse files
Options
Downloads
Patches
Plain Diff
testing/gcli: upgrade to 2.6.1
parent
cda0667a
No related branches found
No related tags found
2 merge requests
!79570
community/firefox-esr: upgrade to 128.7.0
,
!79017
community/lowdown: upgrade to 2.0.0
Pipeline
#293664
skipped
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
testing/gcli/APKBUILD
+4
-7
4 additions, 7 deletions
testing/gcli/APKBUILD
testing/gcli/lowdown-1-4.patch
+0
-87
0 additions, 87 deletions
testing/gcli/lowdown-1-4.patch
with
4 additions
and
94 deletions
testing/gcli/APKBUILD
+
4
−
7
View file @
05c1bd21
maintainer
=
"Hoang Nguyen <folliekazetani@protonmail.com>"
pkgname
=
gcli
pkgver
=
2.
5.0
pkgrel
=
1
pkgver
=
2.
6.1
pkgrel
=
0
pkgdesc
=
"Portable GitHub/GitLab/Gitea CLI tool"
url
=
"https://herrhotzenplotz.de/gcli/"
arch
=
"all"
...
...
@@ -10,9 +10,7 @@ depends="bison flex"
makedepends
=
"curl-dev libedit-dev lowdown-dev"
checkdepends
=
"kyua atf-dev"
subpackages
=
"
$pkgname
-doc"
source
=
"https://herrhotzenplotz.de/gcli/releases/gcli-
$pkgver
/gcli-
$pkgver
.tar.gz
lowdown-1-4.patch
"
source
=
"https://herrhotzenplotz.de/gcli/releases/gcli-
$pkgver
/gcli-
$pkgver
.tar.gz"
build
()
{
./configure
--prefix
=
/usr
--release
...
...
@@ -28,6 +26,5 @@ package() {
}
sha512sums
=
"
ce2ca0cca2d047b8dfba702daa8e11d4a84401f75621d2fc636d29a611f4dc0f0fd33fe3d18d8b1b3bddc56da85c0740db50c54e7be9e161edb757ec6725de1d gcli-2.5.0.tar.gz
f1d2cac8832b604cf9f4c4fbb9ca1d8280b168edc6ea92108e36c91bcbc84f2ada0e5efdce84f0e17462a5afbd4085bacc6563116fc4fb77935a39e167c67428 lowdown-1-4.patch
f2160b9e908e624545b550d42688ff44346931dae6145743a413ae6cba3aa979bef16e823f4da051b0b53ca8e7806f66e93b55d01a2ebfd0bb74a41b4b4188b9 gcli-2.6.1.tar.gz
"
This diff is collapsed.
Click to expand it.
testing/gcli/lowdown-1-4.patch
deleted
100644 → 0
+
0
−
87
View file @
cda0667a
diff --git a/Makefile.in b/Makefile.in
index 9647e46..990b04f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -86,7 +86,11 @@
LIBREADLINE_CPPFLAGS= $(LIBREADLINE_CPPFLAGS_$(LIBREADLINE_FOUND))
############## LOWDOWN #########################################
LIBLOWDOWN_FOUND= @LIBLOWDOWN_FOUND@
-LIBLOWDOWN_CFLAGS_1= @LIBLOWDOWN_CFLAGS@
+LIBLOWDOWN_MAJOR= @LIBLOWDOWN_MAJOR@
+LIBLOWDOWN_MINOR= @LIBLOWDOWN_MINOR@
+LIBLOWDOWN_CFLAGS_1= @LIBLOWDOWN_CFLAGS@ \
+ -DLIBLOWDOWN_MAJOR=$(LIBLOWDOWN_MAJOR) \
+ -DLIBLOWDOWN_MINOR=$(LIBLOWDOWN_MINOR)
LIBLOWDOWN_LIBS_1= @LIBLOWDOWN_LIBS@
LIBLOWDOWN_CFLAGS= $(LIBLOWDOWN_CFLAGS_$(LIBLOWDOWN_FOUND))
LIBLOWDOWN_LIBS= $(LIBLOWDOWN_LIBS_$(LIBLOWDOWN_FOUND))
diff --git a/configure b/configure
index 560b097d..01ccb884 100755
--- a/configure
+++ b/configure
@@ -117,6 +117,8 @@
find_package() {
export ${2}_CFLAGS="$($PKG_CONFIG --cflags $1 | sed 's|-D_XOPEN_SOURCE=[[:digit:]]*||g')"
export ${2}_LIBS="$($PKG_CONFIG --libs $1)"
export ${2}_FOUND=1
+ export ${2}_VERSION="$($PKG_CONFIG --modversion $1)"
+
printf " found\n" >&2
}
@@ -288,6 +290,12 @@
fi
# Lowdown
if [ $ENABLE_LIBLOWDOWN -eq 1 ]; then
find_package lowdown LIBLOWDOWN optional
+
+ # Workaround for breaking API changes and header without versions:
+ #
+ # See https://github.com/kristapsdz/lowdown/issues/148
+ LIBLOWDOWN_MAJOR=$(echo $LIBLOWDOWN_VERSION | cut -d. -f1)
+ LIBLOWDOWN_MINOR=$(echo $LIBLOWDOWN_VERSION | cut -d. -f2)
else
LIBLOWDOWN_FOUND=0
fi
@@ -333,6 +341,8 @@
sed \
-e "s|@LIBLOWDOWN_FOUND@|$LIBLOWDOWN_FOUND|g" \
-e "s|@LIBLOWDOWN_CFLAGS@|$LIBLOWDOWN_CFLAGS|g" \
-e "s|@LIBLOWDOWN_LIBS@|$LIBLOWDOWN_LIBS|g" \
+ -e "s|@LIBLOWDOWN_MAJOR@|$LIBLOWDOWN_MAJOR|g" \
+ -e "s|@LIBLOWDOWN_MINOR@|$LIBLOWDOWN_MINOR|g" \
-e "s|@CONFIGURE_CMD_ARGS@|$CONFIGURE_CMD_ARGS|g" \
-e "s|@CC@|$CC|g" \
-e "s|@CCOM@|$CCOM|g" \
@@ -392,7 +402,7 @@
echo " LIBREADLINE_CFLAGS: ${LIBREADLINE_CFLAGS}"
echo " LIBREADLINE_LIBS: ${LIBREADLINE_LIBS}"
fi
if [ $LIBLOWDOWN_FOUND -eq 1 ]; then
-echo " Using lowdown:"
+echo " Using lowdown ${LIBLOWDOWN_VERSION}:"
echo " LIBLOWDOWN_CFLAGS: ${LIBLOWDOWN_CFLAGS}"
echo " LIBLOWDOWN_LIBS: ${LIBLOWDOWN_LIBS}"
fi
diff --git a/src/cmd/cmd.c b/src/cmd/cmd.c
index 4b1c0e1..f1f6666 100644
--- a/src/cmd/cmd.c
+++ b/src/cmd/cmd.c
@@ -179,9 +179,20 @@
gcli_pretty_print(char const *input, int indent, int maxlinelen, FILE *stream)
if (!gcli_config_have_colours(g_clictx))
opts.oflags |= (LOWDOWN_TERM_NOANSI|LOWDOWN_TERM_NOCOLOUR);
+ /* Lowdown 1.4.0 broke the api in a minor version update. Work around
+ * this by checking versions.
+ *
+ * See: https://github.com/kristapsdz/lowdown/issues/148 and
+ * https://github.com/kristapsdz/lowdown/releases/tag/VERSION_1_4_0 */
+#if LIBLOWDOWN_MAJOR >= 1 && LIBLOWDOWN_MINOR >= 4
+ opts.term.vmargin = 1;
+ opts.term.hmargin = indent - 4; /* somehow there's always 4 spaces being emitted by lowdown */
+ opts.term.cols = maxlinelen;
+#else
opts.vmargin = 1;
- opts.hmargin = indent - 4; /* somehow there's always 4 spaces being emitted by lowdown */
+ opts.hmargin = indent - 4;
opts.cols = maxlinelen;
+#endif
if ((doc = lowdown_doc_new(&opts)) == NULL)
err(1, NULL);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment