commit:     32be8e795a81b9dd005052a7f8ef6d4db76e6559
Author:     Gerion Entrup <gerion.entrup <AT> flump <DOT> de>
AuthorDate: Wed Dec  4 12:06:55 2024 +0000
Commit:     gerion <gerion.entrup <AT> flump <DOT> de>
CommitDate: Wed Dec  4 12:06:55 2024 +0000
URL:        https://gitweb.gentoo.org/repo/user/gerislay.git/commit/?id=32be8e79

gui-apps/organicmaps: add

Add the version of https://github.com/gentoo/guru/pull/185
Now that it works again thanks to 
https://github.com/organicmaps/organicmaps/pull/9814

Signed-off-by: Gerion Entrup <gerion.entrup <AT> flump.de>

 gui-apps/organicmaps/Manifest                |  4 ++
 gui-apps/organicmaps/files/fix-3party.patch  | 24 ++++++++
 gui-apps/organicmaps/files/fix-jansson.patch | 31 ++++++++++
 gui-apps/organicmaps/metadata.xml            |  8 +++
 gui-apps/organicmaps/organicmaps-9999.ebuild | 92 ++++++++++++++++++++++++++++
 5 files changed, 159 insertions(+)

diff --git a/gui-apps/organicmaps/Manifest b/gui-apps/organicmaps/Manifest
new file mode 100644
index 0000000..b8a847b
--- /dev/null
+++ b/gui-apps/organicmaps/Manifest
@@ -0,0 +1,4 @@
+AUX fix-3party.patch 704 BLAKE2B 
be92ac6d473c1712ae3978e06af8a80451821af8bbe8cf5ebe31ba87022735173f164a19f46ec1d4557ad5f68fd0a5375e87e7fc858853dd9e013891ce588ae0
 SHA512 
ba2e9ea92651e50ec885b649568fb2668c46d742d5231a26515e5a3c5ba8e24a3cf00803e563b6a363f479e628a5752906bb0dec52b6cdb7474e465215c7aae4
+AUX fix-jansson.patch 1119 BLAKE2B 
5988c85b94c919dc9c98bb103e0f3c4e6829463aad9e050e99303874d0198611604a5bb9fe7c69d73a2550a23b063302d216187f520bfa7b58421d195fcce3dd
 SHA512 
a796cdc6066e88b20375246f2c4f4ff8b2d5d510f1f2f56b7e9ff8864f31b158795f603cc15eac880bc5ad444dc8aafb822968292ab4ec1315b45c43bea19824
+EBUILD organicmaps-9999.ebuild 2443 BLAKE2B 
31dcff21e5ca6145d612b7043d681fe4d609454f5938b76060fab0f4d5b9f749c8337213a4e6d35e51429a8f52ea3a9bef714ef5ddb109295c956dd6eba4c5dc
 SHA512 
e03fc6fe2974ba4696cfbf443dc9d0ffa5944b7b64ef9c95d94dd849fbe9b9d81e8840c85b92ff3e9a9bd913a80346b74bdfafd0d980a1ac481843ade0e2c495
+MISC metadata.xml 269 BLAKE2B 
de28959b3090173e0b4fc0b61b311af4af3c51764f0eb173e71874e684eb8b459a0d8cff52018479b58e0e0e9602f27f715c538c7dda9c055c52e97b8c1b14be
 SHA512 
fa1cf7ea32065ae5b70250aa532b1599b89b695dd8eae7e2aa22ef427036c3b6e56d2ab349963fc39115559b92a817bf198424a41264a86fd4c8cec26746c4f9

diff --git a/gui-apps/organicmaps/files/fix-3party.patch 
b/gui-apps/organicmaps/files/fix-3party.patch
new file mode 100644
index 0000000..9117f64
--- /dev/null
+++ b/gui-apps/organicmaps/files/fix-3party.patch
@@ -0,0 +1,24 @@
+diff --git a/3party/CMakeLists.txt b/3party/CMakeLists.txt
+index d4996e302d..953787945b 100644
+--- a/3party/CMakeLists.txt
++++ b/3party/CMakeLists.txt
+@@ -41,9 +41,6 @@ if (NOT WITH_SYSTEM_PROVIDED_3PARTY)
+   # Add pugixml library.
+   add_subdirectory(pugixml)
+ 
+-  # Add protobuf library.
+-  add_subdirectory(protobuf)
+-
+   if (NOT PLATFORM_LINUX)
+     add_subdirectory(freetype)
+     add_subdirectory(icu)
+@@ -55,6 +52,9 @@ if (NOT WITH_SYSTEM_PROVIDED_3PARTY)
+   target_include_directories(utf8cpp INTERFACE 
"${OMIM_ROOT}/3party/utfcpp/source")
+ endif()
+ 
++# Add protobuf library.
++add_subdirectory(protobuf)
++
+ add_subdirectory(agg)
+ add_subdirectory(bsdiff-courgette)
+ add_subdirectory(liboauthcpp)

