b0951f
diff -ru a/configure b/configure
b0951f
--- a/configure	2018-01-20 00:27:18.000000000 +0000
9dfd9e
+++ b/configure	2019-08-19 14:51:02.694029707 +0000
b0951f
@@ -6317,7 +6317,7 @@
b0951f
 		fi
b0951f
 		cf_cv_rm_so_locs=yes
b0951f
 		;;
b0951f
-	(linux*|gnu*|k*bsd*-gnu)
b0951f
+	(linux*|gnu*|k*bsd*-gnu|midipix*)
b0951f
 		if test "$DFT_LWR_MODEL" = "shared" ; then
b0951f
 			LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
b0951f
 			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
b0951f
diff -ru a/misc/gen-pkgconfig.in b/misc/gen-pkgconfig.in
b0951f
--- a/misc/gen-pkgconfig.in	2018-01-01 22:51:23.000000000 +0000
9dfd9e
+++ b/misc/gen-pkgconfig.in	2019-08-19 14:51:02.694029707 +0000
b0951f
@@ -64,17 +64,7 @@
b0951f
 MENU_LIBRARY="${MENU_NAME}@USE_ARG_SUFFIX@"
b0951f
 FORM_LIBRARY="${FORM_NAME}@USE_ARG_SUFFIX@"
b0951f
 
b0951f
-CFLAGS="@PKG_CFLAGS@"
b0951f
-if test "$includedir" != "/usr/include" ; then
b0951f
-	includetop=`echo "$includedir" | sed -e 's,/include/[^/]*$,/include,'`
b0951f
-	test "$includetop" = "/usr/include" && includetop="$includedir"
b0951f
-	if test "x$includetop" != "x$includedir"
b0951f
-	then
b0951f
-		CFLAGS="$CFLAGS -I${includetop}"
b0951f
-	fi
b0951f
-	CFLAGS="$CFLAGS -I\${includedir}"
b0951f
-fi
b0951f
-
9dfd9e
+CFLAGS='-I${includedir}'
b0951f
 LDFLAGS=
b0951f
 if test "$libdir" != "/usr/lib" ; then
b0951f
 	LDFLAGS="$LDFLAGS -L\${libdir}"
Lucio Andrés Illanes Albornoz b5c37f
--- ncurses-6.1/misc/run_tic.in.orig	2017-10-24 00:16:22.000000000 +0000
Lucio Andrés Illanes Albornoz b5c37f
+++ ncurses-6.1/misc/run_tic.in	2019-10-11 16:25:12.380000000 +0000
Lucio Andrés Illanes Albornoz b5c37f
@@ -42,16 +42,8 @@
Lucio Andrés Illanes Albornoz b5c37f
 #	make install.data
Lucio Andrés Illanes Albornoz b5c37f
 
Lucio Andrés Illanes Albornoz b5c37f
 : ${suffix:=@EXEEXT@}
Lucio Andrés Illanes Albornoz b5c37f
-: ${DESTDIR:=@DESTDIR@}
Lucio Andrés Illanes Albornoz b5c37f
-: ${prefix:=@prefix@}
Lucio Andrés Illanes Albornoz b5c37f
-: ${exec_prefix:=@exec_prefix@}
Lucio Andrés Illanes Albornoz b5c37f
-: ${bindir:=@bindir@}
Lucio Andrés Illanes Albornoz b5c37f
-: ${top_srcdir:=@top_srcdir@}
Lucio Andrés Illanes Albornoz b5c37f
-: ${srcdir:=@srcdir@}
Lucio Andrés Illanes Albornoz b5c37f
 : ${datarootdir:=@datarootdir@}
Lucio Andrés Illanes Albornoz b5c37f
-: ${datadir:=@datadir@}
Lucio Andrés Illanes Albornoz b5c37f
 : ${TIC_PATH:=@TIC_PATH@}
Lucio Andrés Illanes Albornoz b5c37f
-: ${ticdir:=@TERMINFO@}
Lucio Andrés Illanes Albornoz b5c37f
 : ${source:=@TERMINFO_SRC@}
Lucio Andrés Illanes Albornoz b5c37f
 : ${LN_S:="@LN_S@"}
Lucio Andrés Illanes Albornoz b5c37f
 : ${cross_compiling:=no}
Lucio Andrés Illanes Albornoz b5c37f
--- ncurses-6.1/misc/Makefile.in.orig	2017-12-31 20:34:42.000000000 +0000
Lucio Andrés Illanes Albornoz b5c37f
+++ ncurses-6.1/misc/Makefile.in	2019-10-11 16:27:12.376000000 +0000
Lucio Andrés Illanes Albornoz b5c37f
@@ -83,17 +83,17 @@
Lucio Andrés Illanes Albornoz b5c37f
 install : @MISC_INSTALL_DATA@ install.libs
Lucio Andrés Illanes Albornoz b5c37f
 
