diff --git a/editors/diamond/Makefile b/editors/diamond/Makefile index 37f3d8a80606..58562eaf6d2c 100644 --- a/editors/diamond/Makefile +++ b/editors/diamond/Makefile @@ -1,26 +1,27 @@ PORTNAME= diamond DISTVERSIONPREFIX= diamond- DISTVERSION= 1.3.6 +PORTREVISION= 1 CATEGORIES= editors +PKGNAMESUFFIX= -cs MAINTAINER= adridg@FreeBSD.org COMMENT= Compact programmers editor LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE -LIB_DEPENDS= libhunspell-1.7.so:textproc/hunspell +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/files/patch-src_CMakeLists.txt b/editors/diamond/files/patch-src_CMakeLists.txt index 2105866af22a..d4f059428f38 100644 --- a/editors/diamond/files/patch-src_CMakeLists.txt +++ b/editors/diamond/files/patch-src_CMakeLists.txt @@ -1,67 +1,76 @@ --- 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) +@@ -160,7 +162,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Darwin") + ) + + elseif(CMAKE_SYSTEM_NAME MATCHES "(Linux|OpenBSD|FreeBSD|NetBSD|DragonFly)") +- set_target_properties(Diamond PROPERTIES OUTPUT_NAME diamond) ++ set_target_properties(Diamond PROPERTIES OUTPUT_NAME diamond-cs) + + find_package(PkgConfig) + pkg_check_modules(Hunspell IMPORTED_TARGET hunspell) @@ -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/pkg-plist b/editors/diamond/pkg-plist index a4f2eb0d70d1..5b66a6d4a53e 100644 --- a/editors/diamond/pkg-plist +++ b/editors/diamond/pkg-plist @@ -1,23 +1,23 @@ -bin/diamond +bin/diamond-cs 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