#887 closed defect (fixed)
Remove pre-release suffix from library name (libgeos-3.7.0alpha.so -> libgeos-3.7.0.so)
Reported by: | Bas Couwenberg | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 3.7.0 |
Component: | Default | Version: | main |
Severity: | Unassigned | Keywords: | |
Cc: |
Description
The autotools build includes the pre-release suffix in the library filename.
This has quite an impact on packaging, requiring a library package rename for every pre-release, and NEW processing of that new package which causes delays.
The attached patch strip the pre-release suffix from the library filename.
Attachments (1)
Change History (11)
by , 6 years ago
Attachment: | strip-pre-release-suffix.patch added |
---|
comment:1 by , 6 years ago
comment:3 by , 6 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
This doesn't work for me for something like
3.7.0alpha or 3.7.0beta1dev
Works for 3.7.0alpha1. I'm going to revise.
comment:5 by , 6 years ago
With ?
instead of *
it will break for for numbers higher than 9, that many pre-releases are unlikely, but not out of the question.
comment:6 by , 6 years ago
Might be my sed.
When I tried:
echo "3.7.0alpha" | sed -E 's/(alpha|beta|rc)[[0-9]]*(dev)?$//'
I got this:
3.7.0alpha
I thought * too meant 0 or more, but seems to not be respecting the 0
However this works:
$ echo "3.7.0alpha" | sed -E 's/(alpha|beta|rc)[0-9]*(dev)?$//'
Gives:
3.7.0
What's the purpose of the extra []? My sed version is: sed (GNU sed) 4.2.2
I'd be happy to change it to if that works for you
's/(alpha|beta|rc)[0-9]*(dev)?$//'
comment:7 by , 6 years ago
You know just 0-9? doesn't work for me either for
3.7.0alpha not sure why I thought it did.
comment:8 by , 6 years ago
The single blockquotes are stripped by m4(1)
, hence the need for additional quotes.
You're probably on Windows where the GNU tools are not as modern.
Instead of matching the pre-release suffix, it may be more portable to match the version string and replace the entire string with only the matched numeric version.
Does the following in configure.ac
work on your system?
VERSION_RELEASE=`echo "$VERSION" | sed -E 's/^([[0-9]+\.[0-9]+\.[0-9]+]).*?$/\1/'`
comment:9 by , 6 years ago
I think it was just the extra brackets I wasn't aware of because I was just testing on the console. The above works without the extra [] so I'll commit that.
I've got some other issues with configure on windows mingw64, which I have to check if it's something in GEOS or my configure script. For building GEOS on windows I'm using CMake and that just produces unversioned dlls all the time.
I'll go ahead and commit what you have above and just check the bots to see if they are okay with it.
Note that
geos-config
needs to be patched as well, see: #742