View | Details | Raw Unified | Return to bug 102406 | Differences between
and this patch

Collapse All | Expand All

(-)/home/pankovpv/ports/net-p2p/verlihub/Makefile (-17 / +15 lines)
Lines 7-13 Link Here
7
7
8
PORTNAME=	verlihub
8
PORTNAME=	verlihub
9
PORTVERSION=	0.9.8.c
9
PORTVERSION=	0.9.8.c
10
PORTREVISION=	1
10
PORTREVISION=	2
11
PORTEPOCH=	1
11
PORTEPOCH=	1
12
CATEGORIES=	net-p2p
12
CATEGORIES=	net-p2p
13
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
13
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
Lines 15-55 Link Here
15
DISTNAME=	verlihub-0.9.8c-RC2
15
DISTNAME=	verlihub-0.9.8c-RC2
16
16
17
MAINTAINER=	hurbold@yahoo.com
17
MAINTAINER=	hurbold@yahoo.com
18
COMMENT=	Verlihub Linux/Unix Direct Connect Hub Software
18
COMMENT=	A Linux/Unix Direct Connect Hub Software
19
19
20
LIB_DEPENDS=	GeoIP.5:${PORTSDIR}/net/GeoIP \
20
LIB_DEPENDS=	GeoIP.5:${PORTSDIR}/net/GeoIP \
21
		pcre.0:${PORTSDIR}/devel/pcre
21
		pcre.0:${PORTSDIR}/devel/pcre
22
# Actually, bash isn't required for building,
23
# but otherwise configure script wouldn't pick the right path
24
BUILD_DEPENDS=	bash:${PORTSDIR}/shells/bash2
22
RUN_DEPENDS=	bash:${PORTSDIR}/shells/bash2
25
RUN_DEPENDS=	bash:${PORTSDIR}/shells/bash2
23
26
24
WRKSRC=		${WRKDIR}/verlihub-0.9.8c
27
WRKSRC=		${WRKDIR}/verlihub-0.9.8c
25
28
26
USE_MYSQL=	yes
29
USE_MYSQL=	yes
27
USE_PERL5=	yes
28
USE_GMAKE=	yes
29
GNU_CONFIGURE=	yes
30
GNU_CONFIGURE=	yes
30
INSTALLS_SHLIB=	yes
31
USE_LDCONFIG=	yes
31
CONFIGURE_ENV=	CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include"
32
USE_GCC=	3.4+
33
USE_OPENSSL=	yes
32
34
33
PKGMESSAGE=	${WRKDIR}/pkg-message
35
SUB_FILES=	pkg-message
34
PORTDOCS=	configuring.txt help.sql using.txt features.html help.html params.php verlihub.html
36
USE_RC_SUBR=	${PORTNAME}
35
37
36
.include <bsd.port.pre.mk>
38
PORTDOCS=	configuring.txt using.txt help.html verlihub.html html_manual/verlihub.css html_manual/verlihub_manual.html
37
38
.if ${OSVERSION} < 500000
39
USE_GCC=	3.4+
40
.endif
41
39
42
post-patch:
40
post-patch:
43
	@${CAT} ${PKGDIR}/pkg-message | ${SED} 's|%%PREFIX%%|${PREFIX}|' > ${PKGMESSAGE}
41
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/src/verlihub.cpp
44
42
45
post-install:
43
post-install:
46
.if !defined(NOPORTDOCS)
44
.if !defined(NOPORTDOCS)
47
	${MKDIR} ${DOCSDIR}
45
	@${MKDIR} ${DOCSDIR}
46
	@${MKDIR} ${DOCSDIR}/html_manual
48
.for i in ${PORTDOCS}
47
.for i in ${PORTDOCS}
49
	${INSTALL_DATA} ${WRKSRC}/docs/${i} ${DOCSDIR}
48
	${INSTALL_DATA} ${WRKSRC}/docs/${i} ${DOCSDIR}
