aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorlinimon <linimon@FreeBSD.org>2004-09-04 03:44:01 +0800
committerlinimon <linimon@FreeBSD.org>2004-09-04 03:44:01 +0800
commitd19261063da31f24d14e5a2b1f1b3d4aaf923980 (patch)
tree345782822a9482fb1d5aaf020dd6c194dbb83bd3 /devel
parentea4261a5497a29f5c6a70782fea77ddc6719b2bd (diff)
downloadfreebsd-ports-gnome-d19261063da31f24d14e5a2b1f1b3d4aaf923980.tar.gz
freebsd-ports-gnome-d19261063da31f24d14e5a2b1f1b3d4aaf923980.tar.zst
freebsd-ports-gnome-d19261063da31f24d14e5a2b1f1b3d4aaf923980.zip
Added Locale.get method.
PR: ports/68172 Submitted by: Alexander Novitsky <alecn2002 at yandex dot ru> Approved by: maintainer
Diffstat (limited to 'devel')
-rw-r--r--devel/ruby-locale/Makefile5
-rw-r--r--devel/ruby-locale/files/patch-ab27
2 files changed, 29 insertions, 3 deletions
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));