mirror of
https://abf.rosa.ru/djam/mapper.git
synced 2025-02-23 13:32:53 +00:00
Imported from SRPM
This commit is contained in:
commit
73ae95dc4e
5 changed files with 253 additions and 0 deletions
2
.abf.yml
Normal file
2
.abf.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
sources:
|
||||
mapper-0.9.4.tar.gz: 39808780503d3e5c649462c2d04ec863edac2c3a
|
144
0001-Use-system-QtSingleApplication.patch
Normal file
144
0001-Use-system-QtSingleApplication.patch
Normal file
|
@ -0,0 +1,144 @@
|
|||
From 51fd68cf71ac9b5f8138de7a91a2edff19d1dea6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jani=20V=C3=A4limaa?= <wally@mageia.org>
|
||||
Date: Sat, 7 Oct 2017 13:08:21 +0300
|
||||
Subject: [PATCH] Use system QtSingleApplication
|
||||
|
||||
---
|
||||
CMakeLists.txt | 3 +-
|
||||
cmake/FindQtSingleApplication.cmake | 94 +++++++++++++++++++++++++++++++++++++
|
||||
src/CMakeLists.txt | 3 +-
|
||||
3 files changed, 98 insertions(+), 2 deletions(-)
|
||||
create mode 100644 cmake/FindQtSingleApplication.cmake
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 93ff32d..44509f6 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -269,7 +269,8 @@ if(Mapper_WITH_COVE)
|
||||
add_subdirectory("3rd-party/cove")
|
||||
endif()
|
||||
if(NOT ANDROID)
|
||||
- add_subdirectory("3rd-party/qtsingleapplication")
|
||||
+ find_package(Qt5Widgets REQUIRED)
|
||||
+ find_package(QtSingleApplication REQUIRED)
|
||||
endif()
|
||||
if (Mapper_USE_GDAL)
|
||||
add_subdirectory("src/gdal")
|
||||
diff --git a/cmake/FindQtSingleApplication.cmake b/cmake/FindQtSingleApplication.cmake
|
||||
new file mode 100644
|
||||
index 0000000..eb56607
|
||||
--- /dev/null
|
||||
+++ b/cmake/FindQtSingleApplication.cmake
|
||||
@@ -0,0 +1,94 @@
|
||||
+# - Try to find the QtSingleApplication includes and library
|
||||
+# which defines
|
||||
+#
|
||||
+# QTSINGLEAPPLICATION_FOUND - system has QtSingleApplication
|
||||
+# QTSINGLEAPPLICATION_INCLUDE_DIR - where to find header QtSingleApplication
|
||||
+# QTSINGLEAPPLICATION_LIBRARIES - the libraries to link against to use QtSingleApplication
|
||||
+# QTSINGLEAPPLICATION_LIBRARY - where to find the QtSingleApplication library (not for general use)
|
||||
+
|
||||
+# copyright (c) 2013 TI_Eugene ti.eugene@gmail.com
|
||||
+#
|
||||
+# Redistribution and use is allowed according to the terms of the FreeBSD license.
|
||||
+
|
||||
+SET(QTSINGLEAPPLICATION_FOUND FALSE)
|
||||
+
|
||||
+IF(QT4_FOUND)
|
||||
+ message(STATUS "Looking for Qt4 single application library")
|
||||
+ FIND_PATH(QTSINGLEAPPLICATION_INCLUDE_DIR QtSingleApplication
|
||||
+ # standard locations
|
||||
+ /usr/include
|
||||
+ /usr/include/QtSolutions
|
||||
+ # qt4 location except mac's frameworks
|
||||
+ "${QT_INCLUDE_DIR}/QtSolutions"
|
||||
+ # mac's frameworks
|
||||
+ ${FRAMEWORK_INCLUDE_DIR}/QtSolutions
|
||||
+ )
|
||||
+
|
||||
+ SET(QTSINGLEAPPLICATION_NAMES ${QTSINGLEAPPLICATION_NAMES}
|
||||
+ QtSolutions_SingleApplication-2.6 libQtSolutions_SingleApplication-2.6)
|
||||
+ FIND_LIBRARY(QTSINGLEAPPLICATION_LIBRARY
|
||||
+ NAMES ${QTSINGLEAPPLICATION_NAMES}
|
||||
+ PATHS ${QT_LIBRARY_DIR}
|
||||
+ )
|
||||
+ELSEIF(Qt5Widgets_FOUND)
|
||||
+ message(STATUS "Looking for Qt5 single application library")
|
||||
+ FOREACH(TOP_INCLUDE_PATH in ${Qt5Widgets_INCLUDE_DIRS} ${FRAMEWORK_INCLUDE_DIR})
|
||||
+ FIND_PATH(QTSINGLEAPPLICATION_INCLUDE_DIR QtSingleApplication ${TOP_INCLUDE_PATH}/QtSolutions)
|
||||
+
|
||||
+ IF(QTSINGLEAPPLICATION_INCLUDE_DIR)
|
||||
+ BREAK()
|
||||
+ ENDIF()
|
||||
+ ENDFOREACH()
|
||||
+
|
||||
+ SET(QTSINGLEAPPLICATION_NAMES ${QTSINGLEAPPLICATION_NAMES}
|
||||
+ Qt5Solutions_SingleApplication-2.6 libQt5Solutions_SingleApplication-2.6
|
||||
+ QtSolutions_SingleApplication-2.6 libQtSolutions_SingleApplication-2.6)
|
||||
+ GET_TARGET_PROPERTY(QT5_WIDGETSLIBRARY Qt5::Widgets LOCATION)
|
||||
+ GET_FILENAME_COMPONENT(QT5_WIDGETSLIBRARYPATH ${QT5_WIDGETSLIBRARY} PATH)
|
||||
+
|
||||
+ FIND_LIBRARY(QTSINGLEAPPLICATION_LIBRARY
|
||||
+ NAMES ${QTSINGLEAPPLICATION_NAMES}
|
||||
+ PATHS ${QT5_WIDGETSLIBRARYPATH}
|
||||
+ )
|
||||
+ENDIF()
|
||||
+
|
||||
+IF (QTSINGLEAPPLICATION_LIBRARY AND QTSINGLEAPPLICATION_INCLUDE_DIR)
|
||||
+
|
||||
+ SET(QTSINGLEAPPLICATION_LIBRARIES ${QTSINGLEAPPLICATION_LIBRARY})
|
||||
+ SET(QTSINGLEAPPLICATION_FOUND TRUE)
|
||||
+
|
||||
+ IF (CYGWIN)
|
||||
+ IF(BUILD_SHARED_LIBS)
|
||||
+ # No need to define QTSINGLEAPPLICATION_USE_DLL here, because it's default for Cygwin.
|
||||
+ ELSE(BUILD_SHARED_LIBS)
|
||||
+ SET (QTSINGLEAPPLICATION_DEFINITIONS -DQTSINGLEAPPLICATION_STATIC)
|
||||
+ ENDIF(BUILD_SHARED_LIBS)
|
||||
+ ENDIF (CYGWIN)
|
||||
+
|
||||
+ENDIF (QTSINGLEAPPLICATION_LIBRARY AND QTSINGLEAPPLICATION_INCLUDE_DIR)
|
||||
+
|
||||
+IF (QTSINGLEAPPLICATION_FOUND)
|
||||
+ IF (NOT QtSingleApplication_FIND_QUIETLY)
|
||||
+ MESSAGE(STATUS "Found QtSingleApplication: ${QTSINGLEAPPLICATION_LIBRARY}")
|
||||
+ MESSAGE(STATUS " includes: ${QTSINGLEAPPLICATION_INCLUDE_DIR}")
|
||||
+ ENDIF (NOT QtSingleApplication_FIND_QUIETLY)
|
||||
+ELSE (QTSINGLEAPPLICATION_FOUND)
|
||||
+ IF (QtSingleApplication_FIND_REQUIRED)
|
||||
+ MESSAGE(FATAL_ERROR "Could not find QtSingleApplication library")
|
||||
+ ENDIF (QtSingleApplication_FIND_REQUIRED)
|
||||
+ENDIF (QTSINGLEAPPLICATION_FOUND)
|
||||
+
|
||||
+MARK_AS_ADVANCED(QTSINGLEAPPLICATION_INCLUDE_DIR QTSINGLEAPPLICATION_LIBRARY)
|
||||
+
|
||||
+if(NOT TARGET QtSingleApplication::QtSingleApplication)
|
||||
+ add_library(QtSingleApplication::QtSingleApplication UNKNOWN IMPORTED)
|
||||
+ set_target_properties(QtSingleApplication::QtSingleApplication PROPERTIES
|
||||
+ INTERFACE_INCLUDE_DIRECTORIES "${QTSINGLEAPPLICATION_INCLUDE_DIR}"
|
||||
+ INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${QTSINGLEAPPLICATION_INCLUDE_DIR}"
|
||||
+ )
|
||||
+ if(EXISTS "${QTSINGLEAPPLICATION_LIBRARY}")
|
||||
+ set_target_properties(QtSingleApplication::QtSingleApplication PROPERTIES
|
||||
+ IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
+ IMPORTED_LOCATION "${QTSINGLEAPPLICATION_LIBRARY}")
|
||||
+ endif()
|
||||
+endif(NOT TARGET QtSingleApplication::QtSingleApplication)
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index ba528a3..67e9fef 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -309,7 +309,8 @@ if(ANDROID)
|
||||
else()
|
||||
add_executable(Mapper WIN32 MACOSX_BUNDLE ${Mapper_SRCS})
|
||||
target_compile_definitions(Mapper PRIVATE MAPPER_USE_QTSINGLEAPPLICATION)
|
||||
- target_link_libraries(Mapper QtSingleApplication)
|
||||
+ target_include_directories(Mapper PUBLIC ${QTSINGLEAPPLICATION_INCLUDE_DIR})
|
||||
+ target_link_libraries(Mapper ${QTSINGLEAPPLICATION_LIBRARIES})
|
||||
endif()
|
||||
|
||||
target_link_libraries(Mapper
|
||||
|
||||
--
|
||||
2.14.2
|
||||
|
5
loffice-libcxx-wrapper.sh
Normal file
5
loffice-libcxx-wrapper.sh
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
linker_flags="$(echo "$@" | tr ' ' '\n' | grep '^\-l' | tr '\n' ' ')"
|
||||
|
||||
/usr/bin/clang++ "$@" $LIBCCX_LIBS $linker_flags
|
17
mapper-rosa-licensing.cmake
Normal file
17
mapper-rosa-licensing.cmake
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Based on fedora-licensing.cmake.
|
||||
|
||||
include("linux-distribution.cmake")
|
||||
|
||||
set(explicit_copyright_gdal
|
||||
"gdal"
|
||||
"file:///usr/share/gdal/LICENSE.TXT"
|
||||
)
|
||||
|
||||
set(system_copyright_dir "/usr/share")
|
||||
set(copyright_pattern
|
||||
"${system_copyright_dir}/doc/@package@/COPYING"
|
||||
"${system_copyright_dir}/doc/@package@/COPYRIGHT"
|
||||
"${system_copyright_dir}/licenses/@package@/COPYING"
|
||||
"${system_copyright_dir}/licenses/@package@/Copyright.txt"
|
||||
"${system_copyright_dir}/licenses/@package@/LICENSE"
|
||||
)
|
85
mapper.spec
Normal file
85
mapper.spec
Normal file
|
@ -0,0 +1,85 @@
|
|||
Name: mapper
|
||||
Version: 0.9.4
|
||||
Release: 1
|
||||
Summary: OpenOrienteering Mapper
|
||||
URL: https://www.openorienteering.org/apps/mapper
|
||||
Source0: https://github.com/OpenOrienteering/mapper/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: mapper-rosa-licensing.cmake
|
||||
Source100: https://abf.io/import/libreoffice/raw/rosa2016.1/loffice-libcxx-wrapper.sh
|
||||
Patch0: 0001-Use-system-QtSingleApplication.patch
|
||||
License: GPLv3
|
||||
Group: Geography
|
||||
BuildRequires: cmake
|
||||
BuildRequires: clang
|
||||
BuildRequires: pkgconfig(polyclipping)
|
||||
BuildRequires: pkgconfig(proj)
|
||||
BuildRequires: pkgconfig(gdal)
|
||||
BuildRequires: pkgconfig(Qt5Core)
|
||||
BuildRequires: pkgconfig(Qt5PrintSupport)
|
||||
BuildRequires: pkgconfig(Qt5Positioning)
|
||||
BuildRequires: pkgconfig(Qt5Sql)
|
||||
BuildRequires: pkgconfig(Qt5Help)
|
||||
BuildRequires: pkgconfig(Qt5Concurrent)
|
||||
BuildRequires: pkgconfig(Qt5Concurrent)
|
||||
BuildRequires: pkgconfig(Qt5Network)
|
||||
BuildRequires: pkgconfig(Qt5Network)
|
||||
BuildRequires: pkgconfig(Qt5Gui)
|
||||
BuildRequires: pkgconfig(Qt5Test)
|
||||
BuildRequires: pkgconfig(Qt5Widgets)
|
||||
BuildRequires: pkgconfig(Qt5Sensors)
|
||||
BuildRequires: pkgconfig(Qt5SerialPort)
|
||||
BuildRequires: pkgconfig(Qt5Positioning)
|
||||
BuildRequires: qt5-linguist-tools
|
||||
BuildRequires: qt5-tools
|
||||
BuildRequires: cups-devel
|
||||
BuildRequires: iwyu >= 0.12
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: stdc++-gcc10-devel
|
||||
|
||||
%description
|
||||
OpenOrienteering Mapper is an orienteering mapmaking
|
||||
program and provides a free and open source alternative
|
||||
to existing commercial software. OpenOrienteering Mapper
|
||||
runs on Android, Windows, macOS and Linux.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
install -Dpm644 %{SOURCE1} doc/licensing/rosa-licensing.cmake
|
||||
%patch -p1
|
||||
|
||||
install -m0755 %{SOURCE100} .
|
||||
sed 's/clang++/clang/' loffice-libcxx-wrapper.sh > loffice-libc-wrapper.sh
|
||||
chmod +x *.sh
|
||||
|
||||
|
||||
%build
|
||||
%cmake_qt5 \
|
||||
-DMapper_BUILD_CLIPPER:BOOL=OFF \
|
||||
-DMapper_BUILD_DOXYGEN:BOOL=OFF \
|
||||
-DCMAKE_CXX_COMPILER="$RPM_BUILD_DIR/%{name}-%{version}/loffice-libcxx-wrapper.sh" \
|
||||
-DCMAKE_C_COMPILER="$RPM_BUILD_DIR/%{name}-%{version}/loffice-libc-wrapper.sh" \
|
||||
-DCMAKE_CXX_FLAGS="-nostdinc++ -I/usr/include/libstdc++-gcc10 -I/usr/include/libstdc++-gcc10/%{_host}" \
|
||||
-DCMAKE_C_FLAGS="-nostdinc++ -I/usr/include/libstdc++-gcc10 -I/usr/include/libstdc++-gcc10/%{_host}" \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-lstdc++-gcc10" \
|
||||
-DCMAKE_MODULE_LINKER_FLAGS="-lstdc++-gcc10" \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="-lstdc++-gcc10" \
|
||||
-DCMAKE_INSTALL_PREFIX="%{_prefix}" \
|
||||
-DCMAKE_INSTALL_LIBDIR="%{_lib}".
|
||||
|
||||
%make
|
||||
|
||||
%install
|
||||
%makeinstall -C build DESTDIR=%{buildroot}
|
||||
|
||||
%files
|
||||
%doc README.md COPYING
|
||||
%{_bindir}/Mapper
|
||||
%{_datadir}/applications/Mapper.desktop
|
||||
%{_docdir}/openorienteering-mapper/*
|
||||
%{_iconsdir}/hicolor/*/apps/Mapper.png
|
||||
%{_iconsdir}/hicolor/*/mimetypes/*.png
|
||||
%{_mandir}/man1/Mapper.1.xz
|
||||
%{_datadir}/mime/packages/openorienteering-mapper.xml
|
||||
%{_datadir}/openorienteering-mapper/*
|
||||
|
||||
|
Loading…
Add table
Reference in a new issue