Skip to content

Commit f31791f

Browse files
committed
Add libzstd package dependency for R-devel on distros that build against it
1 parent 92e1279 commit f31791f

File tree

5 files changed

+35
-0
lines changed

5 files changed

+35
-0
lines changed

builder/package.debian-12

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ if grep -q '^LIBS *=.*[-]ldeflate' ${R_INSTALL_PATH}/lib/R/etc/Makeconf; then
1616
deflate_libs='- libdeflate-dev'
1717
fi
1818

19+
# R 4.5.0 and later require libzstd (with headers to link against libR)
20+
zstd_libs='# - libzstd-dev'
21+
if grep -q '^LIBS *=.*[-]lzstd' ${R_INSTALL_PATH}/lib/R/etc/Makeconf; then
22+
zstd_libs='- libzstd-dev'
23+
fi
24+
1925
cat <<EOF > /tmp/nfpm.yml
2026
name: r-${R_VERSION}
2127
version: 1
@@ -58,6 +64,7 @@ ${pcre_libs}
5864
- libtk8.6
5965
- libx11-6
6066
- libxt6
67+
${zstd_libs}
6168
- make
6269
- ucf
6370
- unzip

builder/package.fedora-40

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ if [[ "${R_VERSION}" =~ ^3 ]]; then
1111
- pcre-devel'
1212
fi
1313

14+
# R 4.5.0 and later require libzstd (with headers to link against libR)
15+
zstd_libs='# - libzstd-dev'
16+
if grep -q '^LIBS *=.*[-]lzstd' ${R_INSTALL_PATH}/lib/R/etc/Makeconf; then
17+
zstd_libs='- libzstd-devel'
18+
fi
19+
1420
blas_lib='flexiblas-devel'
1521

1622
# Create postremove script to remove empty directories, as nFPM doesn't include them in the RPM files.
@@ -49,6 +55,7 @@ depends:
4955
- libtiff
5056
- libXmu
5157
- libXt
58+
${zstd_libs}
5259
- make
5360
- ${blas_lib}
5461
- pango

builder/package.fedora-41

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ if [[ "${R_VERSION}" =~ ^3 ]]; then
1111
- pcre-devel'
1212
fi
1313

14+
# R 4.5.0 and later require libzstd (with headers to link against libR)
15+
zstd_libs='# - libzstd-dev'
16+
if grep -q '^LIBS *=.*[-]lzstd' ${R_INSTALL_PATH}/lib/R/etc/Makeconf; then
17+
zstd_libs='- libzstd-devel'
18+
fi
19+
1420
blas_lib='flexiblas-devel'
1521

1622
# Create postremove script to remove empty directories, as nFPM doesn't include them in the RPM files.
@@ -49,6 +55,7 @@ depends:
4955
- libtiff
5056
- libXmu
5157
- libXt
58+
${zstd_libs}
5259
- make
5360
- ${blas_lib}
5461
- pango

builder/package.opensuse-156

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ if [[ "${R_VERSION}" =~ ^3 ]]; then
1111
- pcre-devel'
1212
fi
1313

14+
# R 4.5.0 and later require libzstd (with headers to link against libR)
15+
zstd_libs='# - libzstd-dev'
16+
if grep -q '^LIBS *=.*[-]lzstd' ${R_INSTALL_PATH}/lib/R/etc/Makeconf; then
17+
zstd_libs='- libzstd-devel'
18+
fi
19+
1420
# Create post-install script required for OpenBLAS.
1521
#
1622
# On RHEL and SUSE, we link R against the internal shared BLAS to make the
@@ -72,6 +78,7 @@ depends:
7278
- libpango-1_0-0
7379
- libreadline7
7480
- libtiff6
81+
${zstd_libs}
7582
- make
7683
${pcre_libs}
7784
- tar

builder/package.ubuntu-2404

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ if grep -q '^LIBS *=.*[-]ldeflate' ${R_INSTALL_PATH}/lib/R/etc/Makeconf; then
1616
deflate_libs='- libdeflate-dev'
1717
fi
1818

19+
# R 4.5.0 and later require libzstd (with headers to link against libR)
20+
zstd_libs='# - libzstd-dev'
21+
if grep -q '^LIBS *=.*[-]lzstd' ${R_INSTALL_PATH}/lib/R/etc/Makeconf; then
22+
zstd_libs='- libzstd-dev'
23+
fi
24+
1925
cat <<EOF > /tmp/nfpm.yml
2026
name: r-${R_VERSION}
2127
version: 1
@@ -59,6 +65,7 @@ ${pcre_libs}
5965
- libtk8.6
6066
- libx11-6
6167
- libxt6t64
68+
${zstd_libs}
6269
- make
6370
- ucf
6471
- unzip

0 commit comments

Comments
 (0)