updated on Sun Jan 15 08:01:04 UTC 2012
[aur-mirror.git] / dbskkd-cdb / dbskkd-cdb-2.00.diff
blobfb43fc9aba15b0e130354207eac2992e51226a4d
1 diff -ur dbskkd-cdb-2.00.orig/Makefile dbskkd-cdb-2.00/Makefile
2 --- dbskkd-cdb-2.00.orig/Makefile 2009-02-06 11:56:47.000000000 +0900
3 +++ dbskkd-cdb-2.00/Makefile 2010-10-11 14:28:37.943333781 +0900
4 @@ -1,9 +1,11 @@
5 # dbskkd-cdb Makefile
7 -CC = cc -Wall -O2 -g -I/usr/local/include
8 +CC = cc
9 +CFLAGS += -Wall -O2 -g
10 COMPAT =
11 -CDBLIB = /usr/local/lib/libcdb.a
12 -INSTALLDIR = /usr/local/libexec
13 +CDBLIB = /usr/lib/libcdb.a
14 +INSTALLDIR = /usr/lib/dbskkd-cdb
15 +DESTDIR =
17 .c.o:
18 $(CC) $(COMPAT) $(PRIVATE) -c $*.c
19 @@ -18,11 +20,12 @@
20 dbskkd-cdb.o ${CDBLIB}
22 dbskkd-cdb.o: dbskkd-cdb.c
23 - $(CC) $(COMPAT) $(PRIVATE) -c dbskkd-cdb.c
24 + $(CC) $(CFLAGS) $(COMPAT) $(PRIVATE) -c dbskkd-cdb.c
26 error.o: error.c error.h
28 install: dbskkd-cdb
29 - cp dbskkd-cdb $(INSTALLDIR); chmod 755 $(INSTALLDIR)/dbskkd-cdb
30 + mkdir -p $(DESTDIR)$(INSTALLDIR)
31 + cp dbskkd-cdb $(DESTDIR)$(INSTALLDIR); chmod 755 $(DESTDIR)$(INSTALLDIR)/dbskkd-cdb
33 # end of makefile
34 diff -ur dbskkd-cdb-2.00.orig/dbskkd-cdb.c dbskkd-cdb-2.00/dbskkd-cdb.c
35 --- dbskkd-cdb-2.00.orig/dbskkd-cdb.c 2009-02-06 11:56:47.000000000 +0900
36 +++ dbskkd-cdb-2.00/dbskkd-cdb.c 2010-10-11 14:29:32.376667114 +0900
37 @@ -27,7 +27,7 @@
38 * spelling changed from JISHO to JISYO
40 #ifndef JISYO_FILE
41 -#define JISYO_FILE "/usr/local/share/skk/SKK-JISYO.L.cdb"
42 +#define JISYO_FILE "/usr/share/skk/SKK-JISYO.L.cdb"
43 #endif /* JISYO_FILE */
45 #define BUFSIZE (1024) /* max size of a request */
46 @@ -84,7 +84,7 @@
47 unsigned int keylen, datalen;
49 /* open dictionary cdb file */
50 - if ((dicfd = open(JISYO_FILE, O_RDONLY, S_IRUSR)) < 0) {
51 + if ((dicfd = open(argc == 1 ? JISYO_FILE : argv[1], O_RDONLY, S_IRUSR)) < 0) {
52 diesys("cannot open() the dictionary file " JISYO_FILE);
53 /* NOTREACHED */
55 diff -ur dbskkd-cdb-2.00.orig/makeskkcdb.sh dbskkd-cdb-2.00/makeskkcdb.sh
56 --- dbskkd-cdb-2.00.orig/makeskkcdb.sh 2009-02-06 11:56:47.000000000 +0900
57 +++ dbskkd-cdb-2.00/makeskkcdb.sh 2010-10-11 15:34:16.153333782 +0900
58 @@ -1,3 +1,3 @@
59 #!/bin/sh
60 -./skktocdbm.sh < /usr/local/share/skk/SKK-JISYO.L | \
61 +./skktocdbm.sh < /usr/share/skk/SKK-JISYO.L | \
62 cdb -c -t - SKK-JISYO.L.cdb