Skip to content

Commit

Permalink
Add geos, libzip, protobuf and qgis
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Sep 19, 2020
1 parent 2f166fb commit b828f74
Show file tree
Hide file tree
Showing 4 changed files with 271 additions and 0 deletions.
59 changes: 59 additions & 0 deletions geos.3.8.1.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# This file is part of OpenOrienteering.

# Copyright 2016-2020 Kai Pastor
#
# Redistribution and use is allowed according to the terms of the BSD license:
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# https://tracker.debian.org/pkg/gdal

set(version 3.8.1)
set(download_hash SHA256=605df3f99056b7bb9c48f20d67e90e539f5a9ca5b2c7896d58ba06e3217dc106)
set(patch_version ${version})
set(base_url https://github.com/libgeos/geos/archive/)

superbuild_package(
NAME geos
VERSION ${patch_version}
DEPENDS
common-licenses

SOURCE
URL ${base_url}${version}.tar.gz
URL_HASH ${download_hash}

USING patch_version extra_cflags extra_cxxflags
BUILD [[
CMAKE_ARGS
"-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}"
"-DCMAKE_BUILD_TYPE:STRING=$<CONFIG>"
-DBUILD_SHARED_LIBS=ON
-DBUILD_TESTING=ON
-DDISABLE_GEOS_INLINE=ON
$<$<NOT:$<OR:$<BOOL:@CMAKE_CROSSCOMPILING@>,$<BOOL:@MSYS@>>>:
INSTALL_COMMAND
"${CMAKE_COMMAND}" --build . --target install/strip/fast
]]
)
58 changes: 58 additions & 0 deletions libzip.1.7.3.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This file is part of OpenOrienteering.

# Copyright 2016-2020 Kai Pastor
#
# Redistribution and use is allowed according to the terms of the BSD license:
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# https://tracker.debian.org/pkg/gdal

set(version 1.7.3)
set(download_hash SHA256=c0a086901dfc8bda0fb8695f2d3c8050ed140b7899536b9348bcc72b47b2f307)
set(patch_version ${version})
set(base_url https://github.com/nih-at/libzip/archive/)

superbuild_package(
NAME libzip
VERSION ${patch_version}
DEPENDS
common-licenses

SOURCE
URL ${base_url}v${version}.tar.gz
URL_HASH ${download_hash}

USING patch_version extra_cflags extra_cxxflags
BUILD [[
CMAKE_ARGS
"-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}"
"-DCMAKE_BUILD_TYPE:STRING=$<CONFIG>"
"-DBUILD_SHARED_LIBS=ON"
"-DCMAKE_C_STANDARD_LIBRARIES:STRING=-latomic -lm -lc"
$<$<NOT:$<OR:$<BOOL:@CMAKE_CROSSCOMPILING@>,$<BOOL:@MSYS@>>>:
INSTALL_COMMAND
"${CMAKE_COMMAND}" --build . --target install/strip/fast
]]
)
61 changes: 61 additions & 0 deletions protobuf.3.6.1.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# This file is part of OpenOrienteering.

# Copyright 2016-2020 Kai Pastor
#
# Redistribution and use is allowed according to the terms of the BSD license:
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# https://tracker.debian.org/pkg/gdal

set(version 3.6.1)
set(download_hash SHA256=3d4e589d81b2006ca603c1ab712c9715a76227293032d05b26fca603f90b3f5b)
set(patch_version ${version})
set(base_url https://github.com/protocolbuffers/protobuf/archive/)

superbuild_package(
NAME protobuf
VERSION ${patch_version}
DEPENDS
common-licenses
zlib

SOURCE
URL ${base_url}v${version}/protobuf-cpp-${version}.tar.gz
URL_HASH ${download_hash}

USING patch_version extra_cflags extra_cxxflags
BUILD [[
CMAKE_ARGS
"-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}"
"-DCMAKE_BUILD_TYPE:STRING=$<CONFIG>"
-DBUILD_SHARED_LIBS=ON
-Dprotobuf_BUILD_TESTS=OFF
"-DANDROID_LINKER_FLAGS=-landroid -llog"
${SOURCE_DIR}/cmake

INSTALL_COMMAND
"${CMAKE_COMMAND}" --build . --target install/strip/fast
]]
)
93 changes: 93 additions & 0 deletions qgis-master.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# This file is part of OpenOrienteering.

# Copyright 2016-2020 Kai Pastor
#
# Redistribution and use is allowed according to the terms of the BSD license:
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# https://tracker.debian.org/pkg/gdal

set(version master)
set(download_hash SHA256=a06b47271827892f1897464c04a2a484f682f930d96b4d0329634512e973fe29)
set(patch_version ${version})
set(patch_hash SHA256=50314f747a4813566d0005b677f83eab50c5e2b32ce23e513830724d86ae5640)
set(base_url https://github.com/qgis/QGIS/archive/)
set(QGIS_QT_VERSION 5.15)

superbuild_package(
NAME qgis
VERSION ${patch_version}
DEPENDS
common-licenses
gdal
geos
libzip
protobuf
qtandroidextras-${QGIS_QT_VERSION}
qtbase-${QGIS_QT_VERSION}
qtimageformats-${QGIS_QT_VERSION}
qtlocation-${QGIS_QT_VERSION}
qtsensors-${QGIS_QT_VERSION}
qttools-${QGIS_QT_VERSION}
qttranslations-${QGIS_QT_VERSION}

SOURCE
URL ${base_url}${version}.tar.gz
URL_HASH ${download_hash}

USING patch_version extra_cflags extra_cxxflags
BUILD [[
CMAKE_ARGS
"-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}"
"-DCMAKE_BUILD_TYPE:STRING=$<CONFIG>"
-DBUILD_SHARED_LIBS=ON
-DUSE_THREAD=ON
-DWITH_QTWEBKIT=OFF
$<$<NOT:$<BOOL:@CMAKE_CROSSCOMPILING@>>:
-DBUILD_TESTING=ON
>
$<$<BOOL:@CMAKE_CROSSCOMPILING@>:
-DCMAKE_PROGRAM_PATH=${HOST_DIR}/bin # for sqlite3
-DBUILD_TESTING=OFF
>
$<$<NOT:$<OR:$<BOOL:@CMAKE_CROSSCOMPILING@>,$<BOOL:@MSYS@>>>:
TEST_COMMAND
"${CMAKE_COMMAND}" -E env
"PROJ_LIB=${DESTDIR}${CMAKE_STAGING_PREFIX}/share/proj"
"${CMAKE_COMMAND}" --build . --target test
TEST_AFTER_INSTALL
>
INSTALL_COMMAND
"${CMAKE_COMMAND}" --build . --target install/strip/fast
COMMAND
"${CMAKE_COMMAND}" -E copy_directory
"<SOURCE_DIR>/../proj-patches-${patch_version}/data"
"${DESTDIR}${CMAKE_STAGING_PREFIX}/share/proj"
COMMAND
"${CMAKE_COMMAND}" -E copy
"<SOURCE_DIR>/../proj-patches-${patch_version}/copyright"
"${DESTDIR}${CMAKE_STAGING_PREFIX}/share/doc/copyright/proj-${patch_version}.txt"
]]
)

0 comments on commit b828f74

Please sign in to comment.