View | Details | Raw Unified | Return to bug 98125
Collapse All | Expand All

(-)/usr/home/chinsan/project/zhcon/Makefile (-1 / +2 lines)
Lines 7-13 Link Here
7
7
8
PORTNAME=	zhcon
8
PORTNAME=	zhcon
9
PORTVERSION=	0.2.3
9
PORTVERSION=	0.2.3
10
PORTREVISION=	6
10
PORTREVISION=	7
11
CATEGORIES=	chinese
11
CATEGORIES=	chinese
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
13
MASTER_SITE_SUBDIR=	${PORTNAME}
13
MASTER_SITE_SUBDIR=	${PORTNAME}
Lines 26-31 Link Here
26
MAN1=		zhcon.1
26
MAN1=		zhcon.1
27
27
28
post-patch:
28
post-patch:
29
	@${REINPLACE_CMD} -e 's|/etc|${PREFIX}/etc|' ${WRKSRC}/doc/zhcon.1.in
29
	@${REINPLACE_CMD} -Ee 's,/dev/vga,/dev/ttyv0,g' ${WRKSRC}/src/display/fbdev.cpp
30
	@${REINPLACE_CMD} -Ee 's,/dev/vga,/dev/ttyv0,g' ${WRKSRC}/src/display/fbdev.cpp
30
	@${REINPLACE_CMD} -e '5 s|#||;'  ${WRKSRC}/src/zhcon.conf
31
	@${REINPLACE_CMD} -e '5 s|#||;'  ${WRKSRC}/src/zhcon.conf
31
	@${REINPLACE_CMD} -Ee 's,(\s*=\s*)("?)/usr/local([^"]*)("?),\1\2${PREFIX}\3\4,g' \
32
	@${REINPLACE_CMD} -Ee 's,(\s*=\s*)("?)/usr/local([^"]*)("?),\1\2${PREFIX}\3\4,g' \
(-)/usr/home/chinsan/project/zhcon/files/patch-src-Makefile.in (+11 lines)
Line 0 Link Here
1
--- src/Makefile.in.orig	Thu Apr 17 19:29:48 2003
2
+++ src/Makefile.in	Wed Apr 30 21:10:39 2003
3
@@ -478,7 +478,7 @@
4
 
5
 install-data-local:
6
 	$(mkinstalldirs) $(DESTDIR)/etc
7
-	$(INSTALL_DATA) $(srcdir)/zhcon.conf $(DESTDIR)/etc/zhcon.conf
8
+	$(INSTALL_DATA) $(srcdir)/zhcon.conf $(PREFIX)/etc/zhcon.conf
9
 
10
 uninstall-local:
11
 	-rm -f $(DESTDIR)/etc/zhcon.conf
(-)/usr/home/chinsan/project/zhcon/files/patch-src-configfile.cpp (+21 lines)
Line 0 Link Here
1
--- src/configfile.cpp.orig	Tue Jan 25 07:38:59 2005
2
+++ src/configfile.cpp	Tue Jan 25 07:41:19 2005
3
@@ -19,13 +19,18 @@
4
 #include <stdexcept>
5
 #include <fstream>
6
 #include <cstdlib>
7
+#include <sys/types.h>
8
+#include <unistd.h>
9
 #include "configfile.h"
10
 
11
 ConfigFile::ConfigFile(const char *fn) {
12
+    uid_t euid = geteuid();
13
+    seteuid(getuid());
14
     ifstream in(fn);
15
     if (!in)
16
         throw runtime_error("Could not open config file!");
17
     ParseFile(in);
18
+    seteuid(euid);
19
 }
20
 
21
 ConfigFile::~ConfigFile() {}
(-)/usr/home/chinsan/project/zhcon/files/patch-src-display-fblinear24.cpp (+16 lines)
Line 0 Link Here
1
--- src/display/fblinear24.cpp~	Sun Aug  1 17:22:19 2004
2
+++ src/display/fblinear24.cpp	Sun Aug  1 17:27:33 2004
3
@@ -203,11 +203,11 @@
4
             d1 = (-(*cdat >> 3 & 1) & eorx) ^ bgx;
5
             d2 = (-(*cdat >> 2 & 1) & eorx) ^ bgx;
6
             fb_writel(d1 | (d2<<24), dest32++);
7
-            fb_writew(d2>>8, ((__u16*)dest32)++);
8
+            fb_writew(d2>>8, ((__u16*)dest32) + 1);
9
         }
10
         if (pFont->w & 1) {
11
             d3 = (-(*cdat >> 1 & 1) & eorx) ^ bgx;
12
-            fb_writew(d3, ((__u16*)dest32)++);
13
+            fb_writew(d3, ((__u16*)dest32) + 1);
14
             fb_writeb(d3>>16, (__u8*)dest32);
15
         }
16
         cdat++;
