Skip to content
This repository has been archived by the owner on Jan 15, 2025. It is now read-only.

Commit

Permalink
(maint) only force libxml2/libxslt internal mirror if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
h0tw1r3 committed Nov 18, 2023
1 parent 944f15c commit 6422097
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 17 deletions.
36 changes: 28 additions & 8 deletions configs/components/libxml2.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
component "libxml2" do |pkg, settings, platform|
pkg.version '2.10.3'
pkg.sha256sum '26d2415e1c23e0aad8ca52358523fc9116a2eb6e4d4ef47577b1635c7cee3d5f'
pkg.url "#{settings[:buildsources_url]}/libxml2-#{pkg.get_version}.tar.gz"

# Newer versions of libxml2 either ship as tar.xz or do not ship with a configure file
# and require a newer version of GNU Autotools to generate. This causes problems with
# the older and esoteric (AIX, Solaris) platforms that we support.
# So we generate a configure file manually, compress as tar.gz, and host internally.
pkg.sha256sum '497f12e34790d407ec9e2a190d576c0881a1cd78ff3c8991d1f9e40281a5ff57'
pkg.url "https://gitlab.gnome.org/GNOME/libxml2/-/archive/v#{pkg.get_version}/libxml2-v#{pkg.get_version}.tar.gz"

if platform.is_aix?
if platform.name == 'aix-7.1-ppc'
Expand Down Expand Up @@ -34,7 +29,32 @@
pkg.environment "CFLAGS", settings[:cflags]
end

pkg.build_requires "runtime-#{settings[:runtime_project]}"
build_deps = [ "runtime-#{settings[:runtime_project]}" ]

if platform.is_sles?
build_deps << "autoconf"
elsif platform.is_deb? || platform.is_rpm?
build_deps << "dh-autoreconf"
end

if platform.name == 'el-8-x86_64' || platform.name == 'el-9-x86_64'
build_deps.reject! { |r| r == 'dh-autoreconf' }
end

build_deps.each do |dep|
pkg.build_requires dep
end

# Newer versions of libxml2 either ship as tar.xz or do not ship with a configure file
# and require a newer version of GNU Autotools to generate. This causes problems with
# the older and esoteric (AIX, Solaris) platforms that we support.
# So we generate a configure file manually, compress as tar.gz, and host internally.
if (platform.is_aix? && platform.name == 'aix-7.1-ppc') || platform.is_solaris?
pkg.url "#{settings[:buildsources_url]}/libxml2-#{pkg.get_version}.tar.gz"
pkg.sha256sum '26d2415e1c23e0aad8ca52358523fc9116a2eb6e4d4ef47577b1635c7cee3d5f'
else
pkg.configure { ["autoreconf --force --install"] }
end

pkg.configure do
["./configure --prefix=#{settings[:prefix]} --without-python #{settings[:host]}"]
Expand Down
38 changes: 29 additions & 9 deletions configs/components/libxslt.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
component "libxslt" do |pkg, settings, platform|
pkg.version '1.1.37'
pkg.sha256sum 'a4ecab265f44e888ed3b39e11c7e925103ef6e26e09d62e9381f26977df96343'
pkg.url "#{settings[:buildsources_url]}/libxslt-v#{pkg.get_version}.tar.gz"

# Newer versions of libxslt either ship as tar.xz or do not ship with a configure file
# and require a newer version of GNU Autotools to generate. This causes problems with
# the older and esoteric (AIX, Solaris) platforms that we support.
# So we generate a configure file manually, compress as tar.gz, and host internally.

pkg.build_requires "libxml2"
pkg.sha256sum 'b6f96869b8c42e8257b19d633d31e38cf12ff770829352a9dd109795ffc78bf2'
pkg.url "https://gitlab.gnome.org/GNOME/libxslt/-/archive/v#{pkg.get_version}/libxslt-v#{pkg.get_version}.tar.gz"

if platform.is_aix?
if platform.name == 'aix-7.1-ppc'
Expand Down Expand Up @@ -41,6 +34,33 @@
pkg.environment "CFLAGS", settings[:cflags]
end

build_deps = [ "libxml2" ]

if platform.is_sles?
build_deps << "autoconf"
elsif platform.is_deb? || platform.is_rpm?
build_deps << "dh-autoreconf"
end

if platform.name == 'el-8-x86_64' || platform.name == 'el-9-x86_64'
build_deps.reject! { |r| r == 'dh-autoreconf' }
end

build_deps.each do |dep|
pkg.build_requires dep
end

# Newer versions of libxslt either ship as tar.xz or do not ship with a configure file
# and require a newer version of GNU Autotools to generate. This causes problems with
# the older and esoteric (AIX, Solaris) platforms that we support.
# So we generate a configure file manually, compress as tar.gz, and host internally.
if (platform.is_aix? && platform.name == 'aix-7.1-ppc') || platform.is_solaris?
pkg.url "#{settings[:buildsources_url]}/libxslt-v#{pkg.get_version}.tar.gz"
pkg.sha256sum 'a4ecab265f44e888ed3b39e11c7e925103ef6e26e09d62e9381f26977df96343'
else
pkg.configure { ["autoreconf --force --install"] }
end

pkg.configure do
["./configure --without-python --prefix=#{settings[:prefix]} --docdir=/tmp --with-libxml-prefix=#{settings[:prefix]} #{settings[:host]} #{disable_crypto} #{build}"]
end
Expand Down

0 comments on commit 6422097

Please sign in to comment.