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

(-)distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (freeradius-1.1.6.tar.bz2) = 2c29ab90cc30aa3b92fbd78030ccc198
1
MD5 (freeradius-1.1.7.tar.bz2) = d95d303adccdaa065e4bb1d5038b2452
2
SHA256 (freeradius-1.1.6.tar.bz2) = 942917ed1002e2bf4ac023f379daa70e517ca2510753955e3754eb8a2d0e76ce
2
SHA256 (freeradius-1.1.7.tar.bz2) = 4fa180d5afa4ae957efbad541be8408fc4f6837933793d4b30910802a1ea2cf0
3
SIZE (freeradius-1.1.6.tar.bz2) = 2059399
3
SIZE (freeradius-1.1.7.tar.bz2) = 2063278
(-)files/patch-pthread (+157 lines)
Line 0 Link Here
1
--- configure.in	Tue May 15 13:48:04 2007
2
+++ configure.in	Fri Jul 27 18:43:56 2007
3
@@ -475,14 +475,25 @@
4
 dnl # On Some systems, we need extra pre-processor flags, to get them to
5
 dnl # to do the threading properly.
6
 dnl # 
7
-  AC_CHECK_LIB(pthread, pthread_create,
8
-		[ CFLAGS="$CFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
9
-                  LIBS="$LIBS -lpthread" ],
10
-		AC_CHECK_LIB(c_r, pthread_create,
11
-			    [ CFLAGS="$CFLAGS -pthread -D_THREAD_SAFE" ],
12
-			    [ WITH_THREADS="no" ]
13
-			    )
14
-		)
15
+dnl # On FreeBSD, check the pthread_create function with -pthread in $CFLAGS
16
+dnl # but WITHOUT -lpthread (see FreeBSD Porter's Handbook, section 12.12
17
+dnl # at http://tinyurl.com/34cya8 )
18
+  case "$host" in
19
+  *-freebsd*)
20
+    CFLAGS="$CFLAGS -pthread"
21
+    AC_CHECK_FUNC(pthread_create, , [ WITH_THREADS="no" ])
22
+  ;;
23
+  *)
24
+    AC_CHECK_LIB(pthread, pthread_create,
25
+		  [ CFLAGS="$CFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
26
+                    LIBS="$LIBS -lpthread" ],
27
+		  AC_CHECK_LIB(c_r, pthread_create,
28
+			      [ CFLAGS="$CFLAGS -pthread -D_THREAD_SAFE" ],
29
+			      [ WITH_THREADS="no" ]
30
+			      )
31
+		  )
32
+  ;;
33
+  esac
34
 fi
35
 
36
 dnl # 
37
--- src/modules/rlm_ldap/configure.in	Fri Jul 27 17:51:33 2007
38
+++ src/modules/rlm_ldap/configure.in	Fri Jul 27 18:10:51 2007
39
@@ -77,14 +77,27 @@
40
 
41
 	dnl pthread stuff is usually in -lpthread
42
 	dnl or in -lc_r, on *BSD
43
+	dnl FreeBSD uses -pthread
44
 	if test "x$rlm_ldap_with_threads" = "xyes"; then
45
-	    AC_CHECK_LIB(pthread, pthread_create,
46
-			 [ LIBS="-lpthread $LIBS" ],
47
-			 AC_CHECK_LIB(c_r, pthread_create,
48
-				      [ LIBS="-lc_r $LIBS" ],
49
-				      [ rlm_ldap_with_threads="no" ]
50
-				      )
51
-			 )
52
+	    case "$host" in
53
+	    *-freebsd*)
54
+	        old_CFLAGS=$CFLAGS
55
+	        CFLAGS="$CFLAGS -pthread"
56
+	        AC_CHECK_FUNC(pthread_create, , [ rlm_ldap_with_threads="no" ])
57
+	        if test "x$rlm_ldap_with_threads" = "xno"; then
58
+	            CFLAGS=$old_CFLAGS
59
+	        fi
60
+	    ;;
61
+	    *)
62
+	        AC_CHECK_LIB(pthread, pthread_create,
63
+			     [ LIBS="-lpthread $LIBS" ],
64
+			     AC_CHECK_LIB(c_r, pthread_create,
65
+				          [ LIBS="-lc_r $LIBS" ],
66
+				          [ rlm_ldap_with_threads="no" ]
67
+				          )
68
+			     )
69
+	    ;;
70
+	    esac
71
 	fi
72
 
73
 	dnl Try only "-lldap_r" or "-lldap"
74
--- src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.in	Fri Nov 25 20:31:54 2005
75
+++ src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.in	Fri Jul 27 19:11:33 2007
76
@@ -61,14 +61,27 @@
77
 
78
     dnl pthread stuff is usually in -lpthread
79
     dnl or in -lc_r, on *BSD
80
+    dnl FreeBSD uses -pthread
81
     if test "x$mysql_with_threads" = "xyes"; then
