Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify windows build system #78

Merged
merged 4 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check-standard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: windows-latest, r: 'oldrel-2'}
- {os: windows-latest, r: 'oldrel-4'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: ubuntu-latest, r: 'oldrel-4'}

env:
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# nanonext 1.5.0.9000 (development)

#### Updates

* Unified Windows build system now compiles 'libmbedtls' and 'libnng' from source even on R <= 4.1 using Rtools40 or earlier.

# nanonext 1.5.0

#### Library Updates
Expand Down
4 changes: 2 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ As system libraries, 'libnng' is available as libnng-dev (deb) or nng-devel (rpm

#### Windows

For R >= 4.2 using the 'Rtools42' or newer toolchains, 'libnng' v1.10.1 and 'libmbedtls' v3.6.2 will be automatically compiled from the package sources during installation.
On Windows, 'libnng' v1.10.1 and 'libmbedtls' v3.6.2 will be compiled from the package sources during installation and hence requires the 'Rtools' toolchain.

For previous R versions, pre-compiled 'libnng' v1.10.1 and 'libmbedtls' v3.6.2 libraries are downloaded and used for installation instead.
For R >= 4.2 using the 'Rtools42' or newer toolchains, the prerequisite 'cmake' is included. For previous R versions using 'Rtools40' or earlier, it may be necessary to separately install a version of 'cmake' in Windows and ensure that it is added to your system's `PATH`.

### Acknowledgements and Links

Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,14 @@ OpenCSW - refer to the ‘cmake’ website for the latest source file.*

#### Windows

For R \>= 4.2 using the ‘Rtools42’ or newer toolchains, ‘libnng’ v1.10.1
and ‘libmbedtls’ v3.6.2 will be automatically compiled from the package
sources during installation.

For previous R versions, pre-compiled ‘libnng’ v1.10.1 and ‘libmbedtls’
v3.6.2 libraries are downloaded and used for installation instead.
On Windows, ‘libnng’ v1.10.1 and ‘libmbedtls’ v3.6.2 will be compiled
from the package sources during installation and hence requires the
‘Rtools’ toolchain.

For R \>= 4.2 using the ‘Rtools42’ or newer toolchains, the prerequisite
‘cmake’ is included. For previous R versions using ‘Rtools40’ or
earlier, it may be necessary to separately install a version of ‘cmake’
in Windows and ensure that it is added to your system’s `PATH`.

### Acknowledgements and Links

Expand Down
1 change: 0 additions & 1 deletion cleanup.ucrt

This file was deleted.

1 change: 1 addition & 0 deletions cleanup.win
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rm -rf src/Makevars install
10 changes: 10 additions & 0 deletions configure.ucrt → configure.win
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
LIB_VER="110"
TLS_VER="362"

# Find compiler and export flags
CC=`"${R_HOME}/bin/R" CMD config CC`
export CC

tar -xf src/mbedtls-$TLS_VER.tar.xz
cd mbedtls-$TLS_VER
echo "Compiling 'libmbedtls' from source ..."
Expand All @@ -18,5 +22,11 @@ cmake --build . --target install
cd ..
rm -rf nng-$LIB_VER

PKG_CFLAGS="-I../install/include -DNNG_STATIC_LIB"
PKG_LIBS="-L../install/lib -lnng -lmbedtls -lmbedx509 -lmbedcrypto -lbcrypt -lws2_32"

# Write to Makevars
sed -e "s|@cflags@|$PKG_CFLAGS|" -e "s|@libs@|$PKG_LIBS|" src/Makevars.in > src/Makevars

# Success
exit 0
2 changes: 0 additions & 2 deletions src/Makevars.ucrt

This file was deleted.

15 changes: 0 additions & 15 deletions src/Makevars.win

This file was deleted.

Loading