From 5c2215595fd7a22f47be7da732b40183472b44e3 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Wed, 22 Nov 2023 11:38:19 +0100 Subject: [PATCH] gprbuild: 23.0.0 -> 24.0.0 --- .../tools/build-managers/gprbuild/boot.nix | 6 +++--- .../tools/build-managers/gprbuild/default.nix | 11 +++++------ .../gprbuild/gprbuild-relocatable-build.patch | 13 +++++++++++++ 3 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 pkgs/development/tools/build-managers/gprbuild/gprbuild-relocatable-build.patch diff --git a/pkgs/development/tools/build-managers/gprbuild/boot.nix b/pkgs/development/tools/build-managers/gprbuild/boot.nix index 9cdfb27c8893..4207b3649594 100644 --- a/pkgs/development/tools/build-managers/gprbuild/boot.nix +++ b/pkgs/development/tools/build-managers/gprbuild/boot.nix @@ -7,14 +7,14 @@ }: let - version = "23.0.0"; + version = "24.0.0"; gprConfigKbSrc = fetchFromGitHub { name = "gprconfig-kb-${version}-src"; owner = "AdaCore"; repo = "gprconfig_kb"; rev = "v${version}"; - sha256 = "1rhskq4r2plf3ia67k08misygnpr9knzw3kp3kyv5778lra8y6s2"; + sha256 = "1vnjv2q63l8nq2w4wya75m40isvs78j5ss9b5ga3zx3cpdx3xh09"; }; in @@ -27,7 +27,7 @@ stdenv.mkDerivation { owner = "AdaCore"; repo = "gprbuild"; rev = "v${version}"; - sha256 = "1ciaq4nh98vd7r5i11v353c1ms9s5yph0yxk4fkryc6bvkm4666x"; + sha256 = "096a43453z2xknn6x4hyk2ldp2wh0qhfdfmzsrks50zqcvmkq4v7"; }; nativeBuildInputs = [ diff --git a/pkgs/development/tools/build-managers/gprbuild/default.nix b/pkgs/development/tools/build-managers/gprbuild/default.nix index 5b3d45bf62d5..aad115701263 100644 --- a/pkgs/development/tools/build-managers/gprbuild/default.nix +++ b/pkgs/development/tools/build-managers/gprbuild/default.nix @@ -41,12 +41,11 @@ stdenv.mkDerivation { "LIBRARY_TYPE=relocatable" ]; - # Fixes gprbuild being linked statically always - patches = lib.optional (!stdenv.hostPlatform.isStatic) (fetchpatch { - name = "gprbuild-relocatable-build.patch"; - url = "https://aur.archlinux.org/cgit/aur.git/plain/relocatable-build.patch?h=gprbuild&id=1d4e8a5cb982e79135a0aaa3ef87654bed1fe4f0"; - sha256 = "1r3xsp1pk9h666mm8mdravkybmd5gv2f751x2ffb1kxnwq1rwiyn"; - }); + # Fixes gprbuild being linked statically always. Based on the AUR's patch: + # https://aur.archlinux.org/cgit/aur.git/plain/0001-Makefile-build-relocatable-instead-of-static-binary.patch?h=gprbuild&id=bac524c76cd59c68fb91ef4dfcbe427357b9f850 + patches = lib.optionals (!stdenv.hostPlatform.isStatic) [ + ./gprbuild-relocatable-build.patch + ]; buildFlags = [ "all" "libgpr.build" ]; diff --git a/pkgs/development/tools/build-managers/gprbuild/gprbuild-relocatable-build.patch b/pkgs/development/tools/build-managers/gprbuild/gprbuild-relocatable-build.patch new file mode 100644 index 000000000000..f49478f6e38c --- /dev/null +++ b/pkgs/development/tools/build-managers/gprbuild/gprbuild-relocatable-build.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index 8c542078..e91cef5e 100644 +--- a/Makefile ++++ b/Makefile +@@ -82,7 +82,7 @@ LIB_INSTALLER=gprinstall -p -f --target=$(TARGET) $(RBD) "--prefix=${prefix}" + CLEANER=gprclean -q $(RBD) + + GPRBUILD_BUILDER=$(BUILDER) $(GPRBUILD_GPR) \ +- -XLIBRARY_TYPE=static -XXMLADA_BUILD=static ++ -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable + LIBGPR_BUILDER=$(BUILDER) $(GPR_GPR) $(LIBGPR_OS) + LIBGPR_INSTALLER=$(LIB_INSTALLER) $(GPR_GPR) $(LIBGPR_OS) -XBUILD=${BUILD} \ + --install-name=gpr \