--- /usr/portage/dev-lang/R/R-2.0.0.ebuild 2004-10-11 04:14:15.000000000 +0900 +++ R-2.0.0-r1.ebuild 2004-10-17 11:03:49.499840250 +0900 @@ -4,11 +4,19 @@ inherit 64-bit fortran -IUSE="blas lapack X tcltk gnome zlib bzlib pcre" +IUSE="blas lapack X tcltk gnome zlib bzlib pcre cjk" DESCRIPTION="R is GNU S - A language and environment for statistical computing and graphics." -SRC_URI="http://cran.r-project.org/src/base/R-2/${P}.tar.gz" +SRC_URI="http://cran.r-project.org/src/base/R-2/${P}.tar.gz + cjk? ( + http://r.nakama.ne.jp/${P}/patchs/${P}.i18n.gnome.20041005.patch + http://r.nakama.ne.jp/${P}/patchs/${P}.i18n.main.20041005.patch + http://r.nakama.ne.jp/${P}/patchs/${P}.i18n.regex.20041005.patch + http://r.nakama.ne.jp/${P}/patchs/${P}.i18n.tcltk.20041005.patch + http://r.nakama.ne.jp/${P}/patchs/${P}.i18n.x11_mb.20041005.patch + http://r.nakama.ne.jp/${P}/patchs/${P}.l10n.pstex.20041006.patch + )" #There are daily release patches, don't know how to utilize these #"ftp://ftp.stat.math.ethz.ch/Software/${PN}/${PN}-release.diff.gz" @@ -48,15 +56,25 @@ cd ${S} sed -e 's/^#define NeedFunctionPrototypes 0/#define NeedFunctionPrototypes 1/' \ -i src/modules/X11/dataentry.c || die "sed failed" + + if use cjk; then + epatch ${DISTDIR}/${P}.i18n.gnome.20041005.patch + epatch ${DISTDIR}/${P}.i18n.main.20041005.patch + epatch ${DISTDIR}/${P}.i18n.regex.20041005.patch + epatch ${DISTDIR}/${P}.i18n.tcltk.20041005.patch + epatch ${DISTDIR}/${P}.i18n.x11_mb.20041005.patch + epatch ${DISTDIR}/${P}.l10n.pstex.20041006.patch + rm -f src/main/gram.c + fi } src_compile() { addwrite "/var/cache/fonts" local myconf="--enable-static --enable-R-profiling --enable-R-shlib --with-readline" - use zlib || myconf="${myconf} --with-zlib" #default disabled - use bzlib || myconf="${myconf} --with-bzlib" #default disabled - use pcre || myconf="${myconf} --with-pcre" #default disabled + use zlib && myconf="${myconf} --with-zlib" #default disabled + use bzlib && myconf="${myconf} --with-bzlib" #default disabled + use pcre && myconf="${myconf} --with-pcre" #default disabled # Using the blas USE flag now instead atlas, as atlas now # has been broken into blas-atlas and lapack-atlas. @@ -72,6 +90,10 @@ myconf="${myconf} --without-tcltk" fi + if use cjk; then + myconf="${myconf} X_CFLAGS=\"-DI18N_MB\" MAIN_CFLAGS=\"-DL10N_JP\"" + fi + use gnome && myconf="${myconf} --with-gnome" #default disabled econf \