# --- T2-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# 
# T2 SDE: package/.../ncurses/install-no-rm.patch
# Copyright (C) 2004 - 2008 The T2 SDE Project
# 
# More information can be found in the files COPYING and README.
# 
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- T2-COPYRIGHT-NOTE-END ---

One must not rm a library - especially not when the system - e.g. bash -
depends on it ...

  - Rene Rebe <rene@exactcode.de>
--- ncurses-5.7/mk-1st.awk.vanilla	2008-11-03 17:20:02.000000000 +0100
+++ ncurses-5.7/mk-1st.awk	2008-11-03 17:20:40.000000000 +0100
@@ -115,8 +115,7 @@
 	}
 function symlink(src,dst) {
 		if ( src != dst ) {
-			printf "rm -f %s; ", dst
-			printf "$(LN_S) %s %s; ", src, dst
+			printf "$(LN_S) -f %s %s; ", src, dst
 		}
 	}
 function rmlink(directory, dst) {
@@ -335,11 +334,11 @@
 					if ( ShlibVer == "cygdll" ) {
 						ovr_name = sprintf("libcurses%s.a", suffix)
 						printf "\t@echo linking %s to %s\n", imp_name, ovr_name
-						printf "\tcd $(DESTDIR)$(libdir) && (rm -f %s; $(LN_S) %s %s; )\n", ovr_name, imp_name, ovr_name
+						printf "\tcd $(DESTDIR)$(libdir) && ($(LN_S) -f %s %s; )\n", ovr_name, imp_name, ovr_name
 					} else {
 						ovr_name = sprintf("libcurses%s", suffix)
 						printf "\t@echo linking %s to %s\n", end_name, ovr_name
-						printf "\tcd $(DESTDIR)$(libdir) && (rm -f %s; $(LN_S) %s %s; )\n", ovr_name, end_name, ovr_name
+						printf "\tcd $(DESTDIR)$(libdir) && ($(LN_S) -f %s %s; )\n", ovr_name, end_name, ovr_name
 					}
 				}
 				if ( ldconfig != "" && ldconfig != ":" ) {
