git: cd29c27d5a1f - main - devel/elfio: Update to 3.11

From: Fernando Apesteguía <fernape_at_FreeBSD.org>
Date: Tue, 29 Nov 2022 16:32:58 UTC
The branch main has been updated by fernape:

URL: https://cgit.FreeBSD.org/ports/commit/?id=cd29c27d5a1f46a9f86ba5bd3cf6c7b4645d8351

commit cd29c27d5a1f46a9f86ba5bd3cf6c7b4645d8351
Author:     James Wright <james.wright@digital-chaos.com>
AuthorDate: 2022-11-29 12:24:53 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2022-11-29 16:29:04 +0000

    devel/elfio: Update to 3.11
    
    PR:             268049
    Reported by:    james.wright@digital-chaos.com
---
 devel/elfio/Makefile                   | 17 ++++++++-------
 devel/elfio/distinfo                   |  6 +++---
 devel/elfio/files/patch-CMakeLists.txt | 11 ++++++++++
 devel/elfio/pkg-plist                  | 38 ++++++++++++++++++++--------------
 4 files changed, 46 insertions(+), 26 deletions(-)

diff --git a/devel/elfio/Makefile b/devel/elfio/Makefile
index 8de261e91e04..9b6534bcc886 100644
--- a/devel/elfio/Makefile
+++ b/devel/elfio/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	elfio
-PORTVERSION=	3.10
+PORTVERSION=	3.11
 CATEGORIES=	devel
 MASTER_SITES=	SF/elfio/ELFIO-sources/ELFIO-${PORTVERSION}
 
@@ -8,23 +8,24 @@ COMMENT=	Small C++ library for reading and generating ELF files
 WWW=		http://elfio.sourceforge.net/
 
 LICENSE=	MIT
-LICENSE_FILE=	${WRKSRC}/COPYING
+LICENSE_FILE=	${WRKSRC}/LICENSE.txt
 
-USES=		compiler:c++11-lang
-
-GNU_CONFIGURE=	yes
-CONFIGURE_ARGS=	--bindir=${EXAMPLESDIR}
+USES=		cmake ninja compiler:c++11-lang
 
 OPTIONS_DEFINE=	DOCS EXAMPLES
 OPTIONS_SUB=	yes
 
+EXAMPLES_CMAKE_BOOL=	ELFIO_BUILD_EXAMPLES
+
 post-install-DOCS-on:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	${INSTALL_MAN} ${WRKSRC}/doc/elfio.pdf ${STAGEDIR}${DOCSDIR}
 
 post-install-EXAMPLES-on:
 	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
-	@${FIND} ${WRKSRC}/examples/ -name "*.cpp" -exec ${INSTALL_DATA} {} \
-	${STAGEDIR}${EXAMPLESDIR}/ \;
+	(cd ${WRKSRC}/examples && \
+	${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} "! -name *.txt")
+	(cd ${BUILD_WRKSRC}/examples && \
+	${COPYTREE_BIN} . ${STAGEDIR}${EXAMPLESDIR} "-type f -perm -a=x")
 
 .include <bsd.port.mk>
