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

(-)nss_mdns/Makefile (-3 / +8 lines)
Lines 7-12 Link Here
7
7
8
PORTNAME=	nss_mdns
8
PORTNAME=	nss_mdns
9
PORTVERSION=	0.10
9
PORTVERSION=	0.10
10
PORTREVISION=	1
10
CATEGORIES=	dns ipv6
11
CATEGORIES=	dns ipv6
11
MASTER_SITES=	http://0pointer.de/lennart/projects/nss-mdns/
12
MASTER_SITES=	http://0pointer.de/lennart/projects/nss-mdns/
12
DISTNAME=	nss-mdns-${PORTVERSION}
13
DISTNAME=	nss-mdns-${PORTVERSION}
Lines 32-37 Link Here
32
	--disable-legacy	\
33
	--disable-legacy	\
33
	--disable-lynx
34
	--disable-lynx
34
35
36
INSTALLED_MODULES=nss_mdns nss_mdns_minimal
37
35
#
38
#
36
# libtool is used, therefore we must perform a GNU make based install,
39
# libtool is used, therefore we must perform a GNU make based install,
37
# followed by removal of build rubble; we must create our own .so symlinks;
40
# followed by removal of build rubble; we must create our own .so symlinks;
Lines 40-47 Link Here
40
#
43
#
41
do-install:
44
do-install:
42
	@( cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET} )
45
	@( cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET} )
43
	( cd ${PREFIX}/lib ; ${LN} -s nss_mdns.so.1 nss_mdns.so )
46
.for INSTALLED_MODULE in ${INSTALLED_MODULES}
44
	${RM} ${PREFIX}/lib/nss_mdns.a ${PREFIX}/lib/nss_mdns.la
47
	( cd ${PREFIX}/lib ; ${LN} -s ${INSTALLED_MODULE}.so.1 ${INSTALLED_MODULE}.so )
48
	${RM} ${PREFIX}/lib/${INSTALLED_MODULE}.a ${PREFIX}/lib/${INSTALLED_MODULE}.la
49
.endfor
45
.if !defined(NOPORTDOCS)
50
.if !defined(NOPORTDOCS)
46
	${MKDIR} ${DOCSDIR}/
51
	${MKDIR} ${DOCSDIR}/
47
	${INSTALL_DATA} ${INSTALL_WRKSRC}/doc/README ${DOCSDIR}
52
	${INSTALL_DATA} ${INSTALL_WRKSRC}/doc/README ${DOCSDIR}
