svn commit: r566162 - in head/editors/imhex: . files

MANTANI Nobutaka nobutaka at FreeBSD.org
Sat Feb 20 14:05:43 UTC 2021


Author: nobutaka
Date: Sat Feb 20 14:05:41 2021
New Revision: 566162
URL: https://svnweb.freebsd.org/changeset/ports/566162

Log:
  Update to 1.7.0.

Added:
  head/editors/imhex/files/
  head/editors/imhex/files/patch-cmake_build__helpers.cmake   (contents, props changed)
  head/editors/imhex/files/patch-source_window.cpp   (contents, props changed)
  head/editors/imhex/pkg-plist   (contents, props changed)
Modified:
  head/editors/imhex/Makefile
  head/editors/imhex/distinfo

Modified: head/editors/imhex/Makefile
==============================================================================
--- head/editors/imhex/Makefile	Sat Feb 20 13:56:47 2021	(r566161)
+++ head/editors/imhex/Makefile	Sat Feb 20 14:05:41 2021	(r566162)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 
 PORTNAME=	imhex
-PORTVERSION=	1.6.1
+PORTVERSION=	1.7.0
 CATEGORIES=	editors
 
 MAINTAINER=	nobutaka at FreeBSD.org
@@ -17,12 +17,13 @@ BUILD_DEPENDS=	c++10:lang/gcc10 \
 		glm>0:math/glm \
 		nlohmann-json>0:devel/nlohmann-json
 LIB_DEPENDS=	libcapstone.so:devel/capstone4 \
+		libmbedtls.so:security/mbedtls \
 		libfreetype.so:print/freetype2 \
 		libglfw.so:graphics/glfw \
 		libstdc++.so:lang/gcc10 \
 		libtre.so:textproc/libtre
 
-USES=		cmake pkgconfig python:3.8+ ssl xorg
+USES=		cmake pkgconfig python:3.8+ xorg
 USE_XORG=	x11 xcb xau xdmcp
 USE_GITHUB=	yes
 GH_ACCOUNT=	WerWolv
@@ -32,14 +33,17 @@ GH_TAGNAME=	v${PORTVERSION}
 CC=	${LOCALBASE}/bin/gcc10
 CXX=	${LOCALBASE}/bin/c++10
 
-PLIST_FILES=	bin/imhex
 PORTDOCS=	README.md
 
 OPTIONS_DEFINE=	DOCS NLS
 NLS_USES=	gettext
 
-do-install:
-	${INSTALL_PROGRAM} ${WRKDIR}/.build/imhex ${STAGEDIR}${PREFIX}/bin
+post-patch:
+	${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|" ${WRKSRC}/source/window.cpp
+
+post-install:
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/share/imhex/plugins/builtin.hexplug
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/share/imhex/plugins/example.hexplug
 
 post-install-DOCS-on:
 	${MKDIR} ${STAGEDIR}${DOCSDIR}

Modified: head/editors/imhex/distinfo
==============================================================================
--- head/editors/imhex/distinfo	Sat Feb 20 13:56:47 2021	(r566161)
+++ head/editors/imhex/distinfo	Sat Feb 20 14:05:41 2021	(r566162)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1610362840
-SHA256 (WerWolv-ImHex-1.6.1-v1.6.1_GH0.tar.gz) = 03cfe4ea9971dec548f9519be31793952b96da4e9204328f3ea059742b86639d
-SIZE (WerWolv-ImHex-1.6.1-v1.6.1_GH0.tar.gz) = 962615
+TIMESTAMP = 1613820150
+SHA256 (WerWolv-ImHex-1.7.0-v1.7.0_GH0.tar.gz) = 891c9268dda958922698c6fdfcba34ec7b20853f3764fe9d58c4a932a6b0d3d8
+SIZE (WerWolv-ImHex-1.7.0-v1.7.0_GH0.tar.gz) = 1189375

Added: head/editors/imhex/files/patch-cmake_build__helpers.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/editors/imhex/files/patch-cmake_build__helpers.cmake	Sat Feb 20 14:05:41 2021	(r566162)
@@ -0,0 +1,46 @@
+--- cmake/build_helpers.cmake.orig	2021-02-18 16:11:50 UTC
++++ cmake/build_helpers.cmake
+@@ -188,7 +188,7 @@ macro(createPackage)
+     endif()
+ 
+     if (UNIX AND NOT APPLE)
+-        install(TARGETS libimhex DESTINATION ${CMAKE_INSTALL_PREFIX})
++        install(TARGETS libimhex DESTINATION "${CMAKE_INSTALL_PREFIX}/lib")
+ 
+         string(REPLACE ":" ";" EXTRA_MAGICDBS "${EXTRA_MAGICDBS}")
+ 
+@@ -199,9 +199,9 @@ macro(createPackage)
+ 
+         if (NOT EXTRA_MAGICDBS STREQUAL "NOTFOUND")
+             if (EXTRA_MAGICDBS MATCHES ".*\\.mgc")
+-                install(FILES "${EXTRA_MAGICDBS}" DESTINATION magic/)
++                install(FILES "${EXTRA_MAGICDBS}" DESTINATION share/imhex/magic/)
+             else ()
+-                install(FILES "${EXTRA_MAGICDBS}.mgc" DESTINATION magic/)
++                install(FILES "${EXTRA_MAGICDBS}.mgc" DESTINATION share/imhex/magic/)
+             endif ()
+         endif ()
+     endif ()
+@@ -215,11 +215,11 @@ macro(createPackage)
+             )
+ 
+     foreach (plugin IN LISTS PLUGINS)
+-        install(FILES "$<TARGET_FILE:${plugin}>" DESTINATION plugins/)
++        install(FILES "$<TARGET_FILE:${plugin}>" DESTINATION share/imhex/plugins/)
+     endforeach ()
+ 
+     # Install the magicdb files.
+-    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/magic_dbs.mgc DESTINATION magic/ RENAME imhex.mgc)
++    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/magic_dbs.mgc DESTINATION share/imhex/magic/ RENAME imhex.mgc)
+ 
+     if (CREATE_BUNDLE)
+         include(PostprocessBundle)
+@@ -241,7 +241,7 @@ macro(createPackage)
+         if (WIN32)
+             install(TARGETS imhex RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+         else ()
+-            install(TARGETS imhex RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
++            install(TARGETS imhex RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
+         endif ()
+     endif()
+ 

Added: head/editors/imhex/files/patch-source_window.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/editors/imhex/files/patch-source_window.cpp	Sat Feb 20 14:05:41 2021	(r566162)
@@ -0,0 +1,11 @@
+--- source/window.cpp.orig	2021-02-18 16:11:50 UTC
++++ source/window.cpp
+@@ -595,7 +595,7 @@ namespace hex {
+ 
+     void Window::initPlugins() {
+         try {
+-            auto pluginFolderPath = std::filesystem::path((SharedData::mainArgv)[0]).parent_path() / "plugins";
++            auto pluginFolderPath = std::filesystem::path("%%PREFIX%%/share/imhex/plugins");
+             PluginHandler::load(pluginFolderPath.string());
+         } catch (std::runtime_error &e) { return; }
+ 

Added: head/editors/imhex/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/editors/imhex/pkg-plist	Sat Feb 20 14:05:41 2021	(r566162)
@@ -0,0 +1,5 @@
+bin/imhex
+lib/libimhex.so
+%%DATADIR%%/magic/imhex.mgc
+%%DATADIR%%/plugins/builtin.hexplug
+%%DATADIR%%/plugins/example.hexplug


More information about the svn-ports-all mailing list