summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbsiegert <bsiegert@pkgsrc.org>2012-07-25 14:26:57 +0000
committerbsiegert <bsiegert@pkgsrc.org>2012-07-25 14:26:57 +0000
commitc2528532f4fab7056a9c4f7ef1097d430c63ef4f (patch)
tree7d84c65f5c5b653c885d5a7c2598d02b9e69a2e8
parent1c997a7f031b201a969fe6cbc20f47a293aa1a0b (diff)
downloadpkgsrc-c2528532f4fab7056a9c4f7ef1097d430c63ef4f.tar.gz
MirBSD support.
This adds shlib version handling to rubyversion.mk, a fix to configure (include <sys/time.h> when checking for struct timespec) and a workaround for broken code if getgrnam_r is available.
-rw-r--r--lang/ruby/rubyversion.mk4
-rw-r--r--lang/ruby193-base/Makefile7
-rw-r--r--lang/ruby193-base/distinfo6
-rw-r--r--lang/ruby193-base/patches/patch-configure64
-rw-r--r--lang/ruby193-base/patches/patch-configure.in55
5 files changed, 112 insertions, 24 deletions
diff --git a/lang/ruby/rubyversion.mk b/lang/ruby/rubyversion.mk
index a383075dd84..bdedd9f1cce 100644
--- a/lang/ruby/rubyversion.mk
+++ b/lang/ruby/rubyversion.mk
@@ -1,4 +1,4 @@
-# $NetBSD: rubyversion.mk,v 1.82 2012/07/24 16:23:37 taca Exp $
+# $NetBSD: rubyversion.mk,v 1.83 2012/07/25 14:26:57 bsiegert Exp $
#
# This file determines which Ruby version is used as a dependency for
@@ -326,7 +326,7 @@ RUBY_SHLIBVER= ${RUBY_VER}
.else
RUBY_SHLIBVER= ${_RUBY_VER_MAJOR}${_RUBY_VER_MINOR}${_RUBY_API_MINOR}
.endif
-.elif ${OPSYS} == "OpenBSD"
+.elif ${OPSYS} == "OpenBSD" || ${OPSYS} == "MirBSD"
RUBY_SHLIBVER= ${_RUBY_VER_MAJOR}.${_RUBY_VER_MINOR}${_RUBY_API_MINOR}
.elif ${OPSYS} == "Darwin"
RUBY_SHLIB= ${RUBY_VER}.${RUBY_SHLIBVER}.${RUBY_SLEXT}
diff --git a/lang/ruby193-base/Makefile b/lang/ruby193-base/Makefile
index 44267d0ea24..c7bcd9bfdd0 100644
--- a/lang/ruby193-base/Makefile
+++ b/lang/ruby193-base/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2012/06/02 02:23:33 taca Exp $
+# $NetBSD: Makefile,v 1.15 2012/07/25 14:26:57 bsiegert Exp $
#
DISTNAME= ${RUBY_DISTNAME}
@@ -48,6 +48,11 @@ CONFIGURE_ENV+= OBJCOPY=:
CONFIGURE_ENV+= ac_cv_prog_PKG_CONFIG=""
.endif
+.if ${OPSYS} == "MirBSD"
+# if present, an unsupported sysconf call is used
+CONFIGURE_ENV+= ac_cv_func_getgrnam_r=no
+.endif
+
# Ruby build process depends on config.status's content
CONFIG_STATUS_OVERRIDE= # empty
diff --git a/lang/ruby193-base/distinfo b/lang/ruby193-base/distinfo
index 2e3d3397fe1..37edeb5cc7b 100644
--- a/lang/ruby193-base/distinfo
+++ b/lang/ruby193-base/distinfo
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.7 2012/06/02 02:23:33 taca Exp $
+$NetBSD: distinfo,v 1.8 2012/07/25 14:26:57 bsiegert Exp $
SHA1 (ruby193-base-201202170/ruby-1.9.3-p194.tar.bz2) = afb497dc10ea3d83ecbe3ccd9ed45fba1457721c
RMD160 (ruby193-base-201202170/ruby-1.9.3-p194.tar.bz2) = bca45d750cfd8523e838903c8693749652960d60
Size (ruby193-base-201202170/ruby-1.9.3-p194.tar.bz2) = 9841223 bytes
-SHA1 (patch-configure) = 3045588df7baca5e100363eaef64567d6a59d527
-SHA1 (patch-configure.in) = c6671d30e11dfb2d5e4b253b6f3e53cf32af0152
+SHA1 (patch-configure) = 3ab88504dda0c244b6c58dc42778d9a63f1e4d23
+SHA1 (patch-configure.in) = f743324dda92bd4c490a7214f4822b4cc9a4c5dc
SHA1 (patch-defs_default__gems) = fb24111736f1a76a05e853aa068024dbdd24e5a5
SHA1 (patch-lib_mkmf.rb) = a4547a4bcbf1f533e264578c455ef1c7e6c9aa74
SHA1 (patch-lib_rdoc_ri_driver.rb) = acb4cb022893eb8dea2adf7564f5e5e1a0f1e9c8
diff --git a/lang/ruby193-base/patches/patch-configure b/lang/ruby193-base/patches/patch-configure
index a1a882372ea..1105b6ff3ac 100644
--- a/lang/ruby193-base/patches/patch-configure
+++ b/lang/ruby193-base/patches/patch-configure
@@ -1,11 +1,11 @@
-$NetBSD: patch-configure,v 1.2 2011/12/04 02:31:54 taca Exp $
+$NetBSD: patch-configure,v 1.3 2012/07/25 14:26:57 bsiegert Exp $
-* Adding Interix support.
+* Adding Interix and MirBSD support.
* Ignore doxygen.
---- configure.orig 2011-10-30 09:55:52.000000000 +0000
+--- configure.orig Fri Apr 20 01:32:41 2012
+++ configure
-@@ -10464,6 +10464,9 @@ esac
+@@ -10605,6 +10605,9 @@ esac
superux*) :
ac_cv_func_setitimer=no
;; #(
@@ -15,7 +15,26 @@ $NetBSD: patch-configure,v 1.2 2011/12/04 02:31:54 taca Exp $
*) :
LIBS="-lm $LIBS" ;;
esac
-@@ -16021,8 +16024,12 @@ esac ;; #(
+@@ -11923,6 +11926,9 @@ fi
+ ac_fn_c_check_type "$LINENO" "struct timespec" "ac_cv_type_struct_timespec" "#ifdef HAVE_TIME_H
+ #include <time.h>
+ #endif
++#ifdef HAVE_SYS_TIME_H
++# include <sys/time.h>
++#endif
+ "
+ if test "x$ac_cv_type_struct_timespec" = xyes; then :
+
+@@ -15731,7 +15737,7 @@ done
+ MAINLIBS="-pthread $MAINLIBS" ;; #(
+ *) :
+ case "$target_os" in #(
+- openbsd*) :
++ openbsd*|mirbsd*) :
+ LIBS="-pthread $LIBS" ;; #(
+ *) :
+ LIBS="-l$pthread_lib $LIBS" ;;
+@@ -16180,8 +16186,12 @@ esac ;; #(
rb_cv_dlopen=yes ;; #(
interix*) :
: ${LDSHARED='$(CC) -shared'}
@@ -28,7 +47,16 @@ $NetBSD: patch-configure,v 1.2 2011/12/04 02:31:54 taca Exp $
rb_cv_dlopen=yes ;; #(
freebsd*|dragonfly*) :
-@@ -16548,7 +16555,7 @@ case "$enable_shared" in #(
+@@ -16193,7 +16203,7 @@ esac ;; #(
+ test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED="ld -Bshareable"
+ fi
+ rb_cv_dlopen=yes ;; #(
+- openbsd*) :
++ openbsd*|mirbsd*) :
+ : ${LDSHARED='$(CC) -shared ${CCDLFLAGS}'}
+ if test "$rb_cv_binary_elf" = yes; then
+ LDFLAGS="$LDFLAGS -Wl,-E"
+@@ -16707,7 +16717,7 @@ case "$enable_shared" in #(
freebsd*|dragonfly*) :
SOLIBS='$(LIBS)'
@@ -37,7 +65,16 @@ $NetBSD: patch-configure,v 1.2 2011/12/04 02:31:54 taca Exp $
if test "$rb_cv_binary_elf" != "yes" ; then
LIBRUBY_SO="$LIBRUBY_SO.\$(TEENY)"
LIBRUBY_ALIASES=''
-@@ -16626,7 +16633,12 @@ esac
+@@ -16724,7 +16734,7 @@ case "$enable_shared" in #(
+ LIBRUBY_ALIASES=""
+ fi
+ ;; #(
+- openbsd*) :
++ openbsd*|mirbsd*) :
+
+ SOLIBS='$(LIBS)'
+ LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR).'`expr ${MINOR} \* 10 + ${TEENY}`
+@@ -16785,7 +16795,12 @@ esac
;; #(
interix*) :
@@ -51,7 +88,7 @@ $NetBSD: patch-configure,v 1.2 2011/12/04 02:31:54 taca Exp $
;; #(
*) :
;;
-@@ -16689,11 +16701,7 @@ if test "$install_doc" != no; then
+@@ -16848,11 +16863,7 @@ if test "$install_doc" != no; then
else
RDOCTARGET="nodoc"
fi
@@ -64,7 +101,7 @@ $NetBSD: patch-configure,v 1.2 2011/12/04 02:31:54 taca Exp $
else
RDOCTARGET="nodoc"
CAPITARGET="nodoc"
-@@ -17593,7 +17601,7 @@ ac_config_files="$ac_config_files $FIRST
+@@ -17752,7 +17763,7 @@ ac_config_files="$ac_config_files $FIRST
ac_config_files="$ac_config_files Makefile"
@@ -73,3 +110,12 @@ $NetBSD: patch-configure,v 1.2 2011/12/04 02:31:54 taca Exp $
exec=exec
+@@ -18409,6 +18420,8 @@ do
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
++ : Avoid regenerating within pkgsrc
++ exit 0
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
diff --git a/lang/ruby193-base/patches/patch-configure.in b/lang/ruby193-base/patches/patch-configure.in
index 6ae02850d6f..1b8f5631eec 100644
--- a/lang/ruby193-base/patches/patch-configure.in
+++ b/lang/ruby193-base/patches/patch-configure.in
@@ -1,11 +1,11 @@
-$NetBSD: patch-configure.in,v 1.2 2011/12/04 02:31:54 taca Exp $
+$NetBSD: patch-configure.in,v 1.3 2012/07/25 14:26:57 bsiegert Exp $
-* Adding Interix support.
+* Adding Interix and MirBSD support.
* Ignore doxygen.
---- configure.in.orig 2011-10-09 13:17:20.000000000 +0000
+--- configure.in.orig Wed Apr 18 14:08:40 2012
+++ configure.in
-@@ -1111,6 +1111,8 @@ main()
+@@ -1119,6 +1119,8 @@ main()
],
[superux*], [ ac_cv_func_setitimer=no
],
@@ -14,7 +14,26 @@ $NetBSD: patch-configure.in,v 1.2 2011/12/04 02:31:54 taca Exp $
[ LIBS="-lm $LIBS"])
AC_CHECK_LIB(crypt, crypt)
AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV
-@@ -2051,7 +2053,9 @@ if test "$with_dln_a_out" != yes; then
+@@ -1185,6 +1187,9 @@ AC_CHECK_MEMBERS([struct stat.st_ctimens
+
+ AC_CHECK_TYPES([struct timespec], [], [], [@%:@ifdef HAVE_TIME_H
+ @%:@include <time.h>
++@%:@endif
++@%:@ifdef HAVE_SYS_TIME_H
++@%:@ include <sys/time.h>
+ @%:@endif])
+
+ AC_CHECK_TYPES([struct timezone], [], [], [@%:@ifdef HAVE_TIME_H
+@@ -1834,7 +1839,7 @@ if test x"$enable_pthread" = xyes; then
+ [root], [],
+ [c_r], [MAINLIBS="-pthread $MAINLIBS"],
+ [AS_CASE(["$target_os"],
+- [openbsd*], [LIBS="-pthread $LIBS"],
++ [openbsd*|mirbsd*], [LIBS="-pthread $LIBS"],
+ [LIBS="-l$pthread_lib $LIBS"])])
+ else
+ AC_MSG_WARN("Don't know how to find pthread library on your system -- thread support disabled")
+@@ -2065,7 +2070,9 @@ if test "$with_dln_a_out" != yes; then
rb_cv_dlopen=yes],
[interix*], [ : ${LDSHARED='$(CC) -shared'}
XLDFLAGS="$XLDFLAGS -Wl,-E"
@@ -24,7 +43,16 @@ $NetBSD: patch-configure.in,v 1.2 2011/12/04 02:31:54 taca Exp $
rb_cv_dlopen=yes],
[freebsd*|dragonfly*], [
: ${LDSHARED='$(CC) -shared'}
-@@ -2354,7 +2358,7 @@ AS_CASE("$enable_shared", [yes], [
+@@ -2076,7 +2083,7 @@ if test "$with_dln_a_out" != yes; then
+ test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED="ld -Bshareable"
+ fi
+ rb_cv_dlopen=yes],
+- [openbsd*], [ : ${LDSHARED='$(CC) -shared ${CCDLFLAGS}'}
++ [openbsd*|mirbsd*], [ : ${LDSHARED='$(CC) -shared ${CCDLFLAGS}'}
+ if test "$rb_cv_binary_elf" = yes; then
+ LDFLAGS="$LDFLAGS -Wl,-E"
+ fi
+@@ -2368,7 +2375,7 @@ AS_CASE("$enable_shared", [yes], [
],
[freebsd*|dragonfly*], [
SOLIBS='$(LIBS)'
@@ -33,7 +61,16 @@ $NetBSD: patch-configure.in,v 1.2 2011/12/04 02:31:54 taca Exp $
if test "$rb_cv_binary_elf" != "yes" ; then
LIBRUBY_SO="$LIBRUBY_SO.\$(TEENY)"
LIBRUBY_ALIASES=''
-@@ -2420,7 +2424,12 @@ AS_CASE("$enable_shared", [yes], [
+@@ -2384,7 +2391,7 @@ AS_CASE("$enable_shared", [yes], [
+ LIBRUBY_ALIASES=""
+ fi
+ ],
+- [openbsd*], [
++ [openbsd*|mirbsd*], [
+ SOLIBS='$(LIBS)'
+ LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR).'`expr ${MINOR} \* 10 + ${TEENY}`
+ ],
+@@ -2434,7 +2441,12 @@ AS_CASE("$enable_shared", [yes], [
LIBRUBY_ALIASES='lib$(RUBY_BASE_NAME).$(MAJOR).$(MINOR).dylib lib$(RUBY_INSTALL_NAME).dylib'
],
[interix*], [
@@ -47,7 +84,7 @@ $NetBSD: patch-configure.in,v 1.2 2011/12/04 02:31:54 taca Exp $
])
], [
LIBRUBYARG_SHARED=
-@@ -2465,11 +2474,7 @@ if test "$install_doc" != no; then
+@@ -2479,11 +2491,7 @@ if test "$install_doc" != no; then
else
RDOCTARGET="nodoc"
fi
@@ -60,7 +97,7 @@ $NetBSD: patch-configure.in,v 1.2 2011/12/04 02:31:54 taca Exp $
else
RDOCTARGET="nodoc"
CAPITARGET="nodoc"
-@@ -3023,7 +3028,7 @@ AC_CONFIG_FILES(Makefile, [{
+@@ -3037,7 +3045,7 @@ AC_CONFIG_FILES(Makefile, [{
}],
[EXEEXT='$EXEEXT' gnumake='$gnumake'])