summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernd Waibel <waebbl-gentoo@posteo.net>2021-03-06 23:59:37 +0100
committerJoonas Niilola <juippis@gentoo.org>2021-03-07 11:03:07 +0200
commit764dd0f081d723d9593097055614cff5fb2b265a (patch)
treed978cd40c84a2918fb57b3ce8ba9cc0e03f13f4f
parentmedia-gfx/openscad: adapt to work with lib3mf-2 (diff)
downloadgentoo-764dd0f081d723d9593097055614cff5fb2b265a.tar.gz
gentoo-764dd0f081d723d9593097055614cff5fb2b265a.tar.bz2
gentoo-764dd0f081d723d9593097055614cff5fb2b265a.zip
media-gfx/openscad: bump to 2021.01
Bug: https://bugs.gentoo.org/773217 Closes: https://bugs.gentoo.org/769278 Package-Manager: Portage-3.0.16, Repoman-3.0.2 Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net> Closes: https://github.com/gentoo/gentoo/pull/19412 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
-rw-r--r--media-gfx/openscad/Manifest1
-rw-r--r--media-gfx/openscad/files/openscad-2021.01-0001-Gentoo-specific-Disable-ccache-building.patch32
-rw-r--r--media-gfx/openscad/files/openscad-2021.01-0002-fix-to-find-lib3mf-2.patch43
-rw-r--r--media-gfx/openscad/openscad-2021.01.ebuild110
4 files changed, 186 insertions, 0 deletions
diff --git a/media-gfx/openscad/Manifest b/media-gfx/openscad/Manifest
index fd29bf8f45b..31cd206a20c 100644
--- a/media-gfx/openscad/Manifest
+++ b/media-gfx/openscad/Manifest
@@ -1 +1,2 @@
DIST openscad-2019.05.tar.gz 14604881 BLAKE2B ed7d6088606fab44284363da73643e556f07c0f0a7a223bdf718dcc36a82158bf23e315724ea520d63a3f1331207df0ea7b0ade817f01dd39b67ca6f36529d56 SHA512 073053f625ffa4fea6ed836396b7ff4b87b26cf7500b06c804983afc0f1dfd3d78bfb81b3fd217c3939b0ec915d85b0c7990773eaf968512a150deaa0399df13
+DIST openscad-2021.01.tar.gz 15817555 BLAKE2B 417857d704fa3c14312641ebda983eb85a1e3bc0d517a235fa3bd2523fce6f93c1ea526c330179bc35f03e6c73d3cd7c4c57cd71480088c21bfc99bb020ab7cd SHA512 8deaa26bf4c295c12da38f323d2b2e6f827851337f5bc1cc9c79afc083c9f913c19a263086e6e853bf2c8434c1ccc705ea22ddb02dc99d39bb1e5e03fc58d128
diff --git a/media-gfx/openscad/files/openscad-2021.01-0001-Gentoo-specific-Disable-ccache-building.patch b/media-gfx/openscad/files/openscad-2021.01-0001-Gentoo-specific-Disable-ccache-building.patch
new file mode 100644
index 00000000000..6de581078d2
--- /dev/null
+++ b/media-gfx/openscad/files/openscad-2021.01-0001-Gentoo-specific-Disable-ccache-building.patch
@@ -0,0 +1,32 @@
+From c138881767262b9f5c64a465a0e1e46ffcfc5899 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Sun, 28 Feb 2021 16:51:30 +0100
+Subject: [PATCH] [Gentoo specific] Disable ccache building
+
+On Gentoo, we use a USE flag to determine whether ccache
+should be used for building.
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+---
+ openscad.pro | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/openscad.pro b/openscad.pro
+index b76ca76..678e08d 100755
+--- a/openscad.pro
++++ b/openscad.pro
+@@ -211,11 +211,6 @@ mdi {
+ DEFINES += ENABLE_MDI
+ }
+
+-system("ccache -V >/dev/null 2>/dev/null") {
+- CONFIG += ccache
+- message("Using ccache")
+-}
+-
+ include(common.pri)
+
+ # mingw has to come after other items so OBJECT_DIRS will work properly
+--
+2.30.1
+
diff --git a/media-gfx/openscad/files/openscad-2021.01-0002-fix-to-find-lib3mf-2.patch b/media-gfx/openscad/files/openscad-2021.01-0002-fix-to-find-lib3mf-2.patch
new file mode 100644
index 00000000000..1995bd6e0ac
--- /dev/null
+++ b/media-gfx/openscad/files/openscad-2021.01-0002-fix-to-find-lib3mf-2.patch
@@ -0,0 +1,43 @@
+From 16847a70cf05484a668d8f79aba4ccec7e16c025 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Sat, 6 Mar 2021 22:59:17 +0100
+Subject: [PATCH] fix to find lib3mf-2
+
+The pkgconfig file for lib3mf has been renamed in case
+for lib3mf-2 versions.
+This patch uses the news names.
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+---
+ features/lib3mf.prf | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/features/lib3mf.prf b/features/lib3mf.prf
+index 2c512da..47be364 100644
+--- a/features/lib3mf.prf
++++ b/features/lib3mf.prf
+@@ -15,8 +15,8 @@ isEmpty(LIB3MF_LIBPATH) {
+ }
+
+ isEmpty(LIB3MF_INCLUDEPATH) {
+- LIB3MF_CFLAGS = $$system("$$PKG_CONFIG --cflags lib3MF")
+- LIB3MF_INCLUDEPATH = $$system("$$PKG_CONFIG --variable=includedir lib3MF")
++ LIB3MF_CFLAGS = $$system("$$PKG_CONFIG --cflags lib3mf")
++ LIB3MF_INCLUDEPATH = $$system("$$PKG_CONFIG --variable=includedir lib3mf")
+ !isEmpty(LIB3MF_CFLAGS) {
+ ENABLE_LIB3MF=yes
+ }
+@@ -25,8 +25,8 @@ isEmpty(LIB3MF_INCLUDEPATH) {
+ }
+
+ isEmpty(LIB3MF_LIBPATH) {
+- LIB3MF_LIBS = $$system("$$PKG_CONFIG --libs lib3MF")
+- LIB3MF_LIBPATH = $$system("$$PKG_CONFIG --variable=libdir lib3MF")
++ LIB3MF_LIBS = $$system("$$PKG_CONFIG --libs lib3mf")
++ LIB3MF_LIBPATH = $$system("$$PKG_CONFIG --variable=libdir lib3mf")
+ !isEmpty(LIB3MF_LIBS) {
+ ENABLE_LIB3MF=yes
+ }
+--
+2.30.1
+
diff --git a/media-gfx/openscad/openscad-2021.01.ebuild b/media-gfx/openscad/openscad-2021.01.ebuild
new file mode 100644
index 00000000000..5a5a5f2805d
--- /dev/null
+++ b/media-gfx/openscad/openscad-2021.01.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit elisp-common qmake-utils xdg
+
+SITEFILE="50${PN}-gentoo.el"
+
+DESCRIPTION="The Programmers Solid 3D CAD Modeller"
+HOMEPAGE="https://www.openscad.org/"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.src.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="emacs"
+# tests are not fully working and need cmake which isn't yet
+# officially supported.
+RESTRICT="test"
+
+RDEPEND="
+ dev-cpp/eigen:3
+ dev-libs/boost:=
+ dev-libs/double-conversion:=
+ dev-libs/glib:2
+ dev-libs/gmp:0=
+ dev-libs/hidapi
+ dev-libs/libspnav
+ dev-libs/libxml2
+ dev-libs/libzip:=
+ dev-libs/mpfr:0=
+ dev-qt/qtconcurrent:5
+ dev-qt/qtcore:5
+ dev-qt/qtdbus:5
+ dev-qt/qtgui:5[-gles2-only]
+ dev-qt/qtmultimedia:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtopengl:5
+ dev-qt/qtwidgets:5
+ media-gfx/opencsg
+ media-libs/fontconfig
+ media-libs/freetype
+ >=media-libs/glew-2.0.0:0=
+ media-libs/harfbuzz:=
+ media-libs/lib3mf
+ sci-mathematics/cgal:=
+ x11-libs/cairo
+ >=x11-libs/qscintilla-2.10.3:=
+ emacs? ( >=app-editors/emacs-23.1:* )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ dev-util/itstool
+ sys-devel/bison
+ sys-devel/flex
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+
+PATCHES=( "${FILESDIR}"/${P}-0001-Gentoo-specific-Disable-ccache-building.patch )
+
+src_prepare() {
+ default
+ if has_version ">=media-libs/lib3mf-2"; then
+ eapply "${FILESDIR}/${P}-0002-fix-to-find-lib3mf-2.patch"
+ fi
+}
+
+src_configure() {
+ if has ccache ${FEATURES}; then
+ eqmake5 "PREFIX = ${EROOT}/usr" "CONFIG += ccache" "${PN}.pro"
+ else
+ eqmake5 "PREFIX = ${EROOT}/usr" "${PN}.pro"
+ fi
+}
+
+src_compile() {
+ default
+
+ if use emacs ; then
+ elisp-compile contrib/*.el
+ fi
+}
+
+src_install() {
+ emake install INSTALL_ROOT="${D}"
+
+ if use emacs; then
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ elisp-install ${PN} contrib/*.el contrib/*.elc
+ fi
+
+ mv -i "${ED}"/usr/share/openscad/locale "${ED}"/usr/share || die "failed to move locales"
+ ln -sf ../locale "${ED}"/usr/share/openscad/locale || die
+
+ einstalldocs
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+ xdg_desktop_database_update
+ xdg_mimeinfo_database_update
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+ xdg_desktop_database_update
+ xdg_mimeinfo_database_update
+}