82
-	AC_CHECK_LIB(pthread, pthread_create,
83
-		     [ LIBS="-lpthread $LIBS" ],
84
-		     AC_CHECK_LIB(c_r, pthread_create,
85
-				  [ LIBS="-lc_r $LIBS" ],
86
-				  [ mysql_with_threads=no ]
87
-				  )
88
-		     )
89
+	case "$host" in
90
+	*-freebsd*)
91
+	    old_CFLAGS=$CFLAGS
92
+	    CFLAGS="$CFLAGS -pthread"
93
+	    AC_CHECK_FUNC(pthread_create, , [ mysql_with_threads="no" ])
94
+	    if test "x$mysql_with_threads" = "xno"; then
95
+	        CFLAGS=$old_CFLAGS
96
+	    fi
97
+	;;
98
+	*)
99
+	    AC_CHECK_LIB(pthread, pthread_create,
100
+		         [ LIBS="-lpthread $LIBS" ],
101
+		         AC_CHECK_LIB(c_r, pthread_create,
102
+				      [ LIBS="-lc_r $LIBS" ],
103
+				      [ mysql_with_threads=no ]
104
+				      )
105
+		         )
106
+	;;
107
+	esac
108
     fi
109
 
110
     if test "x$mysql_with_threads" = "xyes"; then
111
--- src/modules/rlm_python/configure.in	Thu May 15 15:52:02 2003
112
+++ src/modules/rlm_python/configure.in	Thu Aug  2 12:43:47 2007
113
@@ -84,6 +84,44 @@
114
 		AC_SMART_CHECK_LIB(python${PY_VERSION}, Py_Initialize)
115
 		LIBS=$old_LIBS
116
 
117
+dnl # If that check fails, try it again having identified threading libraries
118
+dnl # in case libpython is threaded
119
+
120
+		if test "x$smart_lib" = "x"; then
121
+		    AC_MSG_NOTICE([Checking to see if libpython may be threaded.])
122
+		    dnl pthread stuff is usually in -lpthread
123
+		    dnl or in -lc_r, on *BSD
124
+		    dnl FreeBSD uses -pthread
125
+		    libpython_with_threads="yes"
126
+		    case "$host" in
127
+		    *-freebsd*)
128
+		        old_CFLAGS=$CFLAGS
129
+		        CFLAGS="$CFLAGS -pthread"
130
+		        AC_CHECK_FUNC(pthread_create, , [ libpython_with_threads="no" ])
131
+		        if test "x$libpython_with_threads" = "xno"; then
132
+		            CFLAGS=$old_CFLAGS
133
+		        fi
134
+		    ;;
135
+		    *)
136
+		        AC_CHECK_LIB(pthread, pthread_create,
137
+				     [ LIBS="-lpthread $LIBS" ],
138
+				     AC_CHECK_LIB(c_r, pthread_create,
139
+					          [ LIBS="-lc_r $LIBS" ],
140
+					          [ libpython_with_threads="no" ]
141
+					          )
142
+				     )
143
+		    ;;
144
+		    esac
145
+
146
+		    if test "x$libpython_with_threads" = "xyes"; then
147
+		        old_LIBS=$LIBS
148
+		        LIBS="$LIBS $PY_LIB_LOC $PY_EXTRA_LIBS -lm"
149
+		        smart_try_dir=$PY_LIB_DIR
150
+		        AC_SMART_CHECK_LIB(python${PY_VERSION}, Py_Initialize)
151
+		        LIBS=$old_LIBS
152
+		    fi
153
+		fi
154
+
155
 		eval t=\${ac_cv_lib_${sm_lib_safe}_${sm_func_safe}}
156
 		if test "x$t" = "xyes"; then
157
 			python_ldflags="$PY_LIB_LOC $PY_EXTRA_LIBS -lpython${PY_VERSION} -lm"
