summaryrefslogtreecommitdiff
path: root/net-p2p/verlihub
diff options
context:
space:
mode:
authorGabor Kovesdan <gabor@FreeBSD.org>2006-12-10 21:18:10 +0000
committerGabor Kovesdan <gabor@FreeBSD.org>2006-12-10 21:18:10 +0000
commit87f8d0699e6d2a975be721199ecab929481f12c2 (patch)
tree82af496897dc9c0f58cfbfada7ff6faffb6b563d /net-p2p/verlihub
parentUpgrade to version 0.96.0626 and unbreak. (diff)
- Add rc(8) script
- Fix plugin support - Fix dependencies - Modify doc-set - Add database support for non-English hubs - Installation fixes - portlint(1) PR: ports/102406 Submitted by: Pankov Pavel <pankov_p@mail.ru> Approved by: erwin (mentor), maintainer timeout
Diffstat (limited to 'net-p2p/verlihub')
-rw-r--r--net-p2p/verlihub/Makefile33
-rw-r--r--net-p2p/verlihub/distinfo6
-rw-r--r--net-p2p/verlihub/files/patch-db_charset83
-rw-r--r--net-p2p/verlihub/files/patch-plugins45
-rw-r--r--net-p2p/verlihub/files/patch-prefix-conf-dir24
-rw-r--r--net-p2p/verlihub/files/pkg-message.in4
-rw-r--r--net-p2p/verlihub/files/verlihub.in36
-rw-r--r--net-p2p/verlihub/pkg-descr2
8 files changed, 212 insertions, 21 deletions
diff --git a/net-p2p/verlihub/Makefile b/net-p2p/verlihub/Makefile
index 7f1cc6e1a34d..a54d497486e6 100644
--- a/net-p2p/verlihub/Makefile
+++ b/net-p2p/verlihub/Makefile
@@ -7,7 +7,7 @@
PORTNAME= verlihub
PORTVERSION= 0.9.8.c
-PORTREVISION= 1
+PORTREVISION= 2
PORTEPOCH= 1
CATEGORIES= net-p2p
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
@@ -15,39 +15,42 @@ MASTER_SITE_SUBDIR= verlihub
DISTNAME= verlihub-0.9.8c-RC2
MAINTAINER= hurbold@yahoo.com
-COMMENT= Verlihub Linux/Unix Direct Connect Hub Software
+COMMENT= A Direct Connect protocol server (Hub)
+# XXX: Actually, bash isn't required for building,
+# but otherwise configure script would pick the wrong path
+BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash
LIB_DEPENDS= GeoIP.5:${PORTSDIR}/net/GeoIP \
pcre.0:${PORTSDIR}/devel/pcre
RUN_DEPENDS= bash:${PORTSDIR}/shells/bash
WRKSRC= ${WRKDIR}/verlihub-0.9.8c
+USE_RC_SUBR= verlihub
+
USE_MYSQL= yes
-USE_PERL5= yes
-USE_GMAKE= yes
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
-CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include"
+USE_GCC= 3.4+
+USE_OPENSSL= yes
SUB_FILES+= pkg-message
-PKGMESSAGE= ${WRKDIR}/pkg-message
-PORTDOCS= configuring.txt help.sql using.txt features.html help.html params.php verlihub.html
-
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} < 500000
-USE_GCC= 3.4+
-.endif
+SUB_FILES= pkg-message
+DOCS= configuring.txt using.txt help.html verlihub.html
+MANUAL_DOCS= verlihub.css verlihub_manual.html
+PORTDOCS= ${DOCS} ${MANUAL_DOCS}
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
-.for i in ${PORTDOCS}
+.for i in ${DOCS}
${INSTALL_DATA} ${WRKSRC}/docs/${i} ${DOCSDIR}
.endfor
+.for i in ${MANUAL_DOCS}
+ ${INSTALL_DATA} ${WRKSRC}/docs/html_manual/${i} ${DOCSDIR}
+.endfor
.endif
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/net-p2p/verlihub/distinfo b/net-p2p/verlihub/distinfo
index d2302da92cf2..30d99d439c58 100644
--- a/net-p2p/verlihub/distinfo
+++ b/net-p2p/verlihub/distinfo
@@ -1,3 +1,3 @@
-MD5 (verlihub-0.9.8c-RC2.tar.gz) = f3f4f6e1b8010935714609c3faa6577f
-SHA256 (verlihub-0.9.8c-RC2.tar.gz) = 853ab3ab8260da1c67d07fec672e5206152001eae7e5ecda526603b0d5e4be12
-SIZE (verlihub-0.9.8c-RC2.tar.gz) = 696574
+MD5 (verlihub-0.9.8c-RC2.tar.gz) = c536dd46daefe8b91c3872837d1deeb2
+SHA256 (verlihub-0.9.8c-RC2.tar.gz) = 571e637eacf1176c968e09528331d4257f4932186ae4ca9e8d4353d1cffa7e1c
+SIZE (verlihub-0.9.8c-RC2.tar.gz) = 701081
diff --git a/net-p2p/verlihub/files/patch-db_charset b/net-p2p/verlihub/files/patch-db_charset
new file mode 100644
index 000000000000..30a23cd26c19
--- /dev/null
+++ b/net-p2p/verlihub/files/patch-db_charset
@@ -0,0 +1,83 @@
+--- src/cdbconf.cpp Thu Apr 8 02:16:21 2004
++++ src/cdbconf.cpp Thu Oct 12 16:57:43 2006
+@@ -18,6 +18,7 @@
+ Add("db_user",db_user,string("verlihub"));
+ Add("db_pass",db_pass,string(""));
+ Add("db_data",db_data,string("verlihub"));
++ Add("db_charset",db_charset,string("latin1"));
+ Add("config_name",config_name,string("config"));
+ Add("lang_name",lang_name,string("lang_en"));
+ Load();
+
+diff -Nur verlihub-orig/src/cdbconf.h verlihub/src/cdbconf.h
+--- src/cdbconf.h 2006-07-15 18:42:52.000000000 +0400
++++ src/cdbconf.h 2006-07-15 18:43:50.000000000 +0400
+@@ -31,6 +31,7 @@
+ string db_user;
+ string db_pass;
+ string db_data;
++ string db_charset;
+ string config_name;
+ string lang_name;
+ bool allow_exec;
+diff -Nur verlihub-orig/src/cmysql.cpp verlihub/src/cmysql.cpp
+--- src/cmysql.cpp 2006-07-15 18:42:52.000000000 +0400
++++ src/cmysql.cpp 2006-07-15 18:45:25.000000000 +0400
+@@ -19,10 +19,10 @@
+ /*!
+ \fn nMySQL::cMySQL::cMySQL(string&host,string&user,string&pass,string&data)
+ */
+-cMySQL::cMySQL(string&host,string&user,string&pass,string&data) : cObj("cMySQL")
++cMySQL::cMySQL(string&host,string&user,string&pass,string&data,string&charset) : cObj("cMySQL")
+ {
+ Init();
+- if(!Connect(host,user,pass,data))
++ if(!Connect(host,user,pass,data,charset))
+ {
+ throw "Mysql connection error.";
+ }
+@@ -40,12 +40,13 @@
+ if(!mDBHandle) Error(0, string("Can't init mysql structure :(.: "));
+ }
+
+-bool cMySQL::Connect(string &host, string &user, string &pass, string &data)
++bool cMySQL::Connect(string &host, string &user, string &pass, string &data, string &charset)
+ {
+ if(Log(1)) LogStream() << "Connecting to mysql server: "
+- << user << "@" << host << "/" << data << endl;
++ << user << "@" << host << "/" << data << "with charset " << charset << endl;
+
+ mysql_options(mDBHandle,MYSQL_OPT_COMPRESS,0);
++ mysql_options(mDBHandle,MYSQL_SET_CHARSET_NAME,charset.c_str());
+ if(!mysql_real_connect(
+ mDBHandle,
+ host.c_str(),
+diff -Nur verlihub-orig/src/cmysql.h verlihub/src/cmysql.h
+--- src/cmysql.h 2006-07-15 18:42:52.000000000 +0400
++++ src/cmysql.h 2006-07-15 18:43:50.000000000 +0400
+@@ -34,10 +34,10 @@
+ friend class cQuery;
+ public:
+ cMySQL();
+- cMySQL(string&host,string&user,string&pass,string&data);
++ cMySQL(string&host,string&user,string&pass,string&data,string&charset);
+ ~cMySQL();
+ void Init();
+- bool Connect(string &host, string &user, string &passwd, string &db);
++ bool Connect(string &host, string &user, string &passwd, string &db, string &charset);
+ public: void Error(int level, string text);
+
+ private:
+diff -Nur verlihub-orig/src/cserverdc.cpp verlihub/src/cserverdc.cpp
+--- src/cserverdc.cpp 2006-07-15 18:42:52.000000000 +0400
++++ src/cserverdc.cpp 2006-07-15 18:43:50.000000000 +0400
+@@ -72,7 +72,8 @@
+ mDBConf.db_host,
+ mDBConf.db_user,
+ mDBConf.db_pass,
+- mDBConf.db_data), // connect to mysql
++ mDBConf.db_data,
++ mDBConf.db_charset), // connect to mysql
+ mC(*this), // create the config object
+ mL(*this),
+ mSetupList(mMySQL),
diff --git a/net-p2p/verlihub/files/patch-plugins b/net-p2p/verlihub/files/patch-plugins
new file mode 100644
index 000000000000..d8a1436dd5c5
--- /dev/null
+++ b/net-p2p/verlihub/files/patch-plugins
@@ -0,0 +1,45 @@
+diff -ruN src-orig/cpluginloader.cpp src/cpluginloader.cpp
+--- src-orig/cpluginloader.cpp Fri Oct 1 15:19:44 2004
++++ src/cpluginloader.cpp Thu Oct 12 17:16:22 2006
+@@ -40,6 +40,12 @@
+ */
+ bool nPlugin::cPluginLoader::Open()
+ {
++ /*
++ * Reset dlerror() since it can contain error from previous
++ * call to dlopen()/dlsym().
++ */
++ dlerror();
++
+ mHandle = dlopen(mFileName.c_str(), RTLD_NOW);
+ if(!mHandle || IsError()) // NOTE hte OR (||) operator evaluates only the first statement if that one is true
+ {
+@@ -99,6 +105,12 @@
+ */
+ void * nPlugin::cPluginLoader::LoadSym(const char *name)
+ {
++ /*
++ * Reset dlerror() since it can contain error from previous
++ * call to dlopen()/dlsym().
++ */
++ dlerror();
++
+ void *func = dlsym( mHandle, name);
+ if(IsError())
+ {
+diff -ruN src-orig/tpluginbase.cpp src/tpluginbase.cpp
+--- src-orig/tpluginbase.cpp Fri Oct 1 15:19:44 2004
++++ src/tpluginbase.cpp Thu Oct 12 17:16:39 2006
+@@ -34,6 +34,12 @@
+ */
+ bool nPlugin::tPluginBase::Open()
+ {
++ /*
++ * Reset dlerror() since it can contain error from previous
++ * call to dlopen()/dlsym().
++ */
++ dlerror();
++
+ mHandle = dlopen(mFileName.c_str(), RTLD_NOW);
+ if(!mHandle)
+ {
diff --git a/net-p2p/verlihub/files/patch-prefix-conf-dir b/net-p2p/verlihub/files/patch-prefix-conf-dir
new file mode 100644
index 000000000000..c935a86f12cb
--- /dev/null
+++ b/net-p2p/verlihub/files/patch-prefix-conf-dir
@@ -0,0 +1,24 @@
+Index: src/verlihub.cpp
+===================================================================
+RCS file: /cvsroot/verlihub/verlihub/src/verlihub.cpp,v
+retrieving revision 1.14
+diff -u -r1.14 verlihub.cpp
+--- src/verlihub.cpp 24 Apr 2005 19:35:30 -0000 1.14
++++ src/verlihub.cpp 8 Dec 2006 21:08:11 -0000
+@@ -25,6 +25,7 @@
+ #include <sstream>
+ #include <signal.h>
+ #include <dirent.h>
++#include <dirsettings.h>
+ #include "script_api.h"
+
+ using namespace std;
+@@ -81,6 +82,8 @@
+ const char *DirName = NULL;
+ char *HomeDir = getenv("HOME");
+ string tmp;
++ DirName = PREFIXDIR "/etc/verlihub";
++ if ((DirName != NULL) && DirExists(DirName)) ConfigBase = DirName;
+ if (HomeDir)
+ {
+ tmp = HomeDir;
diff --git a/net-p2p/verlihub/files/pkg-message.in b/net-p2p/verlihub/files/pkg-message.in
index 2409001e9e2d..fb9c412655ad 100644
--- a/net-p2p/verlihub/files/pkg-message.in
+++ b/net-p2p/verlihub/files/pkg-message.in
@@ -14,8 +14,8 @@ script:
Follow the instructions given.
-Visit http://verlihub.sourceforge.net for the project's homepage
-or http://verlihub.no-ip.com for the project's forums. The verlihub
+Visit http://www.verlihub-project.org/ for the project's homepage
+or http://www.verlihubforums.com/ for the project's forums. The verlihub
manual is available online at http://www.danomac.org/verlihub
-------------------------------------------------------------------
diff --git a/net-p2p/verlihub/files/verlihub.in b/net-p2p/verlihub/files/verlihub.in
new file mode 100644
index 000000000000..5b7ba01596b0
--- /dev/null
+++ b/net-p2p/verlihub/files/verlihub.in
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+# PROVIDE: verlihub
+# REQUIRE: DAEMON
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# verlihub_enable (bool): Set to NO by default.
+# Set it to YES to enable verlihub.
+#
+
+. "%%RC_SUBR%%"
+
+name="verlihub"
+rcvar=${name}_enable
+
+command=%%PREFIX%%/bin/${name}
+pidfile=/var/run/${name}.pid
+
+logfile=/var/log/${name}.log
+errfile=/var/log/${name}.err
+command_args="> $logfile 2> $errfile &"
+
+: ${verlihub_configdir="`%%PREFIX%%/bin/vh_getcfg`"}
+required_dirs="$verlihub_configdir"
+required_files="$verlihub_configdir/dbconfig $verlihub_configdir/motd $verlihub_configdir/help_usr $verlihub_configdir/faq $verlihub_configdir/rules"
+
+load_rc_config $name
+
+: ${verlihub_enable="NO"}
+
+start_postcmd="echo \$! > $pidfile"
+stop_postcmd="rm $pidfile"
+
+run_rc_command "$1"
diff --git a/net-p2p/verlihub/pkg-descr b/net-p2p/verlihub/pkg-descr
index 5ace8af925f1..4c1dc788c5af 100644
--- a/net-p2p/verlihub/pkg-descr
+++ b/net-p2p/verlihub/pkg-descr
@@ -4,7 +4,7 @@ and has many useful features. It also uses a MySQL Database.
Additional functionality is available through a versatile
'plugin' system.
-WWW: http://verlihub.sourceforge.net
+WWW: http://www.verlihub-project.org/
-Hurbold
hurbold@yahoo.com