From e1c4ce841847fe7e8f8bbb4a4263174128c06ce3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sun, 17 Aug 2025 14:28:30 +0700 Subject: [PATCH] cegui: fix build, trim dependencies --- srcpkgs/cegui/patches/cmake-4.patch | 54 +++++++++++++++++++++++++++++ srcpkgs/cegui/template | 11 +++--- 2 files changed, 60 insertions(+), 5 deletions(-) create mode 100644 srcpkgs/cegui/patches/cmake-4.patch diff --git a/srcpkgs/cegui/patches/cmake-4.patch b/srcpkgs/cegui/patches/cmake-4.patch new file mode 100644 index 00000000000..b14625946a5 --- /dev/null +++ b/srcpkgs/cegui/patches/cmake-4.patch @@ -0,0 +1,54 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,13 +2,6 @@ + # Top-level CMakeLists.txt file for Crazy Eddie's GUI System + ################################################################################ + cmake_minimum_required(VERSION 2.8.12) +-if (POLICY CMP0017) +- cmake_policy(SET CMP0017 OLD) +-endif() +- +-if (POLICY CMP0045) +- cmake_policy(SET CMP0045 OLD) +-endif() + + if (APPLE AND NOT CMAKE_OSX_ARCHITECTURES) + set( CMAKE_OSX_ARCHITECTURES x86_64 CACHE STRING "Build architectures for Mac OS X") +--- a/cmake/CEGUIMacros.cmake ++++ b/cmake/CEGUIMacros.cmake +@@ -51,8 +51,7 @@ endmacro() + macro (cegui_target_link_libraries _TARGET_NAME) + target_link_libraries(${_TARGET_NAME} ${ARGN}) + +- get_target_property(_TARGET_EXISTS ${_TARGET_NAME}_Static TYPE) +- if (_TARGET_EXISTS) ++ if (TARGET ${_TARGET_NAME}_Static) + foreach(_LIB ${ARGN}) + if (${_LIB} STREQUAL optimized OR ${_LIB} STREQUAL debug OR ${_LIB} STREQUAL general) + set (_BUILD ${_LIB}) +@@ -137,8 +136,16 @@ endmacro() + # + macro (cegui_add_dependency _TARGET_NAME _DEP_NAME) + # Optional additional arguments: "SCOPE" "IS_SYSTEM" +- get_target_property(_DYNAMIC_EXISTS ${_TARGET_NAME} TYPE) +- get_target_property(_STATIC_EXISTS ${_TARGET_NAME}_Static TYPE) ++ if (TARGET ${_TARGET_NAME}) ++ set(_DYNAMIC_EXISTS TRUE) ++ else() ++ set(_DYNAMIC_EXISTS FALSE) ++ endif() ++ if (TARGET ${_TARGET_NAME}_STATIC) ++ set(_STATIC_EXISTS TRUE) ++ else() ++ set(_STATIC_EXISTS FALSE) ++ endif() + if ("${ARGC}" GREATER 2) + if (("${ARGC}" GREATER 3) AND "${ARGV3}") + if (_DYNAMIC_EXISTS) +@@ -765,4 +772,4 @@ macro( cegui_check_mingw ) + message( WARNING "If you use MinGW, only the MinGW-w64 flavour (version 3.1 and up) is officially supported. Note: that's MinGW-w64's version, *not* GCC's version! " ) + endif() + endif() +-endmacro() +\ No newline at end of file ++endmacro() diff --git a/srcpkgs/cegui/template b/srcpkgs/cegui/template index 9feb41c8b60..9f3fdb3192e 100644 --- a/srcpkgs/cegui/template +++ b/srcpkgs/cegui/template @@ -1,7 +1,7 @@ # Template file for 'cegui' pkgname=cegui version=0.8.7.20190225 -revision=6 +revision=7 _githash=bfc6a841de45b8e63040d33b9cccc67745337f4e build_style=cmake configure_args="-DOpenGL_GL_PREFERENCE=GLVND \ @@ -10,8 +10,8 @@ configure_args="-DOpenGL_GL_PREFERENCE=GLVND \ make_build_args="all html" hostmakedepends="graphviz doxygen dejavu-fonts-ttf gd glm perl pkg-config" makedepends="libglvnd-devel SDL2-devel SDL2_image-devel libxml2-devel - boost-devel devil-devel glfw-devel glm ois-devel silly-devel fribidi-devel - lua53-devel minizip-devel freetype-devel + boost-devel-minimal devil-devel glfw-devel glm ois-devel silly-devel fribidi-devel + lua53-devel minizip-devel freetype-devel pcre-devel $(vopt_if irrlicht irrlicht-devel) $(vopt_if ogre libogre-devel)" short_desc="Crazy Eddie's Graphical User Interface" @@ -25,6 +25,7 @@ replaces="cegui-data>=0 cegui-sample>=0" build_options="irrlicht ogre" desc_option_irrlicht="Enable support for Irrlicht" desc_option_ogre="Enable support for Ogre" +build_options_default="ogre" if [ -z "$CROSS_BUILD" ]; then # irrlicht interface fails to cross compile @@ -39,7 +40,7 @@ pre_configure() { cp -p ${FILESDIR}/FindOpenGLES.cmake cmake # cmake sets standard to c++03 (which doesn’t know int16_t) - vsed -i -e "s/-std=c++03//" CMakeLists.txt + sed -i -e "s/-std=c++03//" CMakeLists.txt } post_install() { local _ver2=${version%.*.*} @@ -58,7 +59,7 @@ cegui-doc_package() { } } cegui-devel_package() { - depends="${makedepends} ${sourcepkg}>=${version}_${revision}" + depends="${sourcepkg}>=${version}_${revision}" short_desc+=" - development files" pkg_install() { vmove usr/include