New port: graphics/openorienteering-mapper

OpenOrienteering Mapper is a software for creating
maps for the orienteering sport.

WWW: http://www.openorienteering.org/apps/mapper/

PR:		214758
Submitted by:	Nikolay <sikmir@gmail.com>
Reviewed by:	olivierd
This commit is contained in:
Kurt Jaeger 2018-04-15 15:45:12 +00:00
parent 5971959c5a
commit 9efedc4a0e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=467396
14 changed files with 365 additions and 0 deletions

View file

@ -661,6 +661,7 @@
SUBDIR += openjpeg15
SUBDIR += openjump
SUBDIR += opennurbs
SUBDIR += openorienteering-mapper
SUBDIR += openrm
SUBDIR += openshadinglanguage
SUBDIR += opensubdiv

View file

@ -0,0 +1,52 @@
# Created by: Nikolay Korotkiy <sikmir@gmail.com>
# $FreeBSD$
PORTNAME= openorienteering-mapper
PORTVERSION= 0.8.1
DISTVERSIONPREFIX= v
CATEGORIES= graphics geography
MAINTAINER= sikmir@gmail.com
COMMENT= Map drawing program from OpenOrienteering
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/COPYING
BROKEN_FreeBSD_10= fails to compile src/core/map.cpp:1118: no matching member function for call to 'applyOnAllObjects'
LIB_DEPENDS= libpolyclipping.so:graphics/polyclipping \
libproj.so:graphics/proj
USES= cmake:outsource,noninja compiler:c++14-lang \
desktop-file-utils gmake shared-mime-info
USE_QT5= buildtools_build help qmake_build core gui \
location network printsupport sensors widgets
USE_GITHUB= yes
GH_ACCOUNT= OpenOrienteering
GH_PROJECT= mapper
CMAKE_ARGS+= -DLICENSING_PROVIDER=freebsd \
-DMapper_PACKAGE_NAME=${PORTNAME} \
-Wno-dev
OPTIONS_DEFINE= DOCS EXAMPLES GDAL NLS TEST TIFF
OPTIONS_DEFAULT= GDAL
OPTIONS_SUB= yes
DOCS_CMAKE_BOOL= Mapper_WITH_DOCS
DOCS_BUILD_DEPENDS= doxygen:devel/doxygen
DOCS_USE= QT5=assistant_run
EXAMPLES_CMAKE_BOOL= Mapper_WITH_EXAMPLES
GDAL_DESC= Use the GDAL library
GDAL_CMAKE_BOOL= Mapper_USE_GDAL
GDAL_LIB_DEPENDS= libgdal.so:graphics/gdal
NLS_CMAKE_BOOL= Mapper_WITH_NLS
NLS_BUILD_DEPENDS= gsed:textproc/gsed
NLS_USE= QT5=linguisttools_build
NLS_USES= gettext-runtime
TEST_CMAKE_BOOL= Mapper_WITH_TEST
TEST_USE= QT5=testlib_build
TEST_TEST_TARGET= test
TIFF_DESC= Support for TIFF
TIFF_USE= QT5=imageformats
.include <bsd.port.mk>

View file

@ -0,0 +1,3 @@
TIMESTAMP = 1523720387
SHA256 (OpenOrienteering-mapper-v0.8.1_GH0.tar.gz) = 14debf0c31a3ca5b608154e264007a7582ea87d3466bd7d30527157396ae16d7
SIZE (OpenOrienteering-mapper-v0.8.1_GH0.tar.gz) = 8449610

View file

