Unverified Commit 952b3d09 authored by markuskowa's avatar markuskowa Committed by GitHub
Browse files

Merge pull request #280045 from sheepforce/fortran-dynamic

fortran tight-binding ecosystem: enable static/dynamic builds depending on hostPlatform
parents cdcd061e dc237ef7
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -27,11 +27,18 @@ stdenv.mkDerivation rec {

  buildInputs = [ blas lapack mctc-lib mstore multicharge ];

  postInstall = ''
    substituteInPlace $out/lib/pkgconfig/${pname}.pc \
      --replace "''${prefix}/" ""
  outputs = [ "out" "dev" ];

  # Fix the Pkg-Config files for doubled store paths
  postPatch = ''
    substituteInPlace config/template.pc \
      --replace "\''${prefix}/" ""
  '';

  cmakeFlags = [
    "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
  ];

  doCheck = true;
  preCheck = ''
    export OMP_NUM_THREADS=2
+10 −3
Original line number Diff line number Diff line
@@ -22,11 +22,18 @@ stdenv.mkDerivation rec {

  buildInputs = [ json-fortran ];

  postInstall = ''
    substituteInPlace $out/lib/pkgconfig/${pname}.pc \
      --replace "''${prefix}/" ""
  outputs = [ "out" "dev" ];

  # Fix the Pkg-Config files for doubled store paths
  postPatch = ''
    substituteInPlace config/template.pc \
      --replace "\''${prefix}/" ""
  '';

  cmakeFlags = [
    "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
  ];

  doCheck = true;

  meta = with lib; {
+10 −3
Original line number Diff line number Diff line
@@ -21,11 +21,18 @@ stdenv.mkDerivation rec {

  buildInputs = [ mctc-lib ];

  postInstall = ''
    substituteInPlace $out/lib/pkgconfig/${pname}.pc \
      --replace "''${prefix}/" ""
  outputs = [ "out" "dev" ];

  # Fix the Pkg-Config files for doubled store paths
  postPatch = ''
    substituteInPlace config/template.pc \
      --replace "\''${prefix}/" ""
  '';

  cmakeFlags = [
    "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
  ];

  meta = with lib; {
    description = "Molecular structure store for testing";
    license = licenses.asl20;
+10 −3
Original line number Diff line number Diff line
@@ -26,11 +26,18 @@ stdenv.mkDerivation rec {

  buildInputs = [ blas lapack mctc-lib mstore ];

  postInstall = ''
    substituteInPlace $out/lib/pkgconfig/${pname}.pc \
      --replace "''${prefix}/" ""
  outputs = [ "out" "dev" ];

  # Fix the Pkg-Config files for doubled store paths
  postPatch = ''
    substituteInPlace config/template.pc \
      --replace "\''${prefix}/" ""
  '';

  cmakeFlags = [
    "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
  ];

  doCheck = true;
  preCheck = ''
    export OMP_NUM_THREADS=2
+9 −3
Original line number Diff line number Diff line
@@ -26,10 +26,16 @@ stdenv.mkDerivation rec {

  buildInputs = [ mctc-lib mstore toml-f blas ];

  postInstall = ''
    substituteInPlace $out/lib/pkgconfig/s-dftd3.pc \
      --replace "''${prefix}/" ""
  outputs = [ "out" "dev" ];

  # Fix the Pkg-Config files for doubled store paths
  postPatch = ''
    substituteInPlace config/template.pc \
      --replace "\''${prefix}/" ""
  '';
  cmakeFlags = [
    "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
  ];

  doCheck = true;
  preCheck = ''
Loading