50
.endfor
49
.endfor
51
.endif
50
.endif
52
53
	@${CAT} ${PKGMESSAGE}
51
	@${CAT} ${PKGMESSAGE}
54
52
55
.include <bsd.port.post.mk>
53
.include <bsd.port.mk>
(-)/home/pankovpv/ports/net-p2p/verlihub/files/patch-cserverdc.cpp (+11 lines)
Line 0 Link Here
1
--- src/cserverdc.cpp-orig	Tue Mar  8 12:27:21 2005
2
+++ src/cserverdc.cpp	Mon Aug 21 00:22:10 2006
3
@@ -151,7 +151,7 @@
4
 		mOpChat->mMyINFO_basic = mOpChat->mMyINFO;
5
 		AddRobot((cMainRobot*)mOpChat);
6
 	}
7
-	mNetOutLog.open("./net_out.log",ios::out);
8
+	mNetOutLog.open("/var/log/verlihub_net_out.log",ios::out);
9
 	mTotalShare = 0;
10
 
11
 	mFactory = new cDCConnFactory(this);
(-)/home/pankovpv/ports/net-p2p/verlihub/files/patch-db_charset (+83 lines)
Line 0 Link Here
1
diff -ruN src-orig/cdbconf.cpp src/cdbconf.cpp
2
--- src-orig/cdbconf.cpp	Thu Apr  8 02:16:21 2004
3
+++ src/cdbconf.cpp	Mon Aug 21 01:39:14 2006
4
@@ -20,6 +20,7 @@
5
 	Add("db_data",db_data,string("verlihub"));
6
 	Add("config_name",config_name,string("config"));
7
 	Add("lang_name",lang_name,string("lang_en"));
8
+	Add("db_charset",db_charset,string("utf8"));
9
 	Load();
10
 }
11
 
12
diff -ruN src-orig/cdbconf.h src/cdbconf.h
13
--- src-orig/cdbconf.h	Thu Apr  8 02:16:21 2004
14
+++ src/cdbconf.h	Mon Aug 21 01:38:59 2006
15
@@ -31,6 +31,7 @@
16
 	string db_user;
17
 	string db_pass;
18
 	string db_data;
19
+	string db_charset;
20
 	string config_name;
21
 	string lang_name;
22
 
23
diff -ruN src-orig/cmysql.cpp src/cmysql.cpp
24
--- src-orig/cmysql.cpp	Fri Oct  1 15:19:44 2004
25
+++ src/cmysql.cpp	Mon Aug 21 01:38:59 2006
26
@@ -19,10 +19,10 @@
27
 /*!
28
     \fn nMySQL::cMySQL::cMySQL(string&host,string&user,string&pass,string&data)
29
  */
30
-cMySQL::cMySQL(string&host,string&user,string&pass,string&data) : cObj("cMySQL")
31
+cMySQL::cMySQL(string&host,string&user,string&pass,string&data,string&charset) : cObj("cMySQL")
32
 {
33
     Init();
34
-    if(!Connect(host,user,pass,data))
35
+    if(!Connect(host,user,pass,data,charset))
36
     {
37
     	throw "Mysql connection error.";
38
     }
39
@@ -40,12 +40,13 @@
40
 	if(!mDBHandle) Error(0, string("Can't init mysql structure :(.: "));
41
 }
42
 
