public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Matthew Smith" <matthew@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/solvespace/files/, media-gfx/solvespace/
Date: Thu,  9 Jun 2022 19:33:00 +0000 (UTC)	[thread overview]
Message-ID: <1654803166.42c7e4fdba892a459a42e6bce12afadcfd052bcb.matthew@gentoo> (raw)

commit:     42c7e4fdba892a459a42e6bce12afadcfd052bcb
Author:     Matthew Smith <matthew <AT> gentoo <DOT> org>
AuthorDate: Thu Jun  9 19:21:31 2022 +0000
Commit:     Matthew Smith <matthew <AT> gentoo <DOT> org>
CommitDate: Thu Jun  9 19:32:46 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42c7e4fd

media-gfx/solvespace: add 3.1

Signed-off-by: Matthew Smith <matthew <AT> gentoo.org>

 media-gfx/solvespace/Manifest                      |  1 +
 .../files/solvespace-3.1-use-system-mimalloc.patch | 41 +++++++++++
 media-gfx/solvespace/solvespace-3.1.ebuild         | 79 ++++++++++++++++++++++
 3 files changed, 121 insertions(+)

diff --git a/media-gfx/solvespace/Manifest b/media-gfx/solvespace/Manifest
index 445aa5c0bdbc..881e7a36fd2c 100644
--- a/media-gfx/solvespace/Manifest
+++ b/media-gfx/solvespace/Manifest
@@ -1,2 +1,3 @@
 DIST libdxfrw-0.6.3-0b7b7b709d9299565db603f878214656ef5e9ddf.tar.gz 691804 BLAKE2B 84c90a591fac71144e9e13aace7c1a00dfc1bd6f27b0bcde6b60541f5b5d3ccc04ae1c759f60cb467445cc884840d04bf4613b5cc553fbbf6951cac33a084d50 SHA512 9ab498aa7f369be79d800e8ca5ec55fa54be79d0778937b81d4c8da776b3419cb8a75400b54b205efc338da32e2e781afd0bed1bd8efed1a0b212dc8682a2615
 DIST solvespace-3.0.tar.gz 2734860 BLAKE2B 2efc9d98723c60abdb1c76ac086c40ff2f9b8bc9c315978731493d115fa55a080176ef48d930e3b503c0de0604dbfd2bc3bd99a581f359eb07a23034d09f84bf SHA512 b07b41fac1d67c5350082600a2f09e3fa611a1273e0c93ff93d11a7a1dbf550ff33465686eaff04fdb8350d1fe854ab0301d8723ef31cc65c687ba59cb89187f
+DIST solvespace-3.1.tar.gz 2764243 BLAKE2B 764637f84a187c6a86cf65cd672466f48e1e5abd9d335945fc47f2ea48f7d22a94f6840a6019f2380e8416e903bb55f97d9adb18fa6f2e7a94933c2a5b51ef6c SHA512 76794c4b103036f423471c72209521c273b40edcf9a725d2407e757b8dded033863f58640f1bcdf19d7dd1b296334f8745a632875e06604fa4d5b261dd23ba98

