aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-10-30 05:54:44 +0800
committerFelix Lange <fjl@twurst.com>2015-10-30 05:54:44 +0800
commitf570b68ed107d5e835a71cf1194e2b82c496a387 (patch)
tree69073046c5ef6900f88284b16ac716ec64a1e34b
parentbf11a47f22311a21639fa4f7794a41cf2f9b809e (diff)
downloaddexon-f570b68ed107d5e835a71cf1194e2b82c496a387.tar.gz
dexon-f570b68ed107d5e835a71cf1194e2b82c496a387.tar.zst
dexon-f570b68ed107d5e835a71cf1194e2b82c496a387.zip
p2p/nat: add docs for discover
-rw-r--r--p2p/nat/natupnp.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/p2p/nat/natupnp.go b/p2p/nat/natupnp.go
index c544fbcb6..890a35043 100644
--- a/p2p/nat/natupnp.go
+++ b/p2p/nat/natupnp.go
@@ -133,6 +133,9 @@ func discoverUPnP() Interface {
return nil
}
+// finds devices matching the given target and calls matcher for all
+// advertised services of each device. The first non-nil service found
+// is sent into out. If no service matched, nil is sent.
func discover(out chan<- *upnp, target string, matcher func(*goupnp.RootDevice, goupnp.ServiceClient) *upnp) {
devs, err := goupnp.DiscoverDevices(target)
if err != nil {
='/~lantw44/cgit/freebsd-ports-gnome/commit/graphics/mtpaint/Makefile?id=6586bcbf02b80ce20a5d0419d64f90d62344e09e'>6586bcbf02b8
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







                                                                  
                    
                 








                                                       


                                                          

















                                                                                      
# New ports collection makefile for:    mtpaint
# Date created:     3 April 2007
# Whom:         Andrew Pantyukhin <infofarmer@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   mtpaint
PORTVERSION=    3.20
PORTREVISION=   1
CATEGORIES= graphics
MASTER_SITES=   SF

MAINTAINER= infofarmer@FreeBSD.org
COMMENT=    Simple painting program

LIB_DEPENDS=    png.5:${PORTSDIR}/graphics/png \
        ungif.5:${PORTSDIR}/graphics/libungif \
        jpeg.9:${PORTSDIR}/graphics/jpeg \
        tiff.4:${PORTSDIR}/graphics/tiff \
        openjpeg.2:${PORTSDIR}/graphics/openjpeg \
        freetype.9:${PORTSDIR}/print/freetype2

USE_GETTEXT=    yes
USE_BZIP2=  yes
USE_GNOME=  gtk20
HAS_CONFIGURE=  yes
CPPFLAGS=   -I${LOCALBASE}/include
LDFLAGS=    -L${LOCALBASE}/lib
CONFIGURE_ENV=  CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
CONFIGURE_ARGS= --prefix=${PREFIX} --mandir=${MAN1PREFIX}/man/man1 \
        --locale=${PREFIX}/share/locale gif jpeg tiff slow \
        gtk2 intl man
MAN1=       ${PORTNAME}.1
MANCOMPRESSED=  yes

post-patch:
    @${REINPLACE_CMD} -e 's|-o /dev/null|-o `mktemp -t /tmp`|' ${WRKSRC}/configure

.include <bsd.port.mk>