aboutsummaryrefslogtreecommitdiffstats
path: root/net-p2p
diff options
context:
space:
mode:
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/uhub/Makefile36
-rw-r--r--net-p2p/uhub/distinfo4
-rw-r--r--net-p2p/uhub/files/patch-GNUmakefile40
3 files changed, 35 insertions, 45 deletions
diff --git a/net-p2p/uhub/Makefile b/net-p2p/uhub/Makefile
index 312e986c3673..96d235259b41 100644
--- a/net-p2p/uhub/Makefile
+++ b/net-p2p/uhub/Makefile
@@ -6,17 +6,19 @@
#
PORTNAME= uhub
-PORTVERSION= 0.3.2
-PORTREVISION= 4
+PORTVERSION= 0.4.0
CATEGORIES= net-p2p
MASTER_SITES= http://www.extatic.org/downloads/uhub/
-DISTNAME= ${PORTNAME}-${PORTVERSION}-src
+DISTFILES= ${PORTNAME}-${PORTVERSION}-src${EXTRACT_SUFX}
MAINTAINER= yashin.dm@gmail.com
COMMENT= High performance peer-to-peer hub for the ADC network
+LICENSE= GPLv3
+
USE_PERL5_BUILD=yes
USE_GMAKE= yes
+USE_SQLITE= yes
USE_RC_SUBR= uhub
USERS= uhub
@@ -24,20 +26,32 @@ GROUPS= uhub
SHAREGRP= uhub
SHAREMODE= 640
-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
MAKEFILE= ${WRKSRC}/GNUmakefile
-OPTIONS= OPENSSL "Enable SSL support (experimental)" off
+OPTIONS_DEFINE= DEBUG OPENSSL
+OPENSSL_DESC= Enable OpenSSL Support (experimental)
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MOPENSSL}
+USE_OPENSSL= yes
+MAKE_ARGS+= USE_SSL=YES
+.else
+MAKE_ARGS+= USE_SSL=NO
+.endif
-.if defined(WITH_OPENSSL)
-.include "${PORTSDIR}/Mk/bsd.openssl.mk"
-MAKE_ARGS= USE_SSL=YES
-CFLAGS+= -I${OPENSSLINC}
-LDFLAGS+= -L${OPENSSLLIB}
+.if ${PORT_OPTIONS:MDEBUG}
+CFLAGS+= -ggdb -DDEBUG
+.else
+CFLAGS+= -DNDEBUG
.endif
+.include <bsd.port.pre.mk>
+
+CFLAGS+= -I./src/ -I${LOCALBASE}/include
+MAKE_ARGS+= UHUB_PREFIX="${PREFIX}" UHUB_CONF_DIR="${PREFIX}/etc/uhub" \
+ SILENT=NO CC="${CC}" CFLAGS="${CFLAGS}"
+
post-patch:
@${REINPLACE_CMD} -e 's|/etc/uhub/|${PREFIX}&|' ${WRKSRC}/doc/uhub.conf
@${REINPLACE_CMD} -e 's|/etc/uhub/|${PREFIX}&|' ${WRKSRC}/src/uhub.h
diff --git a/net-p2p/uhub/distinfo b/net-p2p/uhub/distinfo
index 1049d9e2036c..4fce07c46524 100644
--- a/net-p2p/uhub/distinfo
+++ b/net-p2p/uhub/distinfo
@@ -1,2 +1,2 @@
-SHA256 (uhub-0.3.2-src.tar.gz) = 8503f9775e2469e271a461452cedf1ef6c0d32b38e0bec6b77170b216a5a374e
-SIZE (uhub-0.3.2-src.tar.gz) = 156108
+SHA256 (uhub-0.4.0-src.tar.gz) = e6f4c35bb5d5ff973ca2428a0432d6545b6f38f08387697cf05b608b5c4525ac
+SIZE (uhub-0.4.0-src.tar.gz) = 194568
diff --git a/net-p2p/uhub/files/patch-GNUmakefile b/net-p2p/uhub/files/patch-GNUmakefile
index 9f9d9cca6a3b..e3640182ec54 100644
--- a/net-p2p/uhub/files/patch-GNUmakefile
+++ b/net-p2p/uhub/files/patch-GNUmakefile
@@ -1,36 +1,12 @@
---- GNUmakefile.orig 2010-06-02 09:48:21.000000000 +0400
-+++ GNUmakefile 2010-06-02 09:55:21.000000000 +0400
-@@ -5,7 +5,7 @@
-
- -include Makefile.private
-
--CC = gcc
-+CC ?= gcc
- LD := $(CC)
- MV := mv
- RANLIB := ranlib
-@@ -44,10 +44,10 @@
- BIN_EXT ?= .exe
- else
- DESTDIR ?= /
--UHUB_CONF_DIR ?= $(DESTDIR)/etc/uhub
--UHUB_PREFIX ?= $(DESTDIR)/usr/local
--CFLAGS += -I/usr/local/include
--LDFLAGS += -L/usr/local/lib
-+UHUB_PREFIX ?= $(PREFIX)
-+UHUB_CONF_DIR ?= $(UHUB_PREFIX)/etc/uhub
-+CFLAGS += -I$(LOCALBASE)/include
-+LDFLAGS += -L$(LOCALBASE)/lib
- BIN_EXT ?=
- endif
-
-@@ -249,7 +249,8 @@
- @if [ ! -d $(UHUB_CONF_DIR) ]; then echo Creating $(UHUB_CONF_DIR); mkdir -p $(UHUB_CONF_DIR); fi
- @if [ ! -f $(UHUB_CONF_DIR)/uhub.conf ]; then cp doc/uhub.conf $(UHUB_CONF_DIR); fi
- @if [ ! -f $(UHUB_CONF_DIR)/users.conf ]; then cp doc/users.conf $(UHUB_CONF_DIR); fi
-- @touch $(UHUB_CONF_DIR)/motd.txt
+--- ./GNUmakefile.orig 2012-06-09 00:35:21.000000000 +1000
++++ ./GNUmakefile 2012-06-09 00:37:17.000000000 +1000
+@@ -365,8 +365,8 @@
+ @if [ ! -f $(UHUB_CONF_DIR)/rules.txt ]; then cp doc/rules.txt $(UHUB_CONF_DIR); fi
+ @if [ ! -f $(UHUB_CONF_DIR)/plugins.conf ]; then cp doc/plugins.conf $(UHUB_CONF_DIR); fi
+ @if [ ! -d $(UHUB_MOD_DIR) ]; then echo Creating $(UHUB_MOD_DIR); mkdir -p $(UHUB_MOD_DIR); fi
+ @if [ ! -f $(UHUB_CONF_DIR)/motd.txt ]; then touch $(UHUB_CONF_DIR)/motd.txt; fi
-+ @if [ ! -f $(UHUB_CONF_DIR)/rules.txt ]; then touch $(UHUB_CONF_DIR)/rules.txt; fi
+ @cp -f mod_*.so $(UHUB_MOD_DIR)
+- @touch $(UHUB_CONF_DIR)/motd.txt
@echo done.
endif