diff --git a/deskutils/vnote/Makefile b/deskutils/vnote/Makefile index 3c20efdcebec..dc6c9081b6d8 100644 --- a/deskutils/vnote/Makefile +++ b/deskutils/vnote/Makefile @@ -1,37 +1,42 @@ PORTNAME= vnote -PORTVERSION= 3.17.0 DISTVERSIONPREFIX= v +DISTVERSION= 3.20.0 CATEGORIES= deskutils MAINTAINER= danfe@FreeBSD.org COMMENT= Pleasant Qt-based note-taking platform WWW= https://app.vnote.fun/en_us/ LICENSE= LGPL3 +BUILD_DEPENDS= vulkan-headers>0:graphics/vulkan-headers \ + pkgconf>0:devel/pkgconf LIB_DEPENDS= libhunspell-1.7.so:textproc/hunspell -USES= compiler:c++14-lang qmake qt:5 +USES= compiler:c++17-lang cmake desktop-file-utils gl qt:6 xorg +USE_GL= opengl +USE_QT= 5compat base declarative imageformats pdf positioning \ + sqldriver-sqlite:run svg webchannel webengine +USE_XORG= ice sm x11 xcb xext USE_LDCONFIG= yes -USE_QT= buildtools:build core gui network printsupport sql svg \ - webchannel webengine widgets x11extras USE_GITHUB= yes GH_ACCOUNT= ${PORTNAME}x GH_PROJECT= QHotkey:qhk vtextedit:vte syntax-highlighting:shl sonnet:s -GH_TAGNAME= 18ac011:qhk 398ec0f:vte 807895f:shl 403863f:s +GH_TAGNAME= d7b5250:qhk c8fe95e:vte 25f6871:shl 7320206:s GH_SUBDIR= libs/QHotkey:qhk libs/vtextedit:vte \ - libs/vtextedit/src/libs/sonnet:s \ - libs/vtextedit/src/libs/syntax-highlighting:shl + libs/vtextedit/libs/sonnet:s \ + libs/vtextedit/libs/syntax-highlighting:shl + +CMAKE_ARGS= -DCMAKE_INSTALL_DATADIR=${DATADIR} post-patch: - @${REINPLACE_CMD} -e 's,"hunspell\.hxx",,' \ - ${WRKSRC}/libs/vtextedit/src/libs/sonnet/src/plugins/hunspell/hunspelldict.h - @${REINPLACE_CMD} -E '/demo|tests/d' \ - ${WRKSRC}/libs/vtextedit/vtextedit.pro \ - ${WRKSRC}/vnote.pro - @${ECHO_CMD} 'LIBS += -lhunspell-1.7' >> ${WRKSRC}/src/src.pro + @${REINPLACE_CMD} -E '/add_subdirectory\((demo|tests)\)/d' \ + ${WRKSRC}/libs/vtextedit/CMakeLists.txt \ + ${WRKSRC}/CMakeLists.txt @${GREP} -Rl --null Q_OS_LINUX ${WRKSRC}/src | ${XARGS} -0 \ ${REINPLACE_CMD} -e 's,Q_OS_LINUX,Q_OS_UNIX,' + @${REINPLACE_CMD} -e 's,%%DATADIR%%,${DATADIR},' \ + ${WRKSRC}/src/core/configmgr.cpp .include diff --git a/deskutils/vnote/distinfo b/deskutils/vnote/distinfo index b0605ed26907..cadca0be8046 100644 --- a/deskutils/vnote/distinfo +++ b/deskutils/vnote/distinfo @@ -1,11 +1,11 @@ -TIMESTAMP = 1693148599 -SHA256 (vnotex-vnote-v3.17.0_GH0.tar.gz) = 55c0d059c01ff23fc4e81d3eb754d53a0f201c01db9d305044b72feb130a686a -SIZE (vnotex-vnote-v3.17.0_GH0.tar.gz) = 7363985 -SHA256 (vnotex-QHotkey-18ac011_GH0.tar.gz) = 558ced948c8642ef4478c7da46658036aa6c3cda31527009096a5e8f4a4ffcf2 -SIZE (vnotex-QHotkey-18ac011_GH0.tar.gz) = 53423 -SHA256 (vnotex-vtextedit-398ec0f_GH0.tar.gz) = fa781bf61e5b72b1b34c0d9536b64a465b574ca0ee56fa0628f71ccdef2e7300 -SIZE (vnotex-vtextedit-398ec0f_GH0.tar.gz) = 1478207 -SHA256 (vnotex-syntax-highlighting-807895f_GH0.tar.gz) = fbf4eabc7bcaaf8c0faef2d6bd357182863887fa8bf8d81e1d6c1705817241b1 -SIZE (vnotex-syntax-highlighting-807895f_GH0.tar.gz) = 2312843 -SHA256 (vnotex-sonnet-403863f_GH0.tar.gz) = 9bd5eab05ee7daf08774dcc428dc9ac245f6179d080c4f93a14ac38e745e1570 -SIZE (vnotex-sonnet-403863f_GH0.tar.gz) = 282981 +TIMESTAMP = 1761324771 +SHA256 (vnotex-vnote-v3.20.0_GH0.tar.gz) = 9d716541193aa7766e9c87313de612b5db49683a525649109128e1780edf4553 +SIZE (vnotex-vnote-v3.20.0_GH0.tar.gz) = 7498396 +SHA256 (vnotex-QHotkey-d7b5250_GH0.tar.gz) = 49bcd9f72394112c2b44f596c3a2d2aca1ab7dc6d2b0da3a65b22772d265087a +SIZE (vnotex-QHotkey-d7b5250_GH0.tar.gz) = 52347 +SHA256 (vnotex-vtextedit-c8fe95e_GH0.tar.gz) = e82f91eafe78800919aedee90beafa5d2ff92d5e497ffda40ac56ff527a2dfa0 +SIZE (vnotex-vtextedit-c8fe95e_GH0.tar.gz) = 1480279 +SHA256 (vnotex-syntax-highlighting-25f6871_GH0.tar.gz) = bb532853f9bc9394743cc26c953af4680902c295d5e2e8cc2eaca3a978f2ffaf +SIZE (vnotex-syntax-highlighting-25f6871_GH0.tar.gz) = 2310298 +SHA256 (vnotex-sonnet-7320206_GH0.tar.gz) = e6674d47735119060b5d851188c530e8d791f6fdf495cd1f691538b8316de8f9 +SIZE (vnotex-sonnet-7320206_GH0.tar.gz) = 279084 diff --git a/deskutils/vnote/files/patch-libs_vtextedit_libs_sonnet_src_CMakeLists.txt b/deskutils/vnote/files/patch-libs_vtextedit_libs_sonnet_src_CMakeLists.txt new file mode 100644 index 000000000000..0b05dcaf0a7e --- /dev/null +++ b/deskutils/vnote/files/patch-libs_vtextedit_libs_sonnet_src_CMakeLists.txt @@ -0,0 +1,7 @@ +--- libs/vtextedit/libs/sonnet/src/CMakeLists.txt.orig 2024-04-30 07:11:17 UTC ++++ libs/vtextedit/libs/sonnet/src/CMakeLists.txt +@@ -1,4 +1,3 @@ + # Just to make it work with VTextEdit. +-add_subdirectory(../../hunspell ../../hunspell) + add_subdirectory(core) + add_subdirectory(plugins/hunspell) diff --git a/deskutils/vnote/files/patch-libs_vtextedit_libs_sonnet_src_plugins_hunspell_CMakeLists.txt b/deskutils/vnote/files/patch-libs_vtextedit_libs_sonnet_src_plugins_hunspell_CMakeLists.txt new file mode 100644 index 000000000000..9d5407e2879d --- /dev/null +++ b/deskutils/vnote/files/patch-libs_vtextedit_libs_sonnet_src_plugins_hunspell_CMakeLists.txt @@ -0,0 +1,18 @@ +--- libs/vtextedit/libs/sonnet/src/plugins/hunspell/CMakeLists.txt.orig 2024-04-30 07:11:17 UTC ++++ libs/vtextedit/libs/sonnet/src/plugins/hunspell/CMakeLists.txt +@@ -5,6 +5,8 @@ find_package(Qt${QT_DEFAULT_MAJOR_VERSION} REQUIRED CO + + set(QT_DEFAULT_MAJOR_VERSION 6 CACHE STRING "Qt version to use (5 or 6), defaults to 6") + find_package(Qt${QT_DEFAULT_MAJOR_VERSION} REQUIRED COMPONENTS Core) ++find_package(PkgConfig REQUIRED) ++pkg_check_modules(Hunspell REQUIRED IMPORTED_TARGET hunspell) + + if ((QT_DEFAULT_MAJOR_VERSION GREATER 5)) + qt_standard_project_setup() +@@ -31,5 +33,5 @@ target_link_libraries(sonnet-hunspell PUBLIC + target_link_libraries(sonnet-hunspell PUBLIC + Qt::Core + sonnet-core +- Hunspell ++ PkgConfig::Hunspell + ) diff --git a/deskutils/vnote/files/patch-libs_vtextedit_src_CMakeLists.txt b/deskutils/vnote/files/patch-libs_vtextedit_src_CMakeLists.txt new file mode 100644 index 000000000000..a9e2bf4ce909 --- /dev/null +++ b/deskutils/vnote/files/patch-libs_vtextedit_src_CMakeLists.txt @@ -0,0 +1,20 @@ +--- libs/vtextedit/src/CMakeLists.txt.orig 2024-07-07 14:06:11 UTC ++++ libs/vtextedit/src/CMakeLists.txt +@@ -6,6 +6,8 @@ find_package(Qt${QT_DEFAULT_MAJOR_VERSION} OPTIONAL_CO + set(QT_DEFAULT_MAJOR_VERSION 6 CACHE STRING "Qt version to use (5 or 6), defaults to 6") + find_package(Qt${QT_DEFAULT_MAJOR_VERSION} REQUIRED COMPONENTS Core Gui Network Svg Widgets LinguistTools) + find_package(Qt${QT_DEFAULT_MAJOR_VERSION} OPTIONAL_COMPONENTS Core5Compat) ++find_package(PkgConfig REQUIRED) ++pkg_check_modules(Hunspell REQUIRED IMPORTED_TARGET hunspell) + + if ((QT_DEFAULT_MAJOR_VERSION GREATER 5)) + qt_standard_project_setup() +@@ -145,7 +147,7 @@ target_link_libraries(VTextEdit PUBLIC + peg-markdown-highlight + sonnet-core + sonnet-hunspell +- Hunspell ++ PkgConfig::Hunspell + ) + + if((QT_DEFAULT_MAJOR_VERSION GREATER 5)) diff --git a/deskutils/vnote/files/patch-src_CMakeLists.txt b/deskutils/vnote/files/patch-src_CMakeLists.txt new file mode 100644 index 000000000000..fcc242ce5761 --- /dev/null +++ b/deskutils/vnote/files/patch-src_CMakeLists.txt @@ -0,0 +1,43 @@ +--- src/CMakeLists.txt.orig 2025-05-15 07:23:24.000000000 -0500 ++++ src/CMakeLists.txt 2025-10-13 13:31:54.811026000 -0500 +@@ -31,14 +31,6 @@ set(VX_TS_FILES data/core/translations/vnote_zh_CN.ts + # Translations + set(VX_TS_FILES data/core/translations/vnote_zh_CN.ts + data/core/translations/vnote_ja.ts) +-if((QT_DEFAULT_MAJOR_VERSION EQUAL 6)) +- if((Qt6Widgets_VERSION VERSION_GREATER_EQUAL 6.7.0)) +- qt_add_lupdate(TS_FILES ${VX_TS_FILES} +- SOURCE_TARGETS vnote) +- else() +- qt_add_lupdate(vnote TS_FILES ${VX_TS_FILES}) +- endif() +-endif() + # Generate .qm files from .ts files (lrelease) + set_source_files_properties(${VX_TS_FILES} PROPERTIES + OUTPUT_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/translations") +@@ -68,6 +60,16 @@ add_executable(vnote WIN32 MACOSX_BUNDLE + ${VX_APP_ICON_RC_WIN} ${VX_APP_ICON_MACOS} ${VX_RESOURCE_FILES} + ) + ++# Add lupdate target for translations (Qt6 only) ++if((QT_DEFAULT_MAJOR_VERSION EQUAL 6)) ++ if((Qt6Widgets_VERSION VERSION_GREATER_EQUAL 6.7.0)) ++ qt_add_lupdate(TS_FILES ${VX_TS_FILES} ++ SOURCE_TARGETS vnote) ++ else() ++ qt_add_lupdate(vnote TS_FILES ${VX_TS_FILES}) ++ endif() ++endif() ++ + add_dependencies(vnote VX_EXTRA_RESOURCE) + + set(VX_LIBS_FOLDER ../libs) +@@ -171,7 +173,7 @@ else() + set(iconsvg.files data/core/logo/vnote.svg) + foreach(item IN ITEMS desktop icon16 icon32 icon48 icon64 icon128 icon256 iconsvg) + install(FILES ${CMAKE_CURRENT_LIST_DIR}/${${item}.files} +- DESTINATION ${CMAKE_INSTALL_DATADIR}/${${item}.path} ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/${${item}.path} + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) + endforeach() + endif() diff --git a/deskutils/vnote/files/patch-src_core_configmgr.cpp b/deskutils/vnote/files/patch-src_core_configmgr.cpp new file mode 100644 index 000000000000..8c2c905f2057 --- /dev/null +++ b/deskutils/vnote/files/patch-src_core_configmgr.cpp @@ -0,0 +1,11 @@ +--- src/core/configmgr.cpp.orig 2024-08-06 13:56:46 UTC ++++ src/core/configmgr.cpp +@@ -576,7 +576,7 @@ void ConfigMgr::initAppPrefixPath() + QStringList potential_dirs; + auto app_dir_path = QCoreApplication::applicationDirPath(); + qInfo() << "app prefix path: " << app_dir_path; +- potential_dirs << app_dir_path; ++ potential_dirs << app_dir_path << "%%DATADIR%%"; + + #if defined(Q_OS_LINUX) + QDir localBinDir(app_dir_path); diff --git a/deskutils/vnote/pkg-plist b/deskutils/vnote/pkg-plist index e494558a64ea..e159d8f5f2ca 100644 --- a/deskutils/vnote/pkg-plist +++ b/deskutils/vnote/pkg-plist @@ -1,18 +1,17 @@ bin/vnote -bin/vnote_extra.rcc -lib/libVSyntaxHighlighting.so -lib/libVSyntaxHighlighting.so.1 -lib/libVSyntaxHighlighting.so.1.0 -lib/libVSyntaxHighlighting.so.1.0.0 lib/libVTextEdit.so -lib/libVTextEdit.so.1 -lib/libVTextEdit.so.1.0 -lib/libVTextEdit.so.1.0.0 share/applications/vnote.desktop share/icons/hicolor/128x128/apps/vnote.png share/icons/hicolor/16x16/apps/vnote.png share/icons/hicolor/256x256/apps/vnote.png share/icons/hicolor/32x32/apps/vnote.png share/icons/hicolor/48x48/apps/vnote.png share/icons/hicolor/64x64/apps/vnote.png share/icons/hicolor/scalable/apps/vnote.svg +%%DATADIR%%/translations/qdialogbuttonbox_zh_CN.qm +%%DATADIR%%/translations/qtbase_ja.qm +%%DATADIR%%/translations/qtbase_zh_CN.qm +%%DATADIR%%/translations/qtv_ja.qm +%%DATADIR%%/translations/qtv_zh_CN.qm +%%DATADIR%%/translations/qwebengine_zh_CN.qm +%%DATADIR%%/vnote_extra.rcc