(-)/usr/home/chinsan/project/zhcon/files/patch-src-display-fblinear8.cpp (+11 lines)
Line 0 Link Here
1
--- src/display/fblinear8.cpp~	Sun Aug  1 17:29:43 2004
2
+++ src/display/fblinear8.cpp	Sun Aug  1 17:39:12 2004
3
@@ -102,7 +102,7 @@
4
             fb_writel((nibbletab_cfb8[*cdat >> 4] & eorx) ^ bgx, dest32++);
5
         }
6
         if (pFont->w & 2) {
7
-            fb_writew((nibbletab_cfb8[*cdat & 0xc] & eorx) ^ bgx, ((__u16*)dest32)++);
8
+            fb_writew((nibbletab_cfb8[*cdat & 0xc] & eorx) ^ bgx, ((__u16*)dest32) + 1);
9
         }
10
         if (pFont->w & 1) {
11
             fb_writeb((*cdat & 2) ? fg : bg, (__u8*)dest32);
(-)/usr/home/chinsan/project/zhcon/files/patch-src-global.h (+11 lines)
Line 0 Link Here
1
--- src/global.h.orig   Thu Aug  7 12:54:31 2003
2
+++ src/global.h        Thu Aug  7 12:54:46 2003
3
@@ -26,7 +26,7 @@
4
 //#endif
5
 #define _(String) gettext (String)
6
 #define gettext_noop(String) (String)
7
-
8
+#include <assert.h>
9
 #include "graphdev.h"
10
 #include "hzdecoder.h"
11
 //class Console;
(-)/usr/home/chinsan/project/zhcon/files/patch-src-inputclient.h (+10 lines)
Line 0 Link Here
1
--- src/inputclient.h.orig	Sat Aug 16 16:34:06 2003
2
+++ src/inputclient.h	Sat Aug 16 16:34:15 2003
3
@@ -19,6 +19,7 @@
4
 #ifndef INPUTCLIENT_H
5
 #define INPUTCLIENT_H
6
 
7
+#include <cassert>
8
 #include <string>
9
 #include "console.h"
10
 
(-)/usr/home/chinsan/project/zhcon/files/patch-src-mouse.cpp (+10 lines)
Line 0 Link Here
1
--- src/mouse.cpp.orig	Sat Aug 16 16:36:28 2003
2
+++ src/mouse.cpp	Sat Aug 16 16:36:39 2003
3
@@ -18,6 +18,7 @@
4
 
5
 #include "debug.h"
6
 #include "mouse.h"
7
+#include <cassert>
8
 #include <sys/signal.h>
9
 
10
 #if defined(__FreeBSD__)
(-)/usr/home/chinsan/project/zhcon/files/patch-src-zhcon.cpp (+11 lines)
Line 0 Link Here
1
--- src/zhcon.cpp.orig	Tue Nov 26 01:35:04 2002
2
+++ src/zhcon.cpp	Tue Nov 26 01:35:25 2002
3
@@ -131,7 +131,7 @@
4
     string cfgfile = getenv("HOME");
5
     cfgfile += "/.zhconrc";
6
     if (access(cfgfile.c_str(), R_OK) != 0)
7
-        cfgfile = "/etc/zhcon.conf";
8
+        cfgfile = PREFIX"/etc/zhcon.conf";
9
 
10
     //for debug,a pause enable us to attach zhcon's pid in gdb
11
     //char c;cin>>c;
(-)/usr/home/chinsan/project/zhcon/files/patch-src::Makefile.in (-11 lines)
Lines 1-11 Link Here
1
--- src/Makefile.in.orig	Thu Apr 17 19:29:48 2003
2
+++ src/Makefile.in	Wed Apr 30 21:10:39 2003
3
@@ -478,7 +478,7 @@
4
 
5
 install-data-local:
6
 	$(mkinstalldirs) $(DESTDIR)/etc
7
-	$(INSTALL_DATA) $(srcdir)/zhcon.conf $(DESTDIR)/etc/zhcon.conf
8
+	$(INSTALL_DATA) $(srcdir)/zhcon.conf $(PREFIX)/etc/zhcon.conf
9
 
10
 uninstall-local:
11
 	-rm -f $(DESTDIR)/etc/zhcon.conf
(-)/usr/home/chinsan/project/zhcon/files/patch-src::configfile.cpp (-21 lines)
Lines 1-21 Link Here
1
--- src/configfile.cpp.orig	Tue Jan 25 07:38:59 2005
2
+++ src/configfile.cpp	Tue Jan 25 07:41:19 2005
3
@@ -19,13 +19,18 @@
4
 #include <stdexcept>
5
 #include <fstream>
6
 #include <cstdlib>
7
+#include <sys/types.h>
8
+#include <unistd.h>
9
 #include "configfile.h"
10
 
11
 ConfigFile::ConfigFile(const char *fn) {
12
+    uid_t euid = geteuid();
13
+    seteuid(getuid());
14
     ifstream in(fn);
15
     if (!in)
16
         throw runtime_error("Could not open config file!");
17
     ParseFile(in);
18
+    seteuid(euid);
19
 }
20
 
21
 ConfigFile::~ConfigFile() {}
(-)/usr/home/chinsan/project/zhcon/files/patch-src::display::fblinear24.cpp (-16 lines)
Lines 1-16 Link Here
1
--- src/display/fblinear24.cpp~	Sun Aug  1 17:22:19 2004
2
+++ src/display/fblinear24.cpp	Sun Aug  1 17:27:33 2004
3
@@ -203,11 +203,11 @@
4
             d1 = (-(*cdat >> 3 & 1) & eorx) ^ bgx;
5
             d2 = (-(*cdat >> 2 & 1) & eorx) ^ bgx;
6
             fb_writel(d1 | (d2<<24), dest32++);
7
-            fb_writew(d2>>8, ((__u16*)dest32)++);
8
+            fb_writew(d2>>8, ((__u16*)dest32) + 1);
9
         }
