Unverified Commit b6e47f20 authored by Matthieu Coudron's avatar Matthieu Coudron Committed by GitHub
Browse files

tint2: fix build with CMake 4 (#451616)

parents 753db825 5816f0b2
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 336dff9..8b8a853 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
+cmake_minimum_required( VERSION 3.10 )
 project( tint2 )
-cmake_minimum_required( VERSION 2.8.5 )
 
 option( ENABLE_BATTERY "Enable battery status plugin" ON )
 option( ENABLE_TINT2CONF "Enable tint2conf build, a GTK+3 theme configurator for tint2" ON )
diff --git a/src/tint2conf/CMakeLists.txt b/src/tint2conf/CMakeLists.txt
index 747b9ac..cbe13bb 100644
--- a/src/tint2conf/CMakeLists.txt
+++ b/src/tint2conf/CMakeLists.txt
@@ -1,5 +1,5 @@
+cmake_minimum_required(VERSION 3.10)
 project(tint2conf)
-cmake_minimum_required(VERSION 2.6)
 
 include( FindPkgConfig )
 pkg_check_modules( X11_T2C REQUIRED x11 xcomposite xdamage xinerama xrender xrandr>=1.3 )
+8 −4
Original line number Diff line number Diff line
@@ -44,6 +44,8 @@ stdenv.mkDerivation rec {
      url = "https://gitlab.com/nick87720z/tint2/uploads/7de4501a4fa4fffa5ba8bb0fa3d19f78/glib.patch";
      hash = "sha256-K547KYlRkVl1s2THi3ZCRuM447EFJwTqUEBjKQnV8Sc=";
    })
    # https://gitlab.com/nick87720z/tint2/-/merge_requests/4
    ./fix-cmake-version.patch
  ];

  # Fix build with gcc14
@@ -80,6 +82,7 @@ stdenv.mkDerivation rec {

  postPatch = ''
    # Add missing dependency on libm
    # https://gitlab.com/nick87720z/tint2/-/merge_requests/3
    substituteInPlace src/tint2conf/CMakeLists.txt \
      --replace-fail "RSVG_LIBRARIES} )" "RSVG_LIBRARIES} m)"

@@ -90,11 +93,12 @@ stdenv.mkDerivation rec {
  nativeInstallCheckInputs = [ versionCheckHook ];
  doInstallCheck = true;

  meta = with lib; {
  meta = {
    mainProgram = "tint2";
    homepage = "https://gitlab.com/nick87720z/tint2";
    description = "Simple panel/taskbar unintrusive and light (memory, cpu, aestetic)";
    license = licenses.gpl2Only;
    platforms = platforms.linux;
    maintainers = [ maintainers.romildo ];
    license = lib.licenses.gpl2Only;
    platforms = lib.platforms.linux;
    maintainers = [ lib.maintainers.romildo ];
  };
}