On 2011-06-23, Jasper Lievisse Adriaanse <[email protected]> wrote:
> On Wed, Jun 22, 2011 at 11:51:58PM -0400, Daniel Dickman wrote:
>> Here's a long overdue update of R to 2.12.2. (much work on this by Mark 
>> Lumsden as well). Still crashes too much but seems much more stable than 
>> what's currently in the tree.
>> 
>> Changes are mostly covered here:
>> http://cran.r-project.org/src/base/NEWS.html
>> 
>> Port changes:
>> - Few new patches (+comments)
>> - updated COMMENT and DESCR
>> - updated license marker
>> - some very minimal tidying up (sort LIB_DEPENDS, etc).
>> 
>> Otherwise the regress tests now actually complete on my end vs. 2.8.1 
>> which don't finish. Also as Mark pointed out[1] the following will now 
>> segfault (vs. infinite loop for me on 2.8.1) --
>> 
>>      $ R --gui=Tk
>>      > mynumbers <- c(1,2,3,4)
>> 
>> Generally feels like an improvement over current in tree version. Be great 
>> to try to get this one in... Tested on amd64.
>> 
>> 
>> [1] http://marc.info/?l=openbsd-ports&m=129440990517731&w=2
>> 
>
> - LIB_DEPENDS appears to have some redudant fluff, pango depends on glib, so
>   no need to depend on glib. cairo depends on png, so no need for png either.
> - could you please look at the systrace warnings during the build? i don't
>   know if they're harmless, but just to be sure.

I suspect this is most likely to be a mkdir() call, my hunch would be
to look at the ones in src/main/dounzip.c first.

> - it links with -lpthread instead of -pthread in several places
>
> could you please have a look at that?
>

It's also linking gettext statically now (that's what the removed
patch-configure lines were fixing), which is especially obvious if you
--enable-R-shlib (as requested by, and based on a diff from, Sam Smith).

This diff on top of yours (use patch -p1) fixes that, zaps some stray
space chars, corrects license marker, syncs WANTLIB and enables the
shared lib.

diff --git a/Makefile b/Makefile
index 07149bf..71ca5cb 100644
--- a/Makefile
+++ b/Makefile
@@ -5,25 +5,24 @@ SHARED_ONLY=  Yes
 COMMENT=       programming language for statistical computing
 
 DISTNAME=      R-2.12.2
-SHARED_LIBS=   Rlapack 30.0 \
+SHARED_LIBS=   R       0.0 \
+               Rlapack 30.0 \
                Rblas   30.0
 
-CATEGORIES=            math
+CATEGORIES=    math
 HOMEPAGE=      http://www.r-project.org/
 
-# GPLv2
+# GPLv2+
 PERMIT_PACKAGE_CDROM=  Yes
 PERMIT_PACKAGE_FTP=    Yes
 PERMIT_DISTFILES_CDROM=        Yes
 PERMIT_DISTFILES_FTP=  Yes
 
-WANTLIB=       GL ICE SM X11 Xau Xdamage Xdmcp Xext Xfixes Xmu Xrender Xss Xt \
-               Xxf86vm bz2 c cairo drm expat fontconfig freetype glib-2.0 \
-               gmodule-2.0 gobject-2.0 gthread-2.0 \
-               icui18n icuuc jpeg m lzma ncurses pango-1.0 \
-               pangocairo-1.0 pangoft2-1.0 pcre pixman-1 png pthread \
-               pthread-stubs readline tiff xcb xcb-render xcb-shm z \
-               ${MODFORTRAN_WANTLIB} ${MODTK_WANTLIB}
+WANTLIB += ${MODFORTRAN_WANTLIB} ${MODTK_WANTLIB}
+WANTLIB += ICE SM X11 Xext Xmu Xss Xt bz2 c cairo expat fontconfig
+WANTLIB += freetype glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0
+WANTLIB += icui18n icuuc jpeg m lzma ncurses pango-1.0 pangocairo-1.0
+WANTLIB += pangoft2-1.0 pcre png pthread readline tiff z
 
 MASTER_SITES=  http://cran.r-project.org/src/base/R-2/ \
                http://cran.uk.r-project.org/src/base/R-2/ \
@@ -50,6 +49,7 @@ LIB_DEPENDS=  ${MODFORTRAN_LIB_DEPENDS} \
 CONFIGURE_STYLE=gnu
 MODGNU_CONFIG_GUESS_DIRS=${WRKSRC}/tools
 CONFIGURE_ARGS=        ${CONFIGURE_SHARED} \
+               --enable-R-shlib \
                --with-readline \
                --with-tcltk \
                --with-tcl-config=${MODTCL_CONFIG} \
@@ -70,6 +70,7 @@ MAKE_FLAGS=   INSTALL='install -c' \
                INSTALL_DATA='install -c -m 644' \
                INSTALL_PROGRAM='install -c -s -m 555' \
                INSTALL_SCRIPT='install -c -m 555' \
+               LIBR_VERSION=${LIBR_VERSION} \
                LIBRlapack_VERSION=${LIBRlapack_VERSION} \
                LIBRblas_VERSION=${LIBRblas_VERSION}
 
diff --git a/patches/patch-configure b/patches/patch-configure
index e69de29..503dd4d 100644
--- a/patches/patch-configure
+++ b/patches/patch-configure
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- configure.orig     Thu Jun 23 22:59:51 2011
++++ configure  Thu Jun 23 23:00:00 2011
+@@ -41641,6 +41641,7 @@ $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
+ 
+ 
+ 
++    LIBINTL="$LTLIBINTL"
+     INTLLIBS="$LIBINTL"
+ 
+ 
diff --git a/pkg/PLIST b/pkg/PLIST
index 9e7faac..1ed072f 100644
--- a/pkg/PLIST
+++ b/pkg/PLIST
@@ -119,6 +119,7 @@ lib/R/include/Rmath.h
 lib/R/include/Rversion.h
 lib/R/include/S.h
 lib/R/lib/
+@lib lib/R/lib/libR.so.${LIBR_VERSION}
 @lib lib/R/lib/libRblas.so.${LIBRblas_VERSION}
 @lib lib/R/lib/libRlapack.so.${LIBRlapack_VERSION}
 lib/R/library/
@@ -1728,5 +1729,6 @@ lib/R/share/texmf/tex/latex/omscmtt.fd
 lib/R/share/texmf/tex/latex/ts1aer.fd
 lib/R/share/texmf/tex/latex/ts1aett.fd
 lib/R/share/texmf/tex/latex/upquote.sty
+lib/pkgconfig/libR.pc
 @man man/man1/R.1
 @man man/man1/Rscript.1


Reply via email to