(-)pkg-plist (-5 / +7 lines)
Lines 50-55 Link Here
50
%%EXAMPLESDIR%%/raddb/oraclesql.conf
50
%%EXAMPLESDIR%%/raddb/oraclesql.conf
51
%%EXAMPLESDIR%%/raddb/otp.conf
51
%%EXAMPLESDIR%%/raddb/otp.conf
52
%%EXAMPLESDIR%%/raddb/postgresql.conf
52
%%EXAMPLESDIR%%/raddb/postgresql.conf
53
%%EXAMPLESDIR%%/raddb/postgresqlippool.conf
53
%%EXAMPLESDIR%%/raddb/preproxy_users
54
%%EXAMPLESDIR%%/raddb/preproxy_users
54
%%EXAMPLESDIR%%/raddb/proxy.conf
55
%%EXAMPLESDIR%%/raddb/proxy.conf
55
%%EXAMPLESDIR%%/raddb/radiusd.conf
56
%%EXAMPLESDIR%%/raddb/radiusd.conf
Lines 312-322 Link Here
312
%%EXPM%%lib/rlm_sqlhpwippool.a
313
%%EXPM%%lib/rlm_sqlhpwippool.a
313
%%EXPM%%lib/rlm_sqlhpwippool.la
314
%%EXPM%%lib/rlm_sqlhpwippool.la
314
%%EXPM%%lib/rlm_sqlhpwippool.so
315
%%EXPM%%lib/rlm_sqlhpwippool.so
315
%%EXPM%%lib/rlm_sqlippool-%%PORTVERSION%%.la
316
lib/rlm_sqlippool-%%PORTVERSION%%.la
316
%%EXPM%%lib/rlm_sqlippool-%%PORTVERSION%%.so
317
lib/rlm_sqlippool-%%PORTVERSION%%.so
317
%%EXPM%%lib/rlm_sqlippool.a
318
lib/rlm_sqlippool.a
318
%%EXPM%%lib/rlm_sqlippool.la
319
lib/rlm_sqlippool.la
319
%%EXPM%%lib/rlm_sqlippool.so
320
lib/rlm_sqlippool.so
320
lib/rlm_unix-%%PORTVERSION%%.la
321
lib/rlm_unix-%%PORTVERSION%%.la
321
lib/rlm_unix-%%PORTVERSION%%.so
322
lib/rlm_unix-%%PORTVERSION%%.so
322
lib/rlm_unix.a
323
lib/rlm_unix.a
Lines 355-360 Link Here
355
%%PORTDOCS%%%%DOCSDIR%%/examples/openldap.schema
356
%%PORTDOCS%%%%DOCSDIR%%/examples/openldap.schema
356
%%PORTDOCS%%%%DOCSDIR%%/examples/oracle.sql
357
%%PORTDOCS%%%%DOCSDIR%%/examples/oracle.sql
357
%%PORTDOCS%%%%DOCSDIR%%/examples/postgresql.sql
358
%%PORTDOCS%%%%DOCSDIR%%/examples/postgresql.sql
359
%%PORTDOCS%%%%DOCSDIR%%/examples/postgresql.sql.extra
358
%%PORTDOCS%%%%DOCSDIR%%/ldap_howto.txt
360
%%PORTDOCS%%%%DOCSDIR%%/ldap_howto.txt
359
%%PORTDOCS%%%%DOCSDIR%%/load-balance.txt
361
%%PORTDOCS%%%%DOCSDIR%%/load-balance.txt
360
%%PORTDOCS%%%%DOCSDIR%%/misc-nas
362
%%PORTDOCS%%%%DOCSDIR%%/misc-nas
(-)Makefile (-3 / +13 lines)
Lines 6-12 Link Here
6
#
6
#
7
7
8
PORTNAME=	freeradius
8
PORTNAME=	freeradius
9
PORTVERSION?=	1.1.6
9
PORTVERSION?=	1.1.7
10
PORTREVISION?=	0
10
PORTREVISION?=	0
11
CATEGORIES=	net
11
CATEGORIES=	net
12
MASTER_SITES=	ftp://ftp.freeradius.org/pub/radius/ \
12
MASTER_SITES=	ftp://ftp.freeradius.org/pub/radius/ \
Lines 37-43 Link Here
37
.endif
37
.endif
38
38
39
USE_RC_SUBR=	radiusd.sh
39
USE_RC_SUBR=	radiusd.sh
40
USE_AUTOTOOLS=	libltdl:15 libtool:15
40
USE_AUTOTOOLS=	libltdl:15 libtool:15 autoconf:261
41
USE_GMAKE=	yes
41
USE_GMAKE=	yes
42
USE_OPENSSL=	yes
42
USE_OPENSSL=	yes
43
MAKE_ARGS+=	LDFLAGS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"
43
MAKE_ARGS+=	LDFLAGS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"
Lines 220-228 Link Here
220
# Clean up after the last operation (so as not to get unwanted files when installing doc/)
220
# Clean up after the last operation (so as not to get unwanted files when installing doc/)
221
	@${FIND} -E ${WRKSRC} -regex '.*/Makefile(\.in)?\.(orig|bak)$$' -delete
221
	@${FIND} -E ${WRKSRC} -regex '.*/Makefile(\.in)?\.(orig|bak)$$' -delete
222
.if ${OSVERSION} < 500000
222
.if ${OSVERSION} < 500000
223
	@${REINPLACE_CMD} -e 's/-DNO_OPENSSL//' ${WRKSRC}/configure
223
	@${REINPLACE_CMD} -e 's/-DNO_OPENSSL//' ${WRKSRC}/configure.in
224
.endif
224
.endif
225
225
226
pre-configure:
227
# Force the rebuild of some configures from configure.in, as we're patching
228
# the configure.in
229
# NOTE: ${WRKSRC}/configure is rebuilt automatically once autoconf:261 is
230
# added to USE_AUTOTOOLS
231
	@cd ${WRKSRC}/src/modules/rlm_ldap && ${AUTOCONF} -I ${WRKSRC}
232
	@cd ${WRKSRC}/src/modules/rlm_sql/drivers/rlm_sql_mysql \
233
		&& ${AUTOCONF} -I ${WRKSRC}
234
	@cd ${WRKSRC}/src/modules/rlm_python && ${AUTOCONF} -I ${WRKSRC}
235
226
post-install:
236
post-install:
227
# Create (if necessary) ${PREFIX}/etc/raddb and subdirectories using
237
# Create (if necessary) ${PREFIX}/etc/raddb and subdirectories using
228
# ${EXAMPLESDIR}/raddb as the model layout
238
# ${EXAMPLESDIR}/raddb as the model layout

Return to bug 115157