From nobody Sun Feb 20 15:45:48 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6B5C319DC519; Sun, 20 Feb 2022 15:45:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K1qXF0ntdz3jbB; Sun, 20 Feb 2022 15:45:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645371949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I2dH/8FjX77xnhLK3aJxYVfzBL+Npxd7ODnIHpC1nlY=; b=pa2LONMPzDYdM/CQqDRU1GTtlfNfRgbojBBcUr2rEh2kUsCuHSd63lYDdNPyoT37qfl+yk zf1lGPjJC/HDTXCS6qert0uZZo3PsXwQijYBKgwNs8R3WnOjbhiHoBHErG9QiD/HrOzYhV DXMDPsTz3lvDpNy/6YnHrs4T4wycpK/pro/fteWJvevrQj4uCH8tI/woVt7Gn1tEd4nY50 HNDY9i9T9WQsT8Z9uEWSy47zSB6JYqwRNMRj//J/w927nF8ROxLAerL911SBsq8StWPg5u Yy15ipNtm0VoZEkjBoQL5XWjDVDJWfsTZ0f+thgzy89ZD2c2/qdK8QT1ji4whQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E9AB81F42B; Sun, 20 Feb 2022 15:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 21KFjmJe017712; Sun, 20 Feb 2022 15:45:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21KFjmo7017711; Sun, 20 Feb 2022 15:45:48 GMT (envelope-from git) Date: Sun, 20 Feb 2022 15:45:48 GMT Message-Id: <202202201545.21KFjmo7017711@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Adriaan de Groot Subject: git: b071a62b5e75 - main - editors:diamond: new port, CopperSpice-based editor List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adridg X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b071a62b5e7518503dc9a2d6e88625b1f0a82863 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645371949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I2dH/8FjX77xnhLK3aJxYVfzBL+Npxd7ODnIHpC1nlY=; b=RY+S/6pe2rUKijo9ZbLZq1wY09t+2jMFEo1wq6NNeDU1WiV6aPHUl1ohda4+VaMRDqoPHl X+8MH1Yuv7e0KN/bxeeIyZFxqMWQxWuhXxGSBD4DRv9X2H5B3tbH7zfcN0Eo+V3Kx7Sqi6 2Jsa1NEGCgE5imEEni+yTZmBbBXs0wYuUk/taYhzmWpe6TiWQm6PeQka+EnyaSsJSre6eQ Bz6ynKQSjWnzQ329q2J/oad5cgsvsvt0HT+UrJovvAsdaTfdi4fo48bjlexBpGvvlHATdc p/sErm+qurH2Z73o+szCoNRBM4HcG2hTmcwFp1qKNLV7y4GvywIvFt9Ll6yXnA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645371949; a=rsa-sha256; cv=none; b=HCowzJfU6VpNJ7d0qP4nFAFm0BBKg122t3Oyc2QKMloScdZdvZVeeUt3Y3Xxzu1p1JQp0i K4yVLdEAMpUX9IYSH6gYx1hvyY7q2BrcVuoBcoHaEiRP5GnFCZCmJtZ6wn+VwvUnwQCXs0 O5GEWblB1dnIj4rq0GV42mEtabsW8SrEkzi9gHqJoT0Qx+7bDPfZ5dFt1pKsSZmX11l2DK oRB8/MQhICkkM/JPrSSjArwqD0xcspbzSHYq+csv40enFUcClCnXhtlZ7rXdfPyPheZmr7 +eFfMGJ4fZNfS6cr5Xfkp3HlE0VtFeqsLQWst0xtXHXI6XogBVvcObKIdMo3fA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by adridg: URL: https://cgit.FreeBSD.org/ports/commit/?id=b071a62b5e7518503dc9a2d6e88625b1f0a82863 commit b071a62b5e7518503dc9a2d6e88625b1f0a82863 Author: Adriaan de Groot AuthorDate: 2022-02-19 20:21:23 +0000 Commit: Adriaan de Groot CommitDate: 2022-02-20 15:45:30 +0000 editors:diamond: new port, CopperSpice-based editor This needs patching to consider the installed location (e.g. share/) as a source of data, rather than the installed location of the binary. --- editors/Makefile | 1 + editors/diamond/Makefile | 26 ++++++++++ editors/diamond/distinfo | 3 ++ editors/diamond/files/patch-CMakeLists.txt | 18 +++++++ editors/diamond/files/patch-src_CMakeLists.txt | 67 ++++++++++++++++++++++++++ editors/diamond/files/patch-src_json.cpp | 11 +++++ editors/diamond/pkg-descr | 19 ++++++++ editors/diamond/pkg-plist | 23 +++++++++ 8 files changed, 168 insertions(+) diff --git a/editors/Makefile b/editors/Makefile index 1c05ff426891..9809b87bf2b9 100644 --- a/editors/Makefile +++ b/editors/Makefile @@ -24,6 +24,7 @@ SUBDIR += deforaos-editor SUBDIR += dhex SUBDIR += diakonos + SUBDIR += diamond SUBDIR += dkns SUBDIR += drjava SUBDIR += dte diff --git a/editors/diamond/Makefile b/editors/diamond/Makefile new file mode 100644 index 000000000000..37f3d8a80606 --- /dev/null +++ b/editors/diamond/Makefile @@ -0,0 +1,26 @@ +PORTNAME= diamond +DISTVERSIONPREFIX= diamond- +DISTVERSION= 1.3.6 +CATEGORIES= editors + +MAINTAINER= adridg@FreeBSD.org +COMMENT= Compact programmers editor + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= libhunspell-1.7.so:textproc/hunspell +BUILD_DEPENDS= copperspice>=1.7:x11-toolkits/copperspice +RUN_DEPENDS= copperspice>=1.7:x11-toolkits/copperspice + +USES= compiler:c++17-lang cmake gl gnome iconv jpeg pkgconfig ssl xorg +USE_GL= gl +USE_GNOME= cairo glib20 libxml2 +USE_XORG= ice sm x11 xau xcb xcursor xext xfixes xi xinerama xrandr xrender + +USE_GITHUB= yes +GH_ACCOUNT= copperspice +GH_PROJECT= diamond + +.include + diff --git a/editors/diamond/distinfo b/editors/diamond/distinfo new file mode 100644 index 000000000000..d907474b1d5a --- /dev/null +++ b/editors/diamond/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1645301383 +SHA256 (copperspice-diamond-diamond-1.3.6_GH0.tar.gz) = e1b85890a870236370207c5d6b7aa7d44d7414a090723ecea513f8b5cec4fb67 +SIZE (copperspice-diamond-diamond-1.3.6_GH0.tar.gz) = 4626624 diff --git a/editors/diamond/files/patch-CMakeLists.txt b/editors/diamond/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..9973587f5eb2 --- /dev/null +++ b/editors/diamond/files/patch-CMakeLists.txt @@ -0,0 +1,18 @@ +--- CMakeLists.txt.orig 2022-02-19 20:16:57 UTC ++++ CMakeLists.txt +@@ -31,7 +31,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Darwin") + elseif(CMAKE_SYSTEM_NAME MATCHES "(Linux|OpenBSD|FreeBSD|NetBSD|DragonFly)") + include(GNUInstallDirs) + +- set(CMAKE_INSTALL_RPATH "\$ORIGIN") ++ # set(CMAKE_INSTALL_RPATH "\$ORIGIN") + + elseif(MSVC) + # use defaults +@@ -109,4 +109,4 @@ message("") + message("Diamond configured to run on: ${CMAKE_SYSTEM_NAME} ${TARGETBITS} bit, ${CMAKE_BUILD_TYPE} Mode") + message("Diamond will be built in: ${CMAKE_BINARY_DIR}") + message("Diamond will be installed in: ${CMAKE_INSTALL_PREFIX}") +-message("\n") +\ No newline at end of file ++message("\n") diff --git a/editors/diamond/files/patch-src_CMakeLists.txt b/editors/diamond/files/patch-src_CMakeLists.txt new file mode 100644 index 000000000000..2105866af22a --- /dev/null +++ b/editors/diamond/files/patch-src_CMakeLists.txt @@ -0,0 +1,67 @@ +--- src/CMakeLists.txt.orig 2021-01-28 22:43:22 UTC ++++ src/CMakeLists.txt +@@ -120,6 +120,8 @@ target_link_libraries(Diamond + CopperSpice::CsNetwork + ) + ++set(install_resource_dir ${CMAKE_INSTALL_DATADIR}/copperspice/diamond) ++ + if (CMAKE_SYSTEM_NAME MATCHES "Darwin") + set_target_properties(Diamond PROPERTIES OUTPUT_NAME diamond) + +@@ -169,8 +171,9 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "(Linux|OpenBSD|FreeB + PRIVATE + PkgConfig::Hunspell + ) ++ target_compile_definitions(Diamond PRIVATE DIAMOND_SHARE_DIR="${CMAKE_INSTALL_PREFIX}/${install_resource_dir}") + +- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../resources/diamond.png DESTINATION .) ++ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../resources/diamond.png DESTINATION ${install_resource_dir}) + + elseif(CMAKE_SYSTEM_NAME MATCHES "Windows") + +@@ -198,28 +201,21 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Windows") + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../resources/diamond.ico DESTINATION .) + endif() + +-install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../source_extra/syntax/ DESTINATION syntax) ++install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../source_extra/syntax/ DESTINATION ${install_resource_dir}/syntax) + + # installs English by default +-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../source_extra/dictionary/en_US.aff DESTINATION dictionary) +-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../source_extra/dictionary/en_US.dic DESTINATION dictionary) ++install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../source_extra/dictionary/en_US.aff DESTINATION ${install_resource_dir}/dictionary) ++install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../source_extra/dictionary/en_US.dic DESTINATION ${install_resource_dir}/dictionary) + +-# will not overwrite dictionary/userDict.txt +-install(CODE " +- if (NOT EXISTS \"${CMAKE_INSTALL_PREFIX}/dictionary/userDict.txt \") +- file(INSTALL \"${CMAKE_CURRENT_SOURCE_DIR}/../source_extra/dictionary/userDict.txt\" DESTINATION \"${CMAKE_INSTALL_PREFIX}/dictionary\") +- endif() +-") +- + if (CMAKE_SYSTEM_NAME MATCHES "Darwin") + install(TARGETS Diamond DESTINATION ../MacOS) + else() +- install(TARGETS Diamond DESTINATION .) ++ install(TARGETS Diamond) + endif() + +-cs_copy_library(CsCore) +-cs_copy_library(CsGui) +-cs_copy_library(CsNetwork) ++# cs_copy_library(CsCore) ++# cs_copy_library(CsGui) ++# cs_copy_library(CsNetwork) + + if (CMAKE_SYSTEM_NAME MATCHES "Darwin") + # copy required plugins to the bundle +@@ -227,6 +223,6 @@ if (CMAKE_SYSTEM_NAME MATCHES "Darwin") + cs_copy_plugins(CsPrinterDriver ../plugins) + else() + # installs required plugins +- cs_copy_plugins(CsGui) +- cs_copy_plugins(CsPrinterDriver) ++ # cs_copy_plugins(CsGui) ++ # cs_copy_plugins(CsPrinterDriver) + endif() diff --git a/editors/diamond/files/patch-src_json.cpp b/editors/diamond/files/patch-src_json.cpp new file mode 100644 index 000000000000..a11b06bdf71a --- /dev/null +++ b/editors/diamond/files/patch-src_json.cpp @@ -0,0 +1,11 @@ +--- src/json.cpp.orig 2022-02-20 12:59:53 UTC ++++ src/json.cpp +@@ -36,7 +36,7 @@ bool MainWindow::json_Read(Config trail) + { + bool ok = true; + +- m_appPath = QCoreApplication::applicationDirPath(); ++ m_appPath = DIAMOND_SHARE_DIR; // QCoreApplication::applicationDirPath(); + + QSettings settings("Diamond Editor", "Settings"); + m_jsonFname = settings.value("configName").toString(); diff --git a/editors/diamond/pkg-descr b/editors/diamond/pkg-descr new file mode 100644 index 000000000000..610a1f4847df --- /dev/null +++ b/editors/diamond/pkg-descr @@ -0,0 +1,19 @@ +Diamond is a cross platform compact editor designed for programmers. +It was developed using the CopperSpice libraries and was written in C++. + + - View multiple documents in movable tabs + - Auto Load previously open Files + - Configuration saved as a JSON format + - Define preset Folders + - Insert Date, Time, and Symbols + - Search and Replace + - Advanced Find + - Syntax Highlighting based on File Type + - Horizontal or Vertical split Window + - Spell Check + - Customize printed Header and Footer + - Show Spaces and Tabs + - User definable standard and custom Keyboard Shortcuts + - Record, Save, and Play back Macros + +WWW: https://github.com/copperspice/diamond diff --git a/editors/diamond/pkg-plist b/editors/diamond/pkg-plist new file mode 100644 index 000000000000..a4f2eb0d70d1 --- /dev/null +++ b/editors/diamond/pkg-plist @@ -0,0 +1,23 @@ +bin/diamond +share/copperspice/diamond/diamond.png +share/copperspice/diamond/dictionary/en_US.aff +share/copperspice/diamond/dictionary/en_US.dic +share/copperspice/diamond/syntax/syn_clipper.json +share/copperspice/diamond/syntax/syn_cmake.json +share/copperspice/diamond/syntax/syn_cpp.json +share/copperspice/diamond/syntax/syn_css.json +share/copperspice/diamond/syntax/syn_doxy.json +share/copperspice/diamond/syntax/syn_errlog.json +share/copperspice/diamond/syntax/syn_html.json +share/copperspice/diamond/syntax/syn_java.json +share/copperspice/diamond/syntax/syn_js.json +share/copperspice/diamond/syntax/syn_json.json +share/copperspice/diamond/syntax/syn_make.json +share/copperspice/diamond/syntax/syn_none.json +share/copperspice/diamond/syntax/syn_nsi.json +share/copperspice/diamond/syntax/syn_php.json +share/copperspice/diamond/syntax/syn_pl.json +share/copperspice/diamond/syntax/syn_py.json +share/copperspice/diamond/syntax/syn_sh.json +share/copperspice/diamond/syntax/syn_txt.json +share/copperspice/diamond/syntax/syn_xml.json