Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / libelfin / 0001-Don-t-detect-package-version-with-Git.patch
blobe4b4e592b7a5c5989444e0511212f558b0bee92b
1 From 77a34d31695e02bc3d06b68c7ca3ff9c3cb67844 Mon Sep 17 00:00:00 2001
2 From: Maximilian Bosch <maximilian@mbosch.me>
3 Date: Sun, 26 May 2019 19:46:27 +0200
4 Subject: [PATCH] Don't detect package version with Git
6 This will build in a Nix-based build environment. Instead we ismply
7 replace `@version@` using `substituteAll`.
8 ---
9 dwarf/Makefile | 19 +++++++++----------
10 elf/Makefile | 15 +++++++--------
11 2 files changed, 16 insertions(+), 18 deletions(-)
13 diff --git a/dwarf/Makefile b/dwarf/Makefile
14 index 71456bd..f871227 100644
15 --- a/dwarf/Makefile
16 +++ b/dwarf/Makefile
17 @@ -43,16 +43,15 @@ CLEAN += libdwarf++.so
18 # Create pkg-config for local library and headers. This will be
19 # transformed in to the correct global pkg-config by install.
20 libdwarf++.pc: always
21 - @(VER=$$(git describe --match 'v*' | sed -e s/^v//); \
22 - echo "libdir=$$PWD"; \
23 - echo "includedir=$$PWD"; \
24 - echo ""; \
25 - echo "Name: libdwarf++"; \
26 - echo "Description: C++11 DWARF library"; \
27 - echo "Version: $$VER"; \
28 - echo "Requires: libelf++ = $$VER"; \
29 - echo "Libs: -L\$${libdir} -ldwarf++"; \
30 - echo "Cflags: -I\$${includedir}") > $@
31 + @(echo "libdir=$$PWD"; \
32 + echo "includedir=$$PWD"; \
33 + echo ""; \
34 + echo "Name: libdwarf++"; \
35 + echo "Description: C++11 DWARF library"; \
36 + echo "Version: @version@"; \
37 + echo "Requires: libelf++ = @version@"; \
38 + echo "Libs: -L\$${libdir} -ldwarf++"; \
39 + echo "Cflags: -I\$${includedir}") > $@
40 CLEAN += libdwarf++.pc
42 .PHONY: always
43 diff --git a/elf/Makefile b/elf/Makefile
44 index 9c7c224..50630a7 100644
45 --- a/elf/Makefile
46 +++ b/elf/Makefile
47 @@ -42,15 +42,14 @@ CLEAN += libelf++.so
48 # Create pkg-config for local library and headers. This will be
49 # transformed in to the correct global pkg-config by install.
50 libelf++.pc: always
51 - @(VER=$$(git describe --match 'v*' | sed -e s/^v//); \
52 - echo "libdir=$$PWD"; \
53 + @(echo "libdir=$$PWD"; \
54 echo "includedir=$$PWD"; \
55 - echo ""; \
56 - echo "Name: libelf++"; \
57 - echo "Description: C++11 ELF library"; \
58 - echo "Version: $$VER"; \
59 - echo "Libs: -L\$${libdir} -lelf++"; \
60 - echo "Cflags: -I\$${includedir}") > $@
61 + echo ""; \
62 + echo "Name: libelf++"; \
63 + echo "Description: C++11 ELF library"; \
64 + echo "Version: @version@"; \
65 + echo "Libs: -L\$${libdir} -lelf++"; \
66 + echo "Cflags: -I\$${includedir}") > $@
67 CLEAN += libelf++.pc
69 .PHONY: always
70 --
71 2.19.2