|
1 | 1 | component 'augeas' do |pkg, settings, platform|
|
2 |
| - pkg.version '1.8.1' |
3 |
| - pkg.md5sum '623ff89d71a42fab9263365145efdbfa' |
4 |
| - pkg.url "#{settings[:buildsources_url]}/augeas-#{pkg.get_version}.tar.gz" |
| 2 | + # Projects may define an :augeas_version setting, or we use 1.8.1 by default: |
| 3 | + version = settings[:augeas_version] || '1.8.1' |
| 4 | + pkg.version version |
| 5 | + |
| 6 | + case version |
| 7 | + when '1.4.0' |
| 8 | + pkg.md5sum 'a2536a9c3d744dc09d234228fe4b0c93' |
| 9 | + |
| 10 | + pkg.apply_patch 'resources/patches/augeas/augeas-1.4.0-osx-stub-needed-readline-functions.patch' |
| 11 | + pkg.apply_patch 'resources/patches/augeas/augeas-1.4.0-sudoers-negated-command-alias.patch' |
| 12 | + pkg.apply_patch 'resources/patches/augeas/augeas-1.4.0-src-pathx.c-parse_name-correctly-handle-trailing-ws.patch' |
| 13 | + when '1.8.1' |
| 14 | + pkg.md5sum '623ff89d71a42fab9263365145efdbfa' |
| 15 | + when '1.10.1' |
| 16 | + pkg.md5sum '6c0b2ea6eec45e8bc374b283aedf27ce' |
| 17 | + |
| 18 | + if platform.name =~ /^el-(5|6|7)-.*/ || platform.is_fedora? |
| 19 | + # Augeas 1.10.1 needs a libselinux pkgconfig file on these platforms: |
| 20 | + pkg.build_requires 'ruby-selinux' |
| 21 | + elsif platform.name =~ /solaris-10-sparc/ |
| 22 | + # This patch to gnulib fixes a linking error around symbol versioning in pthread. |
| 23 | + pkg.add_source 'file://resources/patches/augeas/augeas-1.10.1-gnulib-pthread-in-use.patch' |
| 24 | + |
| 25 | + pkg.configure do |
| 26 | + # gnulib is a submodule, and its files don't exist until after configure, |
| 27 | + # so we apply the patch manually here instead of using pkg.apply_patch. |
| 28 | + ["/usr/bin/gpatch -p0 < ../augeas-1.10.1-gnulib-pthread-in-use.patch"] |
| 29 | + end |
| 30 | + end |
| 31 | + else |
| 32 | + raise "augeas version #{version} has not been configured; Cannot continue." |
| 33 | + end |
| 34 | + |
| 35 | + pkg.url "http://download.augeas.net/augeas-#{pkg.get_version}.tar.gz" |
| 36 | + pkg.mirror "#{settings[:buildsources_url]}/augeas-#{pkg.get_version}.tar.gz" |
5 | 37 |
|
6 | 38 | pkg.build_requires "libxml2"
|
7 | 39 |
|
|
0 commit comments