db1f66
diff -ru ncurses-6.3.orig/configure ncurses-6.3/configure
db1f66
--- ncurses-6.3.orig/configure	2021-10-17 17:12:23.000000000 +0200
db1f66
+++ ncurses-6.3/configure	2021-11-17 20:37:05.654345556 +0100
db1f66
@@ -5940,7 +5940,7 @@
db1f66
 			LD_RPATH_OPT="-rpath "
db1f66
 		fi
db1f66
 		;;
db1f66
-	(linux*|gnu*|k*bsd*-gnu|freebsd*)
db1f66
+	(linux*|gnu*|k*bsd*-gnu|freebsd*|midipix*)
db1f66
 		LD_RPATH_OPT="-Wl,-rpath,"
db1f66
 		;;
db1f66
 	(openbsd[2-9].*|mirbsd*)
db1f66
@@ -6299,7 +6299,7 @@
db1f66
 		fi
db1f66
 		cf_cv_rm_so_locs=yes
db1f66
 		;;
db1f66
-	(linux*|gnu*|k*bsd*-gnu)
db1f66
+	(linux*|gnu*|k*bsd*-gnu|midipix*)
db1f66
 		if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
db1f66
 			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
db1f66
 			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
c96e74
--- ncurses-6.3/misc/gen-pkgconfig.in.orig	2021-08-07 23:36:33.000000000 +0200
c96e74
+++ ncurses-6.3/misc/gen-pkgconfig.in	2022-12-27 09:17:07.295020120 +0100
c96e74
@@ -71,19 +71,9 @@
db1f66
 MENU_LIBRARY="${MENU_NAME}@USE_ARG_SUFFIX@"
db1f66
 PANEL_LIBRARY="${PANEL_NAME}@USE_ARG_SUFFIX@"
db1f66
 
db1f66
-CFLAGS="@PKG_CFLAGS@"
db1f66
-if [ "$includedir" != "/usr/include" ]; then
db1f66
-	includetop=`echo "$includedir" | sed -e 's,/include/[^/]*$,/include,'`
db1f66
-	[ "$includetop" = "/usr/include" ] && includetop="$includedir"
db1f66
-	CFLAGS="$CFLAGS -I\${includedir}"
db1f66
-	if [ "x$includetop" != "x$includedir" ]
db1f66
-	then
db1f66
-		CFLAGS="$CFLAGS -I${includetop}"
db1f66
-	fi
db1f66
-fi
db1f66
-
db1f66
+CFLAGS='-I${includedir}'
db1f66
 lib_flags=
c96e74
-for opt in -L$libdir @EXTRA_PKG_LDFLAGS@ @LIBS@
c96e74
+for opt in @EXTRA_PKG_LDFLAGS@ @LIBS@
db1f66
 do
c96e74
 	case $opt in
c96e74
 	-l*) # LIBS is handled specially below
db1f66
diff -ru ncurses-6.3.orig/misc/Makefile.in ncurses-6.3/misc/Makefile.in
db1f66
--- ncurses-6.3.orig/misc/Makefile.in	2021-07-03 21:07:50.000000000 +0200
db1f66
+++ ncurses-6.3/misc/Makefile.in	2021-11-17 20:44:37.633501552 +0100
db1f66
@@ -103,17 +103,17 @@
db1f66
 @MAKE_DATABASE@install :: @MISC_INSTALL_DATA@
db1f66
 
db1f66
 @MAKE_DATABASE@install.data ::	terminfo.tmp \
db1f66
-@MAKE_DATABASE@		$(DESTDIR)$(libdir) \
db1f66
-@MAKE_DATABASE@		$(DESTDIR)$(datadir) \
db1f66
-@MAKE_DATABASE@		$(DESTDIR)$(tabsetdir)
db1f66
+@MAKE_DATABASE@		$(DESTDIR)/lib \
db1f66
+@MAKE_DATABASE@		$(DESTDIR)/share \
db1f66
+@MAKE_DATABASE@		$(DESTDIR)/share/tabset
db1f66
 @MAKE_DATABASE@	DESTDIR=${DESTDIR} \
db1f66
-@MAKE_DATABASE@	prefix=${prefix} \
db1f66
-@MAKE_DATABASE@	exec_prefix=${exec_prefix} \
db1f66
-@MAKE_DATABASE@	bindir=${bindir} \
db1f66
+@MAKE_DATABASE@	prefix="" \
db1f66
+@MAKE_DATABASE@	exec_prefix="" \
db1f66
+@MAKE_DATABASE@	bindir=/bin \
db1f66
 @MAKE_DATABASE@	top_srcdir=${top_srcdir} \
