diff options
Diffstat (limited to 'media-libs/lib3mf')
4 files changed, 240 insertions, 0 deletions
diff --git a/media-libs/lib3mf/Manifest b/media-libs/lib3mf/Manifest index 36f54567a56a..d9a2e6957d95 100644 --- a/media-libs/lib3mf/Manifest +++ b/media-libs/lib3mf/Manifest @@ -1,5 +1,9 @@ AUX lib3mf-2.1.0-0001-Gentoo-specific-avoid-pre-stripping-library.patch 1067 BLAKE2B 1c56383b9a791ea5bcc8762a23c92426d308d6f55e5b51ec9268a779bb202144958f9cfa02686d72bf260d2beeb08b3ddf0c58441bf1a899032c408fd137df93 SHA512 af9930e67b6a0a3db26a97326e68a8e8a2d3ac57c378cf8f79397f514ec18ab600efb84b941d0449ffc8d620564082f8942a428c1fefa3cf199d972a7a4f9622 AUX lib3mf-2.1.1-0001-patch-to-use-system-provided-act-binary.patch 5462 BLAKE2B 73ebe5037f11673232363ee4ec99aea828b37ea24469ddced15593310e8f7f7806c08bddde40583640471d2566985d5002970dcc6f8f3d64ff369cfe3a3567e7 SHA512 1f5fb5c3b0dd115da478bdcf9c47e9c269c13613604905df8b0a80fccf5b039ee2c1ce0f433c68f783b11e5faf1756fb66772f0e313bdb0ae6af3c2a5cf35ab3 +AUX lib3mf-2.2.0-0001-use-system-provided-act-binary.patch 5370 BLAKE2B c5d3cfe734311995f9fb98a4c7083267af04740e9cc94f6251ec01a837cce8e52587bae4f587a246317976eb60be931c44d1b6bb5f0d72599d07845cadd1a8c4 SHA512 4832d2661dab796e78a737f7aca2f7516e4f4b8c29d0897779ad82be91ec523941f51d39564ad61b01a158a5f313c365a26d5499ce2ccc85793fca8f81b75aee +AUX lib3mf-2.2.0-0002-Gentoo-specific-remove-add_dependencies.patch 936 BLAKE2B ac89b89c223eaa81334da6ae84d1c785beccea2687b883954a93ede0d7fa49d11afc91ff5a6d41e195d7feb959d4317986cc97ac58047328ce372e40e787cefa SHA512 42c9ede93e79c7548b5ed9bed2f5ec0e275441ab5daa5cf9eb72f31610da512b7a3f118a075a8cfc21d1244c96ba42efadaee8c26c1b1837295e8a2ce4a93255 DIST lib3mf-2.1.1.tar.gz 15917671 BLAKE2B eacf066147d5c4e15f79d374a377b5ef3b4bc8b4db20ca29e95df5cded11420874ab2df8b5bc48d4a47bbbb6bcb28390e72dae422ad43d5df4d1fd0cd4ed4878 SHA512 43b1091721e994adfa8390ed6542dc207b62dee278d8747fcca044692a72123c3445d4e7795d5476d15bb535fd1a3ce1da2c2796ab8edb28eb66528778fec846 +DIST lib3mf-2.2.0.tar.gz 16439833 BLAKE2B c98f57ea99f90625f2bfbdbcde9df8dbd8aeccc655e1bd9be165c24b2d9fb74471e4b01c816d8f665e5793db77c7bcf52016f030ec1947f908d6647e9ad12745 SHA512 2a9ee92312396b8966967a7ed696c58c69a77438f94432ad071659adc8c9d12fba34a3cf3d8c8d3ad3b26c12c9a89f4d8645e6f396987dc05b04952b004a1f07 EBUILD lib3mf-2.1.1-r1.ebuild 1422 BLAKE2B 2a5d1bba2b34e3aba7f8b852ed81af4056247e586ebad940d48cbf07d1b1e28b03ded6ed85c958eba45c0ee7d9b40368c57415c212b51862c92745accdf8e100 SHA512 86bd28c9587a9f081049e0fe839cd39b0dc45b7eb90e87b2494fb4855f27a056ca87b114a730160b16591c63bf75ead6229bd5305bfedb8d38ae21c3d5ce2278 +EBUILD lib3mf-2.2.0.ebuild 1473 BLAKE2B 8d54e479362e612ada18f5f7f83697af1acca76dbeec229aea371d2243403c93841b58140ab1077d3291402036ad5067cf6d9f71a6bd00975c589e28e44fec19 SHA512 6e5c41f2d4808af2c91671f4e37f1a4a344c1fe36f5310d8867bde1ed4bfc260a8ab7f8be9cc5c8872c18f8d618230b5d78e23c12f645696a6b037d37a4e2bbe MISC metadata.xml 936 BLAKE2B 55b169d62c7b8e9ef8ab789c16a286ee545f6c5519833e9c27e23765fe279b059050f526b5ceb2c59eb63d8568348c403326ec5b5d2d9925728298f3875673e8 SHA512 dee8668538fab0a6ea13cce39c0b817d59ee4dca58fa3f15e1c7b995dbfbb2abe63e1ec27b5b47c7d40521daeffc1db4a357c3c9d07e39f60c9b8851066ad9fe diff --git a/media-libs/lib3mf/files/lib3mf-2.2.0-0001-use-system-provided-act-binary.patch b/media-libs/lib3mf/files/lib3mf-2.2.0-0001-use-system-provided-act-binary.patch new file mode 100644 index 000000000000..35beebf19306 --- /dev/null +++ b/media-libs/lib3mf/files/lib3mf-2.2.0-0001-use-system-provided-act-binary.patch @@ -0,0 +1,141 @@ +From: Bernd Waibel <waebbl-gentoo@posteo.net> +Date: Wed, 25 Aug 2021 09:29:17 +0200 +Subject: [PATCH] use system provided act binary + +Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net> +--- + CMakeLists.txt | 110 ++++++++++++++++++++++++++++++++----------------- + 1 file changed, 73 insertions(+), 37 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d70a030..9c91496 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -62,14 +62,19 @@ endif() + + + ### The API generation target +-if(CMAKE_HOST_UNIX) +- if(APPLE) +- set(ACT_COMMANDENDING darwin) +- else() +- set(ACT_COMMANDENDING linux) ++option(USE_SYSTEM_ACT "Use system provided act binary" OFF) ++if(NOT USE_SYSTEM_ACT) ++ if(CMAKE_HOST_UNIX) ++ if(APPLE) ++ set(ACT_COMMANDENDING darwin) ++ else() ++ set(ACT_COMMANDENDING linux) ++ endif() ++ elseif(CMAKE_HOST_WIN32) ++ set(ACT_COMMANDENDING exe) + endif() +-elseif(CMAKE_HOST_WIN32) +- set(ACT_COMMANDENDING exe) ++else() ++ find_program(ACT act) + endif() + + set(CMAKE_CURRENT_SOURCE_DIR_AUTOGENERATED ${CMAKE_CURRENT_SOURCE_DIR}/Autogenerated) +@@ -80,36 +85,67 @@ set(ACT_GENERATED_SOURCE + ${CMAKE_CURRENT_SOURCE_DIR_AUTOGENERATED}/Source/lib3mf_interfacewrapper.cpp + ${CMAKE_CURRENT_SOURCE_DIR_AUTOGENERATED}/Source/lib3mf_interfacejournal.cpp + ) +-add_custom_command( +- BYPRODUCTS +- ${ACT_GENERATED_SOURCE} +- OUTPUT +- ${CMAKE_CURRENT_BINARY_DIR_AUTOGENERATED}/LIB3MFACTGENERATIONSTAMP +- WORKING_DIRECTORY +- ${CMAKE_CURRENT_SOURCE_DIR}/AutomaticComponentToolkit +- COMMAND +- cmake -E make_directory "${CMAKE_CURRENT_SOURCE_DIR_AUTOGENERATED}" +- COMMAND +- cmake -E touch "${CMAKE_CURRENT_BINARY_DIR_AUTOGENERATED}/LIB3MFACTGENERATIONSTAMP" +- COMMAND +- ${CMAKE_CURRENT_SOURCE_DIR}/AutomaticComponentToolkit/bin/act.${ACT_COMMANDENDING} ${CMAKE_CURRENT_SOURCE_DIR}/AutomaticComponentToolkit/lib3mf.xml +- COMMAND +- cmake -E remove_directory "${CMAKE_CURRENT_SOURCE_DIR_AUTOGENERATED}/Source" +- COMMAND +- cmake -E remove_directory "${CMAKE_CURRENT_SOURCE_DIR_AUTOGENERATED}/Bindings" +- COMMAND +- cmake -E copy_directory "${CMAKE_TEMP_HEADER_FOLDER}/Bindings" ${CMAKE_CURRENT_SOURCE_DIR_AUTOGENERATED}/Bindings +- COMMAND +- cmake -E copy_directory "${CMAKE_TEMP_HEADER_FOLDER}/Implementations/Cpp/Interfaces" "${CMAKE_CURRENT_SOURCE_DIR_AUTOGENERATED}/Source/" +- COMMAND +- cmake -E remove_directory "${CMAKE_TEMP_HEADER_FOLDER}" +- COMMENT +- "Generating hourglass API bindings and implementation stub" +- DEPENDS +- ${CMAKE_CURRENT_SOURCE_DIR}/AutomaticComponentToolkit/lib3mf.xml +- VERBATIM +-) +- ++if(NOT USE_SYSTEM_ACT) ++ add_custom_command( ++ BYPRODUCTS ++ ${ACT_GENERATED_SOURCE} ++ OUTPUT ++ ${CMAKE_CURRENT_BINARY_DIR_AUTOGENERATED}/LIB3MFACTGENERATIONSTAMP ++ WORKING_DIRECTORY ++ ${CMAKE_CURRENT_SOURCE_DIR}/AutomaticComponentToolkit ++ COMMAND ++ cmake -E make_directory "${CMAKE_CURRENT_SOURCE_DIR_AUTOGENERATED}" ++ COMMAND ++ cmake -E touch "${CMAKE_CURRENT_BINARY_DIR_AUTOGENERATED}/LIB3MFACTGENERATIONSTAMP" ++ COMMAND ++ ${CMAKE_CURRENT_SOURCE_DIR}/AutomaticComponentToolkit/bin/act.${ACT_COMMANDENDING} ${CMAKE_CURRENT_SOURCE_DIR}/AutomaticComponentToolkit/lib3mf.xml ++ COMMAND ++ cmake -E remove_directory "${CMAKE_CURRENT_SOURCE_DIR_AUTOGENERATED}/Source" ++ COMMAND ++ cmake -E remove_directory "${CMAKE_CURRENT_SOURCE_DIR_AUTOGENERATED}/Bindings" ++ COMMAND ++ cmake -E copy_directory "${CMAKE_TEMP_HEADER_FOLDER}/Bindings" ${CMAKE_CURRENT_SOURCE_DIR_AUTOGENERATED}/Bindings ++ COMMAND ++ cmake -E copy_directory "${CMAKE_TEMP_HEADER_FOLDER}/Implementations/Cpp/Interfaces" "${CMAKE_CURRENT_SOURCE_DIR_AUTOGENERATED}/Source/" ++ COMMAND ++ cmake -E remove_directory "${CMAKE_TEMP_HEADER_FOLDER}" ++ COMMENT ++ "Generating hourglass API bindings and implementation stub" ++ DEPENDS ++ ${CMAKE_CURRENT_SOURCE_DIR}/AutomaticComponentToolkit/lib3mf.xml ++ VERBATIM ++ ) ++else() ++ add_custom_command( ++ BYPRODUCTS ++ ${ACT_GENERATED_SOURCE} ++ OUTPUT ++ ${CMAKE_CURRENT_BINARY_DIR_AUTOGENERATED}/LIB3MFACTGENERATIONSTAMP ++ WORKING_DIRECTORY ++ ${CMAKE_CURRENT_SOURCE_DIR}/AutomaticComponentToolkit ++ COMMAND ++ cmake -E make_directory "${CMAKE_CURRENT_BINARY_DIR_AUTOGENERATED}" ++ COMMAND ++ cmake -E touch "${CMAKE_CURRENT_BINARY_DIR_AUTOGENERATED}/LIB3MFACTGENERATIONSTAMP" ++ COMMAND ++ ${ACT} ${CMAKE_CURRENT_SOURCE_DIR}/AutomaticComponentToolkit/lib3mf.xml ++ COMMAND ++ cmake -E remove_directory "${CMAKE_CURRENT_BINARY_DIR_AUTOGENERATED}/Source" ++ COMMAND ++ cmake -E remove_directory "${CMAKE_CURRENT_BINARY_DIR_AUTOGENERATED}/Bindings" ++ COMMAND ++ cmake -E copy_directory "${CMAKE_TEMP_HEADER_FOLDER}/Bindings" ${CMAKE_CURRENT_BINARY_DIR_AUTOGENERATED}/Bindings ++ COMMAND ++ cmake -E copy_directory "${CMAKE_TEMP_HEADER_FOLDER}/Implementations/Cpp/Interfaces" "${CMAKE_CURRENT_BINARY_DIR_AUTOGENERATED}/Source/" ++ COMMAND ++ cmake -E remove_directory "${CMAKE_TEMP_HEADER_FOLDER}" ++ COMMENT ++ "Generating hourglass API bindings and implementation stub" ++ DEPENDS ++ ${CMAKE_CURRENT_SOURCE_DIR}/AutomaticComponentToolkit/lib3mf.xml ++ VERBATIM ++ ) ++endif() + add_custom_target(lib3mfACT + DEPENDS + ${CMAKE_CURRENT_BINARY_DIR_AUTOGENERATED}/LIB3MFACTGENERATIONSTAMP +-- +2.32.0 + diff --git a/media-libs/lib3mf/files/lib3mf-2.2.0-0002-Gentoo-specific-remove-add_dependencies.patch b/media-libs/lib3mf/files/lib3mf-2.2.0-0002-Gentoo-specific-remove-add_dependencies.patch new file mode 100644 index 000000000000..742c877e2b41 --- /dev/null +++ b/media-libs/lib3mf/files/lib3mf-2.2.0-0002-Gentoo-specific-remove-add_dependencies.patch @@ -0,0 +1,29 @@ +From: Bernd Waibel <waebbl-gentoo@posteo.net> +Date: Wed, 25 Aug 2021 18:19:25 +0200 +Subject: [PATCH] [Gentoo specific] remove add_dependencies + +Remove the add_dependencies commands on ssl and crypto. +We use global openssl support instead of package libressl. + +Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net> +--- + Tests/CPP_Bindings/CMakeLists.txt | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/Tests/CPP_Bindings/CMakeLists.txt b/Tests/CPP_Bindings/CMakeLists.txt +index 4a816a5..c26c498 100644 +--- a/Tests/CPP_Bindings/CMakeLists.txt ++++ b/Tests/CPP_Bindings/CMakeLists.txt +@@ -47,9 +47,6 @@ if (WIN32) + target_compile_options(${TESTNAME} PUBLIC "$<$<CONFIG:RELEASE>:/O2;/sdl;/WX;/Oi;/Gy;/FC;/MD;/wd4996>") + endif() + +-add_dependencies(${TESTNAME} ssl) +-add_dependencies(${TESTNAME} crypto) +- + target_include_directories(${TESTNAME} PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/Include + ${gtest_SOURCE_DIR}/include +-- +2.32.0 + diff --git a/media-libs/lib3mf/lib3mf-2.2.0.ebuild b/media-libs/lib3mf/lib3mf-2.2.0.ebuild new file mode 100644 index 000000000000..d37a2212018b --- /dev/null +++ b/media-libs/lib3mf/lib3mf-2.2.0.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="Implementation of the 3D Manufacturing Format file standard" +HOMEPAGE="https://3mf.io/ https://github.com/3MFConsortium/lib3mf" +SRC_URI="https://github.com/3MFConsortium/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0/2" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="+system-act test" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-libs/libzip:= + sys-apps/util-linux + sys-libs/zlib +" +DEPEND="${RDEPEND}" +BDEPEND=" + virtual/pkgconfig + system-act? ( dev-go/act ) + test? ( + dev-cpp/gtest + dev-libs/openssl + dev-util/valgrind + ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-2.1.0-0001-Gentoo-specific-avoid-pre-stripping-library.patch + "${FILESDIR}"/${P}-0001-use-system-provided-act-binary.patch + "${FILESDIR}"/${P}-0002-Gentoo-specific-remove-add_dependencies.patch +) + +src_configure() { + local mycmakeargs=( + -DCMAKE_INSTALL_INCLUDEDIR="include/${PN}" + -DLIB3MF_TESTS=$(usex test) + -DUSE_INCLUDED_LIBZIP=OFF + -DUSE_INCLUDED_ZLIB=OFF + -DUSE_SYSTEM_ACT=$(usex system-act) + ) + + if use test; then + mycmakeargs+=( + -DUSE_INCLUDED_GTEST=OFF + # code says it uses libressl, but works with openssl too + -DUSE_INCLUDED_SSL=OFF + ) + fi + + cmake_src_configure +} + +src_install() { + cmake_src_install + + for suf in abi types implicit; do + dosym -r /usr/include/${PN}/Bindings/Cpp/${PN}_${suf}.hpp /usr/include/${PN}/${PN}_${suf}.hpp + done +} |