diff --git a/devel/elfio/distinfo b/devel/elfio/distinfo
index 34a6a93947ad..fc7a363f6190 100644
--- a/devel/elfio/distinfo
+++ b/devel/elfio/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1645222927
-SHA256 (elfio-3.10.tar.gz) = cdc6362ede2e0c8d1d6db15d7da4b526f461d9cfae6f6337369e416a8bc60234
-SIZE (elfio-3.10.tar.gz) = 530003
+TIMESTAMP = 1669588370
+SHA256 (elfio-3.11.tar.gz) = 3307b104c205399786edbba203906de9517e36297709fe747faf9478d55fbb91
+SIZE (elfio-3.11.tar.gz) = 429788
diff --git a/devel/elfio/files/patch-CMakeLists.txt b/devel/elfio/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..94d80e11e9f1
--- /dev/null
+++ b/devel/elfio/files/patch-CMakeLists.txt
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.orig	2022-11-28 05:02:09 UTC
++++ CMakeLists.txt
+@@ -140,7 +140,7 @@ if(IS_TOP_PROJECT)
+     set(CPACK_SOURCE_IGNORE_FILES "/.git/;/.github/;/.vscode/;/build;/.clang-format;/.gitignore;/.travis.yml;/doc/images/;/doc/site;/doc/elfio.docx;/examples/sudo_gdb.sh;/tests")
+ 
+     install(FILES ${CPACK_RESOURCE_FILE_README} ${CPACK_RESOURCE_FILE_LICENSE}
+-        DESTINATION share/docs/${PROJECT_NAME})
++        DESTINATION share/doc/${PROJECT_NAME})
+ 
+     include(CPack)
+ endif()
diff --git a/devel/elfio/pkg-plist b/devel/elfio/pkg-plist
index c66772c20796..3b41da38c92e 100644
--- a/devel/elfio/pkg-plist
+++ b/devel/elfio/pkg-plist
@@ -4,8 +4,8 @@ include/elfio/elfio_array.hpp
 include/elfio/elfio_dump.hpp
 include/elfio/elfio_dynamic.hpp
 include/elfio/elfio_header.hpp
-include/elfio/elfio_note.hpp
 include/elfio/elfio_modinfo.hpp
+include/elfio/elfio_note.hpp
 include/elfio/elfio_relocation.hpp
 include/elfio/elfio_section.hpp
 include/elfio/elfio_segment.hpp
@@ -14,18 +14,26 @@ include/elfio/elfio_symbols.hpp
 include/elfio/elfio_utils.hpp
 include/elfio/elfio_version.hpp
 include/elfio/elfio_versym.hpp
+%%PORTDOCS%%%%DOCSDIR%%/LICENSE.txt
+%%PORTDOCS%%%%DOCSDIR%%/README.md
 %%PORTDOCS%%%%DOCSDIR%%/elfio.pdf
-%%PORTEXAMPLES%%%%EXAMPLESDIR%%/add_section
-%%PORTEXAMPLES%%%%EXAMPLESDIR%%/add_section.cpp
-%%PORTEXAMPLES%%%%EXAMPLESDIR%%/anonymizer
-%%PORTEXAMPLES%%%%EXAMPLESDIR%%/anonymizer.cpp
-%%PORTEXAMPLES%%%%EXAMPLESDIR%%/elfdump
-%%PORTEXAMPLES%%%%EXAMPLESDIR%%/elfdump.cpp
-%%PORTEXAMPLES%%%%EXAMPLESDIR%%/elfio_c_wrapper.cpp
-%%PORTEXAMPLES%%%%EXAMPLESDIR%%/proc_mem.cpp
-%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tutorial
-%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tutorial.cpp
-%%PORTEXAMPLES%%%%EXAMPLESDIR%%/write_obj
-%%PORTEXAMPLES%%%%EXAMPLESDIR%%/write_obj.cpp
-%%PORTEXAMPLES%%%%EXAMPLESDIR%%/writer
-%%PORTEXAMPLES%%%%EXAMPLESDIR%%/writer.cpp
+%%DATADIR%%/cmake/elfioConfig.cmake
+%%DATADIR%%/cmake/elfioConfigVersion.cmake
+%%DATADIR%%/cmake/elfioTargets.cmake
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/add_section/add_section
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/add_section/add_section.cpp
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/anonymizer/anonymizer
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/anonymizer/anonymizer.cpp
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/c_wrapper/c_example.c
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/c_wrapper/elfio_c_wrapper.cpp
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/c_wrapper/elfio_c_wrapper.h
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/elfdump/elfdump
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/elfdump/elfdump.cpp
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/proc_mem/proc_mem
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/proc_mem/proc_mem.cpp
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tutorial/tutorial
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tutorial/tutorial.cpp
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/write_obj/write_obj
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/write_obj/write_obj.cpp
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/writer/writer
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/writer/writer.cpp