summaryrefslogtreecommitdiff
path: root/app-misc/pal/files/pal-0.4.3-prefix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc/pal/files/pal-0.4.3-prefix.patch')
-rw-r--r--app-misc/pal/files/pal-0.4.3-prefix.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/app-misc/pal/files/pal-0.4.3-prefix.patch b/app-misc/pal/files/pal-0.4.3-prefix.patch
new file mode 100644
index 000000000000..08dfba41c7e7
--- /dev/null
+++ b/app-misc/pal/files/pal-0.4.3-prefix.patch
@@ -0,0 +1,44 @@
+--- a/src/Makefile.defs
++++ b/src/Makefile.defs
+@@ -3,7 +3,7 @@
+
+ # directory to install to. Depending on your distribution, you might
+ # want to change this to /usr/local
+-prefix = /usr
++prefix = @GENTOO_PORTAGE_EPREFIX@/usr
+ CC = gcc
+
+ PAL_VERSION = 0.3.5_pre1
+--- a/src/input.c
++++ b/src/input.c
+@@ -567,7 +567,7 @@
+ }
+
+ /* attempt to copy /etc/pal.conf to ~/.pal/pal.conf */
+- file = fopen("/etc/pal.conf", "r");
++ file = fopen("@GENTOO_PORTAGE_EPREFIX@/etc/pal.conf", "r");
+
+ /* if not found, try PREFIX/share/pal/pal.conf instead */
+ /* NOTE: This is will be removed in the future */
+@@ -577,7 +577,7 @@
+
+ if(file == NULL)
+ {
+- pal_output_error(_("ERROR: Can't open file: /etc/pal.conf\n"));
++ pal_output_error(_("ERROR: Can't open file: @GENTOO_PORTAGE_EPREFIX@/etc/pal.conf\n"));
+ pal_output_error(_("ERROR: Can't open file: " PREFIX "/share/pal/pal.conf\n"));
+ pal_output_error(_("ERROR: This indicates an improper installation.\n"));
+ return ht;
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -51,8 +51,8 @@
+ @echo " --- Installing global data --- "
+ @mkdir -p ${DESTDIR}${prefix}/share/pal;
+ install -m 0644 -o root ../share/*.pal ${DESTDIR}${prefix}/share/pal
+- @mkdir -p ${DESTDIR}/etc;
+- install -m 0644 -o root ../pal.conf ${DESTDIR}/etc/
++ @mkdir -p ${DESTDIR}@GENTOO_PORTAGE_EPREFIX@/etc;
++ install -m 0644 -o root ../pal.conf ${DESTDIR}@GENTOO_PORTAGE_EPREFIX@/etc/
+ @echo
+
+ # "install" will install the files needed by pal and also check to see