summaryrefslogtreecommitdiff
path: root/app-misc/pal/files/pal-0.4.3-prefix.patch
blob: 08dfba41c7e70ffbe46a9ea5f536510867bcae85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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