nixpkgs-suyu/pkgs/applications/video/aegisub/no-git.patch
Kylie McClain d61ce4445c
aegisub: 3.2.2 -> 3.3.2
This also is a switch to wangqr's fork.
This fork is currently used by OpenSUSE, Fedora, Solus, and Void Linux. <https://repology.org/project/aegisub/versions>

<https://github.com/wangqr/aegisub>
2022-05-28 22:13:15 -04:00

41 lines
1.6 KiB
Diff

Modified from <https://github.com/wangqr/Aegisub/commit/f8dca9f6386299ec2f90158e2d923a8fb30e3466>
to patch cleanly to v3.3.2. Necessary for building without git.
Upstream and will be in next release.
diff --git a/build/version.sh b/build/version.sh
index 8cea0a3f3..d505341e4 100755
--- a/build/version.sh
+++ b/build/version.sh
@@ -10,13 +10,13 @@ if ! test -d "${srcdir}/.git"; then
done < "${version_h_path}"
if test x$BUILD_GIT_VERSION_NUMBER != x -a x$BUILD_GIT_VERSION_STRING != x; then
export VERSION_SOURCE="from cached git_version.h"
- return 0
+ exit 0
else
echo "invalid git_version.h"
exit 2
fi
- else
- echo "git repo not found and no cached git_version.h"
+ elif [ -z "$FORCE_GIT_VERSION" ]; then
+ echo "git repo not found and no cached git_version.h - use FORCE_GIT_VERSION to override"
exit 2
fi
fi
@@ -25,13 +25,13 @@ last_svn_revision=6962
last_svn_hash="16cd907fe7482cb54a7374cd28b8501f138116be"
git_revision=$(expr $last_svn_revision + $(git log --pretty=oneline $last_svn_hash..HEAD 2>/dev/null | wc -l))
-git_version_str=$(git describe --exact-match 2> /dev/null)
+git_version_str=${FORCE_GIT_VERSION:-$(git describe --exact-match 2> /dev/null)}
installer_version='0.0.0'
resource_version='0, 0, 0'
if test x$git_version_str != x; then
git_version_str="${git_version_str##v}"
tagged_release=1
- if [ $(echo $git_version_str | grep '\d\.\d\.\d') ]; then
+ if [ $(echo $git_version_str | grep '[0-9].[0-9].[0-9]') ]; then
installer_version=$git_version_str
resource_version=$(echo $git_version_str | sed 's/\./, /g')
fi