This updates subsurface to the current 4.9.3. Joint effort with Tracey
Emery, thank you!
The port-lib-depends-check asks for a x11/gtk+3,-guic RUN_DEPENDS as
well, but I've left that out because this is a Qt application. I'm not
sure if this is correct.
So this has a really ugly (but otherwise harmless) hack to keep the
system from segfaulting on exit that took some time to cook. This is in
patch-desktop-widgets_mainwindow_{h,cpp}. The segfault prevented us
from updating from 4.8.6 onward. I have no idea why this works.
Index: Makefile
===================================================================
RCS file: /cvs/ports/misc/subsurface/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- Makefile 5 Aug 2019 20:48:17 -0000 1.7
+++ Makefile 15 Dec 2019 10:48:14 -0000
@@ -5,8 +5,7 @@ USE_WXNEEDED = Yes
COMMENT = divelog program for recreational, tech, and free-divers
-VER = 4.8.5
-REVISION = 0
+VER = 4.9.3
PKGNAME = subsurface-${VER}
DISTNAME = Subsurface-${VER}
@@ -22,7 +21,8 @@ WANTLIB += ${COMPILER_LIBCXX} Grantlee_T
WANTLIB += Qt5Core Qt5Gui Qt5Location Qt5Network Qt5Positioning
WANTLIB += Qt5PrintSupport Qt5Qml Qt5Quick Qt5QuickWidgets Qt5Svg
WANTLIB += Qt5WebKit Qt5WebKitWidgets Qt5Widgets c crypto curl
-WANTLIB += git2 m sqlite3 ssh2 ssl usb-1.0 xml2 xslt zip
+WANTLIB += git2 iconv lzma m sqlite3 ssh2 ssl usb-1.0 xml2 xslt
+WANTLIB += z zip
MASTER_SITES = https://subsurface-divelog.org/downloads/
EXTRACT_SUFX = .tgz
@@ -41,6 +41,8 @@ BUILD_DEPENDS = ${MODGNU_AUTOCONF_DEPEND
${MODGNU_AUTOMAKE_DEPENDS} \
devel/libtool
+RUN_DEPENDS = devel/desktop-file-utils
+
LIB_DEPENDS = archivers/libzip \
databases/sqlite3 \
devel/libgit2/libgit2 \
@@ -54,11 +56,11 @@ LIB_DEPENDS = archivers/libzip \
USE_GMAKE = Yes
-CONFIGURE_ARGS += -DNO_DOCS:Bool=ON \
- -DBTSUPPORT:Bool=OFF
+CONFIGURE_ARGS += -DNO_DOCS=ON \
+ -DBTSUPPORT=OFF
# many "undefined reference to `dc_*" when tests are enabled
-CONFIGURE_ARGS += -DMAKE_TESTS:Bool=OFF
+CONFIGURE_ARGS += -DMAKE_TESTS=OFF
NO_TEST = Yes
post-extract:
Index: distinfo
===================================================================
RCS file: /cvs/ports/misc/subsurface/distinfo,v
retrieving revision 1.3
diff -u -p -r1.3 distinfo
--- distinfo 18 Jul 2019 11:28:49 -0000 1.3
+++ distinfo 15 Dec 2019 10:48:14 -0000
@@ -1,4 +1,4 @@
-SHA256 (Subsurface-4.8.5.tgz) = dHAuxMu+ksIeEltpfHASUgrEzzcPHBuvOTNh4FpB67c=
-SHA256 (libdivecomputer-subsurface-branch-4.8.5.tgz) = 1F2kOfLlSS6aRFXz7Hiicly2llZb2egfM8JsQD6sxOc=
-SIZE (Subsurface-4.8.5.tgz) = 15063904
-SIZE (libdivecomputer-subsurface-branch-4.8.5.tgz) = 344513
+SHA256 (Subsurface-4.9.3.tgz) = jjWuE9DKcD2kEuvvLiHdxZzGOg16HaYUNlQ3XCCxBbg=
+SHA256 (libdivecomputer-subsurface-branch-4.9.3.tgz) = VGs5PX6t/A7ZITk5OzkHK3qjbQ7FpnetCJyY/2vIgzY=
+SIZE (Subsurface-4.9.3.tgz) = 15404499
+SIZE (libdivecomputer-subsurface-branch-4.9.3.tgz) = 360171
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: /cvs/ports/misc/subsurface/patches/patch-CMakeLists_txt,v
retrieving revision 1.2
diff -u -p -r1.2 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt 18 Jul 2019 11:28:49 -0000 1.2
+++ patches/patch-CMakeLists_txt 15 Dec 2019 10:48:14 -0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-CMakeLists_txt,v 1.2 201
Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
-@@ -20,6 +20,8 @@ set(CMAKE_MODULE_PATH
+@@ -19,6 +19,8 @@ set(CMAKE_MODULE_PATH
)
set(CMAKE_AUTOMOC ON)
@@ -12,7 +12,7 @@ Index: CMakeLists.txt
include(MacroOutOfSourceBuild)
MACRO_ENSURE_OUT_OF_SOURCE_BUILD(
"We don't support building in source, please create a build folder elsewhere and remember to run git clean -xdf to remove temporary files created by CMake."
-@@ -48,6 +50,9 @@ option(USE_WEBENGINE "Use QWebEngine instead of QWebKi
+@@ -45,6 +47,9 @@ option(FTDISUPPORT "enable support for libftdi based s
# Options regarding What should we build on subsurface
option(MAKE_TESTS "Make the tests" ON)
@@ -22,15 +22,15 @@ Index: CMakeLists.txt
SET(SUBSURFACE_TARGET_EXECUTABLE "DesktopExecutable" CACHE STRING "The type of application, DesktopExecutable or MobileExecutable")
LIST(APPEND SUBSURFACE_ACCEPTED_EXECUTABLES "DesktopExecutable" "MobileExecutable")
SET_PROPERTY(CACHE SUBSURFACE_TARGET_EXECUTABLE PROPERTY STRINGS ${SUBSURFACE_ACCEPTED_EXECUTABLES})
-@@ -123,7 +128,6 @@ include(pkgconfig_helper)
+@@ -118,7 +123,6 @@ include(pkgconfig_helper)
# if you think a module miss anything, take a look on the specific
# module file.
include(HandleFindGit2)
-include(HandleFindLibDiveComputer)
- if(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "DesktopExecutable")
+ if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable")
include(HandleFindGrantlee)
include(HandleUserManual)
-@@ -267,7 +271,7 @@ if(BLESUPPORT)
+@@ -258,7 +262,7 @@ if(BLESUPPORT)
endif()
#set up the subsurface_link_libraries variable
@@ -38,18 +38,18 @@ Index: CMakeLists.txt
+set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} ${LIBGIT2_LIBRARIES} ${LIBUSB_LIBRARIES})
qt5_add_resources(SUBSURFACE_RESOURCES subsurface.qrc map-widget/qml/map-widget.qrc)
- # include translations
-@@ -335,6 +339,9 @@ elseif(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "Deskto
+ # hack to build successfully on LGTM
+@@ -331,6 +335,9 @@ elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopE
add_executable(${SUBSURFACE_TARGET} MACOSX_BUNDLE WIN32 ${SUBSURFACE_PKG} ${SUBSURFACE_APP} ${SUBSURFACE_RESOURCES})
endif()
+ add_library(subsurface_dc STATIC IMPORTED)
+ set_target_properties(subsurface_dc PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/libdivecomputer/built/lib/libdivecomputer.a)
+
- if(FBSUPPORT)
- set(FACEBOOK_INTEGRATION facebook_integration)
- add_dependencies(facebook_integration subsurface_generated_ui)
-@@ -348,6 +355,7 @@ elseif(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "Deskto
+ target_link_libraries(
+ ${SUBSURFACE_TARGET}
+ subsurface_generated_ui
+@@ -339,6 +346,7 @@ elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopE
subsurface_statistics
subsurface_models_desktop
subsurface_corelib
@@ -57,7 +57,7 @@ Index: CMakeLists.txt
${SUBSURFACE_LINK_LIBRARIES}
)
add_dependencies(subsurface_desktop_preferences subsurface_generated_ui)
-@@ -520,7 +528,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+@@ -503,7 +511,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
COMMAND ${MAKENSIS} ${WINDOWSSTAGING}/subsurface.nsi
DEPENDS fake_install
)
Index: patches/patch-desktop-widgets_mainwindow_cpp
===================================================================
RCS file: /cvs/ports/misc/subsurface/patches/patch-desktop-widgets_mainwindow_cpp,v
retrieving revision 1.2
diff -u -p -r1.2 patch-desktop-widgets_mainwindow_cpp
--- patches/patch-desktop-widgets_mainwindow_cpp 18 Jul 2019 11:28:49 -0000 1.2
+++ patches/patch-desktop-widgets_mainwindow_cpp 15 Dec 2019 10:48:14 -0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-desktop-widgets_mainwind
Index: desktop-widgets/mainwindow.cpp
--- desktop-widgets/mainwindow.cpp.orig
+++ desktop-widgets/mainwindow.cpp
-@@ -259,7 +259,6 @@ MainWindow::MainWindow() : QMainWindow(),
+@@ -237,7 +237,6 @@ MainWindow::MainWindow() : QMainWindow(),
memset(©PasteDive, 0, sizeof(copyPasteDive));
memset(&what, 0, sizeof(what));
@@ -11,7 +11,29 @@ Index: desktop-widgets/mainwindow.cpp
undoAction = Command::undoAction(this);
redoAction = Command::redoAction(this);
undoAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Z));
-@@ -1276,14 +1275,6 @@ void MainWindow::on_actionAboutSubsurface_triggered()
+@@ -359,8 +358,21 @@ MainWindow::~MainWindow()
+ m_Instance = nullptr;
+ }
+
++voodooHack *voodooHack::instance()
++{
++ static voodooHack *self = new voodooHack();
++ return self;
++}
++
++voodooHack::voodooHack(QObject *parent) :
++ QObject(parent),
++ manager(new QNetworkAccessManager(this))
++{
++}
++
+ void MainWindow::setupSocialNetworkMenu()
+ {
++ voodooHack *fb = voodooHack::instance();
+ }
+
+ void MainWindow::editDiveSite(dive_site *ds)
+@@ -1207,14 +1219,6 @@ void MainWindow::on_actionAboutSubsurface_triggered()
dlg.exec();
}
@@ -26,7 +48,7 @@ Index: desktop-widgets/mainwindow.cpp
void MainWindow::on_actionUserManual_triggered()
{
#ifndef NO_USERMANUAL
-@@ -1445,31 +1436,11 @@ void MainWindow::readSettings()
+@@ -1388,31 +1392,11 @@ void MainWindow::readSettings()
loadRecentFiles();
if (firstRun) {
Index: patches/patch-desktop-widgets_mainwindow_h
===================================================================
RCS file: /cvs/ports/misc/subsurface/patches/patch-desktop-widgets_mainwindow_h,v
retrieving revision 1.2
diff -u -p -r1.2 patch-desktop-widgets_mainwindow_h
--- patches/patch-desktop-widgets_mainwindow_h 18 Jul 2019 11:28:49 -0000 1.2
+++ patches/patch-desktop-widgets_mainwindow_h 15 Dec 2019 10:48:14 -0000
@@ -3,19 +3,36 @@ $OpenBSD: patch-desktop-widgets_mainwind
Index: desktop-widgets/mainwindow.h
--- desktop-widgets/mainwindow.h.orig
+++ desktop-widgets/mainwindow.h
-@@ -71,7 +71,6 @@ class MainWindow : public QMainWindow { (public)
+@@ -43,6 +43,16 @@ class LocationInformationWidget;
+ typedef std::pair<QByteArray, QVariant> WidgetProperty;
+ typedef QVector<WidgetProperty> PropertyList;
+
++class voodooHack : public QObject
++{
++ Q_OBJECT
++public:
++ static voodooHack *instance();
++private:
++ explicit voodooHack(QObject *parent = 0);
++ QNetworkAccessManager *manager;
++};
++
+ class MainWindow : public QMainWindow {
+ Q_OBJECT
+ public:
+@@ -75,7 +85,6 @@ class MainWindow : public QMainWindow { (public)
void cleanUpEmpty();
void setToolButtonsEnabled(bool enabled);
void printPlan();
- void checkSurvey();
- void setApplicationState(const QByteArray& state);
- void setStateProperties(const QByteArray& state, const PropertyList& tl, const PropertyList& tr, const PropertyList& bl,const PropertyList& br);
+ void setApplicationState(ApplicationState state);
bool inPlanner();
-@@ -130,7 +129,6 @@ slots:
+ NotificationWidget *getNotificationWidget();
+@@ -133,7 +142,6 @@ slots:
void on_actionUserSurvey_triggered();
void on_actionDivePlanner_triggered();
void on_actionReplanDive_triggered();
- void on_action_Check_for_Updates_triggered();
- void on_actionDiveSiteEdit_triggered();
void selectionChanged();
+ void initialUiSetup();
Index: patches/patch-desktop-widgets_mainwindow_ui
===================================================================
RCS file: /cvs/ports/misc/subsurface/patches/patch-desktop-widgets_mainwindow_ui,v
retrieving revision 1.2
diff -u -p -r1.2 patch-desktop-widgets_mainwindow_ui
--- patches/patch-desktop-widgets_mainwindow_ui 18 Jul 2019 11:28:49 -0000 1.2
+++ patches/patch-desktop-widgets_mainwindow_ui 15 Dec 2019 10:48:14 -0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-desktop-widgets_mainwind
Index: desktop-widgets/mainwindow.ui
--- desktop-widgets/mainwindow.ui.orig
+++ desktop-widgets/mainwindow.ui
-@@ -114,7 +114,6 @@
+@@ -120,7 +120,6 @@
<string>&Help</string>
</property>
<addaction name="actionAboutSubsurface"/>
@@ -11,7 +11,7 @@ Index: desktop-widgets/mainwindow.ui
<addaction name="actionUserSurvey"/>
<addaction name="actionUserManual"/>
</widget>
-@@ -399,11 +398,6 @@
+@@ -410,11 +409,6 @@
</property>
<property name="shortcut">
<string notr="true">F11</string>
Index: patches/patch-scripts_get-version
===================================================================
RCS file: /cvs/ports/misc/subsurface/patches/patch-scripts_get-version,v
retrieving revision 1.3
diff -u -p -r1.3 patch-scripts_get-version
--- patches/patch-scripts_get-version 18 Jul 2019 11:28:49 -0000 1.3
+++ patches/patch-scripts_get-version 15 Dec 2019 10:48:14 -0000
@@ -9,7 +9,7 @@ Index: scripts/get-version
else
- cmd="git describe --abbrev=12"
- v0=$($cmd) || v0=$(cat .gitversion) || croak "odd; command '$cmd' failed"
-+ v0="v4.8.5"
++ v0="v4.9.3"
fi
# strip off the 'v' prefix, if any
Index: patches/patch-tests_CMakeLists_txt
===================================================================
RCS file: /cvs/ports/misc/subsurface/patches/patch-tests_CMakeLists_txt,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-tests_CMakeLists_txt
--- patches/patch-tests_CMakeLists_txt 14 Aug 2018 17:18:22 -0000 1.1.1.1
+++ patches/patch-tests_CMakeLists_txt 15 Dec 2019 10:48:14 -0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-tests_CMakeLists_txt,v 1
Index: tests/CMakeLists.txt
--- tests/CMakeLists.txt.orig
+++ tests/CMakeLists.txt
-@@ -45,6 +45,7 @@ macro(TEST NAME FILE)
+@@ -46,6 +46,7 @@ function(TEST NAME FILE)
target_link_libraries(
${NAME}
subsurface_corelib
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/misc/subsurface/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- pkg/PLIST 18 Jul 2019 11:28:49 -0000 1.2
+++ pkg/PLIST 15 Dec 2019 10:48:14 -0000
@@ -45,11 +45,18 @@ share/subsurface/Documentation/images/Di
share/subsurface/Documentation/images/DiveProfile1_f20.jpg
share/subsurface/Documentation/images/DiveProfile2_f20.jpg
share/subsurface/Documentation/images/DiveProfile3_f20.jpg
+share/subsurface/Documentation/images/DiveSiteDelete.jpg
+share/subsurface/Documentation/images/DiveSiteEdit.jpg
+share/subsurface/Documentation/images/DiveSiteInsert.jpg
+share/subsurface/Documentation/images/DiveSiteMerge.jpg
+share/subsurface/Documentation/images/DiveSitesTab.jpg
share/subsurface/Documentation/images/Divelogs1.jpg
share/subsurface/Documentation/images/DownloadGPS.jpg
share/subsurface/Documentation/images/Export_f20.jpg
share/subsurface/Documentation/images/ExtraDataTab_f20.jpg
-share/subsurface/Documentation/images/Filterpanel.jpg
+share/subsurface/Documentation/images/FilterOptions.jpg
+share/subsurface/Documentation/images/FilterPanel.jpg
+share/subsurface/Documentation/images/FilterWindowBar.jpg
share/subsurface/Documentation/images/FindMovedImages1.jpg
share/subsurface/Documentation/images/GasPressureBarGraph.jpg
share/subsurface/Documentation/images/Globe_image1.jpg
@@ -58,6 +65,7 @@ share/subsurface/Documentation/images/Gl
share/subsurface/Documentation/images/Group2.jpg
share/subsurface/Documentation/images/Heatmap.jpg
share/subsurface/Documentation/images/Import1_f20.jpg
+share/subsurface/Documentation/images/Import_csv.jpg
share/subsurface/Documentation/images/InfoBox2.jpg
share/subsurface/Documentation/images/LOffice_field_options.jpg
share/subsurface/Documentation/images/LOffice_save_as_options.jpg
@@ -72,6 +80,7 @@ share/subsurface/Documentation/images/Lo
share/subsurface/Documentation/images/LoadImage5_f20.jpg
share/subsurface/Documentation/images/LoadImage6_f20.jpg
share/subsurface/Documentation/images/Location1.jpg
+share/subsurface/Documentation/images/MainWindow.jpg
share/subsurface/Documentation/images/MapMenu.jpg
share/subsurface/Documentation/images/MeasuringBar.png
share/subsurface/Documentation/images/MergedDive.png
@@ -110,13 +119,14 @@ share/subsurface/Documentation/images/We
share/subsurface/Documentation/images/Win_SaveCSV1.jpg
share/subsurface/Documentation/images/Win_SaveCSV2.jpg
share/subsurface/Documentation/images/Win_SaveCSV3.jpg
+share/subsurface/Documentation/images/atmpress.jpg
share/subsurface/Documentation/images/csv_import1_f20.jpg
share/subsurface/Documentation/images/csv_import2_f20.jpg
-share/subsurface/Documentation/images/facebook1.jpg
-share/subsurface/Documentation/images/facebook2.jpg
+share/subsurface/Documentation/images/dc_management.jpg
share/subsurface/Documentation/images/halcyon_RB80.jpg
share/subsurface/Documentation/images/icons/
share/subsurface/Documentation/images/icons/EAD.jpg
+share/subsurface/Documentation/images/icons/GFLow.jpg
share/subsurface/Documentation/images/icons/Galileo.jpg
share/subsurface/Documentation/images/icons/HW_DR5.jpg
share/subsurface/Documentation/images/icons/HW_xdeepblack.jpg
@@ -153,11 +163,11 @@ share/subsurface/Documentation/images/ic
share/subsurface/Documentation/images/icons/ruler.jpg
share/subsurface/Documentation/images/icons/scale.jpg
share/subsurface/Documentation/images/icons/suuntologo.jpg
+share/subsurface/Documentation/images/icons/tissue.jpg
share/subsurface/Documentation/images/icons/tissues.jpg
share/subsurface/Documentation/images/icons/usb.jpg
share/subsurface/Documentation/images/icons/warning2.png
share/subsurface/Documentation/images/iphone.jpg
-share/subsurface/Documentation/images/main_window_f22.jpg
share/subsurface/Documentation/images/mapview_f20.jpg
share/subsurface/Documentation/images/multicylinder_dive.jpg
share/subsurface/Documentation/images/pSCR_profile.jpg
@@ -172,6 +182,7 @@ share/subsurface/Documentation/images/sm
share/subsurface/Documentation/images/strk2ssrf_web.jpg
share/subsurface/Documentation/images/texexample.png
share/subsurface/Documentation/images/tissueHeatmap.jpg
+share/subsurface/Documentation/images/undo.jpg
share/subsurface/Documentation/user-manual.html
share/subsurface/Documentation/user-manual_es.html
share/subsurface/Documentation/user-manual_fr.html