Skip to content

Commit

Permalink
aocl-utils: 4.2 -> 5.0 (#348059)
Browse files Browse the repository at this point in the history
  • Loading branch information
markuskowa authored Oct 16, 2024
2 parents ea2a73f + ed49a12 commit 5e30d97
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
18 changes: 15 additions & 3 deletions pkgs/by-name/ao/aocl-utils/package.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
{ lib, stdenv, fetchFromGitHub, cmake } :
{
lib,
stdenv,
fetchFromGitHub,
cmake,
}:

stdenv.mkDerivation rec {
pname = "aocl-utils";
version = "4.2";
version = "5.0";

src = fetchFromGitHub {
owner = "amd";
repo = "aocl-utils";
rev = version;
hash = "sha256-tjmCgVSU4XjBhbKMUY3hsvj3bvuXvVdf5Bqva5nr1tc=";
hash = "sha256-96j3Sw+Ts+CZzjPpUlt8cRYO5z0iASo+W/x1nrrAyQE=";
};

patches = [ ./pkg-config.patch ];

nativeBuildInputs = [ cmake ];

cmakeFlags = [
(lib.cmakeBool "AU_BUILD_STATIC_LIBS" stdenv.hostPlatform.isStatic)
(lib.cmakeBool "AU_BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
];

meta = with lib; {
description = "Interface to all AMD AOCL libraries to access CPU features";
homepage = "https://github.com/amd/aocl-utils";
Expand Down
14 changes: 14 additions & 0 deletions pkgs/by-name/ao/aocl-utils/pkg-config.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/CMake/aocl-utils.pc.in b/CMake/aocl-utils.pc.in
index 18ce5eb..bcdc39b 100644
--- a/CMake/aocl-utils.pc.in
+++ b/CMake/aocl-utils.pc.in
@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
-libdir=${prefix}/@AU_INSTALL_LIB_DIR@
-includedir=${prefix}/@AU_INSTALL_INCLUDE_DIR@
+libdir=@AU_INSTALL_LIB_DIR@
+includedir=@AU_INSTALL_INCLUDE_DIR@

Name: @PROJECT_FULL_NAME@
Description: @AU_DESCRIPTION@

0 comments on commit 5e30d97

Please sign in to comment.