freebsd-ports/lang/ruby19/files/patch-configure.in
Steve Wills 561a5a1691 - Update Ruby 1.9 to 1.9.3p385. This fixes a security issue in rdoc (CVE-2013-0256)
- Also add the patch for the security issue in the bundled json (CVE-2013-0269)
- Fix an issue with the .pc file by patching configure [1]

Reported by:	avg [1]
Security:	forthcoming
2013-02-12 15:23:04 +00:00

52 lines
2 KiB
Text

--- configure.in.orig 2013-02-11 14:33:14.000000000 +0000
+++ configure.in 2013-02-11 14:30:13.000000000 +0000
@@ -1129,11 +1129,11 @@
[superux*], [ ac_cv_func_setitimer=no
],
[ LIBS="-lm $LIBS"])
-AC_CHECK_LIB(crypt, crypt)
-AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV
-AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX
-AC_CHECK_LIB(socket, socketpair) # SunOS/Solaris
-AC_CHECK_LIB(rt, clock_gettime) # GNU/Linux
+AC_SEARCH_LIBS(crypt, crypt)
+AC_SEARCH_LIBS(dlopen, dl) # Dynamic linking for SunOS/Solaris and SYSV
+AC_SEARCH_LIBS(shl_load, dld) # Dynamic linking for HP-UX
+AC_SEARCH_LIBS(socketpair, socket) # SunOS/Solaris
+AC_SEARCH_LIBS(clock_gettime, rt) # GNU/Linux
if test "${enable_win95}" = maybe; then
AC_HAVE_LIBRARY(unicows, [enable_win95=yes], [enable_win95=no])
fi
@@ -1828,7 +1828,7 @@
fi
if test x"$enable_pthread" = xyes; then
- for pthread_lib in thr pthread pthreads c c_r root; do
+ for pthread_lib in pthread thr pthreads c c_r root; do
AC_CHECK_LIB($pthread_lib, pthread_kill,
rb_with_pthread=yes, rb_with_pthread=no)
if test "$rb_with_pthread" = "yes"; then break; fi
@@ -1836,6 +1836,7 @@
if test x"$rb_with_pthread" = xyes; then
AC_DEFINE(_REENTRANT)
AC_DEFINE(_THREAD_SAFE)
+ [pthread], [MAINLIBS="-pthread $MAINLIBS"],
AC_DEFINE(HAVE_LIBPTHREAD)
AC_CHECK_HEADERS(pthread_np.h, [], [], [@%:@include <pthread.h>])
AS_CASE([$pthread_lib],
@@ -2080,7 +2081,6 @@
: ${LDSHARED='$(CC) -shared'}
if test "$rb_cv_binary_elf" = yes; then
LDFLAGS="$LDFLAGS -rdynamic"
- DLDFLAGS="$DLDFLAGS "'-Wl,-soname,$(.TARGET)'
else
test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED="ld -Bshareable"
fi
@@ -2385,6 +2385,7 @@
[freebsd*|dragonfly*], [
SOLIBS='$(LIBS)'
LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)'
+ LIBRUBY_DLDFLAGS='-Wl,-soname,$(LIBRUBY_SO)'
if test "$rb_cv_binary_elf" != "yes" ; then
LIBRUBY_SO="$LIBRUBY_SO.\$(TEENY)"
LIBRUBY_ALIASES=''