]>
Commit | Line | Data |
---|---|---|
489009f3 JB |
1 | --- libgd-2.3.0/config/getlib.sh.orig 1970-01-01 01:00:00.000000000 +0100 |
2 | +++ libgd-2.3.0/config/getlib.sh 2020-04-18 21:06:18.162626216 +0200 | |
3 | @@ -0,0 +1,42 @@ | |
4 | +#!/bin/sh | |
5 | + | |
6 | +GETVER="${0%/*}/getver.pl" | |
7 | +GDLIB_MAJOR=$("${GETVER}" MAJOR) | |
8 | +GDLIB_MINOR=$("${GETVER}" MINOR) | |
9 | +GDLIB_REVISION=$("${GETVER}" RELEASE) | |
10 | + | |
11 | +# Dynamic library version information | |
12 | +# See http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info | |
13 | + | |
14 | +GDLIB_LT_CURRENT=3 | |
15 | +# This is the version where the soname (current above) changes. We use it | |
16 | +# to reset the revision base back to zero. It's a bit of a pain, but some | |
17 | +# systems restrict the revision range below to [0..255] (like OS X). | |
18 | +GDLIB_PREV_MAJOR=2 | |
19 | +GDLIB_PREV_MINOR=2 | |
20 | +# This isn't 100% correct, but it tends to be a close enough approximation | |
21 | +# for how we manage the codebase. It's rare to do a release that doesn't | |
22 | +# modify the library since this project is centered around the library. | |
23 | +GDLIB_LT_REVISION=$(( ((GDLIB_MAJOR - GDLIB_PREV_MAJOR) << 6) | ((GDLIB_MINOR - GDLIB_PREV_MINOR) << 3) | GDLIB_REVISION )) | |
24 | +GDLIB_LT_AGE=0 | |
25 | + | |
26 | +# The first three fields we feed into libtool and the OS target determines how | |
27 | +# they get used. The last two fields we feed into cmake. We use the same rules | |
28 | +# as Linux SONAME versioning in libtool, but cmake should handle it for us. | |
29 | +case $1 in | |
30 | +CURRENT) | |
31 | + printf '%s' "${GDLIB_LT_CURRENT}" | |
32 | + ;; | |
33 | +REVISION) | |
34 | + printf '%s' "${GDLIB_LT_REVISION}" | |
35 | + ;; | |
36 | +AGE) | |
37 | + printf '%s' "${GDLIB_LT_AGE}" | |
38 | + ;; | |
39 | +VERSION) | |
40 | + printf '%s' "$(( GDLIB_LT_CURRENT - GDLIB_LT_AGE )).${GDLIB_LT_AGE}.${GDLIB_LT_REVISION}" | |
41 | + ;; | |
42 | +SONAME) | |
43 | + printf '%s' "$(( GDLIB_LT_CURRENT - GDLIB_LT_AGE ))" | |
44 | + ;; | |
45 | +esac |