Skip to content

Commit dfb071f

Browse files
committed
(maint) only force libxml2/libxslt internal mirror if necessary
requires * renaming modified source files on internal mirror * mirroring pristine upstream archives
1 parent 2f16000 commit dfb071f

File tree

2 files changed

+61
-17
lines changed

2 files changed

+61
-17
lines changed

configs/components/libxml2.rb

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
component "libxml2" do |pkg, settings, platform|
22
pkg.version '2.10.3'
3-
pkg.sha256sum '26d2415e1c23e0aad8ca52358523fc9116a2eb6e4d4ef47577b1635c7cee3d5f'
4-
pkg.url "#{settings[:buildsources_url]}/libxml2-#{pkg.get_version}.tar.gz"
5-
6-
# Newer versions of libxml2 either ship as tar.xz or do not ship with a configure file
7-
# and require a newer version of GNU Autotools to generate. This causes problems with
8-
# the older and esoteric (AIX, Solaris) platforms that we support.
9-
# So we generate a configure file manually, compress as tar.gz, and host internally.
3+
pkg.sha256sum '497f12e34790d407ec9e2a190d576c0881a1cd78ff3c8991d1f9e40281a5ff57'
4+
pkg.url "https://gitlab.gnome.org/GNOME/libxml2/-/archive/v#{pkg.get_version}/libxml2-v#{pkg.get_version}.tar.gz"
105

116
if platform.is_aix?
127
if platform.name == 'aix-7.1-ppc'
@@ -23,6 +18,7 @@
2318
pkg.environment "CFLAGS", "#{settings[:cflags]} -std=c99"
2419
pkg.environment "LDFLAGS", settings[:ldflags]
2520
elsif platform.is_macos?
21+
pkg.environment 'PATH', '$(PATH):/opt/homebrew/bin:/usr/local/bin'
2622
pkg.environment "LDFLAGS", settings[:ldflags]
2723
pkg.environment "CFLAGS", settings[:cflags]
2824
if platform.is_cross_compiled?
@@ -34,7 +30,33 @@
3430
pkg.environment "CFLAGS", settings[:cflags]
3531
end
3632

37-
pkg.build_requires "runtime-#{settings[:runtime_project]}"
33+
build_deps = [ "runtime-#{settings[:runtime_project]}" ]
34+
35+
if platform.is_sles?
36+
build_deps << "autoconf"
37+
elsif platform.is_deb? || platform.is_rpm?
38+
build_deps << "dh-autoreconf"
39+
end
40+
41+
if platform.name == 'el-8-x86_64' || platform.name == 'el-9-x86_64'
42+
build_deps.reject! { |r| r == 'dh-autoreconf' }
43+
end
44+
45+
build_deps.each do |dep|
46+
pkg.build_requires dep
47+
end
48+
49+
# Newer versions of libxml2 either ship as tar.xz or do not ship with a configure file
50+
# and require a newer version of GNU Autotools to generate. This causes problems with
51+
# the older and esoteric (AIX, Solaris) platforms that we support.
52+
# So we generate a configure file manually, compress as tar.gz, and host internally.
53+
if (platform.is_aix? && platform.name == 'aix-7.1-ppc') || platform.is_solaris?
54+
pkg.url "#{settings[:buildsources_url]}/libxml2-#{pkg.get_version}-puppet.tar.gz"
55+
pkg.sha256sum '26d2415e1c23e0aad8ca52358523fc9116a2eb6e4d4ef47577b1635c7cee3d5f'
56+
else
57+
pkg.mirror "#{settings[:buildsources_url]}/libxml2-#{pkg.get_version}.tar.gz"
58+
pkg.configure { ["autoreconf --force --install"] }
59+
end
3860

3961
pkg.configure do
4062
["./configure --prefix=#{settings[:prefix]} --without-python #{settings[:host]}"]

configs/components/libxslt.rb

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
component "libxslt" do |pkg, settings, platform|
22
pkg.version '1.1.37'
3-
pkg.sha256sum 'a4ecab265f44e888ed3b39e11c7e925103ef6e26e09d62e9381f26977df96343'
4-
pkg.url "#{settings[:buildsources_url]}/libxslt-v#{pkg.get_version}.tar.gz"
5-
6-
# Newer versions of libxslt either ship as tar.xz or do not ship with a configure file
7-
# and require a newer version of GNU Autotools to generate. This causes problems with
8-
# the older and esoteric (AIX, Solaris) platforms that we support.
9-
# So we generate a configure file manually, compress as tar.gz, and host internally.
10-
11-
pkg.build_requires "libxml2"
3+
pkg.sha256sum 'b6f96869b8c42e8257b19d633d31e38cf12ff770829352a9dd109795ffc78bf2'
4+
pkg.url "https://gitlab.gnome.org/GNOME/libxslt/-/archive/v#{pkg.get_version}/libxslt-v#{pkg.get_version}.tar.gz"
125

136
if platform.is_aix?
147
if platform.name == 'aix-7.1-ppc'
@@ -34,13 +27,42 @@
3427
pkg.environment 'CC', 'clang -target arm64-apple-macos11' if platform.name =~ /osx-11/
3528
pkg.environment 'CC', 'clang -target arm64-apple-macos12' if platform.name =~ /osx-12/
3629
end
30+
pkg.environment 'PATH', '$(PATH):/opt/homebrew/bin:/usr/local/bin'
3731
pkg.environment "LDFLAGS", settings[:ldflags]
3832
pkg.environment "CFLAGS", settings[:cflags]
3933
else
4034
pkg.environment "LDFLAGS", settings[:ldflags]
4135
pkg.environment "CFLAGS", settings[:cflags]
4236
end
4337

38+
build_deps = [ "libxml2" ]
39+
40+
if platform.is_sles?
41+
build_deps << "autoconf"
42+
elsif platform.is_deb? || platform.is_rpm?
43+
build_deps << "dh-autoreconf"
44+
end
45+
46+
if platform.name == 'el-8-x86_64' || platform.name == 'el-9-x86_64'
47+
build_deps.reject! { |r| r == 'dh-autoreconf' }
48+
end
49+
50+
build_deps.each do |dep|
51+
pkg.build_requires dep
52+
end
53+
54+
# Newer versions of libxslt either ship as tar.xz or do not ship with a configure file
55+
# and require a newer version of GNU Autotools to generate. This causes problems with
56+
# the older and esoteric (AIX, Solaris) platforms that we support.
57+
# So we generate a configure file manually, compress as tar.gz, and host internally.
58+
if (platform.is_aix? && platform.name == 'aix-7.1-ppc') || platform.is_solaris?
59+
pkg.url "#{settings[:buildsources_url]}/libxslt-v#{pkg.get_version}-puppet.tar.gz"
60+
pkg.sha256sum 'a4ecab265f44e888ed3b39e11c7e925103ef6e26e09d62e9381f26977df96343'
61+
else
62+
pkg.mirror "#{settings[:buildsources_url]}/libxslt-v#{pkg.get_version}.tar.gz"
63+
pkg.configure { ["autoreconf --force --install"] }
64+
end
65+
4466
pkg.configure do
4567
["./configure --without-python --prefix=#{settings[:prefix]} --docdir=/tmp --with-libxml-prefix=#{settings[:prefix]} #{settings[:host]} #{disable_crypto} #{build}"]
4668
end

0 commit comments

Comments
 (0)