diff --git a/media-gfx/solvespace/files/solvespace-3.1-use-system-mimalloc.patch b/media-gfx/solvespace/files/solvespace-3.1-use-system-mimalloc.patch
new file mode 100644
index 000000000000..118a920c741d
--- /dev/null
+++ b/media-gfx/solvespace/files/solvespace-3.1-use-system-mimalloc.patch
@@ -0,0 +1,41 @@
+From a793c7d67fc886b1eb66ab67551f3a2448e4adc0 Mon Sep 17 00:00:00 2001
+From: Matthew Smith <matthew@gentoo.org>
+Date: Thu, 9 Jun 2022 20:19:19 +0100
+Subject: [PATCH] build: Use system mimalloc
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -185,13 +185,7 @@ endif()
+ message(STATUS "Using in-tree libdxfrw")
+ add_subdirectory(extlib/libdxfrw)
+ 
+-message(STATUS "Using in-tree mimalloc")
+-set(MI_OVERRIDE OFF CACHE BOOL "")
+-set(MI_BUILD_SHARED OFF CACHE BOOL "")
+-set(MI_BUILD_OBJECT OFF CACHE BOOL "")
+-set(MI_BUILD_TESTS OFF CACHE BOOL "")
+-add_subdirectory(extlib/mimalloc EXCLUDE_FROM_ALL)
+-set(MIMALLOC_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/extlib/mimalloc/include)
++find_package(mimalloc REQUIRED)
+ 
+ if(NOT FORCE_VENDORED_Eigen3)
+     find_package(Eigen3 CONFIG)
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -27,7 +27,6 @@ target_include_directories(slvs_deps INTERFACE SYSTEM
+     ${PNG_PNG_INCLUDE_DIR}
+     ${FREETYPE_INCLUDE_DIRS}
+     ${CAIRO_INCLUDE_DIRS}
+-    ${MIMALLOC_INCLUDE_DIR}
+     ${EIGEN3_INCLUDE_DIRS})
+ target_link_libraries(slvs_deps INTERFACE
+     dxfrw
+@@ -35,7 +34,7 @@ target_link_libraries(slvs_deps INTERFACE
+     ${PNG_LIBRARY}
+     ${FREETYPE_LIBRARY}
+     ${CAIRO_LIBRARIES}
+-    mimalloc-static)
++    mimalloc)
+ 
+ if(Backtrace_FOUND)
+     target_include_directories(slvs_deps INTERFACE SYSTEM

diff --git a/media-gfx/solvespace/solvespace-3.1.ebuild b/media-gfx/solvespace/solvespace-3.1.ebuild
new file mode 100644
index 000000000000..347d89fe867d
--- /dev/null
+++ b/media-gfx/solvespace/solvespace-3.1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# solvespace's libdxfrw is quite heavily modified and incompatible with
+# the upstream libdxfrw.
+DXFRW_COMMIT="0b7b7b709d9299565db603f878214656ef5e9ddf"
+DXFRW_PV="0.6.3"
+DXFRW_P="libdxfrw-${DXFRW_PV}-${DXFRW_COMMIT}"
+
+inherit cmake toolchain-funcs xdg
+
+DESCRIPTION="Parametric 2d/3d CAD"
+HOMEPAGE="http://solvespace.com"
+SRC_URI="https://github.com/solvespace/solvespace/archive/v${PV}.tar.gz -> ${P}.tar.gz
+	https://github.com/solvespace/libdxfrw/archive/${DXFRW_COMMIT}.tar.gz -> ${DXFRW_P}.tar.gz"
+
+# licenses
+# + SolveSpace (GPL-3+)
+# |- Bitstream Vera (BitstreamVera)
+# + libdxfrw (GPL-2+)
+
+IUSE="openmp"
+KEYWORDS="~amd64 ~x86"
+LICENSE="BitstreamVera GPL-2+ GPL-3+"
+SLOT="0"
+
+RDEPEND="
+	dev-cpp/atkmm:0
+	dev-cpp/glibmm:2
+	dev-cpp/gtkmm:3.0[X]
+	dev-cpp/pangomm:1.4
+	dev-libs/glib:2
+	dev-libs/json-c:=
+	dev-libs/libsigc++:2
+	dev-libs/libspnav[X]
+	dev-libs/mimalloc:=
+	media-libs/fontconfig
+	media-libs/freetype:2[X]
+	media-libs/libpng:0=
+	sys-libs/zlib
+	virtual/opengl
+	x11-libs/cairo[X]
+	x11-libs/gtk+:3[X]
+"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}"/${PN}-3.1-use-system-mimalloc.patch )
+
+# This is shown to the user in the UI and --version.
+MY_HASH="0e0b0252e23dd5bd4ae82ababcc54c44aee036d6"
+
+pkg_pretend() {
+	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_prepare() {
+	rm -r extlib/libdxfrw || die
+	mv "${WORKDIR}"/libdxfrw-${DXFRW_COMMIT} extlib/libdxfrw || die
+
+	sed -i '/include(GetGitCommitHash)/d' CMakeLists.txt || die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DENABLE_OPENMP=$(usex openmp)
+		-DGIT_COMMIT_HASH=${MY_HASH}
+	)
+
+	cmake_src_configure
+}


             reply	other threads:[~2022-06-09 19:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-09 19:33 Matthew Smith [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-02-28 21:12 [gentoo-commits] repo/gentoo:master commit in: media-gfx/solvespace/files/, media-gfx/solvespace/ Andreas Sturmlechner
2021-06-07 16:04 Sam James

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=1654803166.42c7e4fdba892a459a42e6bce12afadcfd052bcb.matthew@gentoo \
    --to=matthew@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