Wednesday, June 09, 2021

[update/unbreak] qmapshack 1.16

Index: Makefile
===================================================================
RCS file: /cvs/ports/geo/qmapshack/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile 24 Mar 2021 10:57:43 -0000 1.5
+++ Makefile 10 Jun 2021 06:58:00 -0000
@@ -4,9 +4,7 @@

GH_ACCOUNT = Maproom
GH_PROJECT = qmapshack
-GH_TAGNAME = V_1.15.0
-REVISION = 0
-BROKEN = doesnt build against proj8
+GH_TAGNAME = V_1.16.0

CATEGORIES = geo

@@ -16,7 +14,7 @@
PERMIT_PACKAGE = Yes

WANTLIB += ${COMPILER_LIBCXX} GL Qt5Core Qt5DBus Qt5Gui Qt5Help
-WANTLIB += Qt5Network Qt5Positioning Qt5PrintSupport Qt5Qml Qt5Quick
+WANTLIB += Qt5Network Qt5Positioning Qt5PrintSupport Qt5Qml Qt5QmlModels Qt5Quick
WANTLIB += Qt5Sql Qt5WebChannel Qt5WebEngineCore Qt5WebEngineWidgets
WANTLIB += Qt5Widgets Qt5Xml c gdal jpeg m proj quazip5 routino

@@ -32,9 +30,7 @@
x11/qt5/qttools \
x11/qt5/qtwebengine

-# https://github.com/Maproom/qmapshack/issues/333
-CONFIGURE_ARGS
= -DCMAKE_CXX_FLAGS=-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1 \
- -Wno-dev
+CONFIGURE_ARGS = -Wno-dev

NO_TEST = Yes