Lines 50-56 Link Here
50
55
51
# TODO: Print a message about the etc directory used for mdns.allow
56
# TODO: Print a message about the etc directory used for mdns.allow
52
# being relative to ${PREFIX}.
57
# being relative to ${PREFIX}.
53
PLIST_FILES=	lib/nss_mdns.so	lib/nss_mdns.so.1
58
PLIST_FILES=	${INSTALLED_MODULES:C/^/lib\//:C/$/.so/} ${INSTALLED_MODULES:C/^/lib\//:C/$/.so.1/}
54
PORTDOCS=	README README.html
59
PORTDOCS=	README README.html
55
60
56
.include <bsd.port.pre.mk>
61
.include <bsd.port.pre.mk>
(-)nss_mdns/files/patch-src__Makefile.am (-9 / +7 lines)
Lines 1-21 Link Here
1
--- src/Makefile.am.orig	2007-02-08 22:12:23.000000000 +0530
1
--- src/Makefile.am.orig	2007-02-08 16:42:23.000000000 +0000
2
+++ src/Makefile.am	2008-04-30 02:52:50.000000000 +0530
2
+++ src/Makefile.am	2008-10-13 23:23:25.000000000 +0100
3
@@ -34,13 +34,7 @@
3
@@ -36,11 +36,7 @@
4
 lib_LTLIBRARIES = 
5
 
6
 if FREEBSD_NSS
4
 if FREEBSD_NSS
7
-lib_LTLIBRARIES += \
5
 lib_LTLIBRARIES += \
8
-	nss_mdns.la \
6
 	nss_mdns.la \
9
-	nss_mdns4.la \
7
-	nss_mdns4.la \
10
-	nss_mdns6.la \
8
-	nss_mdns6.la \
11
-	nss_mdns_minimal.la \
9
-	nss_mdns_minimal.la \
12
-	nss_mdns4_minimal.la \
10
-	nss_mdns4_minimal.la \
13
-	nss_mdns6_minimal.la
11
-	nss_mdns6_minimal.la
14
+lib_LTLIBRARIES += nss_mdns.la 
12
+	nss_mdns_minimal.la
15
 else
13
 else
16
 lib_LTLIBRARIES += \
14
 lib_LTLIBRARIES += \
17
 	libnss_mdns.la \
15
 	libnss_mdns.la \
18
@@ -90,7 +84,7 @@
16
@@ -90,7 +86,7 @@
19
 libnss_mdns6_minimal_la_LDFLAGS=$(libnss_mdns_la_LDFLAGS)
17
 libnss_mdns6_minimal_la_LDFLAGS=$(libnss_mdns_la_LDFLAGS)
20
 
18
 
21
 # FreeBSD
19
 # FreeBSD
(-)nss_mdns/files/patch-src__bsdnss.c (-13 / +50 lines)
Lines 1-15 Link Here
1
--- src/bsdnss.c.orig	2008-04-30 02:40:37.000000000 +0530
1
--- src/bsdnss.c.orig	2007-02-08 16:42:23.000000000 +0000
2
+++ src/bsdnss.c	2008-04-30 02:43:11.000000000 +0530
2
+++ src/bsdnss.c	2008-10-07 23:38:41.000000000 +0100
3
@@ -56,7 +56,7 @@
3
@@ -45,6 +45,7 @@
4
 #if defined(NSS_IPV4_ONLY) || defined(NSS_IPV6_ONLY)
4
 #include <netinet/in.h>
5
 /*
5
 #include <netdb.h>
6
  * FreeBSD's libc is always built with IPv4 support.
6
 
7
- * There is no way of telling at compile time with a define if libc
7
+#include "nss_gethostname_select.h"
8
+ * Therxe is no way of telling at compile time with a define if libc
8
 #include "config.h"
9
  * was built with -DINET6 or not; a configure test would be required.
9
 
10
  * Therefore, distinguishing between the two makes no sense.
10
 #ifdef MDNS_MINIMAL
11
  */
11
@@ -80,37 +81,6 @@
12
@@ -219,22 +219,8 @@
12
 ns_mtab *nss_module_register(const char *source, unsigned int *mtabsize,
13
 			     nss_module_unregister_fn *unreg);
14
 
15
-extern enum nss_status _nss_mdns_gethostbyname_r (const char *name, struct hostent * result,
16
-			   char *buffer, size_t buflen, int *errnop,
17
-			   int *h_errnop);
18
-
19
-extern enum nss_status _nss_mdns_gethostbyname2_r (const char *name, int af, struct hostent * result,
20
-			    char *buffer, size_t buflen, int *errnop,
21
-			    int *h_errnop);
22
-extern enum nss_status _nss_mdns_gethostbyaddr_r (struct in_addr * addr, int len, int type,
23
-			   struct hostent * result, char *buffer,
24
-			   size_t buflen, int *errnop, int *h_errnop);
25
-extern enum nss_status _nss_mdns4_gethostbyname_r (const char *name, struct hostent * result,
26
-			   char *buffer, size_t buflen, int *errnop,
27
-			   int *h_errnop);
28
-
29
-extern enum nss_status _nss_mdns4_gethostbyname2_r (const char *name, int af, struct hostent * result,
30
-			    char *buffer, size_t buflen, int *errnop,
31
-			    int *h_errnop);
32
-extern enum nss_status _nss_mdns4_gethostbyaddr_r (struct in_addr * addr, int len, int type,
33
-			   struct hostent * result, char *buffer,
34
-			   size_t buflen, int *errnop, int *h_errnop);
35
-extern enum nss_status _nss_mdns6_gethostbyname_r (const char *name, struct hostent * result,
36
-			   char *buffer, size_t buflen, int *errnop,
37
-			   int *h_errnop);
38
-
39
-extern enum nss_status _nss_mdns6_gethostbyname2_r (const char *name, int af, struct hostent * result,
40
-			    char *buffer, size_t buflen, int *errnop,
41
-			    int *h_errnop);
42
-extern enum nss_status _nss_mdns6_gethostbyaddr_r (struct in_addr * addr, int len, int type,
43
-			   struct hostent * result, char *buffer,
44
-			   size_t buflen, int *errnop, int *h_errnop);
45
-
46
 typedef enum nss_status 	(*_bsd_nsstub_fn_t)(const char *, struct hostent *, char *, size_t, int *, int *);
47
 
48
 /* XXX: FreeBSD 5.x is not supported. */
49
@@ -219,22 +189,8 @@
13
 	 * 2. Map hostent to addrinfo.
50
 	 * 2. Map hostent to addrinfo.
14
 	 * 3. Hand-off buffer to libc.
51
 	 * 3. Hand-off buffer to libc.
15
 	 */
52
 	 */
Lines 30-36 Link Here
30
-		break;
67
-		break;
31
-	}
68
-	}
32
+	status = _nss_mdns_gethostbyname2_r(name, pai->ai_family, hp, buffer,
69
+	status = _nss_mdns_gethostbyname2_r(name, pai->ai_family, hp, buffer,
33
+					    mbuflen, &_errno, &_h_errno);
70
+					   mbuflen, &_errno, &_h_errno);
34
 	status = __nss_compat_result(status, _errno);