10
         if (pFont->w & 1) {
11
             d3 = (-(*cdat >> 1 & 1) & eorx) ^ bgx;
12
-            fb_writew(d3, ((__u16*)dest32)++);
13
+            fb_writew(d3, ((__u16*)dest32) + 1);
14
             fb_writeb(d3>>16, (__u8*)dest32);
15
         }
16
         cdat++;
(-)/usr/home/chinsan/project/zhcon/files/patch-src::display::fblinear8.cpp (-11 lines)
Lines 1-11 Link Here
1
--- src/display/fblinear8.cpp~	Sun Aug  1 17:29:43 2004
2
+++ src/display/fblinear8.cpp	Sun Aug  1 17:39:12 2004
3
@@ -102,7 +102,7 @@
4
             fb_writel((nibbletab_cfb8[*cdat >> 4] & eorx) ^ bgx, dest32++);
5
         }
6
         if (pFont->w & 2) {
7
-            fb_writew((nibbletab_cfb8[*cdat & 0xc] & eorx) ^ bgx, ((__u16*)dest32)++);
8
+            fb_writew((nibbletab_cfb8[*cdat & 0xc] & eorx) ^ bgx, ((__u16*)dest32) + 1);
9
         }
10
         if (pFont->w & 1) {
11
             fb_writeb((*cdat & 2) ? fg : bg, (__u8*)dest32);
(-)/usr/home/chinsan/project/zhcon/files/patch-src::global.h (-11 lines)
Lines 1-11 Link Here
1
--- src/global.h.orig   Thu Aug  7 12:54:31 2003
2
+++ src/global.h        Thu Aug  7 12:54:46 2003
3
@@ -26,7 +26,7 @@
4
 //#endif
5
 #define _(String) gettext (String)
6
 #define gettext_noop(String) (String)
7
-
8
+#include <assert.h>
9
 #include "graphdev.h"
10
 #include "hzdecoder.h"
11
 //class Console;
(-)/usr/home/chinsan/project/zhcon/files/patch-src::inputclient.h (-10 lines)
Lines 1-10 Link Here
1
--- src/inputclient.h.orig	Sat Aug 16 16:34:06 2003
2
+++ src/inputclient.h	Sat Aug 16 16:34:15 2003
3
@@ -19,6 +19,7 @@
4
 #ifndef INPUTCLIENT_H
5
 #define INPUTCLIENT_H
6
 
7
+#include <cassert>
8
 #include <string>
9
 #include "console.h"
10
 
(-)/usr/home/chinsan/project/zhcon/files/patch-src::mouse.cpp (-10 lines)
Lines 1-10 Link Here
1
--- src/mouse.cpp.orig	Sat Aug 16 16:36:28 2003
2
+++ src/mouse.cpp	Sat Aug 16 16:36:39 2003
3
@@ -18,6 +18,7 @@
4
 
5
 #include "debug.h"
6
 #include "mouse.h"
7
+#include <cassert>
8
 #include <sys/signal.h>
9
 
10
 #if defined(__FreeBSD__)
(-)/usr/home/chinsan/project/zhcon/files/patch-src::zhcon.cpp (-11 lines)
Lines 1-11 Link Here
1
--- src/zhcon.cpp.orig	Tue Nov 26 01:35:04 2002
2
+++ src/zhcon.cpp	Tue Nov 26 01:35:25 2002
3
@@ -131,7 +131,7 @@
4
     string cfgfile = getenv("HOME");
5
     cfgfile += "/.zhconrc";
6
     if (access(cfgfile.c_str(), R_OK) != 0)
7
-        cfgfile = "/etc/zhcon.conf";
8
+        cfgfile = PREFIX"/etc/zhcon.conf";
9
 
10
     //for debug,a pause enable us to attach zhcon's pid in gdb
11
     //char c;cin>>c;

Return to bug 98125