Skip to content

Commit

Permalink
Merge pull request #424 from dmurdoch/fixes
Browse files Browse the repository at this point in the history
Various minor fixes
  • Loading branch information
dmurdoch authored Jun 16, 2024
2 parents 0b13a69 + 3b35c90 commit 2a346c5
Show file tree
Hide file tree
Showing 9 changed files with 1,189 additions and 958 deletions.
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# rgl 1.3.6
# rgl 1.3.7

## Minor changes

* `readSTL()` can now read (some) ASCII format STL files.
* The configure script has had minor changes, and autoconf
support files have been updated.

## Bug fixes

Expand Down
42 changes: 26 additions & 16 deletions README.Rmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
output:
markdown::html_format
output: github_document
---

<!-- README.md is generated from README.Rmd. Please edit that file -->
Expand All @@ -14,9 +13,11 @@ knitr::opts_chunk$set(
comment = "#>",
fig.path = "man/figures/README"
)
options(rgl.useNULL=TRUE)
suppressPackageStartupMessages(library(rgl))
options(rgl.useNULL = TRUE)
if (!requireNamespace("rmarkdown", quietly = TRUE)) {
warning(call. = FALSE, "These vignettes assume rmarkdown. This was not found.")
knitr::knit_exit()
Expand Down Expand Up @@ -213,19 +214,28 @@ to install from CRAN, or

remotes::install_github("dmurdoch/rgl")

to install the development version from Github.

Sometimes
binary development versions are available for Windows and
macOS using

install.packages("rgl", repos = "https://dmurdoch.github.io/drat",
type = "binary")

but these are not always kept up to date.

BUILDING WITHOUT OPENGL
-----------------------
to install the development version from Github.

### BUILDING ON MACOS

To build on MacOS using one of the ARM64 chips (currently M1, M2 or
M3), follow the instructions on https://mac.r-project.org/tools/
to install the tools and libraries into `/opt/R/arm64`. It is
important that `/opt/R/arm64/bin` appear in your
PATH before `/usr/local/bin` if the latter directory has been used
for x86_64 installs. If you don't do this, or have some other
error in setting things up, you'll get a warning during
`rgl` installation saying that some configure test failed, and `rgl`
will be installed without OpenGL support.

Some versions of RStudio (including 2024.04.2+764) have a bug that
modifies your PATH on startup and again after every package
installation, putting `/usr/local/bin` at the head of the PATH.
If you are building `rgl` in such a system you need to remove
files from `/usr/local/bin` if there's a file with the same name in
`/opt/R/arm64/bin`. Hopefully this bug will be fixed soon!

### BUILDING WITHOUT OPENGL

As of version 0.104.1, it is possible to build the package without
OpenGL support on Unix-alikes (including macOS) with the configure option
Expand Down
28 changes: 19 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Binary builds of `rgl` are available for some platforms on CRAN.
For source builds, install the prerequisites as described above,
download the tarball and at the command line run

R CMD INSTALL rgl_1.1.6.tar.gz
R CMD INSTALL rgl_1.3.6.tar.gz

(with the appropriate version of the tarball). The build uses an
`autoconf` configure script; to see the options, expand the tarball and
Expand All @@ -160,21 +160,31 @@ to install from CRAN, or

to install the development version from Github.

Sometimes binary development versions are available for Windows and
macOS using
### BUILDING ON MACOS

install.packages("rgl", repos = "https://dmurdoch.github.io/drat",
type = "binary")
To build on MacOS using one of the ARM64 chips (currently M1, M2 or M3),
follow the instructions on <https://mac.r-project.org/tools/> to install
the tools and libraries into `/opt/R/arm64`. It is important that
`/opt/R/arm64/bin` appear in your PATH before `/usr/local/bin` if the
latter directory has been used for x86_64 installs. If you don’t do
this, or have some other error in setting things up, you’ll get a
warning during `rgl` installation saying that some configure test
failed, and `rgl` will be installed without OpenGL support.

but these are not always kept up to date.
Some versions of RStudio (including 2024.04.2+764) have a bug that
modifies your PATH on startup and again after every package
installation, putting `/usr/local/bin` at the head of the PATH. If you
are building `rgl` in such a system you need to remove files from
`/usr/local/bin` if there’s a file with the same name in
`/opt/R/arm64/bin`. Hopefully this bug will be fixed soon!

## BUILDING WITHOUT OPENGL
### BUILDING WITHOUT OPENGL

As of version 0.104.1, it is possible to build the package without
OpenGL support on Unix-alikes (including macOS) with the configure
option –disable-opengl For example,

R CMD INSTALL --configure-args="--disable-opengl" rgl_1.1.6.tar.gz
R CMD INSTALL --configure-args="--disable-opengl" rgl_1.3.6.tar.gz

On Windows, OpenGL support cannot currently be disabled.

Expand Down Expand Up @@ -207,7 +217,7 @@ Fernandez i Marin for help debugging the build.
George Helffrich for draping code.
Ivan Krylov for window_group code in X11.
Michael Sumner for as.mesh3d.default enhancement.
Tomas Kalibera for `winutf8` help.
Tomas Kalibera for `winutf8` and other help.
David Hugh-Jones for documentation improvements.
Trevor Davis for a `snapshot3d` patch. Mike Stein for pointer-handling
code.
9 changes: 0 additions & 9 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -4227,17 +4227,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu




if test `uname` = "Darwin" ; then
darwin="yes"
## we want the *build* cputype and not the host one.
cmd=`echo $CC $CFLAGS | grep -E 'x86_64|ppc64|-m64'`
if test -n "$cmd"; then
have_64bit="yes"
else
have_64bit="no"
fi
else
darwin="no"
fi
Expand Down
9 changes: 0 additions & 9 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,8 @@ fi
AC_PROG_CPP
AC_PROG_CC



if test `uname` = "Darwin" ; then
darwin="yes"
## we want the *build* cputype and not the host one.
cmd=`echo $CC $CFLAGS | grep -E 'x86_64|ppc64|-m64'`
if test -n "$cmd"; then
have_64bit="yes"
else
have_64bit="no"
fi
else
darwin="no"
fi
Expand Down
Loading

0 comments on commit 2a346c5

Please sign in to comment.