summaryrefslogtreecommitdiffstats
path: root/math/gretl/files
diff options
context:
space:
mode:
Diffstat (limited to 'math/gretl/files')
-rw-r--r--math/gretl/files/patch-Makefile.in14
-rw-r--r--math/gretl/files/patch-cli::Makefile.in41
-rw-r--r--math/gretl/files/patch-gnome::Makefile.in32
-rw-r--r--math/gretl/files/patch-gui2::Makefile.in100
-rw-r--r--math/gretl/files/patch-gui2::omf-install::Makefile.in29
-rw-r--r--math/gretl/files/patch-lib::Makefile.in56
-rw-r--r--math/gretl/files/patch-lib::src::gretl_paths.c13
-rw-r--r--math/gretl/files/patch-lib__src__gretl_matrix.c17
-rw-r--r--math/gretl/files/patch-macros-lapack.m411
-rw-r--r--math/gretl/files/patch-plugin::Makefile.in46
-rw-r--r--math/gretl/files/patch-plugin::libole2::ms-ole2.h14
-rw-r--r--math/gretl/files/patch-plugin::workbook.c10
-rw-r--r--math/gretl/files/patch-plugin__oprobit.c19
-rw-r--r--math/gretl/files/patch-share::Makefile.in65
-rw-r--r--math/gretl/files/patch-share::bcih::Makefile.in14
15 files changed, 481 insertions, 0 deletions
diff --git a/math/gretl/files/patch-Makefile.in b/math/gretl/files/patch-Makefile.in
new file mode 100644
index 000000000..c4dab95e3
--- /dev/null
+++ b/math/gretl/files/patch-Makefile.in
@@ -0,0 +1,14 @@
+--- Makefile.in.orig Thu Sep 12 00:35:22 2002
++++ Makefile.in Mon Oct 21 10:02:37 2002
+@@ -22,8 +22,9 @@
+ GUIDIR = gui
+ endif
+
+-INSTALL_PROGRAM = ${INSTALL} -m 755
+-INSTALL_DATA = ${INSTALL} -m 644
++INSTALL_PROGRAM = @INSTALL_PROGRAM@
++INSTALL_SCRIPT = @INSTALL_SCRIPT@
++INSTALL_DATA = @INSTALL_DATA@
+
+ export
+
diff --git a/math/gretl/files/patch-cli::Makefile.in b/math/gretl/files/patch-cli::Makefile.in
new file mode 100644
index 000000000..0d5ed3166
--- /dev/null
+++ b/math/gretl/files/patch-cli::Makefile.in
@@ -0,0 +1,41 @@
+--- cli/Makefile.in.orig Sat Sep 11 01:19:35 2004
++++ cli/Makefile.in Sun Oct 8 02:07:02 2006
+@@ -9,12 +9,16 @@
+ exec_prefix = @exec_prefix@
+ bindir = @bindir@
+ datadir = @datadir@
+-localedir = $(datadir)/locale
++localedir = $(prefix)/share/locale
+
+ have_readline = @have_readline@
+ READLINE_LIBS = @READLINE_LIBS@
+ READLINE_CFLAGS = @READLINE_CFLAGS@
+
++CPPFLAGS = @CPPFLAGS@
++LDFLAGS = @LDFLAGS@
++INTL_LIBS = @LTLIBINTL@
++
+ ifeq ($(CC),)
+ CC = gcc
+ endif
+@@ -40,17 +44,17 @@
+
+ DEFS = -DLOCALEDIR=\"$(localedir)\" -DHAVE_CONFIG_H
+
+-override CFLAGS += -I.. -I$(topsrc) -I$(libsrc) $(READLINE_CFLAGS) $(DEFS)
++override CFLAGS += -I.. -I$(topsrc) -I$(libsrc) $(READLINE_CFLAGS) $(DEFS) $(CPPFLAGS)
+
+ CLI = gretlcli
+-LIBTOOL = ../libtool
++LIBTOOL = @LIBTOOL@
+
+ %.o: %.c
+ $(CC) -c $(CFLAGS) $<
+ $(CC) $(CFLAGS) -MM $< > .deps/$*.d
+
+ $(CLI): .deps $(OBJS)
+- $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJS) $(GRETLLIB) $(READLINE_LIBS)
++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJS) $(GRETLLIB) $(READLINE_LIBS) $(INTL_LIBS)
+
+ .deps:
+ mkdir $@
diff --git a/math/gretl/files/patch-gnome::Makefile.in b/math/gretl/files/patch-gnome::Makefile.in
new file mode 100644
index 000000000..8c1ad3d1d
--- /dev/null
+++ b/math/gretl/files/patch-gnome::Makefile.in
@@ -0,0 +1,32 @@
+--- gnome/Makefile.in.orig Sat Dec 23 00:26:03 2006
++++ gnome/Makefile.in Sun Mar 25 02:18:02 2007
+@@ -5,12 +5,10 @@
+
+ INSTALL = @INSTALL@
+ prefix = @prefix@
+-gnome_prefix = @gnome_prefix@
++datadir = @datadir@
+ have_gnome = @have_gnome@
+
+-ifeq ($(gnome_prefix),NA)
+- gnome_prefix = $(prefix)
+-endif
++sysconfdir = @sysconfdir@
+
+ GCONFTOOL = @GCONFTOOL@
+ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
+@@ -26,10 +24,10 @@
+ schemadir = $(GCONF_SCHEMA_FILE_DIR)
+ endif
+
+-desktopdir = $(gnome_prefix)/share/applications
+-mimedir = $(gnome_prefix)/share/mime-info
+-gpixmaps = $(gnome_prefix)/share/pixmaps
+-schemadir = $(gnome_prefix)/etc/gconf/schemas
++desktopdir = $(datadir)/applications
++mimedir = $(datadir)/mime-info
++gpixmaps = $(datadir)/pixmaps
++schemadir = $(sysconfdir)/gconf/schemas
+
+ install: install-images install-misc $(install_schemas)
+
diff --git a/math/gretl/files/patch-gui2::Makefile.in b/math/gretl/files/patch-gui2::Makefile.in
new file mode 100644
index 000000000..f5844dd3e
--- /dev/null
+++ b/math/gretl/files/patch-gui2::Makefile.in
@@ -0,0 +1,100 @@
+--- gui2/Makefile.in.orig Thu Jul 27 04:51:05 2006
++++ gui2/Makefile.in Sun Oct 8 02:07:29 2006
+@@ -4,6 +4,7 @@
+ exec_prefix = @exec_prefix@
+ bindir = @bindir@
+ libdir = @libdir@
++datadir = @datadir@
+ CC = @CC@
+ CFLAGS = @CFLAGS@
+ MAKE = @MAKE@
+@@ -50,7 +51,7 @@
+
+ ifeq ($(have_gtksourceview),yes)
+ langbase := $(shell pkg-config --variable=prefix gtksourceview-1.0)
+- langdir = $(langbase)/share/gtksourceview-1.0/language-specs
++ langdir = $(datadir)/gtksourceview-1.0/language-specs
+ query_install_lang = install-lang
+ endif
+
+@@ -59,7 +60,7 @@
+ GTKSOURCEVIEW_CFLAGS = -I$(topsrc)/gui2
+ GTKSOURCEVIEW_LIBS = -L./gtksourceview -lgtksourceview-lite
+ MY_SOURCEVIEW_LIB = gtksourceview/libgtksourceview-lite.a
+- langdir = $(prefix)/share/gretl/gtksourceview
++ langdir = $(datadir)/gretl/gtksourceview
+ query_install_lang = install-lang
+ endif
+ endif
+@@ -69,14 +70,14 @@
+ ../lib/libgretl-1.0.la
+ GUI_CFLAGS = $(GNOME_CFLAGS) $(GTKSOURCEVIEW_CFLAGS) $(GTK_EXTRA_CFLAGS)
+ query_install_gnome = install-gnome
+- GNOMEDEF = -DDATADIR=\"$(gnome_prefix)/share\"
++ GNOMEDEF = -DDATADIR=\"$(datadir)\"
+ else
+ LIBS = $(GTK_LIBS) $(GTKSOURCEVIEW_LIBS) $(GTK_EXTRA_LIB) ../lib/libgretl-1.0.la
+ GUI_CFLAGS = $(GTK_CFLAGS) $(GTKSOURCEVIEW_CFLAGS) $(GTK_EXTRA_CFLAGS)
+ endif
+ ifeq ($(USE_NLS),yes)
+ datadir = @datadir@
+- localedir = $(datadir)/locale
++ localedir = $(prefix)/share/locale
+ NLSDEF = -DLOCALEDIR=\"$(localedir)\"
+ endif
+
+@@ -88,7 +89,7 @@
+
+ # Directories
+ bindir = $(prefix)/bin
+-gretldir = $(prefix)/share/gretl
++gretldir = $(datadir)/gretl
+ tooldir = $(topsrc)/tools
+ libsrc = $(topsrc)/lib/src
+ clisrc = $(topsrc)/cli
+@@ -97,7 +98,7 @@
+ #### End of system configuration section. ####
+
+ SHELL = /bin/sh
+-LIBTOOL = ../libtool
++LIBTOOL = @LIBTOOL@
+ PROG = gretl_x11
+
+ vpath %.c $(topsrc)/gui2
+@@ -156,23 +157,23 @@
+ $(CC) $(CFLAGS) -MM $< > .deps/$*.d
+
+ $(PROG): .deps $(OBJS) $(HACK_OBJ) $(GTKEXTRA_LITE) $(MY_SOURCEVIEW_LIB)
+- $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJS) $(HACK_OBJ) $(LIBS) $(INETLIB) $(CARBONLIB)
++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJS) $(HACK_OBJ) $(LIBS) $(INETLIB) $(CARBONLIB)
+
+ $(HACK_OBJ): $(HACK_SRC) $(HACK_HDR)
+ $(CC) $(CFLAGS) $(GTK_CFLAGS) -c $<
+
+ mklang: mklang.c
+ $(CC) -c -I.. -I$(libsrc) $(XML_CFLAGS) $<
+- $(LIBTOOL) --mode=link $(CC) -o $@ mklang.o ../lib/libgretl-1.0.la $(XML_LIBS)
++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ mklang.o ../lib/libgretl-1.0.la $(XML_LIBS)
+
+ gretl.lang: mklang
+ ./mklang > $@
+
+ $(GTKEXTRA_LITE):
+- make -C gtkextra-lite
++ $(MAKE) -C gtkextra-lite
+
+ gtksourceview/libgtksourceview-lite.a:
+- make -C gtksourceview
++ $(MAKE) -C gtksourceview
+
+ .deps:
+ mkdir $@
+@@ -187,7 +188,7 @@
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) -s $(PROG) $(bindir)/$(PROG)
+
+ install-data: installdirs
+- $(INSTALL_PROGRAM) ../gretl_sh $(bindir)/gretl
++ $(INSTALL_SCRIPT) ../gretl_sh $(bindir)/gretl
+ $(INSTALL_DATA) $(topsrc)/pixmaps/gretl-logo.xpm $(gretldir)
+ $(INSTALL_DATA) $(topsrc)/COPYING $(gretldir)
+
diff --git a/math/gretl/files/patch-gui2::omf-install::Makefile.in b/math/gretl/files/patch-gui2::omf-install::Makefile.in
new file mode 100644
index 000000000..c5cfa1532
--- /dev/null
+++ b/math/gretl/files/patch-gui2::omf-install::Makefile.in
@@ -0,0 +1,29 @@
+--- gui2/omf-install/Makefile.in.orig Wed Apr 9 01:11:18 2003
++++ gui2/omf-install/Makefile.in Mon Apr 14 17:37:41 2003
+@@ -1,13 +1,14 @@
+-topsrc = $top_srcdir@
++topsrc = @top_srcdir@
+ tooldir = $(topsrc)/tools
+
+ INSTALL = @INSTALL@
+-gnome_prefix = @gnome_prefix@
++INSTALL_DATA = @INSTALL_DATA@
++datadir = @datadir@
+
+ VPATH = $(topsrc)/gui2/omf-install
+
+-docdir = $(gnome_prefix)/share/gnome/help/gretl/C
+-omfdir = $(gnome_prefix)/share/omf/gretl
++docdir = $(gnome_prefix)/share/gnome/help/gretl/C
++omfdir = $(datadir)/omf/gretl
+
+ gretl-C.omf: gretl-C.omf.in
+ scrollkeeper-preinstall $(docdir)/`awk 'BEGIN {RS = ">" } \
+@@ -16,5 +17,5 @@
+
+ install: gretl-C.omf
+ $(tooldir)/mkinstalldirs $(omfdir)
+- $(INSTALL) -m 644 $< $(omfdir)
+- scrollkeeper-update -p $(gnome_prefix)/var/scrollkeeper
++ $(INSTALL_DATA) $< $(omfdir)
++ scrollkeeper-update -p /var/db/scrollkeeper
diff --git a/math/gretl/files/patch-lib::Makefile.in b/math/gretl/files/patch-lib::Makefile.in
new file mode 100644
index 000000000..f193e4b10
--- /dev/null
+++ b/math/gretl/files/patch-lib::Makefile.in
@@ -0,0 +1,56 @@
+--- lib/Makefile.in.orig Mon Apr 16 10:13:11 2007
++++ lib/Makefile.in Mon May 21 16:10:51 2007
+@@ -25,6 +25,11 @@
+
+ have_gtk = @have_gtk@
+
++datadir = @datadir@
++CPPFLAGS = @CPPFLAGS@ -DDATADIR=\"$(datadir)\"
++LDFLAGS = @LDFLAGS@
++INTL_LIBS = @LTLIBINTL@
++
+ ifeq ($(INSTALL_PROGRAM),)
+ INSTALL_PROGRAM = $(INSTALL) -m 755
+ endif
+@@ -39,7 +44,7 @@
+ libdir = $(prefix)/lib
+ includedir = $(prefix)/include/gretl
+ aclocaldir = $(prefix)/share/aclocal
+-pkgconfigdir = $(libdir)/pkgconfig
++pkgconfigdir = $(prefix)/libdata/pkgconfig
+
+ INSTALLDIRS = $(libdir) $(includedir) $(aclocaldir)
+
+@@ -55,8 +60,8 @@
+
+ # hard-coded -L/usr/local/lib is a bodge!!
+
+-LIBS = $(LAPACK_LIBS) -lm -ldl -L/usr/local/lib -lz $(XML_LIBS) \
+- $(GLIB_LIBS) $(GMP_LIBS) $(FFTW_LIBS)
++LIBS = $(LAPACK_LIBS) -lm -lz $(XML_LIBS) \
++ $(GLIB_LIBS) $(GMP_LIBS) $(FFTW_LIBS) $(INTL_LIBS)
+
+ #### End of system configuration section. ####
+
+@@ -204,10 +209,10 @@
+ LOBJS = $(SRCS:.c=.lo)
+ AUX_LOBJ = $(CEPHES_SRC:.c=.lo) $(MINPACK_SRC:.c=.lo)
+
+-LIBTOOL = ../libtool
++LIBTOOL = @LIBTOOL@
+
+ override CFLAGS += -I.. -I$(topsrc) -I$(libsrc) $(XML_CFLAGS) $(GLIB_CFLAGS) \
+- $(GMP_CFLAGS) $(FFTW_CFLAGS) -DHAVE_CONFIG_H
++ $(GMP_CFLAGS) $(FFTW_CFLAGS) $(CPPFLAGS) -DHAVE_CONFIG_H
+
+ COMPILE = $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS)
+
+@@ -216,7 +221,7 @@
+ $(CC) $(CFLAGS) -MM -MT $*.lo $< > .deps/$*.d
+
+ $(LIBGRETL): .deps $(LOBJS) $(AUX_LOBJ)
+- $(LIBTOOL) --mode=link $(CC) -o $@ $(LOBJS) $(AUX_LOBJ) \
++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(LOBJS) $(AUX_LOBJ) \
+ -rpath $(prefix)/lib $(LIBS) \
+ -version-info $(CURRENT):$(REVISION):$(AGE)
+
diff --git a/math/gretl/files/patch-lib::src::gretl_paths.c b/math/gretl/files/patch-lib::src::gretl_paths.c
new file mode 100644
index 000000000..12770b080
--- /dev/null
+++ b/math/gretl/files/patch-lib::src::gretl_paths.c
@@ -0,0 +1,13 @@
+--- lib/src/gretl_paths.c.orig Wed Feb 11 06:14:36 2004
++++ lib/src/gretl_paths.c Sun Feb 29 18:10:53 2004
+@@ -432,8 +432,8 @@
+ if (home != NULL) {
+ strcpy(ppaths->gretldir, home);
+ } else {
+- strcpy(ppaths->gretldir, GRETL_PREFIX);
+- strcat(ppaths->gretldir, "/share/gretl/");
++ strcpy(ppaths->gretldir, DATADIR);
++ strcat(ppaths->gretldir, "/gretl/");
+ }
+
+ sprintf(ppaths->binbase, "%sdb/", ppaths->gretldir);
diff --git a/math/gretl/files/patch-lib__src__gretl_matrix.c b/math/gretl/files/patch-lib__src__gretl_matrix.c
new file mode 100644
index 000000000..0943f175b
--- /dev/null
+++ b/math/gretl/files/patch-lib__src__gretl_matrix.c
@@ -0,0 +1,17 @@
+--- lib/src/gretl_matrix.c.orig Wed Mar 14 09:25:57 2007
++++ lib/src/gretl_matrix.c Sat Apr 14 03:50:51 2007
+@@ -432,12 +432,13 @@
+ {
+ int reverse = (start > end);
+ int i, k, n = 1 + (reverse ? (start-end) : (end-start));
++ gretl_matrix *v;
+
+ if (n == 0) {
+ return NULL;
+ }
+
+- gretl_matrix *v = gretl_vector_alloc(n);
++ v = gretl_vector_alloc(n);
+
+ if (v == NULL) {
+ return v;
diff --git a/math/gretl/files/patch-macros-lapack.m4 b/math/gretl/files/patch-macros-lapack.m4
new file mode 100644
index 000000000..e2c4ae940
--- /dev/null
+++ b/math/gretl/files/patch-macros-lapack.m4
@@ -0,0 +1,11 @@
+--- macros/lapack.m4~ Fri Aug 26 05:19:27 2005
++++ macros/lapack.m4 Tue Jan 23 10:04:28 2007
+@@ -17,7 +17,7 @@
+
+ if test x"${LAPACK_LIBS}" = x ; then
+ AC_MSG_CHECKING(for libgfortran, libg2c or libf2c)
+- AC_CHECK_LIB(gfortran,etime_,FLIB="-lgfortran",FLIB="none")
++ AC_CHECK_LIB(gfortran,_gfortran_etime,FLIB="-lgfortran",FLIB="none")
+ if test $FLIB = "none" ; then
+ AC_CHECK_LIB(g2c,c_sqrt,FLIB="-lg2c",FLIB="none")
+ fi
diff --git a/math/gretl/files/patch-plugin::Makefile.in b/math/gretl/files/patch-plugin::Makefile.in
new file mode 100644
index 000000000..ee99f0eae
--- /dev/null
+++ b/math/gretl/files/patch-plugin::Makefile.in
@@ -0,0 +1,46 @@
+--- plugin/Makefile.in.orig Tue Sep 12 22:53:16 2006
++++ plugin/Makefile.in Sun Oct 8 02:08:19 2006
+@@ -8,6 +8,10 @@
+ INSTALL = @INSTALL@
+ LN = @LN_S@
+
++CPPFLAGS = @CPPFLAGS@
++LDFLAGS = @LDFLAGS@
++INTL_LIBS = @LTLIBINTL@
++
+ build_gui = @build_gui@
+ have_gtk = @have_gtk@
+ have_gmp = @have_gmp@
+@@ -45,7 +49,7 @@
+
+ override CFLAGS += -I.. -I$(topsrc)/gui2 -DHAVE_CONFIG_H
+
+-LIBTOOL = ../libtool
++LIBTOOL = @LIBTOOL@
+ COMPILE = $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS)
+ LINK = $(LIBTOOL) --mode=link $(CC) -module -avoid-version -rpath $(plugindir)
+
+@@ -163,7 +167,7 @@
+ URCDATA = $(topsrc)/plugin/data/urcdata.gz
+
+ override CFLAGS += $(GRETLINC) $(GTK_CFLAGS) $(GMP_CFLAGS) $(MPFR_CFLAGS) \
+- $(XML_CFLAGS) $(GRETL_LIBOLE2_CFLAGS) $(ZIP_CFLAGS) $(AUDIO_CFLAGS) -I. $(GMPDEF)
++ $(XML_CFLAGS) $(GRETL_LIBOLE2_CFLAGS) $(ZIP_CFLAGS) $(AUDIO_CFLAGS) -I. $(GMPDEF) $(CPPFLAGS)
+
+ %.lo: %.c
+ $(COMPILE) $<
+@@ -266,12 +270,12 @@
+ .PHONY:
+
+ install: $(GRETLLIB) $(PLUGINS) $(URCDATA) installdirs
+- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) \
++ $(LIBTOOL) --mode=install $(INSTALL_DATA) \
+ $(PLUGINS) $(plugindir)
+ $(INSTALL_DATA) $(URCDATA) $(plugindir)/data
+
+ install-strip: $(GRETLLIB) $(PLUGINS) installdirs
+- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) -s \
++ $(LIBTOOL) --mode=install $(INSTALL_DATA) -s \
+ $(PLUGINS) $(plugindir)
+
+ installdirs:
diff --git a/math/gretl/files/patch-plugin::libole2::ms-ole2.h b/math/gretl/files/patch-plugin::libole2::ms-ole2.h
new file mode 100644
index 000000000..dc25fd58b
--- /dev/null
+++ b/math/gretl/files/patch-plugin::libole2::ms-ole2.h
@@ -0,0 +1,14 @@
+--- plugin/libole2/ms-ole.h.orig Fri Apr 12 03:41:50 2002
++++ plugin/libole2/ms-ole.h Thu Dec 19 06:28:05 2002
+@@ -13,10 +13,10 @@
+
+ /* This should be done in glib */
+ /* Allin Cottrell modifications here */
++# include <sys/types.h>
+ #ifndef _WIN32
+ # include <fcntl.h> /* for mode_t */
+ #else
+-# include <sys/types.h>
+ # ifdef notdef
+ typedef unsigned long mode_t;
+ typedef /* signed */ long off_t;
diff --git a/math/gretl/files/patch-plugin::workbook.c b/math/gretl/files/patch-plugin::workbook.c
new file mode 100644
index 000000000..d91482092
--- /dev/null
+++ b/math/gretl/files/patch-plugin::workbook.c
@@ -0,0 +1,10 @@
+--- plugin/workbook.c.orig Fri May 31 22:22:42 2002
++++ plugin/workbook.c Sat Jul 27 08:45:00 2002
+@@ -24,6 +24,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <glib.h>
++#include <wchar.h>
+
+ #ifdef G_OS_WIN32
+ # include "../winconfig.h"
diff --git a/math/gretl/files/patch-plugin__oprobit.c b/math/gretl/files/patch-plugin__oprobit.c
new file mode 100644
index 000000000..8b8ff9683
--- /dev/null
+++ b/math/gretl/files/patch-plugin__oprobit.c
@@ -0,0 +1,19 @@
+--- plugin/oprobit.c.orig Fri Feb 16 06:47:19 2007
++++ plugin/oprobit.c Sat Apr 14 03:58:23 2007
+@@ -665,6 +665,7 @@
+ gretl_matrix *V = NULL;
+ double *theta = NULL;
+ int err;
++ op_container *OC;
+
+ /* BFGS apparatus */
+ int maxit = 1000;
+@@ -679,7 +680,7 @@
+ opt &= ~OPT_R;
+ }
+
+- op_container *OC = op_container_new(ci, Z, pmod, opt);
++ OC = op_container_new(ci, Z, pmod, opt);
+ if (OC == NULL) {
+ return E_ALLOC;
+ }
diff --git a/math/gretl/files/patch-share::Makefile.in b/math/gretl/files/patch-share::Makefile.in
new file mode 100644
index 000000000..2ae91dc9c
--- /dev/null
+++ b/math/gretl/files/patch-share::Makefile.in
@@ -0,0 +1,65 @@
+--- share/Makefile.in.orig Fri Mar 9 11:04:53 2007
++++ share/Makefile.in Sat Apr 14 02:54:05 2007
+@@ -2,15 +2,16 @@
+ datarootdir = @datarootdir@
+
+ prefix = @prefix@
++datadir = @datadir@
+ have_gtk = @have_gtk@
+ build_docs = @build_docs@
+
+-gretldir = $(prefix)/share/gretl
++gretldir = $(datadir)/gretl
+ tooldir = $(topsrc)/tools
+ sharesrc = $(topsrc)/share
+ pdfdir = ../doc/tex
+
+-INSTALL_DATA = cp -fp
++INSTALL_DATA = @INSTALL_DATA@
+
+ EN_GUI_HLP = $(sharesrc)/gretlgui.hlp
+ EN_CMD_HLP = $(sharesrc)/gretlcmd.hlp
+@@ -45,14 +46,14 @@
+ all: $(query_make_help)
+
+ help:
+- make -C ../doc/commands help-all
++ $(MAKE) -C ../doc/commands help-all
+
+ .PHONY :
+
+ install: installdirs install_datafiles install_scripts install_functions \
+ install_help install_fonts $(query_install_help)
+ $(INSTALL_DATA) $(sharesrc)/gretl.stamp $(gretldir)/gretl.stamp
+- make -C bcih install
++ $(MAKE) -C bcih install
+
+ install-strip: install
+
+@@ -78,12 +79,12 @@
+ $(INSTALL_DATA) $(sharesrc)/functions/gretlfunc.dtd $(gretldir)/functions
+
+ install_man: gretl.1
+- $(tooldir)/mkinstalldirs $(prefix)/share/man/man1
+- $(INSTALL_DATA) $(topsrc)/gretl.1 $(prefix)/share/man/man1
++ $(tooldir)/mkinstalldirs $(prefix)/man/man1
++ $(INSTALL_DATA) $(topsrc)/gretl.1 $(prefix)/man/man1
+
+ install_help: $(AUTO_HELPFILES)
+ $(tooldir)/mkinstalldirs $(gretldir)
+- $(tooldir)/mkinstalldirs $(gretldir)/doc
++# $(tooldir)/mkinstalldirs $(gretldir)/doc
+ $(tooldir)/mkinstalldirs $(gretldir)/helpfigs
+ $(INSTALL_DATA) $(EN_GUI_HLP) $(gretldir)/gretlgui.hlp
+ $(INSTALL_DATA) $(EN_CMD_HLP) $(gretldir)/gretlcmd.hlp
+@@ -96,8 +97,8 @@
+ $(INSTALL_DATA) $(IT_CLI_HLP) $(gretldir)/gretlcli.hlp.it
+ for f in $(sharesrc)/texfigs/*.png ; do \
+ $(INSTALL_DATA) $$f $(gretldir)/helpfigs ; done
+- for f in $(pdfdir)/gretl-ref.pdf $(pdfdir)/gretl-guide.pdf ; do \
+- if test -f $$f ; then $(INSTALL_DATA) $$f $(gretldir)/doc ; fi ; done
++# for f in $(pdfdir)/gretl-ref.pdf $(pdfdir)/gretl-guide.pdf ; do \
++# if test -f $$f ; then $(INSTALL_DATA) $$f $(gretldir)/doc ; fi ; done
+
+ install_fonts:
+ for f in $(sharesrc)/fonts/*.ttf ; do \
diff --git a/math/gretl/files/patch-share::bcih::Makefile.in b/math/gretl/files/patch-share::bcih::Makefile.in
new file mode 100644
index 000000000..0be68fd9f
--- /dev/null
+++ b/math/gretl/files/patch-share::bcih::Makefile.in
@@ -0,0 +1,14 @@
+--- share/bcih/Makefile.in.orig Sat Apr 26 04:32:37 2003
++++ share/bcih/Makefile.in Sun May 4 03:16:24 2003
+@@ -4,7 +4,10 @@
+ INSTALL_DATA = cp -fp
+
+ prefix = @prefix@
+-gretldir = $(prefix)/share/gretl
++datadir = @datadir@
++gretldir = $(datadir)/gretl
++INSTALL_DATA = @INSTALL_DATA@
++
+ VPATH = $(topsrc)/share/bcih
+
+ bcih.bin: mkbin bcih.dat