From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8D60C158089 for ; Wed, 20 Sep 2023 17:39:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CD9E92BC015; Wed, 20 Sep 2023 17:39:30 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B303D2BC015 for ; Wed, 20 Sep 2023 17:39:30 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E31EE335C9F for ; Wed, 20 Sep 2023 17:39:29 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 78A6E121F for ; Wed, 20 Sep 2023 17:39:28 +0000 (UTC) From: "Alessandro Barbieri" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alessandro Barbieri" Message-ID: <1695231566.3e12b65f0dc89e9f147f1055a0157c729ebf0fe8.Alessandro-Barbieri@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: media-libs/imgui/files/, media-libs/imgui/ X-VCS-Repository: repo/proj/guru X-VCS-Files: media-libs/imgui/files/cimgui-1.87-CMakeLists.txt media-libs/imgui/imgui-1.87-r7.ebuild X-VCS-Directories: media-libs/imgui/ media-libs/imgui/files/ X-VCS-Committer: Alessandro-Barbieri X-VCS-Committer-Name: Alessandro Barbieri X-VCS-Revision: 3e12b65f0dc89e9f147f1055a0157c729ebf0fe8 X-VCS-Branch: dev Date: Wed, 20 Sep 2023 17:39:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 02031a05-9bc6-4efb-80ef-f3e2cbab42a2 X-Archives-Hash: 28fa0686737457adf305f82182913bfc commit: 3e12b65f0dc89e9f147f1055a0157c729ebf0fe8 Author: Alessandro Barbieri gmail com> AuthorDate: Wed Sep 20 17:38:19 2023 +0000 Commit: Alessandro Barbieri gmail com> CommitDate: Wed Sep 20 17:39:26 2023 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3e12b65f media-libs/imgui: install all the generated cimgui files Signed-off-by: Alessandro Barbieri gmail.com> media-libs/imgui/files/cimgui-1.87-CMakeLists.txt | 26 +++-- media-libs/imgui/imgui-1.87-r7.ebuild | 113 ++++++++++++++++++++++ 2 files changed, 133 insertions(+), 6 deletions(-) diff --git a/media-libs/imgui/files/cimgui-1.87-CMakeLists.txt b/media-libs/imgui/files/cimgui-1.87-CMakeLists.txt index 713125ec6b..a1c735bcab 100644 --- a/media-libs/imgui/files/cimgui-1.87-CMakeLists.txt +++ b/media-libs/imgui/files/cimgui-1.87-CMakeLists.txt @@ -43,13 +43,22 @@ if(IMGUI_VULKAN) list(APPEND GENERATOR_ARGS vulkan) endif() list(APPEND GENERATOR_ARGS ${IMGUI_COMMON_FLAGS} ${CMAKE_CPP_FLAGS}) -file(GLOB GENERATOR_OUTPUT_FILES "${CMAKE_SOURCE_DIR}/generator/output/*") -list(APPEND - GENERATOR_OUTPUT_FILES +set(CIMGUI_EXTRA_STUFF + ${CMAKE_SOURCE_DIR}/generator/output/definitions.json + ${CMAKE_SOURCE_DIR}/generator/output/definitions.lua + ${CMAKE_SOURCE_DIR}/generator/output/impl_definitions.json + ${CMAKE_SOURCE_DIR}/generator/output/impl_definitions.lua + ${CMAKE_SOURCE_DIR}/generator/output/overloads.txt + ${CMAKE_SOURCE_DIR}/generator/output/structs_and_enums.json + ${CMAKE_SOURCE_DIR}/generator/output/structs_and_enums.lua + ${CMAKE_SOURCE_DIR}/generator/output/typedefs_dict.json + ${CMAKE_SOURCE_DIR}/generator/output/typedefs_dict.lua +) +set(GENERATOR_OUTPUT_FILES ${CMAKE_SOURCE_DIR}/cimgui.cpp ${CMAKE_SOURCE_DIR}/cimgui.h - ${CMAKE_SOURCE_DIR}/generator/output/cimgui_nopreprocess.cpp - ${CMAKE_SOURCE_DIR}/generator/output/cimgui_nopreprocess.h + ${CMAKE_SOURCE_DIR}/generator/output/cimgui_impl.h + ${CIMGUI_EXTRA_STUFF} ) ADD_CUSTOM_COMMAND(VERBATIM OUTPUT ${GENERATOR_OUTPUT_FILES} @@ -57,7 +66,10 @@ ADD_CUSTOM_COMMAND(VERBATIM WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/generator" ) set(CIMGUI_SOURCES "${CMAKE_SOURCE_DIR}/cimgui.cpp") -set(CIMGUI_INCLUDE_FILES "${CMAKE_SOURCE_DIR}/cimgui.h") +set(CIMGUI_INCLUDE_FILES + "${CMAKE_SOURCE_DIR}/cimgui.h" + "${CMAKE_SOURCE_DIR}/generator/output/cimgui_impl.h" +) target_sources(cimgui PUBLIC @@ -70,6 +82,7 @@ include(GNUInstallDirs) #install install(TARGETS cimgui LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(FILES ${CIMGUI_INCLUDE_FILES} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/imgui") +install(FILES ${CIMGUI_EXTRA_STUFF} DESTINATION "${CMAKE_INSTALL_DATADIR}/cimgui") #test set(CIMGUI_TEST "no" CACHE STRING "Enable compilation of a test unit based on imgui null") @@ -78,3 +91,4 @@ if (CIMGUI_TEST) add_subdirectory(test) endif () endif() + diff --git a/media-libs/imgui/imgui-1.87-r7.ebuild b/media-libs/imgui/imgui-1.87-r7.ebuild new file mode 100644 index 0000000000..49227f0f47 --- /dev/null +++ b/media-libs/imgui/imgui-1.87-r7.ebuild @@ -0,0 +1,113 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="Bloat-free graphical user interface library for C++" +HOMEPAGE=" + https://github.com/ocornut/imgui + https://github.com/cimgui/cimgui +" +SRC_URI=" + https://github.com/ocornut/imgui/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz + https://github.com/cimgui/cimgui/archive/refs/tags/${PV}.tar.gz -> c${P}.gh.tar.gz +" + +LICENSE="MIT" +SLOT="0/${PV}" +KEYWORDS="~amd64" +IUSE="allegro bindings examples freetype glfw glut opengl sdl vulkan" +S="${WORKDIR}/c${P}" + +RDEPEND=" + dev-libs/stb:= + allegro? ( media-libs/allegro:5 ) + freetype? ( media-libs/freetype ) + glfw? ( media-libs/glfw:0 ) + glut? ( media-libs/freeglut ) + opengl? ( virtual/opengl ) + sdl? ( media-libs/libsdl2 ) + vulkan? ( media-libs/vulkan-loader ) +" +DEPEND=" + ${RDEPEND} + vulkan? ( dev-util/vulkan-headers ) +" +BDEPEND=" + bindings? ( dev-lang/luajit ) + virtual/pkgconfig +" + +REQUIRED_USE=" + || ( + allegro + glfw + glut + sdl + ) + || ( + allegro + opengl + vulkan + ) +" + +PATCHES=( "${FILESDIR}/${P}-fpermissive.patch" ) + +src_prepare() { + pushd ../ || die + rm -rf "${S}/imgui" || die + mv "${P}" "${S}/imgui" || die + pushd "${S}/imgui" || die + + # imgui + rm -r examples/libs || die + rm -r misc/*/*.ttf || die + rm -r misc/single_file || die + + cp "${FILESDIR}/${P}-CMakeLists.txt" CMakeLists.txt || die + cp "${FILESDIR}/imgui.pc.in" imgui.pc.in || die + sed -e "s|@version@|${PV}|g" -i imgui.pc.in || die + + pushd "${S}" || die + cp "${FILESDIR}/c${P}-CMakeLists.txt" CMakeLists.txt || die + # remove files to be generated + rm cimgui.cpp cimgui.h generator/output/* || die + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DIMGUI_ALLEGRO=$(usex allegro) + -DIMGUI_BINDINGS=$(usex bindings) + -DIMGUI_EXAMPLES=$(usex examples) + -DIMGUI_FREETYPE=$(usex freetype) + -DIMGUI_GLFW=$(usex glfw) + -DIMGUI_GLUT=$(usex glut) + -DIMGUI_OPENGL=$(usex opengl) + -DIMGUI_SDL=$(usex sdl) + -DIMGUI_VULKAN=$(usex vulkan) + ) + cmake_src_configure +} + +src_install() { + + cmake_src_install + + pushd imgui || die + # imgui + rm -rf misc/{fonts,freetype} || die + dodoc -r misc + + popd || die + + if use bindings; then + # cimgui + + insinto "/usr/share/doc/${PF}/cimgui" + doins README.md TODO.txt + fi +}