python312Packages.lion-pytorch: 0.2.2 -> 0.2.3 (#364581)
[NixPkgs.git] / pkgs / tools / misc / tlp / patches / 0001-makefile-correctly-sed-paths.patch
blob46ac58f4099ad77193c150fa96b5367a006bac41
1 From 6500d02a70572f94e7b7df4d70b391ac27ac8bcb Mon Sep 17 00:00:00 2001
2 From: Bernardo Meurer <bernardo@meurer.org>
3 Date: Fri, 15 Oct 2021 23:22:50 -0700
4 Subject: [PATCH 1/2] makefile: correctly sed paths
6 The default Makefile for tlp makes a mess with catenating `DESTDIR` to
7 everything, but then not actualy using the catenated (_ prefixed)
8 variables to sed it's `.in` files.
10 This patch makes sure that it correctly sets the paths, taking `DESTDIR`
11 in account where it makes sense (e.g. /bin where we want $out/bin) but
12 not where it doesn't (/etc/tlp.conf should be just that).
14 The reason DESTDIR is used at all, as opposed to the more appropriate
15 PREFIX, is covered in the nix formula, and is (also) due to the Makefile
16 being a bit "different."
17 ---
18 Makefile | 18 +++++++++---------
19 1 file changed, 9 insertions(+), 9 deletions(-)
21 diff --git a/Makefile b/Makefile
22 index 41eb38d..df3abb7 100644
23 --- a/Makefile
24 +++ b/Makefile
25 @@ -57,17 +57,17 @@ _VAR = $(DESTDIR)$(TLP_VAR)
27 SED = sed \
28 -e "s|@TLPVER@|$(TLPVER)|g" \
29 - -e "s|@TLP_SBIN@|$(TLP_SBIN)|g" \
30 - -e "s|@TLP_TLIB@|$(TLP_TLIB)|g" \
31 - -e "s|@TLP_FLIB@|$(TLP_FLIB)|g" \
32 - -e "s|@TLP_ULIB@|$(TLP_ULIB)|g" \
33 - -e "s|@TLP_BATD@|$(TLP_BATD)|g" \
34 + -e "s|@TLP_SBIN@|$(_SBIN)|g" \
35 + -e "s|@TLP_TLIB@|$(_TLIB)|g" \
36 + -e "s|@TLP_FLIB@|$(_FLIB)|g" \
37 + -e "s|@TLP_ULIB@|$(_ULIB)|g" \
38 + -e "s|@TLP_BATD@|$(_BATD)|g" \
39 -e "s|@TLP_CONFUSR@|$(TLP_CONFUSR)|g" \
40 -e "s|@TLP_CONFDIR@|$(TLP_CONFDIR)|g" \
41 - -e "s|@TLP_CONFDEF@|$(TLP_CONFDEF)|g" \
42 - -e "s|@TLP_CONFREN@|$(TLP_CONFREN)|g" \
43 - -e "s|@TLP_CONFDPR@|$(TLP_CONFDPR)|g" \
44 - -e "s|@TLP_CONF@|$(TLP_CONF)|g" \
45 + -e "s|@TLP_CONFDEF@|$(_CONFDEF)|g" \
46 + -e "s|@TLP_CONFREN@|$(_CONFREN)|g" \
47 + -e "s|@TLP_CONFDPR@|$(_CONFDPR)|g" \
48 + -e "s|@TLP_CONF@|$(_CONF)|g" \
49 -e "s|@TLP_RUN@|$(TLP_RUN)|g" \
50 -e "s|@TLP_VAR@|$(TLP_VAR)|g"
52 --
53 2.44.1