Skip to content

Commit

Permalink
gui-apps/organicmaps: fix build
Browse files Browse the repository at this point in the history
- adjust patches. They depend on
	organicmaps/organicmaps#7982
    organicmaps/organicmaps#6310
- fix dependencies. OrganicMaps has more external libs now. Moreover all
  dynamically linked libraries were checked and added as deps.
- don't install test targets

Signed-off-by: Gerion Entrup <[email protected]>
  • Loading branch information
gerion0 committed May 7, 2024
1 parent 33a3075 commit 58117e0
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 66 deletions.
24 changes: 24 additions & 0 deletions gui-apps/organicmaps/files/fix-3party.patch
Original file line number Diff line number Diff line change
@@ -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)
31 changes: 31 additions & 0 deletions gui-apps/organicmaps/files/fix-jansson.patch
Original file line number Diff line number Diff line change
@@ -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()
46 changes: 0 additions & 46 deletions gui-apps/organicmaps/files/more-3party.patch

This file was deleted.

15 changes: 0 additions & 15 deletions gui-apps/organicmaps/files/no-dynamic-download.patch

This file was deleted.

24 changes: 19 additions & 5 deletions gui-apps/organicmaps/organicmaps-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ EGIT_WORLD_FEED_REPO_URI="https://github.com/${PN}/world_feed_integration_tests_
# 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
Expand All @@ -29,27 +28,35 @@ 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
>=dev-libs/utfcpp-4
dev-qt/qtbase:6[gui,network,opengl,widgets]
dev-qt/qtpositioning:6
dev-qt/qtsvg:6
dev-util/vulkan-headers
>=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}"/more-3party.patch "${FILESDIR}"/no-dynamic-download.patch )
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 () {
src_unpack() {
git-r3_fetch
git-r3_checkout
git-r3_fetch "${EGIT_WORLD_FEED_REPO_URI}"
Expand All @@ -71,6 +78,13 @@ src_configure() {
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

Expand Down

0 comments on commit 58117e0

Please sign in to comment.