diff --git a/gui-apps/organicmaps/files/fix-jansson.patch 
b/gui-apps/organicmaps/files/fix-jansson.patch
new file mode 100644
index 0000000..6f4859a
--- /dev/null
+++ b/gui-apps/organicmaps/files/fix-jansson.patch
@@ -0,0 +1,31 @@
+commit 905b161487865a200ce4a43fb2c1d96ecb38e102
+Author: Gerion Entrup <[email protected]>
+Date:   Thu Apr 25 10:14:41 2024 +0200
+
+    CMakeLists: import jansson with pkgconfig
+    
+    Upstream jansson offers compiling with autotools and CMake.
+    If it is compiled with autotools (the recommended way) it does only
+    provide a pkgconfig file and not a cmake file.
+    This is also the way most distributions provide jansson, so this commit
+    changes the behavior to use pkgconfig, too.
+    
+    Signed-off-by: Gerion Entrup <[email protected]>
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1902f0e618..975a402f8a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -320,8 +320,11 @@ if (WITH_SYSTEM_PROVIDED_3PARTY)
+   set(GFLAGS_USE_TARGET_NAMESPACE ON)
+   find_package(gflags REQUIRED)
+ 
++  find_package(PkgConfig)
++  pkg_check_modules(jansson REQUIRED IMPORTED_TARGET jansson)
++  add_library(jansson::jansson ALIAS PkgConfig::jansson)
++
+   find_package(expat CONFIG REQUIRED)
+-  find_package(jansson CONFIG REQUIRED)
+   find_package(pugixml REQUIRED)
+   find_package(utf8cpp REQUIRED)
+ endif()

diff --git a/gui-apps/organicmaps/metadata.xml 
b/gui-apps/organicmaps/metadata.xml
new file mode 100644
index 0000000..e473d21
--- /dev/null
+++ b/gui-apps/organicmaps/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person" proxied="yes">
+               <email>[email protected]</email>
+               <name>Vitaly Zdanevich</name>
+       </maintainer>
+</pkgmetadata>

diff --git a/gui-apps/organicmaps/organicmaps-9999.ebuild 
b/gui-apps/organicmaps/organicmaps-9999.ebuild
new file mode 100644
index 0000000..5c4fe93
--- /dev/null
+++ b/gui-apps/organicmaps/organicmaps-9999.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{7..12} )
+inherit git-r3 python-r1 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/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";
+
+LICENSE="Apache-2.0"
+SLOT="0"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+# depend on sys-libs/zlib[minizip] when it is not pulled in as subproject 
anymore
+RDEPEND="
+       >dev-cpp/fast_double_parser-0.7.0
+       dev-cpp/gflags
+       dev-db/sqlite
+       dev-lang/python
+       dev-libs/boost
+       dev-libs/expat
+       dev-libs/icu
+       dev-libs/jansson
+       >=dev-libs/utfcpp-4
+       dev-qt/qtbase:6[gui,network,opengl,widgets]
+       dev-qt/qtpositioning:6
+       dev-qt/qtsvg:6
+       >=dev-util/vulkan-headers-1.3.280
+       media-libs/harfbuzz
+       media-libs/freetype
+       media-libs/libglvnd
+       sys-libs/zlib
+       ${PYTHON_DEPS}
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+       "${FILESDIR}"/fix-3party.patch  # upstream PR #6310
+       "${FILESDIR}"/fix-jansson.patch  # upstream PR #7982
+)
+
+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=(
+               -DWITH_SYSTEM_PROVIDED_3PARTY=yes
+               -DBUILD_SHARED_LIBS=off
+               -DTEST_DATA_REPO_URL="${WORLD_FEED_TESTS_S}"
+       )
+       cmake_src_configure
+}
+
+src_install() {
+       cmake_src_install
+
+       # Remove test data
+       rm -rf "${ED}"/usr/share/${PN}/data/world_feed_integration_tests_data 
|| die
+}
+
+pkg_postinst() {
+       xdg_icon_cache_update
+
+       einfo "For dark  mode type in search ?dark"
+       einfo "For light mode type in search ?light"
+}

Reply via email to