db1f66
 @MAKE_DATABASE@	srcdir=${srcdir} \
db1f66
-@MAKE_DATABASE@	datadir=${datadir} \
db1f66
-@MAKE_DATABASE@	ticdir=${ticdir} \
db1f66
+@MAKE_DATABASE@	datadir=share \
db1f66
+@MAKE_DATABASE@	ticdir=share/terminfo \
db1f66
 @MAKE_DATABASE@	source=terminfo.tmp \
db1f66
 @MAKE_DATABASE@	cross_compiling=@cross_compiling@ \
db1f66
 @MAKE_DATABASE@	$(SHELL) ./run_tic.sh
db1f66
@@ -121,7 +121,7 @@
db1f66
 @MAKE_DATABASE@		$(SHELL) -c 'for i in * ; do \
db1f66
 @MAKE_DATABASE@			if test -f $$i ; then \
db1f66
 @MAKE_DATABASE@			echo installing $$i; \
db1f66
-@MAKE_DATABASE@			$(INSTALL_DATA) $$i $(DESTDIR)$(tabsetdir)/$$i; \
db1f66
+@MAKE_DATABASE@			$(INSTALL_DATA) $$i $(DESTDIR)/share/tabset/$$i; \
db1f66
 @MAKE_DATABASE@			fi; done' )
db1f66
 install.data ::
db1f66
 	@echo "finished $@"
db1f66
@@ -147,13 +147,13 @@
db1f66
 # directory during this rule:
db1f66
 @MAKE_PC_FILES@install \
db1f66
 @MAKE_PC_FILES@install.libs :: pc-files
db1f66
-@MAKE_PC_FILES@	@$(SHELL) -c 'case "x$(DESTDIR)$(PKG_CONFIG_LIBDIR)" in \
db1f66
+@MAKE_PC_FILES@	@$(SHELL) -c 'case "x$(PKG_CONFIG_LIBDIR)" in \
db1f66
 @MAKE_PC_FILES@		x/*) \
db1f66
-@MAKE_PC_FILES@			mkdir -p $(DESTDIR)$(PKG_CONFIG_LIBDIR); \
db1f66
+@MAKE_PC_FILES@			mkdir -p $(PKG_CONFIG_LIBDIR); \
db1f66
 @MAKE_PC_FILES@			for name in $(PC_FILES); do \
db1f66
 @MAKE_PC_FILES@				test -f $$name || continue; \
db1f66
 @MAKE_PC_FILES@				echo installing $$name; \
db1f66
-@MAKE_PC_FILES@				$(INSTALL_DATA) $$name $(DESTDIR)$(PKG_CONFIG_LIBDIR)/$$name; \
db1f66
+@MAKE_PC_FILES@				$(INSTALL_DATA) $$name $(PKG_CONFIG_LIBDIR)/$$name; \
db1f66
 @MAKE_PC_FILES@			done \
db1f66
 @MAKE_PC_FILES@			;; \
db1f66
 @MAKE_PC_FILES@		*) \
db1f66
diff -ru ncurses-6.3.orig/misc/run_tic.in ncurses-6.3/misc/run_tic.in
db1f66
--- ncurses-6.3.orig/misc/run_tic.in	2020-02-15 16:30:53.000000000 +0100
db1f66
+++ ncurses-6.3/misc/run_tic.in	2021-11-17 20:34:54.197118847 +0100
db1f66
@@ -43,16 +43,8 @@
db1f66
 #	make install.data
db1f66
 
db1f66
 : ${suffix:=@EXEEXT@}
db1f66
-: ${DESTDIR:=@DESTDIR@}
db1f66
-: ${prefix:=@prefix@}
db1f66
-: ${exec_prefix:=@exec_prefix@}
db1f66
-: ${bindir:=@bindir@}
db1f66
-: ${top_srcdir:=@top_srcdir@}
db1f66
-: ${srcdir:=@srcdir@}
db1f66
 : ${datarootdir:=@datarootdir@}
db1f66
-: ${datadir:=@datadir@}
db1f66
 : ${TIC_PATH:=@TIC@}
db1f66
-: ${ticdir:=@TERMINFO@}
db1f66
 : ${source:=@TERMINFO_SRC@}
db1f66
 : ${LN_S:="@LN_S@"}
db1f66
 : ${cross_compiling:=no}