gui-apps/organicmaps: reduce clones

The code is from https://github.com/organicmaps/organicmaps/issues/2217#issuecomment-1868159186

Signed-off-by: Vitaly Zdanevich <zdanevich.vitaly@ya.ru>
This commit is contained in:
Vitaly Zdanevich
2023-12-25 10:02:13 +04:00
parent c41f1c4d35
commit 1a22ea7cee
3 changed files with 101 additions and 23 deletions

View File

@@ -5,6 +5,18 @@ EAPI=8
inherit git-r3 xdg cmake
EGIT_REPO_URI="https://github.com/${PN}/${PN}.git"
# this URL is to make the tests compile since organicmaps usually dynamically clones the repo
# maybe a better way would be to skip the test
EGIT_WORLD_FEED_REPO_URI="https://github.com/${PN}/world_feed_integration_tests_data.git"
# organicmaps gets more and more system libraries, we use as many
# as currently possible, use submodules for the rest
EGIT_SUBMODULES=(
3party/harfbuzz/harfbuzz
3party/fast_double_parser
3party/just_gtfs
3party/protobuf/protobuf # wait for https://github.com/organicmaps/organicmaps/pull/6310
3party/fast_obj
)
DESCRIPTION="Offline maps and navigation using OpenStreetMap data"
HOMEPAGE="https://organicmaps.app"
@@ -12,38 +24,43 @@ HOMEPAGE="https://organicmaps.app"
LICENSE="Apache-2.0"
SLOT="0"
DEPEND="sys-devel/clang
>=dev-util/cmake-3.18.1
dev-util/ninja
media-libs/freetype
dev-libs/icu
>=dev-qt/qtpositioning-6
sys-libs/libstdc++-v3
dev-qt/qtcore
dev-qt/qtsvg
# depend on sys-libs/zlib[minizip] when it is not pulled in as subproject anymore
RDEPEND="
dev-cpp/gflags
dev-db/sqlite
sys-libs/zlib[minizip]"
RDEPEND=""
dev-lang/python
dev-libs/boost
dev-libs/icu
dev-qt/qtpositioning:6
dev-util/vulkan-headers
media-libs/freetype
sys-libs/zlib
"
DEPEND="${RDEPEND}"
src_prepare() {
eapply_user
PATCHES=( "${FILESDIR}"/more-3party.patch "${FILESDIR}"/no-dynamic-download.patch )
cmake_src_prepare
WORLD_FEED_TESTS_S="${WORKDIR}/world_feed_integration_tests_data-${PV}"
src_unpack () {
git-r3_fetch
git-r3_checkout
git-r3_fetch "${EGIT_WORLD_FEED_REPO_URI}"
git-r3_checkout "${EGIT_WORLD_FEED_REPO_URI}" "${WORLD_FEED_TESTS_S}"
}
src_configure() {
# organicmaps wants a ./configure.sh execution.
# However, this setups mainly stuff for Android and XCode builds that we don't need.
# We need just this line here
cp private_default.h private.h || die
CMAKE_BUILD_TYPE="RelWithDebInfo"
local mycmakeargs=(
-DBUILD_SHARED_LIBS=False
-DINSTALL_GTEST=off
-DUNITY_DISABLE=on
-DPLATFORM_DESKTOP=true
-DSKIP_TESTS=on
-DWITH_SYSTEM_PROVIDED_3PARTY=yes
-DBUILD_SHARED_LIBS=off
-DTEST_DATA_REPO_URL="${WORLD_FEED_TESTS_S}"
)
echo | ./configure.sh
cmake_src_configure
}