Unverified Commit 228f761e authored by Gergő Gutyina's avatar Gergő Gutyina Committed by GitHub
Browse files

alsa-tools: drop tools relying on gtk2; various: drop (#467307)

parents de42baa3 5c88b85f
Loading
Loading
Loading
Loading
+0 −109
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitHub,
  fpc,
  lazarus,
  atk,
  cairo,
  gdk-pixbuf,
  glib,
  gtk2-x11,
  libX11,
  pango,
  hamlib,
  mariadb,
  tqsl,
  xdg-utils,
  xplanet,
  autoPatchelfHook,
  wrapGAppsHook3,
}:

stdenv.mkDerivation rec {
  pname = "cqrlog";
  version = "2.5.2";

  src = fetchFromGitHub {
    owner = "ok2cqr";
    repo = "cqrlog";
    rev = "v${version}";
    sha256 = "0zzcg0bl6mq4wfifj998x9x09w8sigbh46synpqx034fpr0swyhb";
  };

  # Adds the possibility to change the lazarus directory,
  # otherwise, we would get error : "directory lcl not found"
  patches = [ ./fix-makefile-lazarusdir.patch ];

  postPatch = ''
    substituteInPlace Makefile \
      --replace @Lazarusdir@ "${lazarus}/share/lazarus" \
      --replace /usr ""
    substituteInPlace src/fTRXControl.pas \
      --replace "/usr/bin/rigctld" "${hamlib}/bin/rigctld"
    substituteInPlace src/fCallAttachment.pas \
      --replace "/usr/bin/xdg-open" "${xdg-utils}/bin/xdg-open"
    substituteInPlace src/fRotControl.pas \
      --replace "/usr/bin/rotctld" "${hamlib}/bin/rotctld"
    substituteInPlace src/fPreferences.pas \
      --replace "/usr/bin/rigctld" "${hamlib}/bin/rigctld" \
      --replace "/usr/bin/rotctld" "${hamlib}/bin/rotctld" \
      --replace "/usr/bin/xplanet" "${xplanet}/bin/xplanet"
    substituteInPlace src/fLoTWExport.pas \
      --replace "/usr/bin/tqsl" "${tqsl}/bin/tqsl"
    substituteInPlace src/dUtils.pas \
      --replace "/usr/bin/xplanet" "${xplanet}/bin/xplanet" \
      --replace "/usr/bin/rigctld" "${hamlib}/bin/rigctld"
    # Order is important
    substituteInPlace src/dData.pas \
      --replace "/usr/bin/mysqld_safe" "${mariadb}/bin/mysqld_safe" \
      --replace "/usr/bin/mysqld" "${mariadb}/bin/mysqld"

    # To be fail when I need to patch a new hardcoded binary
    ! grep -C src -RC0 "/usr"
  '';

  nativeBuildInputs = [
    lazarus
    fpc
    autoPatchelfHook
    wrapGAppsHook3
  ];
  buildInputs = [
    atk
    cairo
    gdk-pixbuf
    glib
    gtk2-x11
    libX11
    pango
  ];
  propagatedBuildInputs = [
    hamlib
    mariadb
    tqsl
    xdg-utils
    xplanet
  ];

  makeFlags = [
    "FPC=fpc"
    "PP=fpc"
    "DESTDIR=$(out)"
  ];

  postFixup = ''
    libmysqlclient=$(find "${mariadb.client}/lib" -name "libmysqlclient.so" | tail -n1)
    patchelf --add-needed "libmysqlclient.so" \
             --add-rpath "$(dirname "$libmysqlclient")" \
             "$out/bin/.cqrlog-wrapped"
  '';

  meta = {
    description = "Linux logging program for amateur radio operators";
    mainProgram = "cqrlog";
    homepage = "https://www.cqrlog.com/";
    license = lib.licenses.gpl2Plus;
    platforms = lib.platforms.linux;
  };
}
+0 −13
Original line number Diff line number Diff line
Seulement dans b: logs
diff --color -ur a/Makefile b/Makefile
--- a/Makefile	2021-02-15 17:07:14.333810200 +0100
+++ b/Makefile	2021-02-15 17:19:18.599426984 +0100
@@ -6,7 +6,7 @@
 tmpdir   = /tmp
 
 cqrlog: src/cqrlog.lpi
