diff --git a/installers/linux/al2/spec/build.gradle b/installers/linux/al2/spec/build.gradle index 82d5d0df79..774310e9dd 100644 --- a/installers/linux/al2/spec/build.gradle +++ b/installers/linux/al2/spec/build.gradle @@ -45,6 +45,8 @@ task inflateRpmSpec(type: Copy) { filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: [ debug_level: correttoDebugLevel]) filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: [ experimental_feature: project.findProperty("corretto.experimental_feature") ?: "%{nil}" ]) filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: [ additional_configure_options: project.findProperty("corretto.additional_configure_options") ?: "%{nil}"]) + filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: [ zlib_option: project.findProperty("corretto.zlib_option") ?: "system"]) + filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: [ use_gcc_ver: project.findProperty("corretto.use_gcc_ver") ?: ""]) } into buildRoot } diff --git a/installers/linux/al2/spec/java-1.8.0-amazon-corretto.spec.template b/installers/linux/al2/spec/java-1.8.0-amazon-corretto.spec.template index 648401edf4..97c50c52c1 100644 --- a/installers/linux/al2/spec/java-1.8.0-amazon-corretto.spec.template +++ b/installers/linux/al2/spec/java-1.8.0-amazon-corretto.spec.template @@ -25,6 +25,8 @@ %global java_home %{_jvmdir}/%{name}.%{_arch} %global experimental_feature @experimental_feature@ %global additional_configure_options @additional_configure_options@ +%global zlib_option @zlib_option@ +%global use_gcc_ver @use_gcc_ver@ # The experimental_feature macro gets set to %nil by the template, but that is still defined and # the spec doesn't have a quick is not nil check, just define/not defined, this makes it easier to @@ -114,7 +116,7 @@ BuildRequires: cups-devel BuildRequires: fontconfig-devel BuildRequires: freetype-devel BuildRequires: giflib-devel -BuildRequires: gcc-c++ +BuildRequires: gcc%{?use_gcc_ver}-c++ BuildRequires: libjpeg-devel BuildRequires: libpng-devel BuildRequires: libxslt @@ -186,7 +188,7 @@ bash ./configure \ %if 0%{?additional_configure_options:1} %{additional_configure_options} \ %endif - --with-zlib=system \ + --with-zlib="%{zlib_option}" \ --with-giflib=system \ --with-update-version="%{java_update}" \ --with-build-number="%{buildver}" \