Index: distinfo
===================================================================
RCS file: /cvs/ports/geo/qmapshack/distinfo,v
retrieving revision 1.2
diff -u -r1.2 distinfo
--- distinfo 25 Aug 2020 18:43:54 -0000 1.2
+++ distinfo 10 Jun 2021 06:58:00 -0000
@@ -1,2 +1,2 @@
-SHA256 (qmapshack-1.15.0.tar.gz) = o6RwZXpmohpZ6BLdb5NRhFzjMAwAwlYi3LSjgY7YhPI=
-SIZE (qmapshack-1.15.0.tar.gz) = 46097781
+SHA256 (qmapshack-1.16.0.tar.gz) = C+rhBj/BfAM+YITqcbwMyV3lBfb8BNqc+LcPgAPfQwI=
+SIZE (qmapshack-1.16.0.tar.gz) = 54233332
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: patches/patch-CMakeLists_txt
diff -N patches/patch-CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-CMakeLists_txt 10 Jun 2021 06:58:00 -0000
@@ -0,0 +1,23 @@
+$OpenBSD$
+
+Index: CMakeLists.txt
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -154,16 +154,12 @@ find_package(GDAL REQUIRED)
+ find_package(PROJ REQUIRED)
+ find_package(JPEG REQUIRED)
+ find_package(ROUTINO REQUIRED)
+-find_package(QuaZip-Qt5 REQUIRED)
++find_package(QuaZip5 REQUIRED)
+ find_package(ALGLIB ) # optional as we can use our local version
+
+
+ if(${Qt5Widgets_VERSION} VERSION_LESS 5.8.0)
+ message( SEND_ERROR "You need at least Qt5.8 or newer.")
+-endif()
+-
+-if(${PROJ_VERSION} VERSION_LESS 7.2.1)
+- message( SEND_ERROR "You need at least PROJ 7.2.1 or newer.")
+ endif()
+
+ if(USE_QT5DBus)
Index: patches/patch-cmake_Modules_FindPROJ4_cmake
===================================================================
RCS file: patches/patch-cmake_Modules_FindPROJ4_cmake
diff -N patches/patch-cmake_Modules_FindPROJ4_cmake
--- patches/patch-cmake_Modules_FindPROJ4_cmake 22 Aug 2020 06:10:19 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,159 +0,0 @@
-$OpenBSD: patch-cmake_Modules_FindPROJ4_cmake,v 1.1.1.1 2020/08/22 06:10:19 kirby Exp $
-
-Index: cmake/Modules/FindPROJ4.cmake
---- cmake/Modules/FindPROJ4.cmake.orig
-+++ cmake/Modules/FindPROJ4.cmake
-@@ -0,0 +1,153 @@
-+#.rst:
-+# FindPROJ4
-+# --------
-+#
-+# Find the proj includes and library.
-+#
-+# IMPORTED Targets
-+# ^^^^^^^^^^^^^^^^
-+#
-+# This module defines :prop_tgt:`IMPORTED` target ``PROJ4::proj``,
-+# if Proj.4 has been found.
-+#
-+# Result Variables
-+# ^^^^^^^^^^^^^^^^
-+#
-+# This module defines the following variables:
-+#
-+# ::
-+#
-+# PROJ4_INCLUDE_DIRS - where to find proj_api.h, etc.
-+# PROJ4_LIBRARIES - List of libraries when using libproj.
-+# PROJ4_FOUND - True if libproj found.
-+#
-+# ::
-+#
-+# PROJ4_VERSION - The version of libproj found (x.y.z)
-+# PROJ4_VERSION_MAJOR - The major version of libproj
-+# PROJ4_VERSION_MINOR - The minor version of libproj
-+# PROJ4_VERSION_PATCH - The patch version of libproj
-+# PROJ4_VERSION_TWEAK - always 0
-+# PROJ4_VERSION_COUNT - The number of version components, always 3
-+#
-+# Hints
-+# ^^^^^
-+#
-+# A user may set ``PROJ4_ROOT`` to a libproj installation root to tell this
-+# module where to look exclusively.
-+
-+#=============================================================================
-+# Copyright 2016 Kai Pastor
-+#
-+#
-+# This file was derived from CMake 3.5's module FindZLIB.cmake
-+# which has the following terms:
-+#
-+# Copyright 2001-2011 Kitware, Inc.
-+#
-+# Redistribution and use in source and binary forms, with or without
-+# modification, are permitted provided that the following conditions are
-+# met:
-+#
-+# * Redistributions of source code must retain the above copyright notice,
-+# this list of conditions and the following disclaimer.
-+#
-+# * Redistributions in binary form must reproduce the above copyright notice,
-+# this list of conditions and the following disclaimer in the documentation
-+# and/or other materials provided with the distribution.
-+#
-+# * The names of Kitware, Inc., the Insight Consortium, or the names of
-+# any consortium members, or of any contributors, may not be used to
-+# endorse or promote products derived from this software without
-+# specific prior written permission.
-+#
-+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
-+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
-+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+#=============================================================================
-+
-+# Search PROJ4_ROOT exclusively if it is set.
-+if(PROJ4_ROOT)
-+ set(_PROJ4_SEARCH PATHS ${PROJ4_ROOT} NO_DEFAULT_PATH)
-+else()
-+ set(_PROJ4_SEARCH)
-+endif()
-+
-+find_path(PROJ4_INCLUDE_DIR NAMES proj_api.h ${_PROJ4_SEARCH} PATH_SUFFIXES include)
-+mark_as_advanced(PROJ4_INCLUDE_DIR)
-+
-+if(PROJ4_INCLUDE_DIR AND EXISTS "${PROJ4_INCLUDE_DIR}/proj_api.h")
-+ file(STRINGS "${PROJ4_INCLUDE_DIR}/proj_api.h" PROJ4_H REGEX "^#define PJ_VERSION [0-9]+$")
-+
-+ string(REGEX REPLACE "^.*PJ_VERSION ([0-9]).*$" "\\1" PROJ4_VERSION_MAJOR "${PROJ4_H}")
-+ string(REGEX REPLACE "^.*PJ_VERSION [0-9]([0-9]).*$" "\\1" PROJ4_VERSION_MINOR "${PROJ4_H}")
-+ string(REGEX REPLACE "^.*PJ_VERSION [0-9][0-9]([0-9]).*$" "\\1" PROJ4_VERSION_PATCH "${PROJ4_H}")
-+ set(PROJ4_VERSION "${PROJ4_VERSION_MAJOR}.${PROJ4_VERSION_MINOR}.${PROJ4_VERSION_PATCH}")
-+ set(PROJ4_VERSION_COUNT 3)
-+endif()
-+
-+# Allow PROJ4_LIBRARY to be set manually, as the location of the proj library
-+if(NOT PROJ4_LIBRARY)
-+ set(PROJ4_NAMES proj)
-+ set(PROJ4_NAMES_DEBUG projd)
-+ if(WIN32 AND DEFINED PROJ4_VERSION_MAJOR AND DEFINED PROJ4_VERSION_MINOR)
-+ list(APPEND PROJ4_NAMES proj_${PROJ4_VERSION_MAJOR}_${PROJ4_VERSION_MINOR})
-+ list(APPEND PROJ4_NAMES projd_${PROJ4_VERSION_MAJOR}_${PROJ4_VERSION_MINOR})
-+ endif()
-+ find_library(PROJ4_LIBRARY_RELEASE NAMES ${PROJ4_NAMES} ${_PROJ4_SEARCH} PATH_SUFFIXES lib)
-+ find_library(PROJ4_LIBRARY_DEBUG NAMES ${PROJ4_NAMES_DEBUG} ${_PROJ4_SEARCH} PATH_SUFFIXES lib)
-+ include(SelectLibraryConfigurations)
-+ select_library_configurations(PROJ4)
-+endif()
-+
-+# handle the QUIETLY and REQUIRED arguments and set PROJ4_FOUND to TRUE if
-+# all listed variables are TRUE
-+include(FindPackageHandleStandardArgs)
-+find_package_handle_standard_args(PROJ4
-+ REQUIRED_VARS
-+ PROJ4_LIBRARY
-+ PROJ4_INCLUDE_DIR
-+ VERSION_VAR
-+ PROJ4_VERSION
-+)
-+
-+if(PROJ4_FOUND)
-+ set(PROJ4_INCLUDE_DIRS ${PROJ4_INCLUDE_DIR})
-+
-+ if(NOT PROJ4_LIBRARIES)
-+ set(PROJ4_LIBRARIES ${PROJ4_LIBRARY})
-+ endif()
-+
-+ if(NOT TARGET PROJ4::proj)
-+ add_library(PROJ4::proj UNKNOWN IMPORTED)
-+ set_target_properties(PROJ4::proj PROPERTIES
-+ INTERFACE_INCLUDE_DIRECTORIES "${PROJ4_INCLUDE_DIRS}")
-+
-+ if(PROJ4_LIBRARY_RELEASE)
-+ set_property(TARGET PROJ4::proj APPEND PROPERTY
-+ IMPORTED_CONFIGURATIONS RELEASE)
-+ set_target_properties(PROJ4::proj PROPERTIES
-+ IMPORTED_LOCATION_RELEASE "${PROJ4_LIBRARY_RELEASE}")
-+ endif()
-+
-+ if(PROJ4_LIBRARY_DEBUG)
-+ set_property(TARGET PROJ4::proj APPEND PROPERTY
-+ IMPORTED_CONFIGURATIONS DEBUG)
-+ set_target_properties(PROJ4::proj PROPERTIES
-+ IMPORTED_LOCATION_DEBUG "${PROJ4_LIBRARY_DEBUG}")
-+ endif()
-+
-+ if(NOT PROJ4_LIBRARY_RELEASE AND NOT PROJ4_LIBRARY_DEBUG)
-+ set_property(TARGET PROJ4::proj APPEND PROPERTY
-+ IMPORTED_LOCATION "${PROJ4_LIBRARY}")
-+ endif()
-+ endif()
-+endif()
-+
Index: patches/patch-cmake_Modules_FindPROJ_cmake
===================================================================
RCS file: patches/patch-cmake_Modules_FindPROJ_cmake
diff -N patches/patch-cmake_Modules_FindPROJ_cmake
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-cmake_Modules_FindPROJ_cmake 10 Jun 2021 06:58:00 -0000
@@ -0,0 +1,42 @@
+$OpenBSD$
+
+inspired from https://github.com/OSGeo/libgeotiff/blob/master/libgeotiff/cmake/FindPROJ.cmake
+Index: cmake/Modules/FindPROJ.cmake
+--- cmake/Modules/FindPROJ.cmake.orig
++++ cmake/Modules/FindPROJ.cmake
+@@ -0,0 +1,35 @@
++###############################################################################
++# CMake module to search for PROJ library
++#
++# On success, the macro sets the following variables:
++# PROJ_FOUND = if the library found
++# PROJ_LIBRARY = full path to the library
++# PROJ_INCLUDE_DIR = where to find the library headers
++# also defined, but not for general use are
++# PROJ_LIBRARY, where to find the PROJ library.
++#
++# Copyright (c) 2009 Mateusz Loskot <mateusz@loskot.net>
++#
++# Redistribution and use is allowed according to the terms of the BSD license.
++# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
++#
++###############################################################################
++
++FIND_PATH(PROJ_INCLUDE_DIR proj.h
++ PATHS include
++ DOC "Path to PROJ library include directory")
++
++SET(PROJ_NAMES ${PROJ_NAMES} proj proj_i)
++FIND_LIBRARY(PROJ_LIBRARY
++ NAMES ${PROJ_NAMES}
++ PATHS lib
++ DOC "Path to PROJ library file")
++
++# Handle the QUIETLY and REQUIRED arguments and set PROJ_FOUND to TRUE
++# if all listed variables are TRUE
++INCLUDE(FindPackageHandleStandardArgs)
++FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ DEFAULT_MSG PROJ_LIBRARY PROJ_INCLUDE_DIR)
++
++IF(PROJ_FOUND)
++ SET(PROJ_LIBRARIES ${PROJ_LIBRARY})
++ENDIF()
Index: patches/patch-src_qmapshack_CAbout_cpp
===================================================================
RCS file: /cvs/ports/geo/qmapshack/patches/patch-src_qmapshack_CAbout_cpp,v
retrieving revision 1.2
diff -u -r1.2 patch-src_qmapshack_CAbout_cpp
--- patches/patch-src_qmapshack_CAbout_cpp 25 Aug 2020 18:43:54 -0000 1.2
+++ patches/patch-src_qmapshack_CAbout_cpp 10 Jun 2021 06:58:00 -0000
@@ -3,7 +3,7 @@
Index: src/qmapshack/CAbout.cpp
--- src/qmapshack/CAbout.cpp.orig
+++ src/qmapshack/CAbout.cpp
-@@ -48,7 +48,7 @@ CAbout::CAbout(QWidget *parent)
+@@ -48,7 +48,7 @@ CAbout::CAbout(QWidget* parent)
labelRoutinoVersion->setText(tr("%1 (API V%2)").arg(Routino_Version).arg(Routino_APIVersion));
}