-	$(CC) --ws=gtk2 --pcp=$(tmpdir)/.lazarus src/cqrlog.lpi
+	$(CC) --ws=gtk2 --pcp=$(tmpdir)/.lazarus --lazarusdir=@Lazarusdir@ src/cqrlog.lpi
 	$(ST) src/cqrlog
 	gzip tools/cqrlog.1 -c > tools/cqrlog.1.gz
 
+2 −4
Original line number Diff line number Diff line
@@ -4,7 +4,6 @@
  fetchurl,
  alsa-lib,
  fltk_1_3,
  gtk2,
  gtk3,
  makeWrapper,
  pkg-config,
@@ -28,14 +27,13 @@ stdenv.mkDerivation (finalAttrs: {
  buildInputs = [
    alsa-lib
    fltk_1_3
    gtk2
    gtk3
    psmisc
  ];

  env.TOOLSET = lib.concatStringsSep " " [
    "as10k1"
    "echomixer"
    # "echomixer" # Requires gtk2
    "envy24control"
    "hda-verb"
    "hdajackretask"
@@ -48,7 +46,7 @@ stdenv.mkDerivation (finalAttrs: {
    # "qlo10k1" # needs Qt
    "mixartloader"
    "pcxhrloader"
    "rmedigicontrol"
    # "rmedigicontrol" # Requires gtk2
    "sb16_csp"
    # "seq" # mysterious configure error
    "sscape_ctl"
+0 −73
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchurl,
  fetchpatch,
  alsa-lib,
  cmake,
  gtk2,
  libjack2,
  gnome2,
  libpthreadstubs,
  libsamplerate,
  libsndfile,
  libtool,
  libxml2,
  pkg-config,
  openssl,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "petri-foo";
  version = "0.1.87";

  src = fetchurl {
    url = "mirror://sourceforge/petri-foo/petri-foo-${finalAttrs.version}.tar.bz2";
    sha256 = "0b25iicgn8c42487fdw32ycfrll1pm2zjgy5djvgw6mfcaa4gizh";
  };

  patches = [
    # Pull patch pending upstream inclusion for -fno-common toollchain support:
    #  https://github.com/petri-foo/Petri-Foo/pull/43
    (fetchpatch {
      name = "fno-common.patch";
      url = "https://github.com/petri-foo/Petri-Foo/commit/6a3256c9b619b1fed18ad15063f110e8d91aa6fe.patch";
      sha256 = "05yc4g22iwnd054jmvihrl461yr0cxnghslfrbhan6bac6fcvlal";
    })
  ];

  # See https://github.com/NixOS/nixpkgs/issues/445447
  postPatch = ''
    substituteInPlace CMakeLists.txt --replace-fail \
      "cmake_minimum_required(VERSION 2.6)" \
      "cmake_minimum_required(VERSION 3.10)"
  '';

  nativeBuildInputs = [
    cmake
    pkg-config
  ];

  buildInputs = [
    alsa-lib
    gtk2
    libjack2
    gnome2.libgnomecanvas
    libpthreadstubs
    libsamplerate
    libsndfile
    libtool
    libxml2
    openssl
  ];

  meta = {
    description = "MIDI controllable audio sampler";
    longDescription = "a fork of Specimen";
    homepage = "https://petri-foo.sourceforge.net";
    license = lib.licenses.gpl2Plus;
    platforms = lib.platforms.linux;
    maintainers = [ ];
    mainProgram = "petri-foo";
  };
})
+0 −11
Original line number Diff line number Diff line
--- a/matlib/mat.hh	2003-01-06 23:47:26.000000000 +0100
+++ b/matlib/mat.copy.hh	2021-01-06 10:05:34.332415179 +0100
@@ -91,7 +91,7 @@
                 memcpy(c, r, d1 * d3 * sizeof(c[0]));
 }

-template<typename T> void mdet(const T *c, unsigned int d)
+template<typename T> int mdet(const T *c, unsigned int d)
 {
         T *c2;
         unsigned int i, j, k, l;
Loading