From f4495087276411285fd2c01ced852969e30f7ade Mon Sep 17 00:00:00 2001 From: Sam Estep Date: Tue, 5 May 2026 21:17:48 -0400 Subject: [PATCH] libagar: 1.5.0 -> 1.7.1 Assisted-by: Codex:gpt-5.5 Co-authored-by: Michael Daniels --- .../li/libagar/fix-conflicting-types.patch | 26 ------------ pkgs/by-name/li/libagar/package.nix | 42 +++++-------------- pkgs/by-name/li/libagar_test/package.nix | 21 ++-------- 3 files changed, 13 insertions(+), 76 deletions(-) delete mode 100644 pkgs/by-name/li/libagar/fix-conflicting-types.patch diff --git a/pkgs/by-name/li/libagar/fix-conflicting-types.patch b/pkgs/by-name/li/libagar/fix-conflicting-types.patch deleted file mode 100644 index 0de03c279f4eb..0000000000000 --- a/pkgs/by-name/li/libagar/fix-conflicting-types.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/math/m_sparse_factor.c -+++ b/math/m_sparse_factor.c -@@ -1236,7 +1236,6 @@ int I, NumberOfTies = 0; - ElementPtr ChosenPivot, TiedElements[MAX_MARKOWITZ_TIES + 1]; - RealNumber Magnitude, LargestInCol, Ratio, MaxRatio; - RealNumber LargestOffDiagonal; --RealNumber FindBiggestInColExclude(); - - /* Begin `QuicklySearchDiagonal'. */ - NumberOfTies = -1; -@@ -1434,7 +1433,6 @@ register ElementPtr pDiag; - int I; - ElementPtr ChosenPivot, pOtherInRow, pOtherInCol; - RealNumber Magnitude, LargestInCol, LargestOffDiagonal; --RealNumber FindBiggestInColExclude(); - - /* Begin `QuicklySearchDiagonal'. */ - ChosenPivot = NULL; -@@ -1601,7 +1599,6 @@ register ElementPtr pDiag; - int NumberOfTies = 0, Size = Matrix->Size; - ElementPtr ChosenPivot; - RealNumber Magnitude, Ratio, RatioOfAccepted = 0.0, LargestInCol; --RealNumber FindBiggestInColExclude(); - - /* Begin `SearchDiagonal'. */ - ChosenPivot = NULL; diff --git a/pkgs/by-name/li/libagar/package.nix b/pkgs/by-name/li/libagar/package.nix index b9d5f912180f7..5994aa44a756f 100644 --- a/pkgs/by-name/li/libagar/package.nix +++ b/pkgs/by-name/li/libagar/package.nix @@ -4,54 +4,36 @@ fetchurl, pkg-config, libtool, - perl, - bsdbuild, gettext, - mandoc, libpng, libjpeg, libxinerama, freetype, SDL, libGL, - libsndfile, - portaudio, libmysqlclient, fontconfig, + perl, }: - stdenv.mkDerivation (finalAttrs: { pname = "libagar"; - version = "1.5.0"; + version = "1.7.1"; src = fetchurl { url = "https://stable.hypertriton.com/agar/agar-${finalAttrs.version}.tar.gz"; - sha256 = "001wcqk5z67qg0raw9zlwmv62drxiwqykvsbk10q2mrc6knjsd42"; + hash = "sha256-0euZTIJizXDfHU2UYsVFMInbXcgV0BtXZ1CMKSOlllw="; }; - patches = [ - ./fix-conflicting-types.patch - ]; - preConfigure = '' - substituteInPlace configure.in \ - --replace '_BSD_SOURCE' '_DEFAULT_SOURCE' - cat configure.in | ${bsdbuild}/bin/mkconfigure > configure + substituteInPlace configure \ + --replace-fail '_BSD_SOURCE' '_DEFAULT_SOURCE' ''; configureFlags = [ - "--with-libtool=${libtool}/bin/libtool" - "--enable-nls=yes" - "--with-gettext=${gettext}" + "--enable-nls=no" "--with-jpeg=${libjpeg.dev}" "--with-gl=${libGL}" "--with-mysql=${libmysqlclient}" - "--with-manpages=yes" - ]; - - outputs = [ - "out" - "devdoc" ]; nativeBuildInputs = [ @@ -61,26 +43,22 @@ stdenv.mkDerivation (finalAttrs: { ]; buildInputs = [ - bsdbuild perl libxinerama SDL libGL libmysqlclient - mandoc - freetype.dev + freetype libpng - libjpeg.dev + libjpeg fontconfig - portaudio - libsndfile ]; meta = { description = "Cross-platform GUI toolkit"; homepage = "http://libagar.org/index.html"; - license = with lib.licenses; bsd3; + license = with lib.licenses; [ bsd3 ]; maintainers = with lib.maintainers; [ ramkromberg ]; - platforms = with lib.platforms; linux; + platforms = lib.platforms.linux; }; }) diff --git a/pkgs/by-name/li/libagar_test/package.nix b/pkgs/by-name/li/libagar_test/package.nix index 32b3628cf6eb0..2fd663cdb6548 100644 --- a/pkgs/by-name/li/libagar_test/package.nix +++ b/pkgs/by-name/li/libagar_test/package.nix @@ -1,37 +1,22 @@ { lib, stdenv, - bsdbuild, libagar, perl, libjpeg, libpng, openssl, }: - stdenv.mkDerivation { pname = "libagar-test"; inherit (libagar) version src; sourceRoot = "agar-${libagar.version}/tests"; - # Workaround build failure on -fno-common toolchains: - # ld: textdlg.o:(.bss+0x0): multiple definition of `someString'; - # configsettings.o:(.bss+0x0): first defined here - # TODO: the workaround can be removed once nixpkgs updates to 1.6.0. - env.NIX_CFLAGS_COMPILE = "-fcommon"; - - preConfigure = '' - substituteInPlace configure.in \ - --replace '_BSD_SOURCE' '_DEFAULT_SOURCE' - cat configure.in | ${bsdbuild}/bin/mkconfigure > configure - ''; - configureFlags = [ "--with-agar=${libagar}" ]; buildInputs = [ perl - bsdbuild libagar libjpeg libpng @@ -39,12 +24,12 @@ stdenv.mkDerivation { ]; meta = { - broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); description = "Tests for libagar"; mainProgram = "agartest"; homepage = "http://libagar.org/index.html"; - license = with lib.licenses; bsd3; + license = with lib.licenses; [ bsd3 ]; maintainers = with lib.maintainers; [ ramkromberg ]; - platforms = with lib.platforms; linux; + platforms = lib.platforms.linux; + broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); }; }