folloup CMakeLists.txt updates (followup eddf6feb)

This commit is contained in:
Juergen E. Fischer 2020-11-11 23:02:08 +01:00
parent fec9c525dd
commit 3922a28dbc
6 changed files with 23 additions and 23 deletions

View File

@ -71,9 +71,9 @@ jobs:
esac esac
target=Experimental target=Experimental
major=$(sed -ne 's/^SET(CPACK_PACKAGE_VERSION_MAJOR "\([0-9]*\)")\s*$/\1/p' CMakeLists.txt) major=$(sed -ne 's/^SET(CPACK_PACKAGE_VERSION_MAJOR "\([0-9]*\)")\s*$/\1/ip' CMakeLists.txt)
minor=$(sed -ne 's/^SET(CPACK_PACKAGE_VERSION_MINOR "\([0-9]*\)")\s*$/\1/p' CMakeLists.txt) minor=$(sed -ne 's/^SET(CPACK_PACKAGE_VERSION_MINOR "\([0-9]*\)")\s*$/\1/ip' CMakeLists.txt)
patch=$(sed -ne 's/^SET(CPACK_PACKAGE_VERSION_PATCH "\([0-9]*\)")\s*$/\1/p' CMakeLists.txt) patch=$(sed -ne 's/^SET(CPACK_PACKAGE_VERSION_PATCH "\([0-9]*\)")\s*$/\1/ip' CMakeLists.txt)
binary=$(curl --location-trusted http://ftp.osuosl.org/pub/osgeo/download/osgeo4w/$OSGEO4W_ARCH/release/qgis/$OSGEO4W_PKG/LATEST.sha | sed -e "s/:.*$//") binary=$(curl --location-trusted http://ftp.osuosl.org/pub/osgeo/download/osgeo4w/$OSGEO4W_ARCH/release/qgis/$OSGEO4W_PKG/LATEST.sha | sed -e "s/:.*$//")
(( binary++ )) || true (( binary++ )) || true

6
debian/rules vendored
View File

@ -46,9 +46,9 @@ endif
DEB_BUILD_NAME ?= $(DISTRIBUTION)-$(DEB_BUILD_ARCH) DEB_BUILD_NAME ?= $(DISTRIBUTION)-$(DEB_BUILD_ARCH)
QGIS_MAJOR=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_MAJOR "\([0-9]*\)")/\1/p' CMakeLists.txt) QGIS_MAJOR=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_MAJOR "\([0-9]*\)")/\1/ip' CMakeLists.txt)
QGIS_MINOR=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_MINOR "\([0-9]*\)")/\1/p' CMakeLists.txt) QGIS_MINOR=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_MINOR "\([0-9]*\)")/\1/ip' CMakeLists.txt)
QGIS_PATCH=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_PATCH "\([0-9]*\)")/\1/p' CMakeLists.txt) QGIS_PATCH=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_PATCH "\([0-9]*\)")/\1/ip' CMakeLists.txt)
QGIS_ABI=$(QGIS_MAJOR).$(QGIS_MINOR).$(QGIS_PATCH) QGIS_ABI=$(QGIS_MAJOR).$(QGIS_MINOR).$(QGIS_PATCH)
GRASS=grass$(subst .,,$(shell pkg-config --modversion grass|cut -d. -f1,2)) GRASS=grass$(subst .,,$(shell pkg-config --modversion grass|cut -d. -f1,2))
GRASSVER=$(subst .,,$(shell pkg-config --modversion grass|cut -d. -f1)) GRASSVER=$(subst .,,$(shell pkg-config --modversion grass|cut -d. -f1))

View File

@ -284,13 +284,13 @@ my($major, $minor, $patch);
open F, "../../CMakeLists.txt"; open F, "../../CMakeLists.txt";
while(<F>) { while(<F>) {
if(/SET\(CPACK_PACKAGE_VERSION_MAJOR "(\d+)"\)/) { if(/SET\(CPACK_PACKAGE_VERSION_MAJOR "(\d+)"\)/i) {
$major = $1; $major = $1;
} elsif(/SET\(CPACK_PACKAGE_VERSION_MINOR "(\d+)"\)/) { } elsif(/SET\(CPACK_PACKAGE_VERSION_MINOR "(\d+)"\)/i) {
$minor = $1; $minor = $1;
} elsif(/SET\(CPACK_PACKAGE_VERSION_PATCH "(\d+)"\)/) { } elsif(/SET\(CPACK_PACKAGE_VERSION_PATCH "(\d+)"\)/i) {
$patch = $1; $patch = $1;
} elsif(/SET\(RELEASE_NAME "(.+)"\)/) { } elsif(/SET\(RELEASE_NAME "(.+)"\)/i) {
$releasename = $1 unless defined $releasename; $releasename = $1 unless defined $releasename;
} }
} }

View File