Index: patches/patch-src_qmapshack_CMakeLists_txt
===================================================================
RCS file: patches/patch-src_qmapshack_CMakeLists_txt
diff -N patches/patch-src_qmapshack_CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_qmapshack_CMakeLists_txt 10 Jun 2021 06:58:00 -0000
@@ -0,0 +1,22 @@
+$OpenBSD$
+
+Index: src/qmapshack/CMakeLists.txt
+--- src/qmapshack/CMakeLists.txt.orig
++++ src/qmapshack/CMakeLists.txt
+@@ -927,6 +927,7 @@ include_directories(
+ ${PROJ_INCLUDE_DIRS}
+ ${ROUTINO_INCLUDE_DIRS}
+ ${ALGLIB_INCLUDE_DIRS}
++ ${QUAZIP_INCLUDE_DIR}
+ )
+
+ if(APPLE)
+@@ -974,7 +975,7 @@ target_link_libraries(${APPLICATION_NAME}
+ ${PROJ_LIBRARIES}
+ ${ROUTINO_LIBRARIES}
+ ${ALGLIB_LIBRARIES}
+- QuaZip::QuaZip
++ ${QUAZIP_LIBRARIES}
+ )
+
+ if(APPLE)
Index: patches/patch-src_qmapshack_helpers_CDraw_cpp
===================================================================
RCS file: /cvs/ports/geo/qmapshack/patches/patch-src_qmapshack_helpers_CDraw_cpp,v
retrieving revision 1.1
diff -u -r1.1 patch-src_qmapshack_helpers_CDraw_cpp
--- patches/patch-src_qmapshack_helpers_CDraw_cpp 19 Jan 2021 06:44:20 -0000 1.1
+++ patches/patch-src_qmapshack_helpers_CDraw_cpp 10 Jun 2021 06:58:00 -0000
@@ -3,8 +3,8 @@
Index: src/qmapshack/helpers/CDraw.cpp
--- src/qmapshack/helpers/CDraw.cpp.orig
+++ src/qmapshack/helpers/CDraw.cpp
-@@ -24,6 +24,7 @@
- #include <QImage>
+@@ -25,6 +25,7 @@
+ #include <QPainterPath>
#include <QPointF>
#include <QtMath>
+#include <QPainterPath>
Index: patches/patch-src_qmaptool_helpers_CDraw_cpp
===================================================================
RCS file: /cvs/ports/geo/qmapshack/patches/patch-src_qmaptool_helpers_CDraw_cpp,v
retrieving revision 1.1
diff -u -r1.1 patch-src_qmaptool_helpers_CDraw_cpp
--- patches/patch-src_qmaptool_helpers_CDraw_cpp 19 Jan 2021 06:44:20 -0000 1.1
+++ patches/patch-src_qmaptool_helpers_CDraw_cpp 10 Jun 2021 06:58:00 -0000
@@ -3,11 +3,11 @@
Index: src/qmaptool/helpers/CDraw.cpp
--- src/qmaptool/helpers/CDraw.cpp.orig
+++ src/qmaptool/helpers/CDraw.cpp
-@@ -24,6 +24,7 @@
- #include <QImage>
+@@ -25,6 +25,7 @@
+ #include <QPainterPath>
#include <QPointF>
#include <QtMath>
+#include <QPainterPath>

