public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Joonas Niilola" <juippis@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/openscad/, media-gfx/openscad/files/
Date: Fri, 12 Jun 2020 07:00:45 +0000 (UTC)	[thread overview]
Message-ID: <1591945185.8dfc7b2d0c0cc3d01d08ec9dc7885be394334a50.juippis@gentoo> (raw)

commit:     8dfc7b2d0c0cc3d01d08ec9dc7885be394334a50
Author:     Bernd Waibel <waebbl <AT> gmail <DOT> com>
AuthorDate: Sun Apr 19 18:44:54 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Jun 12 06:59:45 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8dfc7b2d

media-gfx/openscad: Fix build with boost-1.73.0

Thanks to William T Wilson for reporting and providing patch.

Additionally OpenSCAD has an optional, but automagic dependency on
media-libs/lib3mf.

Add ccache USE flag, as it's automagically enabled whenever the ccache
binary is found in PATH.

Reported-by: William T Wilson <fluffysheap <AT> gmail.com>
Closes: https://bugs.gentoo.org/722302
Package-Manager: Portage-2.3.99-r2, Repoman-2.3.22
Signed-off-by: Bernd Waibel <waebbl <AT> gmail.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 ...ad-2019.05-0001-Fix-build-with-boost-1.73.patch |  28 ++++++
 ...2-Gentoo-specific-Disable-ccache-building.patch |  35 +++++++
 media-gfx/openscad/metadata.xml                    |   5 +
 media-gfx/openscad/openscad-2019.05-r3.ebuild      | 108 +++++++++++++++++++++
 4 files changed, 176 insertions(+)

diff --git a/media-gfx/openscad/files/openscad-2019.05-0001-Fix-build-with-boost-1.73.patch b/media-gfx/openscad/files/openscad-2019.05-0001-Fix-build-with-boost-1.73.patch
new file mode 100644
index 00000000000..74f48b4c1ae
--- /dev/null
+++ b/media-gfx/openscad/files/openscad-2019.05-0001-Fix-build-with-boost-1.73.patch
@@ -0,0 +1,28 @@
+From 47275a3d92969709e7605f23a408c5ed5aa483c9 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl@gmail.com>
+Date: Fri, 15 May 2020 19:09:10 +0200
+Subject: [PATCH] Fix build with boost-1.73
+
+Thanks to William T Wilson for reporting and providing the patch.
+
+Signed-off-by: Bernd Waibel <waebbl@gmail.com>
+---
+ src/import.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/import.cc b/src/import.cc
+index eef1323..08e46ff 100644
+--- a/src/import.cc
++++ b/src/import.cc
+@@ -50,7 +50,7 @@ namespace fs = boost::filesystem;
+ #include <boost/assign/std/vector.hpp>
+ using namespace boost::assign; // bring 'operator+=()' into scope
+ 
+-#include <boost/detail/endian.hpp>
++#include <boost/endian/arithmetic.hpp>
+ #include <cstdint>
+ 
+ extern PolySet * import_amf(std::string, const Location &loc);
+-- 
+2.26.2
+

diff --git a/media-gfx/openscad/files/openscad-2019.05-0002-Gentoo-specific-Disable-ccache-building.patch b/media-gfx/openscad/files/openscad-2019.05-0002-Gentoo-specific-Disable-ccache-building.patch
new file mode 100644
index 00000000000..1a4903828e8
--- /dev/null
+++ b/media-gfx/openscad/files/openscad-2019.05-0002-Gentoo-specific-Disable-ccache-building.patch
@@ -0,0 +1,35 @@
+From 2940d8e5c74faa5dcd5279c8166064ade3da5695 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl@gmail.com>
+Date: Sun, 17 May 2020 21:13:44 +0200
+Subject: [PATCH] [Gentoo-specific] Disable ccache building
+
+On Gentoo we use a USE flag to determine whether to use
+ccache for building or not.
+
+Signed-off-by: Bernd Waibel <waebbl@gmail.com>
+---
+ openscad.pro | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/openscad.pro b/openscad.pro
+index 2d190dd..9c4e67b 100755
+--- a/openscad.pro
++++ b/openscad.pro
+@@ -214,10 +214,10 @@ mdi {
+   DEFINES += ENABLE_MDI
+ }
+ 
+-system("ccache -V >/dev/null 2>/dev/null") {
+-  CONFIG += ccache
+-  message("Using ccache")
+-}
++#system("ccache -V >/dev/null 2>/dev/null") {
++#  CONFIG += ccache
++#  message("Using ccache")
++#}
+ 
+ include(common.pri)
+ 
+-- 
+2.26.2
+

diff --git a/media-gfx/openscad/metadata.xml b/media-gfx/openscad/metadata.xml
index 7b83ba14800..5ed7ed33c62 100644
--- a/media-gfx/openscad/metadata.xml
+++ b/media-gfx/openscad/metadata.xml
@@ -20,6 +20,11 @@
 	OpenSCAD is free software and available for Linux/UNIX, MS Windows and
 	Mac OS X.
 </longdescription>
+<use>
+	<flag name="ccache">
+		Use <pkg>dev-util/ccache</pkg> to speed up rebuilds
+	</flag>
+</use>
 <upstream>
 	<remote-id type="github">openscad/openscad</remote-id>
 </upstream>

diff --git a/media-gfx/openscad/openscad-2019.05-r3.ebuild b/media-gfx/openscad/openscad-2019.05-r3.ebuild
new file mode 100644
index 00000000000..73d70652513
--- /dev/null
+++ b/media-gfx/openscad/openscad-2019.05-r3.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2020 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 ~x86"
+IUSE="ccache emacs"
+RESTRICT="test"
+
+PATCHES=(
+	"${FILESDIR}/${P}_fix-boost-1.72.0-build.patch"
+	"${FILESDIR}/${P}-0001-Fix-build-with-boost-1.73.patch"
+)
+
+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/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/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
+	ccache? ( dev-util/ccache )
+"
+
+src_prepare() {
+	default
+
+	# fix path prefix
+	sed -i "s/\/usr\/local/\/usr/g" ${PN}.pro || die
+
+	# disable ccache
+	if ! use ccache; then
+		eapply "${FILESDIR}/${P}-0002-Gentoo-specific-Disable-ccache-building.patch"
+	fi
+}
+
+src_configure() {
+	eqmake5 "${PN}.pro"
+}
+
+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
+
+	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
+}


             reply	other threads:[~2020-06-12  7:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-12  7:00 Joonas Niilola [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-01-14 16:20 [gentoo-commits] repo/gentoo:master commit in: media-gfx/openscad/, media-gfx/openscad/files/ Andreas Sturmlechner
2022-07-03 11:51 Joonas Niilola
2022-04-15  6:18 Joonas Niilola
2021-05-04 22:02 Sam James
2021-03-07  9:03 Joonas Niilola
2020-12-07  8:56 Joonas Niilola
2020-06-12  7:00 Joonas Niilola
2019-05-15 18:29 Andreas Sturmlechner
2017-10-21 21:24 Andreas Sturmlechner
2017-05-14 12:49 Michael Weber

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=1591945185.8dfc7b2d0c0cc3d01d08ec9dc7885be394334a50.juippis@gentoo \
    --to=juippis@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