Lucio Andrés Illanes Albornoz b5c37f
 install.data :	terminfo.tmp \
Lucio Andrés Illanes Albornoz b5c37f
-		$(DESTDIR)$(libdir) \
Lucio Andrés Illanes Albornoz b5c37f
-		$(DESTDIR)$(datadir) \
Lucio Andrés Illanes Albornoz b5c37f
-		$(DESTDIR)$(tabsetdir)
Lucio Andrés Illanes Albornoz b5c37f
+		$(DESTDIR)/lib \
Lucio Andrés Illanes Albornoz b5c37f
+		$(DESTDIR)/share \
Lucio Andrés Illanes Albornoz b5c37f
+		$(DESTDIR)/share/tabset
Lucio Andrés Illanes Albornoz b5c37f
 	DESTDIR=${DESTDIR} \
Lucio Andrés Illanes Albornoz b5c37f
-	prefix=${prefix} \
Lucio Andrés Illanes Albornoz b5c37f
-	exec_prefix=${exec_prefix} \
Lucio Andrés Illanes Albornoz b5c37f
-	bindir=${bindir} \
Lucio Andrés Illanes Albornoz b5c37f
+	prefix="" \
Lucio Andrés Illanes Albornoz b5c37f
+	exec_prefix="" \
Lucio Andrés Illanes Albornoz b5c37f
+	bindir=bin \
Lucio Andrés Illanes Albornoz b5c37f
 	top_srcdir=${top_srcdir} \
Lucio Andrés Illanes Albornoz b5c37f
 	srcdir=${srcdir} \
Lucio Andrés Illanes Albornoz b5c37f
-	datadir=${datadir} \
Lucio Andrés Illanes Albornoz b5c37f
-	ticdir=${ticdir} \
Lucio Andrés Illanes Albornoz b5c37f
+	datadir=share \
Lucio Andrés Illanes Albornoz b5c37f
+	ticdir=share/terminfo \
Lucio Andrés Illanes Albornoz b5c37f
 	source=terminfo.tmp \
Lucio Andrés Illanes Albornoz b5c37f
 	cross_compiling=@cross_compiling@ \
Lucio Andrés Illanes Albornoz b5c37f
 	$(SHELL) ./run_tic.sh
Lucio Andrés Illanes Albornoz b5c37f
@@ -101,7 +101,7 @@
Lucio Andrés Illanes Albornoz b5c37f
 		$(SHELL) -c 'for i in * ; do \
Lucio Andrés Illanes Albornoz b5c37f
 			if test -f $$i ; then \
Lucio Andrés Illanes Albornoz b5c37f
 			echo installing $$i; \
Lucio Andrés Illanes Albornoz b5c37f
-			$(INSTALL_DATA) $$i $(DESTDIR)$(tabsetdir)/$$i; \
Lucio Andrés Illanes Albornoz b5c37f
+			$(INSTALL_DATA) $$i $(DESTDIR)/share/tabset/$$i; \
Lucio Andrés Illanes Albornoz b5c37f
 			fi; done'
Lucio Andrés Illanes Albornoz b5c37f
 
Lucio Andrés Illanes Albornoz b5c37f
 NCURSES_CONFIG	= ncurses@DFT_ARG_SUFFIX@@cf_cv_abi_version@@cf_config_suffix@-config
9dfd9e
@@ -113,12 +113,12 @@
9dfd9e
 # pkg-config is not installed.  Work around that by creating the library
9dfd9e
 # directory during this rule:
9dfd9e
 @MAKE_PC_FILES@install.libs :: pc-files
9dfd9e
-@MAKE_PC_FILES@	@$(SHELL) -c 'case "x$(DESTDIR)$(PKG_CONFIG_LIBDIR)" in \
9dfd9e
+@MAKE_PC_FILES@	@$(SHELL) -c 'case "x$(PKG_CONFIG_LIBDIR)" in \
9dfd9e
 @MAKE_PC_FILES@		(x/*) \
9dfd9e
-@MAKE_PC_FILES@			mkdir -p $(DESTDIR)$(PKG_CONFIG_LIBDIR); \
9dfd9e
+@MAKE_PC_FILES@			mkdir -p $(PKG_CONFIG_LIBDIR); \
9dfd9e
 @MAKE_PC_FILES@			for name in *.pc; do \
9dfd9e
 @MAKE_PC_FILES@				echo installing $$name; \
9dfd9e
-@MAKE_PC_FILES@				$(INSTALL_DATA) $$name $(DESTDIR)$(PKG_CONFIG_LIBDIR)/$$name; \
9dfd9e
+@MAKE_PC_FILES@				$(INSTALL_DATA) $$name $(PKG_CONFIG_LIBDIR)/$$name; \
9dfd9e
 @MAKE_PC_FILES@			done \
9dfd9e
 @MAKE_PC_FILES@			;; \
9dfd9e
 @MAKE_PC_FILES@		(*) \