- QPen CDraw::penBorderBlue(QColor(10,10,150,220),2);
- QPen CDraw::penBorderGray(Qt::lightGray,2);
+ QPen CDraw::penBorderBlue(QColor(10, 10, 150, 220), 2);
+ QPen CDraw::penBorderGray(Qt::lightGray, 2);
Index: patches/patch-src_qmaptool_setup_IAppSetup_cpp
===================================================================
RCS file: /cvs/ports/geo/qmapshack/patches/patch-src_qmaptool_setup_IAppSetup_cpp,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 patch-src_qmaptool_setup_IAppSetup_cpp
--- patches/patch-src_qmaptool_setup_IAppSetup_cpp 22 Aug 2020 06:10:19 -0000 1.1.1.1
+++ patches/patch-src_qmaptool_setup_IAppSetup_cpp 10 Jun 2021 06:58:00 -0000
@@ -3,7 +3,7 @@
Index: src/qmaptool/setup/IAppSetup.cpp
--- src/qmaptool/setup/IAppSetup.cpp.orig
+++ src/qmaptool/setup/IAppSetup.cpp
-@@ -56,7 +56,7 @@ IAppSetup& IAppSetup::createInstance(QObject * parent)
+@@ -56,7 +56,7 @@ IAppSetup& IAppSetup::createInstance(QObject* parent)
}
#if defined(Q_OS_MAC)
new CAppSetupMac(parent);
hi,

i marked it broken when updating to proj8, but upstream recently made a
new release, so i banged the cmake bits together until it produced a
build. Completely untested at runtime, so looking for feedback.

Landry

No comments:

Post a Comment