aboutsummaryrefslogtreecommitdiff
path: root/nix/libtomcrypt-pkgconfig-for-static.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nix/libtomcrypt-pkgconfig-for-static.patch')
-rw-r--r--nix/libtomcrypt-pkgconfig-for-static.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/nix/libtomcrypt-pkgconfig-for-static.patch b/nix/libtomcrypt-pkgconfig-for-static.patch
new file mode 100644
index 0000000..5db9dbd
--- /dev/null
+++ b/nix/libtomcrypt-pkgconfig-for-static.patch
@@ -0,0 +1,16 @@
+# NOTE: LibTomCrypt does not expose the lib, when built statically (using `makefile and not `makefile.shared`).
+# This patch copies the necessary code from `makefile.shared`.
+diff --git a/makefile b/makefile
+index cd94b86f..ffb65402 100644
+--- a/makefile
++++ b/makefile
+@@ -79,6 +79,9 @@ $(foreach demo, $(strip $(DEMOS)), $(eval $(call DEMO_template,$(demo))))
+ #as root in order to have a high enough permission to write to the correct
+ #directories and to set the owner and group to root.
+ install: $(call print-help,install,Installs the library and headers) .common_install
++ sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION_PC),' libtomcrypt.pc.in > libtomcrypt.pc
++ install -p -d $(DESTDIR)$(LIBPATH)/pkgconfig
++ install -p -m 644 libtomcrypt.pc $(DESTDIR)$(LIBPATH)/pkgconfig/
+
+ install_bins: $(call print-help,install_bins,Installs the useful demos ($(USEFUL_DEMOS))) .common_install_bins
+ '')