71
 	status = __nss_compat_result(status, _errno);
35
 
72
 
36
 	if (status == NS_SUCCESS) {
73
 	if (status == NS_SUCCESS) {
(-)nss_mdns/files/patch-src__nss.c (+39 lines)
Line 0 Link Here
1
--- src/nss.c.orig	2008-10-06 23:16:19.000000000 +0100
2
+++ src/nss.c	2008-10-07 22:15:07.000000000 +0100
3
@@ -23,6 +23,7 @@
4
 #include <config.h>
5
 #endif
6
 
7
+#include <netinet/in.h>
8
 #include <unistd.h>
9
 #include <errno.h>
10
 #include <string.h>
11
@@ -39,27 +40,7 @@
12
 #include "avahi.h"
13
 #endif
14
 
15
-#if defined(NSS_IPV4_ONLY) && ! defined(MDNS_MINIMAL)
16
-#define _nss_mdns_gethostbyname2_r _nss_mdns4_gethostbyname2_r
17
-#define _nss_mdns_gethostbyname_r  _nss_mdns4_gethostbyname_r
18
-#define _nss_mdns_gethostbyaddr_r  _nss_mdns4_gethostbyaddr_r
19
-#elif defined(NSS_IPV4_ONLY) && defined(MDNS_MINIMAL)
20
-#define _nss_mdns_gethostbyname2_r _nss_mdns4_minimal_gethostbyname2_r
21
-#define _nss_mdns_gethostbyname_r  _nss_mdns4_minimal_gethostbyname_r
22
-#define _nss_mdns_gethostbyaddr_r  _nss_mdns4_minimal_gethostbyaddr_r
23
-#elif defined(NSS_IPV6_ONLY) && ! defined(MDNS_MINIMAL)
24
-#define _nss_mdns_gethostbyname2_r _nss_mdns6_gethostbyname2_r
25
-#define _nss_mdns_gethostbyname_r  _nss_mdns6_gethostbyname_r
26
-#define _nss_mdns_gethostbyaddr_r  _nss_mdns6_gethostbyaddr_r
27
-#elif defined(NSS_IPV6_ONLY) && defined(MDNS_MINIMAL)
28
-#define _nss_mdns_gethostbyname2_r _nss_mdns6_minimal_gethostbyname2_r
29
-#define _nss_mdns_gethostbyname_r  _nss_mdns6_minimal_gethostbyname_r
30
-#define _nss_mdns_gethostbyaddr_r  _nss_mdns6_minimal_gethostbyaddr_r
31
-#elif defined(MDNS_MINIMAL)
32
-#define _nss_mdns_gethostbyname2_r _nss_mdns_minimal_gethostbyname2_r
33
-#define _nss_mdns_gethostbyname_r  _nss_mdns_minimal_gethostbyname_r
34
-#define _nss_mdns_gethostbyaddr_r  _nss_mdns_minimal_gethostbyaddr_r
35
-#endif
36
+#include "nss_gethostname_select.h"
37
 
38
 /* Maximum number of entries to return */
39
 #define MAX_ENTRIES 16
(-)nss_mdns/files/patch-src__nss_gethostname_select.h (+55 lines)
Line 0 Link Here
1
--- src/nss_gethostname_select.h.orig	2008-10-07 22:27:59.000000000 +0100
2
+++ src/nss_gethostname_select.h	2008-10-07 22:22:10.000000000 +0100
3
@@ -0,0 +1,52 @@
4
+/* $Id$ */
5
+
6
+/***
7
+	This file is part of nss-mdns.
8
+
9
+	nss-mdns is free software; you can redistribute it and/or modify
10
+	it under the terms of the GNU Lesser General Public License as published
11
+	by the Free Software Foundation; either version 2 of the License,
12
+	or (at your option) any later version.
13
+
14
+	nss-mdns is distributed in the hope that it will be useful, but1
15
+	WITHOUT ANY WARRANTY; without even the implied warranty of
16
+	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
+	General Public License for more details.
18
+
19
+	You should have received a copy of the GNU Lesser General Public License
20
+	along with nss-mdns; if not, write to the Free Software
21
+	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22
+	USA.
23
+***/
24
+
25
+#ifndef NSS_GETHOSTNAME_SELECT_H
26
+#define NSS_GETHOSTNAME_SELECT_H
27
+
28
+#if defined(NSS_IPV4_ONLY) && ! defined(MDNS_MINIMAL)
29
+#define _nss_mdns_gethostbyname2_r _nss_mdns4_gethostbyname2_r
30
+#define _nss_mdns_gethostbyname_r  _nss_mdns4_gethostbyname_r
31
+#define _nss_mdns_gethostbyaddr_r  _nss_mdns4_gethostbyaddr_r
32
+#elif defined(NSS_IPV4_ONLY) && defined(MDNS_MINIMAL)
33
+#define _nss_mdns_gethostbyname2_r _nss_mdns4_minimal_gethostbyname2_r
34
+#define _nss_mdns_gethostbyname_r  _nss_mdns4_minimal_gethostbyname_r
35
+#define _nss_mdns_gethostbyaddr_r  _nss_mdns4_minimal_gethostbyaddr_r
36
+#elif defined(NSS_IPV6_ONLY) && ! defined(MDNS_MINIMAL)
37
+#define _nss_mdns_gethostbyname2_r _nss_mdns6_gethostbyname2_r
38
+#define _nss_mdns_gethostbyname_r  _nss_mdns6_gethostbyname_r
39
+#define _nss_mdns_gethostbyaddr_r  _nss_mdns6_gethostbyaddr_r
40
+#elif defined(NSS_IPV6_ONLY) && defined(MDNS_MINIMAL)
41
+#define _nss_mdns_gethostbyname2_r _nss_mdns6_minimal_gethostbyname2_r
42
+#define _nss_mdns_gethostbyname_r  _nss_mdns6_minimal_gethostbyname_r
43
+#define _nss_mdns_gethostbyaddr_r  _nss_mdns6_minimal_gethostbyaddr_r
44
+#elif defined(MDNS_MINIMAL)
45
+#define _nss_mdns_gethostbyname2_r _nss_mdns_minimal_gethostbyname2_r
46
+#define _nss_mdns_gethostbyname_r  _nss_mdns_minimal_gethostbyname_r
47
+#define _nss_mdns_gethostbyaddr_r  _nss_mdns_minimal_gethostbyaddr_r
48
+#endif
49
+
50
+/* prototypes of things in nss.c */
51
+enum nss_status _nss_mdns_gethostbyaddr_r(const void* addr, int len, int af, struct hostent *result, char *buffer, size_t buflen, int *errnop, int *h_errnop);
52
+enum nss_status _nss_mdns_gethostbyname_r(const char *name, struct hostent *result, char *buffer, size_t buflen, int *errnop, int *h_errnop);
53
+enum nss_status _nss_mdns_gethostbyname2_r(const char *name, int af, struct hostent *result, char *buffer, size_t buflen, int *errnop, int *h_errnop);
54
+
55
+#endif

Return to bug 128107