-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathreadline.rb
More file actions
52 lines (47 loc) · 1.93 KB
/
readline.rb
File metadata and controls
52 lines (47 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#####
# Component release information:
# https://www.gnu.org/software/readline/
# https://tiswww.case.edu/php/chet/readline/CHANGES
# Notes:
# 2023-07-23: Quite out of date, latest is 8.3. Need to evaluate if the
# new version breaks anything.
#####
component 'readline' do |pkg, settings, platform|
pkg.version '8.1.2'
pkg.md5sum '12819fa739a78a6172400f399ab34f81'
pkg.url "http://ftp.gnu.org/gnu/#{pkg.get_name}/#{pkg.get_name}-#{pkg.get_version}.tar.gz"
pkg.mirror "#{settings[:buildsources_url]}/#{pkg.get_name}-#{pkg.get_version}.tar.gz"
if platform.is_aix?
pkg.environment 'PATH', '/opt/freeware/bin:$(PATH)'
elsif platform.is_cross_compiled_linux?
pkg.environment 'PATH', "/opt/pl-build-tools/bin:$(PATH):#{settings[:bindir]}"
pkg.environment 'CFLAGS', settings[:cflags]
pkg.environment 'LDFLAGS', settings[:ldflags]
elsif platform.is_solaris?
pkg.environment 'PATH',
"/opt/pl-build-tools/bin:$(PATH):/usr/local/bin:/usr/ccs/bin:/usr/sfw/bin:#{settings[:bindir]}"
pkg.environment 'CFLAGS', "#{settings[:cflags]} -std=c99"
pkg.environment 'LDFLAGS', settings[:ldflags]
elsif platform.is_macos?
pkg.environment 'LDFLAGS', settings[:ldflags]
pkg.environment 'CFLAGS', settings[:cflags]
pkg.environment 'CC', settings[:cc]
pkg.environment 'MACOSX_DEPLOYMENT_TARGET', settings[:deployment_target]
else
pkg.environment 'LDFLAGS', settings[:ldflags]
pkg.environment 'CFLAGS', settings[:cflags]
end
pkg.build_requires "runtime-#{settings[:runtime_project]}"
pkg.configure do
["./configure --prefix=#{settings[:prefix]} #{settings[:host]}"]
end
pkg.build do
["#{platform[:make]} VERBOSE=1 -j$(shell expr $(shell #{platform[:num_cores]}) + 1)"]
end
pkg.install do
[
"#{platform[:make]} VERBOSE=1 -j$(shell expr $(shell #{platform[:num_cores]}) + 1) install",
"rm -rf #{settings[:datadir]}/doc/#{pkg.get_name}*"
]
end
end