aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libresource/fix-pkgconfig-version.patch
diff options
context:
space:
mode:
authorBart Ribbers <bribbers@disroot.org>2020-05-01 15:56:08 +0200
committerRasmus Thomsen <oss@cogitri.dev>2020-05-04 10:32:09 +0000
commit133698cfe24319991b9ce8f5c571bcc5d8ec7b37 (patch)
treec892fa05980229fc67607487bec240dd6da619b8 /testing/libresource/fix-pkgconfig-version.patch
parent1ecd82679913332ed94823aab160b0ad41f2c1df (diff)
downloadaports-133698cfe24319991b9ce8f5c571bcc5d8ec7b37.tar.bz2
aports-133698cfe24319991b9ce8f5c571bcc5d8ec7b37.tar.xz
testing/libresource: new aport
Diffstat (limited to 'testing/libresource/fix-pkgconfig-version.patch')
-rw-r--r--testing/libresource/fix-pkgconfig-version.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/testing/libresource/fix-pkgconfig-version.patch b/testing/libresource/fix-pkgconfig-version.patch
new file mode 100644
index 0000000000..72594f6b77
--- /dev/null
+++ b/testing/libresource/fix-pkgconfig-version.patch
@@ -0,0 +1,53 @@
+Upstream merge-request: https://git.sailfishos.org/mer-core/libresource/merge_requests/5
+
+From 5d4625173c64dec352548f262159da33d8030b1a Mon Sep 17 00:00:00 2001
+From: Bart Ribbers <bribbers@disroot.org>
+Date: Wed, 25 Mar 2020 13:49:33 +0100
+Subject: [PATCH] Never run git commands when .tarball-version exists
+
+This makes it work in environments where the building takes place in a
+git repo, but libresource is still built from a release tarball
+---
+ build-aux/git-version-gen | 25 ++++++++++++++-----------
+ 1 file changed, 14 insertions(+), 11 deletions(-)
+
+diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
+index 819fa04..7769787 100755
+--- a/build-aux/git-version-gen
++++ b/build-aux/git-version-gen
+@@ -129,18 +129,21 @@ fi
+
+ v=`echo "$v" |sed 's/^v//'`
+
+-# Don't declare a version "dirty" merely because a time stamp has changed.
+-git status > /dev/null 2>&1
++if [ ! -f $tarball_version_file ]
++then
++ # Don't declare a version "dirty" merely because a time stamp has changed.
++ git status > /dev/null 2>&1
+
+-dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty=
+-case "$dirty" in
+- '') ;;
+- *) # Append the suffix only if there isn't one already.
+- case $v in
+- *-dirty) ;;
+- *) v="$v-dirty" ;;
+- esac ;;
+-esac
++ dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty=
++ case "$dirty" in
++ '') ;;
++ *) # Append the suffix only if there isn't one already.
++ case $v in
++ *-dirty) ;;
++ *) v="$v-dirty" ;;
++ esac ;;
++ esac
++fi
+
+ # We default to 0.0.0 instead of UNKNOWN
+ if test "x$v" = "xUNKNOWN"; then
+--
+2.23.0
+