commit:     4c48b38e185de8672deed3aee4871355cc22b8fa
Author:     Chris Mayo <aklhfex <AT> gmail <DOT> com>
AuthorDate: Tue Sep 19 18:43:29 2023 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon Dec 11 13:30:27 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c48b38e

media-gfx/opencsg: add 1.6.0

Signed-off-by: Chris Mayo <aklhfex <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/32932
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 media-gfx/opencsg/Manifest                         |  1 +
 .../opencsg/files/opencsg-1.6.0-includepath.patch  | 24 +++++++++++
 media-gfx/opencsg/opencsg-1.6.0.ebuild             | 50 ++++++++++++++++++++++
 3 files changed, 75 insertions(+)

diff --git a/media-gfx/opencsg/Manifest b/media-gfx/opencsg/Manifest
index 1ed379730a40..59d87480dc81 100644
--- a/media-gfx/opencsg/Manifest
+++ b/media-gfx/opencsg/Manifest
@@ -1 +1,2 @@
 DIST OpenCSG-1.5.1.tar.gz 967182 BLAKE2B 
a24d7e736b58af78dfed218e7015c9a580c447b65367209fade0c90a36cf7bb638c4abe10cdf37a07c8f16d46389e92341ab72ea8d9c189e380502cbb2962d29
 SHA512 
aef3e785e730fd8f2ee06719d1c7a57c105e7432fb4dc6f4ad4305aabf1c7d4438ef869ae4eb840dc272b35f20c4ff296e6dd5418337230081e74ac4c91cd342
+DIST OpenCSG-1.6.0.tar.gz 302547 BLAKE2B 
ceb99fb6558b38df0eb629cfd5e5e2b768311f026f2f42e0e35ca948761bd7c67fcfc35322d54eb6c013eded39d95ede08f634b30241ebad4231bf783f76b591
 SHA512 
0cbf28353aafb47738a122bd5fa8e8ab0abc616d7b3f4e5f1ee02f550a060ccfbd6569d1183fcc4e992fe9bbb49584c23aa9cc7db2a7e7c53b119544aa9589a7

diff --git a/media-gfx/opencsg/files/opencsg-1.6.0-includepath.patch 
b/media-gfx/opencsg/files/opencsg-1.6.0-includepath.patch
new file mode 100644
index 000000000000..419a0f7478b3
--- /dev/null
+++ b/media-gfx/opencsg/files/opencsg-1.6.0-includepath.patch
@@ -0,0 +1,24 @@
+* Fix build with GCC 6
+* Don't hardcode libdir
+
+Gentoo-bug: 623840
+
+--- a/src/src.pro
++++ b/src/src.pro
+@@ -7,14 +7,13 @@
+ }
+ 
+ CONFIG += opengl warn_on release
+-INCLUDEPATH += ../include ../ $$INSTALLDIR/include
++INCLUDEPATH += ../include ..
+ CONFIG -= qt
+-LIBS += -L$$INSTALLDIR/lib
+ 
+ DESTDIR = ../lib
+ headers.files = ../include/opencsg.h
+ headers.path = $$INSTALLDIR/include
+-target.path = $$INSTALLDIR/lib
++target.path = $$INSTALLDIR/$$LIBDIR
+ INSTALLS += target headers
+ 
+ HEADERS               = ../include/opencsg.h \

diff --git a/media-gfx/opencsg/opencsg-1.6.0.ebuild 
b/media-gfx/opencsg/opencsg-1.6.0.ebuild
new file mode 100644
index 000000000000..cdcf6421d4a4
--- /dev/null
+++ b/media-gfx/opencsg/opencsg-1.6.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit qmake-utils
+
+MY_P="OpenCSG-${PV}"
+
+DESCRIPTION="The Constructive Solid Geometry rendering library"
+HOMEPAGE="https://www.opencsg.org";
+SRC_URI="https://www.opencsg.org/${MY_P}.tar.gz";
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-2+"
+SLOT="0/1.6"
+KEYWORDS="~amd64 ~arm64 ~riscv ~x86"
+IUSE="doc"
+RESTRICT="test"
+
+RDEPEND="
+       virtual/opengl
+"
+
+# qtgui is needed for opengles2 feature by
+# /usr/lib64/qt5/mkspecs/feature/unix/opengl.prf
+DEPEND="${RDEPEND}
+       dev-qt/qtcore:5
+       dev-qt/qtgui:5
+"
+
+DOCS=( build.txt changelog.txt )
+
+PATCHES=( "${FILESDIR}"/${PN}-1.6.0-includepath.patch )
+
+src_configure() {
+       eqmake5 opencsg.pro INSTALLDIR="${EPREFIX}/usr" LIBDIR="$(get_libdir)"
+}
+
+src_compile() {
+       # rebuild Makefiles in subdirs
+       emake INSTALLDIR="${EPREFIX}/usr" LIBDIR="$(get_libdir)" qmake_all
+       emake sub-src
+}
+
+src_install() {
+       emake -C src INSTALL_ROOT="${ED}" install
+       use doc && local HTML_DOCS=( doc/. )
+       einstalldocs
+}

Reply via email to