@ -0,0 +1,47 @@
--- CMakeLists.txt.orig 2018-03-11 14:00:07 UTC
+++ CMakeLists.txt
@@ -69,6 +69,11 @@ option(Mapper_DEBUG_TRANSLATIONS "Debug
# Used for some Linux distributions which do not provide the polyclipping lib.
option(Mapper_BUILD_CLIPPER "Build the Clipper package from source" OFF)
+option(Mapper_WITH_DOCS "Build and/or install documentation" ON)
+option(Mapper_WITH_EXAMPLES "Build and/or install examples" ON)
+option(Mapper_WITH_NLS "Native Language Support" ON)
+option(Mapper_WITH_TEST "Build the test suite" ON)
+
option(Mapper_USE_GDAL "Use the GDAL library" ON)
if(CMAKE_BUILD_TYPE MATCHES Release|MinSizeRel|RelWithDebInfo)
@@ -227,10 +232,20 @@ endif()
# Subdirectories
-add_subdirectory("doc/manual")
-add_subdirectory("examples")
+if (Mapper_WITH_DOCS)
+ add_subdirectory("doc/manual")
+endif()
+if (Mapper_WITH_EXAMPLES)
+ add_subdirectory("examples")
+endif()
add_subdirectory("symbol sets")
-add_subdirectory("translations")
+if (Mapper_WITH_NLS)
+ add_subdirectory("translations")
+else()
+ execute_process(COMMAND "${CMAKE_COMMAND}" -E make_directory "packaging/linux")
+ execute_process(COMMAND "${CMAKE_COMMAND}" -E copy "${PROJECT_SOURCE_DIR}/packaging/linux/Mapper.desktop" "packaging/linux/")
+ execute_process(COMMAND "${CMAKE_COMMAND}" -E copy "${PROJECT_SOURCE_DIR}/packaging/linux/openorienteering-mapper.xml" "packaging/linux/")
+endif()
add_subdirectory("3rd-party/qbezier")
if(NOT ANDROID)
add_subdirectory("3rd-party/qtsingleapplication")
@@ -250,7 +265,7 @@ if(CMAKE_CROSSCOMPILING)
add_custom_target(TEST_WARNING ALL
COMMENT "Crosscompiling, skipping all tests")
add_dependencies(TEST_WARNING Mapper)
-else()
+elseif(Mapper_WITH_TEST)
enable_testing()
add_subdirectory("test")
endif()

View file

@ -0,0 +1,9 @@
--- doc/licensing/freebsd-licensing.cmake.orig 2018-04-14 16:13:40 UTC
+++ doc/licensing/freebsd-licensing.cmake
@@ -0,0 +1,6 @@
+include("linux-distribution.cmake")
+
+set(system_copyright_dir "/usr/local/share/licenses")
+set(copyright_pattern
+ "${system_copyright_dir}/@package@/LICENSE"
+)

View file

@ -0,0 +1,11 @@
--- packaging/CMakeLists.txt.orig 2018-03-11 14:00:07 UTC
+++ packaging/CMakeLists.txt
@@ -437,7 +437,7 @@ endforeach(_qt_plugin)
if(UNIX AND NOT APPLE AND NOT ANDROID)
install(
FILES "${PROJECT_SOURCE_DIR}/doc/man/Mapper.1"
- DESTINATION "share/man/man1")
+ DESTINATION "man/man1")
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/linux/Mapper.desktop"
DESTINATION "share/applications")

View file

@ -0,0 +1,8 @@
--- packaging/custom_install.cmake.in.orig 2018-03-11 14:00:07 UTC
+++ packaging/custom_install.cmake.in
@@ -215,4 +215,4 @@ endif()
set(runtime "")
set(dirs "@MAPPER_LIB_HINTS@")
handle_qt_conf()
-fixup_bundle_portable("${runtime}" "${dirs}")
+#fixup_bundle_portable("${runtime}" "${dirs}")

View file

@ -0,0 +1,14 @@
--- src/CMakeLists.txt.orig 2018-03-11 14:00:07 UTC
+++ src/CMakeLists.txt
@@ -286,8 +286,9 @@ target_compile_definitions(Mapper_Common
# MAPPER_ENABLE_COMPATIBILITY
)
-mapper_translations_sources(${Mapper_Common_SRCS} ${Mapper_Common_HEADERS})
-
+if(Mapper_WITH_NLS)
+ mapper_translations_sources(${Mapper_Common_SRCS} ${Mapper_Common_HEADERS})
+endif()
# Mapper executable

View file

@ -0,0 +1,15 @@
--- src/gdal/CMakeLists.txt.orig 2018-03-11 14:00:07 UTC
+++ src/gdal/CMakeLists.txt
@@ -34,8 +34,10 @@ set(MAPPER_GDAL_SOURCES
ogr_template.cpp
mapper-osmconf.ini
)
-
-mapper_translations_sources(${MAPPER_GDAL_HEADERS} ${MAPPER_GDAL_SOURCES})
+
+if(Mapper_WITH_NLS)
+ mapper_translations_sources(${MAPPER_GDAL_HEADERS} ${MAPPER_GDAL_SOURCES})
+endif()
add_library(mapper-gdal STATIC ${MAPPER_GDAL_HEADERS} ${MAPPER_GDAL_SOURCES} "${PROJECT_BINARY_DIR}/gdal/mapper-osmconf.ini")

View file

