public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/lib3mf/, media-libs/lib3mf/files/
Date: Sun, 24 Oct 2021 04:06:20 +0000 (UTC)	[thread overview]
Message-ID: <1635048366.c3f5d8e908b956a30e72a6b40f2c559d24a30b1e.sam@gentoo> (raw)

commit:     c3f5d8e908b956a30e72a6b40f2c559d24a30b1e
Author:     Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
AuthorDate: Wed Aug 25 06:05:48 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Oct 24 04:06:06 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3f5d8e9

media-libs/lib3mf: bump to 2.2.0

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/22640
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/lib3mf/Manifest                         |   1 +
 ...2.2.0-0001-use-system-provided-act-binary.patch | 141 +++++++++++++++++++++
 ...2-Gentoo-specific-remove-add_dependencies.patch |  29 +++++
 media-libs/lib3mf/lib3mf-2.2.0.ebuild              |  66 ++++++++++
 4 files changed, 237 insertions(+)

diff --git a/media-libs/lib3mf/Manifest b/media-libs/lib3mf/Manifest
index 957eb0a7970..42f1c787d50 100644
--- a/media-libs/lib3mf/Manifest
+++ b/media-libs/lib3mf/Manifest
@@ -1 +1,2 @@
 DIST lib3mf-2.1.1.tar.gz 15917671 BLAKE2B eacf066147d5c4e15f79d374a377b5ef3b4bc8b4db20ca29e95df5cded11420874ab2df8b5bc48d4a47bbbb6bcb28390e72dae422ad43d5df4d1fd0cd4ed4878 SHA512 43b1091721e994adfa8390ed6542dc207b62dee278d8747fcca044692a72123c3445d4e7795d5476d15bb535fd1a3ce1da2c2796ab8edb28eb66528778fec846
+DIST lib3mf-2.2.0.tar.gz 16439833 BLAKE2B c98f57ea99f90625f2bfbdbcde9df8dbd8aeccc655e1bd9be165c24b2d9fb74471e4b01c816d8f665e5793db77c7bcf52016f030ec1947f908d6647e9ad12745 SHA512 2a9ee92312396b8966967a7ed696c58c69a77438f94432ad071659adc8c9d12fba34a3cf3d8c8d3ad3b26c12c9a89f4d8645e6f396987dc05b04952b004a1f07

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 00000000000..35beebf1930
--- /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 00000000000..742c877e2b4
--- /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 00000000000..d37a2212018
--- /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
+}


             reply	other threads:[~2021-10-24  4:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-24  4:06 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-01-06  1:00 [gentoo-commits] repo/gentoo:master commit in: media-libs/lib3mf/, media-libs/lib3mf/files/ Sam James
2024-08-09 14:29 Sam James
2022-04-24  7:40 Joonas Niilola
2021-05-22 18:07 John Helmert III
2021-03-07  9:03 Joonas Niilola

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1635048366.c3f5d8e908b956a30e72a6b40f2c559d24a30b1e.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox