Actually, DYLIB_COMPATIBILITY_VERSION shouldn't be updated for a stable point release

@smcv
This commit is contained in:
Sam Lantinga 2022-09-05 11:21:13 -07:00
parent 612a86ebad
commit acf397b4df
3 changed files with 19 additions and 4 deletions

View File

@ -123,7 +123,7 @@ math(EXPR DYLIB_CURRENT_VERSION_MAJOR "${LT_MAJOR} + ${LT_AGE} + 1")
math(EXPR DYLIB_CURRENT_VERSION_MINOR "${LT_REVISION}") math(EXPR DYLIB_CURRENT_VERSION_MINOR "${LT_REVISION}")
math(EXPR DYLIB_COMPAT_VERSION_MAJOR "${LT_MAJOR} + 1") math(EXPR DYLIB_COMPAT_VERSION_MAJOR "${LT_MAJOR} + 1")
set(DYLIB_CURRENT_VERSION "${DYLIB_CURRENT_VERSION_MAJOR}.${DYLIB_CURRENT_VERSION_MINOR}.0") set(DYLIB_CURRENT_VERSION "${DYLIB_CURRENT_VERSION_MAJOR}.${DYLIB_CURRENT_VERSION_MINOR}.0")
set(DYLIB_COMPATIBILITY_VERSION "${DYLIB_CURRENT_VERSION}") set(DYLIB_COMPATIBILITY_VERSION "${DYLIB_CURRENT_VERSION_MAJOR}.0.0")
# This list holds all generated headers. # This list holds all generated headers.
# To avoid generating them twice, these are added to a dummy target on which all sdl targets depend. # To avoid generating them twice, these are added to a dummy target on which all sdl targets depend.

View File

@ -45,7 +45,7 @@
* `Xcode/SDL/SDL.xcodeproj/project.pbxproj`: * `Xcode/SDL/SDL.xcodeproj/project.pbxproj`:
`DYLIB_CURRENT_VERSION`, `DYLIB_COMPATIBILITY_VERSION` `DYLIB_CURRENT_VERSION`, `DYLIB_COMPATIBILITY_VERSION`
* set second number in `DYLIB_CURRENT_VERSION` to *patchlevel* * set second number in `DYLIB_CURRENT_VERSION` to *patchlevel*
* set `DYLIB_COMPATIBILITY_VERSION` to the same value * Leave `DYLIB_COMPATIBILITY_VERSION` unchanged
* Run test/versioning.sh to verify that everything is consistent * Run test/versioning.sh to verify that everything is consistent

View File

@ -130,12 +130,11 @@ fi
# For simplicity this assumes we'll never break ABI before SDL 3. # For simplicity this assumes we'll never break ABI before SDL 3.
dylib_compat=$(sed -Ene 's/.*DYLIB_COMPATIBILITY_VERSION = (.*);$/\1/p' Xcode/SDL/SDL.xcodeproj/project.pbxproj) dylib_compat=$(sed -Ene 's/.*DYLIB_COMPATIBILITY_VERSION = (.*);$/\1/p' Xcode/SDL/SDL.xcodeproj/project.pbxproj)
dylib_cur=$(sed -Ene 's/.*DYLIB_CURRENT_VERSION = (.*);$/\1/p' Xcode/SDL/SDL.xcodeproj/project.pbxproj)
case "$ref_minor" in case "$ref_minor" in
(*[02468]) (*[02468])
major="$(( ref_minor * 100 + 1 ))" major="$(( ref_minor * 100 + 1 ))"
minor="$ref_micro" minor="0"
;; ;;
(*) (*)
major="$(( ref_minor * 100 + ref_micro + 1 ))" major="$(( ref_minor * 100 + ref_micro + 1 ))"
@ -152,6 +151,22 @@ else
not_ok "project.pbxproj DYLIB_COMPATIBILITY_VERSION is inconsistent, expected $ref, got $dylib_compat" not_ok "project.pbxproj DYLIB_COMPATIBILITY_VERSION is inconsistent, expected $ref, got $dylib_compat"
fi fi
dylib_cur=$(sed -Ene 's/.*DYLIB_CURRENT_VERSION = (.*);$/\1/p' Xcode/SDL/SDL.xcodeproj/project.pbxproj)
case "$ref_minor" in
(*[02468])
major="$(( ref_minor * 100 + 1 ))"
minor="$ref_micro"
;;
(*)
major="$(( ref_minor * 100 + ref_micro + 1 ))"
minor="0"
;;
esac
ref="${major}.${minor}.0
${major}.${minor}.0"
if [ "$ref" = "$dylib_cur" ]; then if [ "$ref" = "$dylib_cur" ]; then
ok "project.pbxproj DYLIB_CURRENT_VERSION is consistent" ok "project.pbxproj DYLIB_CURRENT_VERSION is consistent"
else else