@ -0,0 +1,10 @@
--- src/mapper_config.h.in.orig 2018-03-11 14:00:07 UTC
+++ src/mapper_config.h.in
@@ -30,6 +30,7 @@
#cmakedefine Mapper_DEBUG_TRANSLATIONS
#cmakedefine Mapper_PACKAGE_NAME
+#cmakedefine Mapper_WITH_DOCS
#define MAPPER_DATA_DESTINATION "@CMAKE_INSTALL_PREFIX@/@MAPPER_DATA_DESTINATION@"
#define MAPPER_ABOUT_DESTINATION "@CMAKE_INSTALL_PREFIX@/@MAPPER_ABOUT_DESTINATION@"

View file

@ -0,0 +1,31 @@
--- translations/CMakeLists.txt.orig 2018-03-11 14:00:07 UTC
+++ translations/CMakeLists.txt
@@ -220,24 +220,24 @@ else()
set(pre_lupdate )
set(post_lupdate
- COMMAND sed -i -e "/<context>/N\\;/<name>Q[A-Z]/,/<.context>/d" "${CMAKE_CURRENT_SOURCE_DIR}/${translation}"
+ COMMAND gsed -i -e "/<context>/N\\;/<name>Q[A-Z]/,/<.context>/d" "${CMAKE_CURRENT_SOURCE_DIR}/${translation}"
)
if("${ts_filename}" STREQUAL "OpenOrienteering_hu")
# No plural support for Hungarian in Qt
# Save first numerusform in translatorcomment
list(APPEND pre_lupdate
- COMMAND sed -i -f "${save_first_numerusform}" "${CMAKE_CURRENT_SOURCE_DIR}/${translation}"
+ COMMAND gsed -i -f "${save_first_numerusform}" "${CMAKE_CURRENT_SOURCE_DIR}/${translation}"
)
# Restore first numerusform for translatorcomment
list(APPEND post_lupdate
- COMMAND sed -i -f "${restore_first_numerusform}" "${CMAKE_CURRENT_SOURCE_DIR}/${translation}"
+ COMMAND gsed -i -f "${restore_first_numerusform}" "${CMAKE_CURRENT_SOURCE_DIR}/${translation}"
)
endif()
add_custom_target(Mapper_${ts_filename}_update
${pre_lupdate}
COMMAND "${Qt5_LUPDATE_EXECUTABLE}" ${lupdate_options} "@${listfile}" -ts "${CMAKE_CURRENT_SOURCE_DIR}/${translation}"
- COMMAND sed -i -e "/<context>/N;/<name>Q[A-Z]/,/<.context>/d" "${CMAKE_CURRENT_SOURCE_DIR}/${translation}"
+ COMMAND gsed -i -e "/<context>/N;/<name>Q[A-Z]/,/<.context>/d" "${CMAKE_CURRENT_SOURCE_DIR}/${translation}"
${post_lupdate}
VERBATIM
)

View file