43
-bool cMySQL::Connect(string &host, string &user, string &pass, string &data)
44
+bool cMySQL::Connect(string &host, string &user, string &pass, string &data, string &charset)
45
 {
46
 	if(Log(1)) LogStream() << "Connecting to mysql server: "
47
-			<< user << "@" << host << "/" << data << endl;
48
+			<< user << "@" << host << "/" << data << "with charset " << charset << endl;
49
 
50
 	mysql_options(mDBHandle,MYSQL_OPT_COMPRESS,0);
51
+	mysql_options(mDBHandle,MYSQL_SET_CHARSET_NAME,charset.c_str());
52
 	if(!mysql_real_connect(
53
 		mDBHandle,
54
 		host.c_str(),
55
diff -ruN src-orig/cmysql.h src/cmysql.h
56
--- src-orig/cmysql.h	Mon Mar  8 18:59:56 2004
57
+++ src/cmysql.h	Mon Aug 21 01:38:59 2006
58
@@ -34,10 +34,10 @@
59
 friend class cQuery;
60
 public:
61
 	cMySQL();
62
-	cMySQL(string&host,string&user,string&pass,string&data);
63
+	cMySQL(string&host,string&user,string&pass,string&data,string&charset);
64
 	~cMySQL();
65
 	void Init();
66
-	bool Connect(string &host, string &user, string &passwd, string &db);
67
+	bool Connect(string &host, string &user, string &passwd, string &db, string &charset);
68
 	public: void Error(int level, string text);
69
 
70
 private:
71
diff -ruN src-orig/cserverdc.cpp src/cserverdc.cpp
72
--- src-orig/cserverdc.cpp	Tue Mar  8 12:27:21 2005
73
+++ src/cserverdc.cpp	Mon Aug 21 01:38:59 2006
74
@@ -66,7 +66,8 @@
75
 		mDBConf.db_host,
76
 		mDBConf.db_user,
77
 		mDBConf.db_pass,
78
-		mDBConf.db_data), // connect to mysql
79
+		mDBConf.db_data,
80
+		mDBConf.db_charset), // connect to mysql
81
 	mC(*this), // create the config object
82
 	mL(*this),
83
 	mSetupList(mMySQL),
(-)/home/pankovpv/ports/net-p2p/verlihub/files/patch-scripts-vh_install.in (+16 lines)
Line 0 Link Here
1
--- scripts/vh_install.in-orig	Sat Mar  5 04:24:59 2005
2
+++ scripts/vh_install.in	Sun Aug 20 20:18:09 2006
3
@@ -210,10 +210,13 @@
4
 		echo "FYI: original configuration has been moved to $cfg_dir/_backup"
5
 	fi
6
 
7
+	$old_umask=`umask`
8
+	umask 77
9
 	echo "db_host = $mysql_host" >  $cfg_dbconfig
10
 	echo "db_data = $mysql_data" >> $cfg_dbconfig
11
 	echo "db_user = $mysql_user" >> $cfg_dbconfig
12
 	echo "db_pass = $mysql_pass" >> $cfg_dbconfig
13
+	umask $old_umask
14
 
15
 	echo "Written: $cfg_dbconfig"
16
 
(-)/home/pankovpv/ports/net-p2p/verlihub/files/patch-scripts-vh_runhub.in (+15 lines)
Line 0 Link Here
1
--- scripts/vh_runhub.in-orig	Sat Mar  5 03:52:33 2005
2
+++ scripts/vh_runhub.in	Sun Aug 20 23:25:45 2006
3
@@ -14,9 +14,9 @@
4
 
5
 confdir=`$bindir/vh_getcfg` || die "fix your problem with vh_getcfg, maybe just run vh_install first"
6
 exepath=$bindir/ # default location for the hub config directory
7
-pidfile=$confdir/pid
8
-logfile=$confdir/log
9
-errfile=$confdir/err
10
+pidfile=/var/run/verlihub.pid
11
+logfile=/var/log/verlihub.log
12
+errfile=/var/log/verlihub.err
13
 psname=vh_restart
14
 launcher=$bindir/$psname
15
 killsig=
(-)/home/pankovpv/ports/net-p2p/verlihub/files/patch-src-cpluginloader.cpp (+28 lines)
Line 0 Link Here
1
--- src/cpluginloader.cpp.orig	Fri Oct  1 15:19:44 2004
2
+++ src/cpluginloader.cpp	Mon Aug 21 02:39:33 2006
3
@@ -40,6 +40,12 @@
4
  */
5
 bool nPlugin::cPluginLoader::Open()
6
 {
7
+	/*
8
+	 * Reset dlerror() since it can contain error from previous
9
+	 * call to dlopen()/dlsym().
10
+	 */
11
+	dlerror();
12
+
13
 	mHandle = dlopen(mFileName.c_str(), RTLD_NOW);
14
 	if(!mHandle || IsError()) // NOTE hte OR (||) operator evaluates only the first statement if that one is true
15
 	{
16
@@ -99,6 +105,12 @@
17
  */
18
 void * nPlugin::cPluginLoader::LoadSym(const char *name)
19
 {
20
+	/*
21
+	 * Reset dlerror() since it can contain error from previous
22
+	 * call to dlopen()/dlsym().
23
+	 */
24
+	dlerror();
25
+	
26
 	void *func = dlsym( mHandle, name);
27
 	if(IsError())
28
 	{
(-)/home/pankovpv/ports/net-p2p/verlihub/files/patch-src-tpluginbase.cpp (+15 lines)
Line 0 Link Here
1
--- src/tpluginbase.cpp-orig	Fri Oct  1 15:19:44 2004
2
+++ src/tpluginbase.cpp	Mon Aug 21 01:56:22 2006
3
@@ -34,6 +34,12 @@
4
  */
5
 bool nPlugin::tPluginBase::Open()
6
 {
7
+	/*
8
+	 * Reset dlerror() since it can contain error from previous
9
+	 * call to dlopen()/dlsym().
10
+	*/
11
+	dlerror();
12
+	
13
 	mHandle = dlopen(mFileName.c_str(), RTLD_NOW);
14
 	if(!mHandle)
15
 	{
(-)/home/pankovpv/ports/net-p2p/verlihub/files/patch-src-verlihub.cpp (+11 lines)
Line 0 Link Here
1
--- src/verlihub.cpp-orig	Tue Dec 21 15:48:46 2004
2
+++ src/verlihub.cpp	Sun Aug 20 18:22:29 2006
3
@@ -81,6 +81,8 @@
4
 	{
5
 		string ConfigBase;
6
 		const char *DirName = NULL;
7
+		DirName = "%%PREFIX%%/etc/verlihub";
8
+		if ((DirName != NULL) && DirExists(DirName)) ConfigBase = DirName;
9
 		char *HomeDir = getenv("HOME");
10
 		string tmp;
11
 		if (HomeDir)
(-)/home/pankovpv/ports/net-p2p/verlihub/files/pkg-message.in (+18 lines)
Line 0 Link Here
1
--------------------------------------------------------------------
2
3
Documentation has been installed in %%DOCSDIR%%
4
5
This port requires a working mysql server installation, either
6
locally or remotely. Once you have a properly-running mysql server, 
7
please run the install script:
8
9
%%PREFIX%%/bin/vh_install
10
11
Follow the instructions given. After it verlihub can be controlled 
12
through the rc(8) script %%PREFIX%%/etc/rc.d/%%PORTNAME%%.sh
13
14
Visit http://www.verlihub.net for the project's homepage
15
or http://www.verlihubforums.com for the project's forums. The verlihub
16
manual is available online at http://www.danomac.org/verlihub/
17
18
-------------------------------------------------------------------
(-)/home/pankovpv/ports/net-p2p/verlihub/files/verlihub.in (+36 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
# PROVIDE: verlihub
4
# REQUIRE: DAEMON
5
#
6
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
7
# to enable this service:
8
#
9
# verlihub_enable (bool):   Set to NO by default.
10
#               Set it to YES to enable verlihub.
11
#
12
13
. "%%RC_SUBR%%"
14
15
name="verlihub"
16
rcvar=${name}_enable
17
18
command=%%PREFIX%%/bin/${name}
19
pidfile=/var/run/${name}.pid
20
21
logfile=/var/log/${name}.log
22
errfile=/var/log/${name}.err
23
command_args="> $logfile 2> $errfile &"
24
25
: ${verlihub_configdir="`%%PREFIX%%/bin/vh_getcfg`"}
26
required_dirs="$verlihub_configdir"
27
required_files="$verlihub_configdir/dbconfig $verlihub_configdir/motd $verlihub_configdir/help_usr $verlihub_configdir/faq $verlihub_configdir/rules"
28
29
load_rc_config $name
30
31
: ${verlihub_enable="NO"}
32
33
start_postcmd="echo \$! > $pidfile"
34
stop_postcmd="rm $pidfile"
35
36
run_rc_command "$1"
(-)/home/pankovpv/ports/net-p2p/verlihub/pkg-descr (-1 / +1 lines)
Lines 4-10 Link Here
4
Additional functionality is available through a versatile
4
Additional functionality is available through a versatile
5
'plugin' system.
5
'plugin' system.
6
 
6
 
7
WWW: http://verlihub.sourceforge.net
7
WWW: http://www.verlihub.net
8
8
9
-Hurbold
9
-Hurbold
10
hurbold@yahoo.com
10
hurbold@yahoo.com
(-)/home/pankovpv/ports/net-p2p/verlihub/pkg-message (-21 lines)
Lines 1-21 Link Here
1
--------------------------------------------------------------------
2
3
Documentation has been installed in %%PREFIX%%/share/doc
4
5
Scripts and the executable have been installed in %%PREFIX%%/bin
6
7
This port requires a working mysql server installation, either
8
locally or remotely.
9
10
Once you have a properly-running mysql server, please run the install
11
script:
12
13
%%PREFIX%%/bin/vh_install
14
15
Follow the instructions given.
16
17
Visit http://verlihub.sourceforge.net for the project's homepage
18
or http://verlihub.no-ip.com for the project's forums. The verlihub
19
manual is available online at http://www.danomac.org/verlihub
20
21
-------------------------------------------------------------------
(-)/home/pankovpv/ports/net-p2p/verlihub/pkg-plist (-17 / +17 lines)
Lines 101-121 Link Here
101
lib/libvhapi.la
101
lib/libvhapi.la
102
lib/libvhapi.so
102
lib/libvhapi.so
103
lib/libvhapi.so.0
103
lib/libvhapi.so.0
104
share/verlihub/config/faq
104
%%DATADIR%%/config/faq
105
share/verlihub/config/help_admin
105
%%DATADIR%%/config/help_admin
106
share/verlihub/config/help_cheef
106
%%DATADIR%%/config/help_cheef
107
share/verlihub/config/help_master
107
%%DATADIR%%/config/help_master
108
share/verlihub/config/help_op
108
%%DATADIR%%/config/help_op
109
share/verlihub/config/help_reg
109
%%DATADIR%%/config/help_reg
110
share/verlihub/config/help_usr
110
%%DATADIR%%/config/help_usr
111
share/verlihub/config/help_vip
111
%%DATADIR%%/config/help_vip
112
share/verlihub/config/motd
112
%%DATADIR%%/config/motd
113
share/verlihub/config/rules
113
%%DATADIR%%/config/rules
114
share/verlihub/sql/default_pi_plug.sql
114
%%DATADIR%%/sql/default_pi_plug.sql
115
share/verlihub/sql/default_conn_types.sql
115
%%DATADIR%%/sql/default_conn_types.sql
116
share/verlihub/sql/default_file_trigger.sql
116
%%DATADIR%%/sql/default_file_trigger.sql
117
share/verlihub/sql/default_reglist.sql
117
%%DATADIR%%/sql/default_reglist.sql
118
@dirrm include/verlihub
118
@dirrm include/verlihub
119
@dirrm share/verlihub/config
119
@dirrm %%DATADIR%%/config
120
@dirrm share/verlihub/sql
120
@dirrm %%DATADIR%%/sql
121
@dirrm share/verlihub
121
@dirrm %%DATADIR%%

Return to bug 102406