summaryrefslogtreecommitdiff
path: root/x11-toolkits/imgui/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'x11-toolkits/imgui/Makefile')
-rw-r--r--x11-toolkits/imgui/Makefile83
1 files changed, 61 insertions, 22 deletions
diff --git a/x11-toolkits/imgui/Makefile b/x11-toolkits/imgui/Makefile
index bbca0eadab10..4e8f9ba03b7a 100644
--- a/x11-toolkits/imgui/Makefile
+++ b/x11-toolkits/imgui/Makefile
@@ -1,6 +1,8 @@
PORTNAME= imgui
DISTVERSIONPREFIX= v
-DISTVERSION= 1.91.9
+DISTVERSION= 1.92.1
+DISTVERSIONSUFFIX= -docking
+PORTREVISION= 1
CATEGORIES= x11-toolkits
MAINTAINER= yuri@FreeBSD.org
@@ -10,24 +12,34 @@ WWW= https://github.com/ocornut/imgui
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
-USES= cmake
-USE_LDCONFIG= yes
-
+USES= cmake gl
USE_GITHUB= yes
GH_ACCOUNT= ocornut
+USE_GL= gl
+USE_LDCONFIG= yes
CMAKE_ON= BUILD_SHARED_LIBS
+CMAKE_OFF= EMSCRIPTEN IMGUI_TEST_ENGINE
+
+LDFLAGS+= -lGL -L${LOCALBASE}/lib
-OPTIONS_DEFINE= FREETYPE WCHAR32
+OPTIONS_DEFINE= FREETYPE FREETYPE_SVG WCHAR32
+OPTIONS_DEFAULT= GLFW GLUT OPENGL2 OPENGL3 SDL3 SDL3_RENDERER \
+ SDLGPU3 VULKAN
OPTIONS_MULTI= BACKENDS
-OPTIONS_MULTI_BACKENDS= ALLEGRO5 GLFW OPENGL2 OPENGL3 SDL2 SDL2_RENDERER VULKAN
-OPTIONS_DEFAULT= GLFW OPENGL2 OPENGL3
+OPTIONS_MULTI_BACKENDS= ALLEGRO5 GLFW GLUT OPENGL2 OPENGL3 SDL2 \
+ SDL2_RENDERER SDL3 SDL3_RENDERER \
+ SDLGPU3 VULKAN
OPTIONS_SUB= yes
## general options
-FREETYPE_CMAKE_BOOL= IMGUI_FREETYPE
FREETYPE_LIB_DEPENDS= libfreetype.so:print/freetype2
+FREETYPE_CMAKE_BOOL= IMGUI_FREETYPE
+
+FREETYPE_SVG_DESC= Support SVG fonts via plutosvg
+FREETYPE_SVG_LIB_DEPENDS= libplutosvg.so:graphics/plutosvg
+FREETYPE_SVG_CMAKE_BOOL= IMGUI_FREETYPE_SVG
WCHAR32_DESC= Use wchar32
WCHAR32_CMAKE_BOOL= IMGUI_USE_WCHAR32
@@ -35,47 +47,74 @@ WCHAR32_CMAKE_BOOL= IMGUI_USE_WCHAR32
## backend options
ALLEGRO5_DESC= Install Allegro5 backend
-ALLEGRO5_CMAKE_BOOL= IMGUI_BUILD_ALLEGRO5_BINDING
ALLEGRO5_LIB_DEPENDS= liballegro.so:devel/allegro5 # even though binary doesn't link to liballegro.so for some reason
+ALLEGRO5_CMAKE_BOOL= IMGUI_BUILD_ALLEGRO5_BINDING
GLFW_DESC= Install GLFW backend
-GLFW_CMAKE_BOOL= IMGUI_BUILD_GLFW_BINDING
-GLFW_USES= gl
-GLFW_USE= GL=gl
GLFW_LIB_DEPENDS= libglfw.so:graphics/glfw
+GLFW_CMAKE_BOOL= IMGUI_BUILD_GLFW_BINDING
+
+GLUT_DESC= Install GLUT backend
+GLUT_USES= xorg
+GLUT_USE= GL=glut XORG=xi,xmu
+GLUT_CMAKE_BOOL= IMGUI_BUILD_GLUT_BINDING
OPENGL2_DESC= Install OPENGL2 backend
-OPENGL2_USES= gl localbase
-OPENGL2_USE= GL=gl
OPENGL2_CMAKE_BOOL= IMGUI_BUILD_OPENGL2_BINDING
OPENGL3_DESC= Install OPENGL3 backend
-OPENGL3_USES= gl localbase
-OPENGL3_USE= GL=gl
OPENGL3_CMAKE_BOOL= IMGUI_BUILD_OPENGL3_BINDING
SDL2_DESC= Install SDL2 backend
-SDL2_USES= localbase sdl
+SDL2_PREVENTS= SDL3 SDL3_RENDERER
+SDL2_PREVENTS_MSG= INTERFACE_SDL_VERSION conflict
+SDL2_USES= sdl
SDL2_USE= SDL=sdl2
SDL2_CMAKE_BOOL= IMGUI_BUILD_SDL2_BINDING
SDL2_RENDERER_DESC= Install SDL2 renderer backend
+SDL2_RENDERER_PREVENTS= SDL3 SDL3_RENDERER SDLGPU3
+SDL2_RENDERER_PREVENTS_MSG= INTERFACE_SDL_VERSION conflict
SDL2_RENDERER_USES= sdl
SDL2_RENDERER_USE= SDL=sdl2
SDL2_RENDERER_CMAKE_BOOL= IMGUI_BUILD_SDL2_RENDERER_BINDING
+SDL3_DESC= Install SDL3 backend
+SDL3_PREVENTS= SDL2 SDL2_RENDERER
+SDL3_PREVENTS_MSG= INTERFACE_SDL_VERSION conflict
+SDL3_USES= sdl
+SDL3_USE= SDL=sdl3
+SDL3_CMAKE_BOOL= IMGUI_BUILD_SDL3_BINDING
+
+SDL3_RENDERER_DESC= Install SDL3 renderer backend
+SDL3_RENDERER_PREVENTS= SDL2 SDL2_RENDERER
+SDL3_RENDERER_PREVENTS_MSG= INTERFACE_SDL_VERSION conflict
+SDL3_RENDERER_USES= sdl
+SDL3_RENDERER_USE= SDL=sdl3
+SDL3_RENDERER_CMAKE_BOOL= IMGUI_BUILD_SDL3_RENDERER_BINDING
+
+SDLGPU3_DESC= Install SDL3 GPU backend
+SDLGPU3_PREVENTS= SDL2 SDL2_RENDERER
+SDLGPU3_PREVENTS_MSG= INTERFACE_SDL_VERSION conflict
+SDLGPU3_USES= sdl
+SDLGPU3_USE= SDL=sdl3
+SDLGPU3_CMAKE_BOOL= IMGUI_BUILD_SDLGPU3_BINDING
+
VULKAN_DESC= Install Vulkan renderer backend
-VULKAN_CMAKE_BOOL= IMGUI_BUILD_VULKAN_BINDING
+VULKAN_BUILD_DEPENDS= glslangValidator:graphics/glslang \
+ glslc:graphics/shaderc \
+ ${LOCALBASE}/include/vulkan/vulkan.h:graphics/vulkan-headers
VULKAN_LIB_DEPENDS= libvulkan.so:graphics/vulkan-loader
+VULKAN_CMAKE_BOOL= IMGUI_BUILD_VULKAN_BINDING
post-patch:
@${CP} ${FILESDIR}/CMakeLists.txt ${FILESDIR}/imgui-config.cmake.in ${WRKSRC}
do-test:
- @cd ${WRKSRC}/examples/example_sdl2_opengl3 && \
+ @cd ${WRKSRC}/examples/example_sdl3_sdlrenderer3 && \
${GMAKE} \
- CXXFLAGS="${CXXFLAGS} `pkg-config --cflags sdl2` -I${STAGEDIR}${PREFIX}/include -I${WRKSRC}/backends" \
- LIBS="`pkg-config --libs sdl2` -lGL" && \
- ./example_sdl2_opengl3
+ CXXFLAGS="${CXXFLAGS} `pkg-config --cflags sdl3` -I${STAGEDIR}${PREFIX}/include -I${WRKSRC}/backends" \
+ LIBS="`pkg-config --libs sdl3` -lGL" && \
+ ./example_sdl3_sdlrenderer3
.include <bsd.port.mk>