From d19261063da31f24d14e5a2b1f1b3d4aaf923980 Mon Sep 17 00:00:00 2001 From: linimon Date: Fri, 3 Sep 2004 19:44:01 +0000 Subject: Added Locale.get method. PR: ports/68172 Submitted by: Alexander Novitsky Approved by: maintainer --- devel/ruby-locale/Makefile | 5 ++--- devel/ruby-locale/files/patch-ab | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 devel/ruby-locale/files/patch-ab (limited to 'devel') diff --git a/devel/ruby-locale/Makefile b/devel/ruby-locale/Makefile index aedac2d88fd8..0436fded2672 100644 --- a/devel/ruby-locale/Makefile +++ b/devel/ruby-locale/Makefile @@ -7,21 +7,20 @@ PORTNAME= locale PORTVERSION= 0.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel ruby MASTER_SITES= http://kafka.salemstate.edu/~yashi/ruby/ PKGNAMEPREFIX= ${RUBY_PKGNAMEPREFIX} DISTNAME= ruby-${PORTNAME}-${PORTVERSION} DIST_SUBDIR= ruby -MAINTAINER= knu@FreeBSD.org +MAINTAINER= alecn2002@yandex.ru COMMENT= A simple Ruby module that provides setlocale(3) #USE_BZIP2= yes # only saves 500 bytes.. USE_RUBY= yes USE_RUBY_EXTCONF= yes -WRKSRC= ${WRKDIR}/${DISTNAME} INSTALL_TARGET= site-install post-install: diff --git a/devel/ruby-locale/files/patch-ab b/devel/ruby-locale/files/patch-ab new file mode 100644 index 000000000000..4afd2cead8b6 --- /dev/null +++ b/devel/ruby-locale/files/patch-ab @@ -0,0 +1,27 @@ +--- rblocale.c.orig Fri Apr 14 08:20:58 2000 ++++ rblocale.c Mon Jun 21 20:36:37 2004 +@@ -31,6 +31,16 @@ + return ret == NULL ? Qnil : rb_str_new2(ret); + } + ++VALUE ++locale_get( self, category ) ++ VALUE self, category; ++{ ++ char *ret; ++ ++ ret = setlocale(NUM2INT(category), NULL ); ++ return ret == NULL ? Qnil : rb_str_new2(ret); ++} ++ + void Init_locale() + { + char *curr_locale; +@@ -44,6 +54,7 @@ + } + + rb_define_module_function(mLocale, "set", locale_set, 2); ++ rb_define_module_function(mLocale, "get", locale_get, 1); + + rb_define_const(mLocale, "ALL", INT2FIX(LC_ALL)); + rb_define_const(mLocale, "COLLATE", INT2FIX(LC_COLLATE)); -- cgit