@ -115,11 +115,11 @@ else
fi fi
# Get the version string # Get the version string
major=$(grep -e 'SET(CPACK_PACKAGE_VERSION_MAJOR' ../CMakeLists.txt | major=$(grep -ie 'SET(CPACK_PACKAGE_VERSION_MAJOR' ../CMakeLists.txt |
sed -r 's/.*\"([0-9]+)\".*/\1/g') sed -r 's/.*\"([0-9]+)\".*/\1/g')
minor=$(grep -e 'SET(CPACK_PACKAGE_VERSION_MINOR' ../CMakeLists.txt | minor=$(grep -ie 'SET(CPACK_PACKAGE_VERSION_MINOR' ../CMakeLists.txt |
sed -r 's/.*\"([0-9]+)\".*/\1/g') sed -r 's/.*\"([0-9]+)\".*/\1/g')
patch=$(grep -e 'SET(CPACK_PACKAGE_VERSION_PATCH' ../CMakeLists.txt | patch=$(grep -ie 'SET(CPACK_PACKAGE_VERSION_PATCH' ../CMakeLists.txt |
sed -r 's/.*\"([0-9]+)\".*/\1/g') sed -r 's/.*\"([0-9]+)\".*/\1/g')
version=$major.$minor.$patch version=$major.$minor.$patch

View File

@ -28,10 +28,10 @@ sub updateCMakeLists($$$$) {
open I, "CMakeLists.txt.orig"; open I, "CMakeLists.txt.orig";
open O, ">CMakeLists.txt" or die "cannot create CMakeLists.txt: $!"; open O, ">CMakeLists.txt" or die "cannot create CMakeLists.txt: $!";
while(<I>) { while(<I>) {
s/SET\(CPACK_PACKAGE_VERSION_MAJOR "(\d+)"\)/SET(CPACK_PACKAGE_VERSION_MAJOR "$major")/; s/SET\(CPACK_PACKAGE_VERSION_MAJOR "(\d+)"\)/set(CPACK_PACKAGE_VERSION_MAJOR "$major")/i;
s/SET\(CPACK_PACKAGE_VERSION_MINOR "(\d+)"\)/SET(CPACK_PACKAGE_VERSION_MINOR "$minor")/; s/SET\(CPACK_PACKAGE_VERSION_MINOR "(\d+)"\)/set(CPACK_PACKAGE_VERSION_MINOR "$minor")/i;
s/SET\(CPACK_PACKAGE_VERSION_PATCH "(\d+)"\)/SET(CPACK_PACKAGE_VERSION_PATCH "$patch")/; s/SET\(CPACK_PACKAGE_VERSION_PATCH "(\d+)"\)/set(CPACK_PACKAGE_VERSION_PATCH "$patch")/i;
s/SET\(RELEASE_NAME "(.+)"\)/SET(RELEASE_NAME "$release")/; s/SET\(RELEASE_NAME "(.+)"\)/set(RELEASE_NAME "$release")/i;
print O; print O;
} }
close O; close O;
@ -86,13 +86,13 @@ my $patch;
my $releasename; my $releasename;
open F, "CMakeLists.txt"; open F, "CMakeLists.txt";
while(<F>) { while(<F>) {
if(/SET\(CPACK_PACKAGE_VERSION_MAJOR "(\d+)"\)/) { if(/SET\(CPACK_PACKAGE_VERSION_MAJOR "(\d+)"\)/i) {
$major = $1; $major = $1;
} elsif(/SET\(CPACK_PACKAGE_VERSION_MINOR "(\d+)"\)/) { } elsif(/SET\(CPACK_PACKAGE_VERSION_MINOR "(\d+)"\)/i) {
$minor = $1; $minor = $1;
} elsif(/SET\(CPACK_PACKAGE_VERSION_PATCH "(\d+)"\)/) { } elsif(/SET\(CPACK_PACKAGE_VERSION_PATCH "(\d+)"\)/i) {
$patch = $1; $patch = $1;
} elsif(/SET\(RELEASE_NAME \"(.*)\"\)/) { } elsif(/SET\(RELEASE_NAME \"(.*)\"\)/i) {
$releasename = $1; $releasename = $1;
} }
} }

View File

@ -210,8 +210,8 @@ rename "i18n/CMakeLists.txt", "i18n/CMakeLists.txt.temp" || die "cannot rename i
open I, "i18n/CMakeLists.txt.temp"; open I, "i18n/CMakeLists.txt.temp";
open O, ">i18n/CMakeLists.txt"; open O, ">i18n/CMakeLists.txt";
while(<I>) { while(<I>) {
if( /^SET\(TS_FILES / || /^FILE \(GLOB TS_FILES \*\.ts\)/ ) { if( /^SET\(TS_FILES /i ) {
print O "SET(TS_FILES " . join( " ", map { "qgis_$_\.ts"; } @ts ) . ")\n"; print O "set(TS_FILES " . join( " ", map { "qgis_$_\.ts"; } @ts ) . ")\n";
} else { } else {
print O; print O;
} }