From 9dc6bba881bbee4c3a4e6dad085c63e76773ca00 Mon Sep 17 00:00:00 2001 From: layman Date: Sat, 2 Oct 2021 22:53:16 +0200 Subject: [PATCH] Updated openscad --- media-gfx/openscad/Manifest | 3 + ...nscad-9999-0001-fix-to-find-lib3mf-2.patch | 17 +++ media-gfx/openscad/metadata.xml | 38 +++++ media-gfx/openscad/openscad-9999.ebuild | 134 ++++++++++++++++++ 4 files changed, 192 insertions(+) create mode 100644 media-gfx/openscad/Manifest create mode 100644 media-gfx/openscad/files/openscad-9999-0001-fix-to-find-lib3mf-2.patch create mode 100644 media-gfx/openscad/metadata.xml create mode 100644 media-gfx/openscad/openscad-9999.ebuild diff --git a/media-gfx/openscad/Manifest b/media-gfx/openscad/Manifest new file mode 100644 index 0000000..cc5fc1c --- /dev/null +++ b/media-gfx/openscad/Manifest @@ -0,0 +1,3 @@ +AUX openscad-9999-0001-fix-to-find-lib3mf-2.patch 766 BLAKE2B b28f21821b0bb55ea3743a0510a908eda2a9c0dbba3d4272deb843b86c91f2114a2a3e1e2ac87c4bcfd0631a9c856d41067f166674d42611b8652cd01b4a65d6 SHA512 3abfb61161699a4251fd606de0e1a04ff6160af95c9060861ac73e360343812f3350ad7aa59e17b8ed05ab6b960a6855eb6235bb44bdb3c6a30c0f45ac902a13 +EBUILD openscad-9999.ebuild 2637 BLAKE2B cb11bb884071eda0a6ab6106562bc5b5f8f5fe497cf6aa8f0bae6b78ebdee4c0f1ead216f8bdb0b6808f937cac7a4eedc0af3db427e44d9200d06570494416aa SHA512 4e03ffe8b4bc5e6a7ca57e3f373494852fceb62397bbb5bbdf3ad7aea8feda08345ec2f2b3735e730952da5e15d660035b006b82d5dda22f50aad8d88f14f31e +MISC metadata.xml 1348 BLAKE2B b15a74a20ef94a6a47de57826c5279a4e8c388a52bf9d1058a1ba0b347fcd77e0c8b79a42515f5411d0991fb8fb71c604f792dd2a2addaaca78bc85dbfc7a611 SHA512 fea109a00324f0bdcaae855e18fba456a449bb8192e633cfd5806fa1040fe3bba24f75493e0012d54afe8828073fc4d02ae01533b45648e05c575777b23572d1 diff --git a/media-gfx/openscad/files/openscad-9999-0001-fix-to-find-lib3mf-2.patch b/media-gfx/openscad/files/openscad-9999-0001-fix-to-find-lib3mf-2.patch new file mode 100644 index 0000000..46d4237 --- /dev/null +++ b/media-gfx/openscad/files/openscad-9999-0001-fix-to-find-lib3mf-2.patch @@ -0,0 +1,17 @@ +diff -urN openscad-9999.orig/cmake/Modules/FindLib3MF.cmake openscad-9999/cmake/Modules/FindLib3MF.cmake +--- openscad-9999.orig/cmake/Modules/FindLib3MF.cmake 2021-09-29 09:08:23.870290708 +0200 ++++ openscad-9999/cmake/Modules/FindLib3MF.cmake 2021-09-29 09:20:36.077846758 +0200 +@@ -14,11 +14,11 @@ + # Travis CI Ubuntu Trusty environment has some issue with pkg-config + # not finding the version. + find_package(PkgConfig REQUIRED QUIET) +-pkg_check_modules(PC_LIB3MF lib3MF) ++pkg_check_modules(PC_LIB3MF lib3mf) + set(LIB3MF_VERSION ${PC_LIB3MF_VERSION}) + + find_path(LIB3MF_INCLUDE_DIRS +- NAMES Model/COM/NMR_DLLInterfaces.h ++ NAMES lib3mf_implicit.hpp + HINTS $ENV{LIB3MF_INCLUDEDIR} + ${PC_LIB3MF_INCLUDEDIR} + ${PC_LIB3MF_INCLUDE_DIRS} diff --git a/media-gfx/openscad/metadata.xml b/media-gfx/openscad/metadata.xml new file mode 100644 index 0000000..817a36f --- /dev/null +++ b/media-gfx/openscad/metadata.xml @@ -0,0 +1,38 @@ + + + + + waebbl-gentoo@posteo.net + Bernd Waibel + + + proxy-maint@gentoo.org + Proxy Maintainers + + + OpenSCAD is a software for creating solid 3D CAD objects. Unlike + most free software for creating 3D models (such as the famous + application Blender) it does not focus on the artistic aspects of 3D + modelling but instead on the CAD aspects. Thus it might be the + application you are looking for when you are planning to create 3D + models of machine parts but pretty sure is not what you are looking + for when you are more interested in creating computer-animated movies. + OpenSCAD is free software and available for Linux/UNIX, MS Windows and + Mac OS X. + + + + Add support for gamepads through dev-qt/qtgamepad + + + Build a binary without GUI + + + Add support for space navigator devices through + dev-libs/libspnav + + + + openscad/openscad + + diff --git a/media-gfx/openscad/openscad-9999.ebuild b/media-gfx/openscad/openscad-9999.ebuild new file mode 100644 index 0000000..c4a9b06 --- /dev/null +++ b/media-gfx/openscad/openscad-9999.ebuild @@ -0,0 +1,134 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake elisp-common git-r3 xdg + +SITEFILE="50${PN}-gentoo.el" + +DESCRIPTION="The Programmers Solid 3D CAD Modeller" +HOMEPAGE="https://www.openscad.org/" +SRC_URI="" +EGIT_REPO_URI="https://github.com/openscad/openscad.git" + +# Code is GPL-3+, MCAD library is LGPL-2.1 +LICENSE="GPL-3+ LGPL-2.1" +SLOT="0" +KEYWORDS="" +IUSE="cairo dbus emacs gamepad headless spacenav" +RESTRICT="test" # 32 out 1300+ tests fail + +REQUIRED_USE=" + headless? ( !dbus !gamepad !spacenav ) +" + +RDEPEND=" + dev-cpp/eigen:3 + dev-libs/boost:= + dev-libs/double-conversion:= + dev-libs/glib:2 + dev-libs/libxml2 + dev-libs/libzip:= + media-gfx/opencsg + media-libs/fontconfig + media-libs/freetype + media-libs/glew:0= + media-libs/harfbuzz:= + media-libs/lib3mf + sci-mathematics/cgal:= + virtual/opengl + cairo? ( x11-libs/cairo ) + emacs? ( app-editors/emacs:* ) + !headless? ( + dev-qt/qtconcurrent:5 + dev-qt/qtcore:5 + dev-qt/qtgui:5[-gles2-only] + dev-qt/qtmultimedia:5 + dev-qt/qtnetwork:5 + dev-qt/qtopengl:5 + dev-qt/qtwidgets:5 + x11-libs/qscintilla:= + dbus? ( dev-qt/qtdbus:5 ) + gamepad? ( dev-qt/qtgamepad:5 ) + ) + spacenav? ( dev-libs/libspnav ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-util/itstool + sys-devel/bison + sys-devel/flex + sys-devel/gettext + virtual/pkgconfig +" + +DOCS=( + RELEASE_NOTES.md + doc/TODO.txt + doc/contributor_copyright.txt + doc/hacking.md + doc/testing.txt +) + +src_prepare() { + if has_version ">=media-libs/lib3mf-2"; then + eapply "${FILESDIR}/${P}-0001-fix-to-find-lib3mf-2.patch" + fi + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DCLANG_TIDY=OFF + -DENABLE_CAIRO=$(usex cairo) + -DENABLE_SPNAV=$(usex spacenav) + -DENABLE_TESTS=OFF + -DHEADLESS=$(usex headless) + -DUSE_CCACHE=OFF + ) + + if use !headless; then + mycmakeargs+=( + -DENABLE_GAMEPAD=$(usex gamepad) + -DENABLE_QTDBUS=$(usex dbus) + ) + fi + + cmake_src_configure +} + +src_compile() { + cmake_src_compile + + if use emacs ; then + elisp-compile contrib/*.el + fi +} + +src_install() { + DOCS+=( doc/*.pdf ) + cmake_src_install + + mv -i "${ED}"/usr/share/openscad/locale "${ED}"/usr/share || die "failed to move locales" + ln -sf ../locale "${ED}"/usr/share/openscad/locale || die + + if use emacs; then + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + elisp-install ${PN} contrib/*.el contrib/*.elc + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen + xdg_desktop_database_update + xdg_icon_cache_update + xdg_mimeinfo_database_update +} + +pkg_postrm() { + use emacs && elisp-site-regen + xdg_desktop_database_update + xdg_icon_cache_update + xdg_mimeinfo_database_update +}