summary refs log tree commit diff
path: root/pkgs/games/scid-vs-pc/0001-put-fonts-in-out.patch
blob: 63f31d7ef9e0548b9cbc1029cb4a0349a53a26a0 (plain) (blame)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
From 7e99cf4ae3f38406133a4abf962527cd02416f8e Mon Sep 17 00:00:00 2001
From: Sebastian Galkin <paraseba@gmail.com>
Date: Wed, 20 Dec 2017 18:23:03 -0200
Subject: [PATCH] put fonts in $out

---
 Makefile.conf | 22 ++++------------------
 configure     | 12 ------------
 2 files changed, 4 insertions(+), 30 deletions(-)

diff --git a/Makefile.conf b/Makefile.conf
index e7f8de9..87f3fff 100644
--- a/Makefile.conf
+++ b/Makefile.conf
@@ -226,19 +226,11 @@ install_scid: all_scid
 	fi
 	install -m 755 -d $(SHAREDIR)/bitmaps
 	cp -r ./bitmaps/* $(SHAREDIR)/bitmaps/
-	@if [ "`id -u`" -eq 0 ]; then \
-		install -m 755 -d $(FONTDIR); \
-		install -m 644 -p fonts/*.ttf $(FONTDIR); \
-	else \
-		install -m 755 -d ~/.fonts; \
-		install -m 644 -p fonts/*.ttf ~/.fonts; \
-	fi
+	install -m 755 -d $(FONTDIR); \
+	install -m 644 -p fonts/*.ttf $(FONTDIR); \
+
 	@if [ ! -z "`which fc-cache`" ]; then \
-		if [ "`id -u`" -eq 0 ]; then \
- 			fc-cache -fv $(FONTDIR); \
-		else \
-			fc-cache -fv ~/.fonts; \
-		fi; \
+ 		fc-cache -fv $(FONTDIR); \
 	else \
 		echo "Don't know how to setup truetype fonts (fc-cache not available)."; \
 		echo "Please contact your system administrator."; \
@@ -292,12 +284,6 @@ uninstall:
 		for f in `ls fonts/*.ttf`; do \
 			rm -f ~/.$$f; \
 		done; \
-		if [ ! -z "`which fc-cache`" ]; then \
-			fc-cache -fv ~/.fonts; \
-		fi; \
-		if [ "`find ~/.fonts -type d -empty`" = "`ls -d ~/.fonts`" ]; then \
-			rmdir ~/.fonts; \
-		fi; \
 	fi
 
 clean:
diff --git a/configure b/configure
index 4599c77..8b09678 100755
--- a/configure
+++ b/configure
@@ -473,18 +473,6 @@ proc writeMakefile {{type ""}} {
        exit 1
     }
 
-    if {[isDarwin]} {
-        set var(FONTDIR) /Library/Fonts/
-    } else {
-        # Just install fonts in to /usr irrespective of system prefix. /usr/local may not be active
-        set prefix /usr
-        if {![file isdirectory $prefix/share/fonts]} {
-            set var(FONTDIR) "~/.fonts"
-        } else {
-            set var(FONTDIR) $prefix/share/fonts/truetype/Scid
-        }
-    }
-
     set line [gets $from]
     while {1} {
         set line [gets $from]
-- 
2.15.1