@ -0,0 +1,58 @@
--- translations/translate_text_files.sh.orig 2018-03-11 14:00:07 UTC
+++ translations/translate_text_files.sh
@@ -21,8 +21,8 @@ set -e
for FILE
do
- echo -n "$FILE" | sed -e 's/.*OpenOrienteering_/Comment[/;s/\.ts$/]=/'
- cat ${FILE} | sed -n -e '
+ echo -n "$FILE" | gsed -e 's/.*OpenOrienteering_/Comment[/;s/\.ts$/]=/'
+ cat ${FILE} | gsed -n -e '
/<source>A free software for drawing orienteering maps</! d
n
/<translation>/! n
@@ -31,22 +31,22 @@ do
p
q
'
-done | sed -e "
+done | gsed -e "
s/^[^=]*\]=\(Comment\)/\1/
/^[^=]*\]=$/ d
s/&quot;/\"/
s/&apos;/'/
" > desktop_file_comment.txt
-sed -i "../packaging/linux/Mapper.desktop" -e '
+gsed -i "../packaging/linux/Mapper.desktop" -e '
/^Comment=/ r desktop_file_comment.txt
/^Comment\[/ d
'
for FILE
do
- echo -n "$FILE" | sed -e 's/.*OpenOrienteering_/ <comment xml:lang="/;s/\.ts$/">/'
- cat ${FILE} | sed -n -e '
+ echo -n "$FILE" | gsed -e 's/.*OpenOrienteering_/ <comment xml:lang="/;s/\.ts$/">/'
+ cat ${FILE} | gsed -n -e '
/<source>Orienteering map</! d
n
/<translation>/! n
@@ -55,7 +55,7 @@ do
p
q
'
-done | sed -e "
+done | gsed -e "
s/^[^>]*>\( *<comment\)/\1/
/\">$/ d
s/$/<\/comment>/
@@ -63,7 +63,7 @@ done | sed -e "
s/&apos;/'/
" > mime_type_comment.txt
-sed -i "../packaging/linux/openorienteering-mapper.xml" -e '
+gsed -i "../packaging/linux/openorienteering-mapper.xml" -e '
/^ *<comment>/ r mime_type_comment.txt
/^ *<comment [^>]*lang=/ d
'

View file

@ -0,0 +1,6 @@
OpenOrienteering Mapper (OOM).
OpenOrienteering Mapper is a software for creating
maps for the orienteering sport.
WWW: http://www.openorienteering.org/apps/mapper/

View file

@ -0,0 +1,100 @@
bin/Mapper
man/man1/Mapper.1.gz
share/applications/Mapper.desktop
%%DOCSDIR%%/3rd-party/qtsingleapplication.txt
%%DOCS%%%%PORTDOCS%%%%DOCSDIR%%/Mapper 0.8.1 Manual.qch
%%DOCS%%%%PORTDOCS%%%%DOCSDIR%%/Mapper 0.8.1 Manual.qhc
%%DOCSDIR%%/common-licenses/GPL-3.txt
%%DOCSDIR%%/licensing.html
share/icons/hicolor/128x128/apps/Mapper.png
share/icons/hicolor/128x128/mimetypes/application-x-openorienteering-ocd.png
share/icons/hicolor/128x128/mimetypes/application-x-openorienteering-xmap.png
share/icons/hicolor/16x16/apps/Mapper.png
share/icons/hicolor/16x16/mimetypes/application-x-openorienteering-ocd.png
share/icons/hicolor/16x16/mimetypes/application-x-openorienteering-xmap.png
share/icons/hicolor/24x24/apps/Mapper.png
share/icons/hicolor/24x24/mimetypes/application-x-openorienteering-ocd.png
share/icons/hicolor/24x24/mimetypes/application-x-openorienteering-xmap.png
share/icons/hicolor/256x256/apps/Mapper.png
share/icons/hicolor/256x256/mimetypes/application-x-openorienteering-ocd.png
share/icons/hicolor/256x256/mimetypes/application-x-openorienteering-xmap.png
share/icons/hicolor/32x32/apps/Mapper.png
share/icons/hicolor/32x32/mimetypes/application-x-openorienteering-ocd.png
share/icons/hicolor/32x32/mimetypes/application-x-openorienteering-xmap.png
share/icons/hicolor/48x48/apps/Mapper.png
share/icons/hicolor/48x48/mimetypes/application-x-openorienteering-ocd.png
share/icons/hicolor/48x48/mimetypes/application-x-openorienteering-xmap.png
share/icons/hicolor/512x512/apps/Mapper.png
share/icons/hicolor/512x512/mimetypes/application-x-openorienteering-ocd.png
share/icons/hicolor/512x512/mimetypes/application-x-openorienteering-xmap.png
share/icons/hicolor/96x96/apps/Mapper.png
share/icons/hicolor/96x96/mimetypes/application-x-openorienteering-ocd.png
share/icons/hicolor/96x96/mimetypes/application-x-openorienteering-xmap.png
share/mime/packages/openorienteering-mapper.xml
%%EXAMPLES%%%%DATADIR%%/examples/complete map.omap
%%EXAMPLES%%%%DATADIR%%/examples/forest sample.omap
%%EXAMPLES%%%%DATADIR%%/examples/overprinting.omap
%%GDAL%%%%DATADIR%%/gdal/mapper-osmconf.ini
%%DATADIR%%/symbol sets/10000/Course_Design_10000.omap
%%DATADIR%%/symbol sets/10000/ISMTBOM_10000.omap
%%DATADIR%%/symbol sets/10000/ISOM2000_10000.omap
%%DATADIR%%/symbol sets/10000/ISOM2017_10000.omap
%%DATADIR%%/symbol sets/10000/ISSkiOM_10000.omap
%%DATADIR%%/symbol sets/15000/Course_Design_15000.omap
%%DATADIR%%/symbol sets/15000/ISMTBOM_15000.omap
%%DATADIR%%/symbol sets/15000/ISOM2000_15000.omap
%%DATADIR%%/symbol sets/15000/ISOM2017_15000.omap
%%DATADIR%%/symbol sets/15000/ISSkiOM_15000.omap
%%DATADIR%%/symbol sets/20000/ISMTBOM_20000.omap
%%DATADIR%%/symbol sets/4000/Course_Design_4000.omap
%%DATADIR%%/symbol sets/4000/ISSOM_4000.omap
%%DATADIR%%/symbol sets/5000/Course_Design_5000.omap
%%DATADIR%%/symbol sets/5000/ISMTBOM_5000.omap
%%DATADIR%%/symbol sets/5000/ISSOM_5000.omap
%%DATADIR%%/symbol sets/5000/ISSkiOM_5000.omap
%%DATADIR%%/symbol sets/7500/ISMTBOM_7500.omap
%%DATADIR%%/symbol sets/ISOM2000-ISOM2017.crt
%%DATADIR%%/symbol sets/ISOM2000-ISSOM.crt
%%DATADIR%%/symbol sets/OSM-ISOM2000.crt
%%DATADIR%%/symbol sets/OSM-ISOM2017.crt
%%DATADIR%%/symbol sets/OSM-ISSOM.crt
%%NLS%%%%DATADIR%%/translations/OpenOrienteering_cs.qm
%%NLS%%%%DATADIR%%/translations/OpenOrienteering_da.qm
%%NLS%%%%DATADIR%%/translations/OpenOrienteering_de.qm
%%NLS%%%%DATADIR%%/translations/OpenOrienteering_en.qm
%%NLS%%%%DATADIR%%/translations/OpenOrienteering_eo.qm
%%NLS%%%%DATADIR%%/translations/OpenOrienteering_es.qm
%%NLS%%%%DATADIR%%/translations/OpenOrienteering_fi.qm
%%NLS%%%%DATADIR%%/translations/OpenOrienteering_fr.qm
%%NLS%%%%DATADIR%%/translations/OpenOrienteering_hu.qm
%%NLS%%%%DATADIR%%/translations/OpenOrienteering_id.qm
%%NLS%%%%DATADIR%%/translations/OpenOrienteering_it.qm
%%NLS%%%%DATADIR%%/translations/OpenOrienteering_ja.qm
%%NLS%%%%DATADIR%%/translations/OpenOrienteering_lv.qm
%%NLS%%%%DATADIR%%/translations/OpenOrienteering_nb.qm
%%NLS%%%%DATADIR%%/translations/OpenOrienteering_nl.qm
%%NLS%%%%DATADIR%%/translations/OpenOrienteering_pl.qm
%%NLS%%%%DATADIR%%/translations/OpenOrienteering_pt_BR.qm
%%NLS%%%%DATADIR%%/translations/OpenOrienteering_ru.qm
%%NLS%%%%DATADIR%%/translations/OpenOrienteering_sv.qm
%%NLS%%%%DATADIR%%/translations/OpenOrienteering_uk.qm
%%NLS%%%%DATADIR%%/translations/OpenOrienteering_zh_CN.qm
%%NLS%%%%DATADIR%%/translations/map_symbols_cs.qm
%%NLS%%%%DATADIR%%/translations/map_symbols_da.qm
%%NLS%%%%DATADIR%%/translations/map_symbols_de.qm
%%NLS%%%%DATADIR%%/translations/map_symbols_eo.qm
%%NLS%%%%DATADIR%%/translations/map_symbols_es.qm
%%NLS%%%%DATADIR%%/translations/map_symbols_fi.qm
%%NLS%%%%DATADIR%%/translations/map_symbols_fr.qm
%%NLS%%%%DATADIR%%/translations/map_symbols_hu.qm
%%NLS%%%%DATADIR%%/translations/map_symbols_it.qm
%%NLS%%%%DATADIR%%/translations/map_symbols_nl.qm
%%NLS%%%%DATADIR%%/translations/map_symbols_ru.qm
%%NLS%%%%DATADIR%%/translations/map_symbols_sv.qm
%%NLS%%%%DATADIR%%/translations/map_symbols_uk.qm
%%NLS%%%%DATADIR%%/translations/qt_eo.qm
%%NLS%%%%DATADIR%%/translations/qt_et.qm
%%NLS%%%%DATADIR%%/translations/qt_id.qm
%%NLS%%%%DATADIR%%/translations/qt_lv.qm
%%NLS%%%%DATADIR%%/translations/qt_nb.qm
%%NLS%%%%DATADIR%%/translations/qt_nl.qm