summaryrefslogtreecommitdiffstats
path: root/testing/squidguard/squidguard-1.4-gentoo.patch
blob: 60b5461e9ef29a7a2d05c9ccf107c26677ebed65 (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
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
diff -Nru squidGuard-1.4.orig/Makefile.in squidGuard-1.4/Makefile.in
--- squidGuard-1.4.orig/Makefile.in	2008-05-17 18:36:44.000000000 +0000
+++ squidGuard-1.4/Makefile.in	2009-01-10 13:02:14.000000000 +0000
@@ -43,7 +43,7 @@
 # Dependencies for installing
 #	
 
-install:	install-build install-conf
+install:	install-build
 
 install-conf:
 	@echo Installing configuration file  ;
@@ -85,10 +85,10 @@
 
 install-build:
 	@echo Installing squidGuard 
-	@if [ ! -d $(bindir) ]; then \
-		$(MKINSTALLDIRS) $(bindir) ; \
+	@if [ ! -d "$(INSTDIR)"/$(bindir) ]; then \
+		$(MKINSTALLDIRS) "$(INSTDIR)"/$(bindir) ; \
 	fi ; \
-	cp src/squidGuard $(bindir) || exit 1 ;  \
+	cp src/squidGuard "$(INSTDIR)"/$(bindir) || exit 1 ;  \
 	echo Done. ;
 
 clean::
diff -Nru squidGuard-1.4.orig/src/Makefile.in squidGuard-1.4/src/Makefile.in
--- squidGuard-1.4.orig/src/Makefile.in	2009-01-03 20:05:39.000000000 +0000
+++ squidGuard-1.4/src/Makefile.in	2009-01-10 13:02:14.000000000 +0000
@@ -110,6 +110,8 @@
 	mv -f y.tab.c y.tab.c.bison
 	mv -f y.tab.h y.tab.h.bison
 
+sg.y sg.l:
+
 #
 # Dependencies for installing
 #
@@ -122,8 +124,8 @@
 
 install.bin:: squidGuard
 	@echo making $@ in `basename \`pwd\``
-	@$(MKDIR) $(bindir) $(logdir) $(cfgdir)
-	$(INSTALL_PROGRAM) squidGuard $(bindir)/squidGuard
+	@$(MKDIR) "$(INSTDIR)"/$(bindir) "$(INSTDIR)"/$(logdir) "$(INSTDIR)"/$(cfgdir)
+	$(INSTALL_PROGRAM) squidGuard "$(INSTDIR)"/$(bindir)/squidGuard
 
 uninstall.bin::
 	@echo making $@ in `basename \`pwd\``
diff -Nru squidGuard-1.4.orig/src/sgDb.c squidGuard-1.4/src/sgDb.c
--- squidGuard-1.4.orig/src/sgDb.c	2008-07-14 18:29:41.000000000 +0000
+++ squidGuard-1.4/src/sgDb.c	2009-01-10 13:02:14.000000000 +0000
@@ -103,13 +103,21 @@
     if(createdb)
       flag = flag | DB_TRUNCATE;
     if ((ret = 
+#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
+	 Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) {
+#else
 	 Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) {
+#endif
       (void) Db->dbp->close(Db->dbp, 0);
       sgLogFatalError("Error db_open: %s", strerror(ret));
     }
   } else {
     if ((ret = 
+#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
+	 Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {
+#else
 	 Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {
+#endif
       sgLogFatalError("Error db_open: %s", strerror(ret));
     }
   }