summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Mayo <aklhfex@gmail.com>2024-03-27 19:23:11 +0000
committerJoonas Niilola <juippis@gentoo.org>2024-05-09 15:56:57 +0300
commit196c412ef6fdeb61ddc752176248c82e4745a6bd (patch)
treeb312d6fc9fb2a857cdb073e52d3eb66032db8289
parentvirtual/dist-kernel: Stabilize 6.6.30 amd64 arm64 ppc64, #931278 (diff)
downloadgentoo-196c412ef6fdeb61ddc752176248c82e4745a6bd.tar.gz
gentoo-196c412ef6fdeb61ddc752176248c82e4745a6bd.tar.bz2
gentoo-196c412ef6fdeb61ddc752176248c82e4745a6bd.zip
media-gfx/opencsg: drop dependency on Qt 5
Signed-off-by: Chris Mayo <aklhfex@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/35935 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
-rw-r--r--media-gfx/opencsg/files/opencsg-1.6.0-cmake.patch61
-rw-r--r--media-gfx/opencsg/opencsg-1.6.0-r1.ebuild36
2 files changed, 97 insertions, 0 deletions
diff --git a/media-gfx/opencsg/files/opencsg-1.6.0-cmake.patch b/media-gfx/opencsg/files/opencsg-1.6.0-cmake.patch
new file mode 100644
index 000000000000..19866126da08
--- /dev/null
+++ b/media-gfx/opencsg/files/opencsg-1.6.0-cmake.patch
@@ -0,0 +1,61 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+new file mode 100644
+index 0000000..0ba23fe
+--- /dev/null
++++ b/CMakeLists.txt
+@@ -0,0 +1,12 @@
++cmake_minimum_required(VERSION 3.16)
++project(opencsg VERSION 1.6.0 LANGUAGES CXX)
++
++option(BUILD_EXAMPLE "Build example program" ON)
++option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
++
++include(GNUInstallDirs)
++
++add_subdirectory(src)
++if(BUILD_EXAMPLE)
++ add_subdirectory(example)
++endif()
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+new file mode 100644
+index 0000000..323a491
+--- /dev/null
++++ b/src/CMakeLists.txt
+@@ -0,0 +1,37 @@
++add_library(opencsg
++ area.cpp area.h
++ batch.cpp batch.h
++ channelManager.cpp channelManager.h
++ context.cpp context.h
++ frameBufferObject.cpp frameBufferObject.h
++ frameBufferObjectExt.cpp frameBufferObjectExt.h
++ glad/include/KHR/khrplatform.h
++ glad/include/glad/gl.h
++ glad/src/gl.cpp
++ occlusionQuery.cpp occlusionQuery.h
++ offscreenBuffer.h
++ opencsgConfig.h
++ opencsgRender.cpp opencsgRender.h
++ openglExt.h
++ openglHelper.cpp openglHelper.h
++ primitive.cpp
++ primitiveHelper.cpp primitiveHelper.h
++ renderGoldfeather.cpp
++ renderSCS.cpp
++ scissorMemo.cpp scissorMemo.h
++ settings.cpp settings.h
++)
++target_include_directories(opencsg PUBLIC
++ ${CMAKE_SOURCE_DIR}/include
++)
++
++set_target_properties(opencsg PROPERTIES
++ VERSION ${PROJECT_VERSION}
++ SOVERSION ${PROJECT_VERSION_MAJOR}
++ PUBLIC_HEADER ${CMAKE_SOURCE_DIR}/include/opencsg.h
++)
++
++install(TARGETS opencsg
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
++)
diff --git a/media-gfx/opencsg/opencsg-1.6.0-r1.ebuild b/media-gfx/opencsg/opencsg-1.6.0-r1.ebuild
new file mode 100644
index 000000000000..020597e9a1b0
--- /dev/null
+++ b/media-gfx/opencsg/opencsg-1.6.0-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+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 ~ppc64 ~riscv ~x86"
+IUSE="doc"
+RESTRICT="test"
+
+DOCS=( build.txt changelog.txt )
+
+PATCHES=( "${FILESDIR}"/${PN}-1.6.0-cmake.patch )
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_EXAMPLE=OFF
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+ use doc && local HTML_DOCS=( doc/. )
+ einstalldocs
+}