- tabs in preamble
[packages/geki5-KXL.git] / geki5-KXL-scorepath.patch
1 diff -Nur geki5-KXL-0.3.0.orig/configure.in geki5-KXL-0.3.0/configure.in
2 --- geki5-KXL-0.3.0.orig/configure.in   Mon Sep  3 16:28:48 2001
3 +++ geki5-KXL-0.3.0/configure.in        Mon May 12 14:44:52 2003
4 @@ -29,11 +29,18 @@
5          BMP_PATH=$prefix/share/geki5/bmp
6          WAV_PATH=$prefix/share/geki5/wav
7  fi
8 +if test "x$localstatedir" = "xNONE"; then
9 +       SCORE_PATH=/var/games
10 +else
11 +       SCORE_PATH=$localstatedir/games
12 +fi
13  AC_DEFINE_UNQUOTED(DATA_PATH,"$DATA_PATH")
14 +AC_DEFINE_UNQUOTED(SCORE_PATH,"$SCORE_PATH")
15  AC_DEFINE_UNQUOTED(BMP_PATH,"$BMP_PATH")
16  AC_DEFINE_UNQUOTED(WAV_PATH,"$WAV_PATH")
17  AC_DEFINE_UNQUOTED(TITLE,"$PACKAGE $VERSION")
18  AC_SUBST(DATA_PATH)
19 +AC_SUBST(SCORE_PATH)
20  AC_SUBST(BMP_PATH)
21  AC_SUBST(WAV_PATH)
22  
23 diff -Nur geki5-KXL-0.3.0.orig/data/Makefile.am geki5-KXL-0.3.0/data/Makefile.am
24 --- geki5-KXL-0.3.0.orig/data/Makefile.am       Mon Sep  3 17:06:34 2001
25 +++ geki5-KXL-0.3.0/data/Makefile.am    Mon May 12 14:45:29 2003
26 @@ -4,5 +4,6 @@
27  EXTRA_DIST = stage1.dat stage2.dat stage3.dat stage4.dat stage5.dat\
28              stage6.dat stage7.dat stage8.dat .score
29  
30 -install:
31 -       $(INSTALL) -c -m 666 ./.score $(DESTDIR)$(DATA_PATH)
32 +install-data-local:
33 +       $(INSTALL) -d -m 755 $(DESTDIR)$(SCORE_PATH)
34 +       $(INSTALL) -c -m 666 ./.score $(DESTDIR)$(SCORE_PATH)/geki5.score
35 diff -Nur geki5-KXL-0.3.0.orig/src/ranking.c geki5-KXL-0.3.0/src/ranking.c
36 --- geki5-KXL-0.3.0.orig/src/ranking.c  Mon Sep  3 15:20:55 2001
37 +++ geki5-KXL-0.3.0/src/ranking.c       Mon May 12 14:45:50 2003
38 @@ -36,7 +36,7 @@
39    FILE *fp;\r
40    Uint16 i;\r
41  \r
42 -  if ((fp = fopen(DATA_PATH "/.score", "r"))) {\r
43 +  if ((fp = fopen(SCORE_PATH "/geki5.score", "r"))) {\r
44      fscanf(fp, "%d", &(Root->HiScore));\r
45      for (i = 0; i < 5; i ++)\r
46        fscanf(fp, "%d %d %s",\r
47 @@ -65,7 +65,7 @@
48    FILE *fp;\r
49    Uint16 i;\r
50  \r
51 -  if ((fp = fopen(DATA_PATH "/.score", "w"))) {\r
52 +  if ((fp = fopen(SCORE_PATH "/geki5.score", "w"))) {\r
53      fprintf(fp, "%d\n", Root->HiScore);\r
54      for (i = 0; i < 5; i ++)\r
55        fprintf(fp, "%d %d %s\n",\r
This page took 0.06475 seconds and 3 git commands to generate.