diff options
| author | Emily Trau <emily@downunderctf.com> | 2024-03-20 15:33:01 +1100 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2024-08-26 13:29:36 +0000 |
| commit | bc308f1b817521dca11f30bb0068a56a725042f4 (patch) | |
| tree | 3f9e201fabbbf2f346508deb1cae6dc93713d810 | |
| parent | motif: fix clang bump (diff) | |
| download | nixpkgs-origin/backport-297360-to-release-24.05.tar.gz | |
ddd: 3.3.12 -> 3.4.0origin/backport-297360-to-release-24.05
(cherry picked from commit fbc9fff74f7d529c1f7988b7676a13a11511cce1)
| -rw-r--r-- | pkgs/development/tools/misc/ddd/default.nix | 67 | ||||
| -rw-r--r-- | pkgs/development/tools/misc/ddd/gcc44.patch | 11 |
2 files changed, 51 insertions, 27 deletions
diff --git a/pkgs/development/tools/misc/ddd/default.nix b/pkgs/development/tools/misc/ddd/default.nix index 10f3fa161f73..0321b24de321 100644 --- a/pkgs/development/tools/misc/ddd/default.nix +++ b/pkgs/development/tools/misc/ddd/default.nix @@ -1,32 +1,67 @@ -{lib, stdenv, fetchurl, motif, ncurses, libX11, libXt}: +{ + lib, + stdenv, + fetchurl, + imagemagick, + desktopToDarwinBundle, + motif, + ncurses, + libX11, + libXt, + gdb, +}: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "ddd"; - version = "3.3.12"; + version = "3.4.0"; + src = fetchurl { - url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz"; - sha256 = "0p5nx387857w3v2jbgvps2p6mlm0chajcdw5sfrddcglsxkwvmis"; + url = "mirror://gnu/ddd/ddd-${finalAttrs.version}.tar.gz"; + hash = "sha256-XUy8iguwRYVDhm1nkwjFOj7wZuQC/loZGOGWmKPTWA8="; }; - buildInputs = [motif ncurses libX11 libXt]; - configureFlags = [ "--with-x" ]; - patches = [ - # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504868 - ./gcc44.patch + postPatch = '' + substituteInPlace ddd/Ddd.in \ + --replace-fail 'debuggerCommand:' 'debuggerCommand: ${gdb}/bin/gdb' + ''; + + nativeBuildInputs = [ imagemagick ] ++ lib.optionals stdenv.isDarwin [ desktopToDarwinBundle ]; + + buildInputs = [ + motif + ncurses + libX11 + libXt ]; - env.NIX_CFLAGS_COMPILE = "-fpermissive"; + # ioctl is not found without this flag. fixed in next release + # Upstream issue ref: https://savannah.gnu.org/bugs/index.php?64188 + env = lib.optionalAttrs stdenv.isDarwin { NIX_CFLAGS_COMPILE = "-DHAVE_SYS_IOCTL_H"; }; + + configureFlags = [ + "--enable-builtin-manual" + "--enable-builtin-app-defaults" + ]; + + # From MacPorts: make will build the executable "ddd" and the X resource + # file "Ddd" in the same directory, as HFS+ is case-insensitive by default + # this will loosely FAIL + makeFlags = [ "EXEEXT=exe" ]; + enableParallelBuilding = true; postInstall = '' - install -D icons/ddd.xpm $out/share/pixmaps/ddd.xpm + mv $out/bin/dddexe $out/bin/ddd + convert icons/ddd.xbm ddd.png + install -D ddd.png $out/share/icons/hicolor/48x48/apps/ddd.png ''; meta = { - homepage = "https://www.gnu.org/software/ddd"; + changelog = "https://www.gnu.org/software/ddd/news.html"; description = "Graphical front-end for command-line debuggers"; + homepage = "https://www.gnu.org/software/ddd"; + license = lib.licenses.gpl3Only; mainProgram = "ddd"; - license = lib.licenses.gpl3Plus; - platforms = lib.platforms.linux; maintainers = with lib.maintainers; [ emilytrau ]; + platforms = lib.platforms.unix; }; -} +}) diff --git a/pkgs/development/tools/misc/ddd/gcc44.patch b/pkgs/development/tools/misc/ddd/gcc44.patch deleted file mode 100644 index c4e4004b12e0..000000000000 --- a/pkgs/development/tools/misc/ddd/gcc44.patch +++ /dev/null @@ -1,11 +0,0 @@ -http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504868 ---- a/ddd/strclass.C~ 2008-11-07 17:57:13.000000000 +0000 -+++ b/ddd/strclass.C 2008-11-07 17:57:27.000000000 +0000 -@@ -39,6 +39,7 @@ - #include <ctype.h> - #include <limits.h> - #include <new> -+#include <cstdio> - #include <stdlib.h> - - void string::error(const char* msg) const |
