about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/readline/link-against-ncurses.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/readline/link-against-ncurses.patch')
-rw-r--r--nixpkgs/pkgs/development/libraries/readline/link-against-ncurses.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/readline/link-against-ncurses.patch b/nixpkgs/pkgs/development/libraries/readline/link-against-ncurses.patch
new file mode 100644
index 000000000000..0fd0598f4650
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/readline/link-against-ncurses.patch
@@ -0,0 +1,18 @@
+This patch is to make sure that `libncurses' is among the `NEEDED'
+dependencies of `libreadline.so' and `libhistory.so'.
+
+Failing to do that, applications linking against Readline are
+forced to explicitly link against libncurses as well; in addition,
+this trick doesn't work when using GNU ld's `--as-needed'.
+
+--- shlib/Makefile.in	2009-01-06 18:03:22.000000000 +0100
++++ shlib/Makefile.in	2009-07-27 14:43:25.000000000 +0200
+@@ -84,7 +84,7 @@ SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@
+ SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@
+ SHOBJ_LIBS = @SHOBJ_LIBS@
+ 
+-SHLIB_XLDFLAGS = @LDFLAGS@ @SHLIB_XLDFLAGS@
++SHLIB_XLDFLAGS = @LDFLAGS@ @SHLIB_XLDFLAGS@ -lncurses
+ SHLIB_LIBS = @SHLIB_LIBS@
+ 
+ SHLIB_DOT = @SHLIB_DOT@