-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use official .tar.gz instead of .bz2 since is no longer provided.
- Loading branch information
1 parent
e9e64ef
commit 232a52e
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
recipe "zlib", "1.2.8" do | ||
use :autotools | ||
|
||
fetch "http://distfiles.openknapsack.org/#{name}/#{name}-#{version}.tar.gz", | ||
:md5 => "44d667c142d7cda120332623eab69f40" | ||
|
||
action :configure do | ||
if platform.mingw? | ||
# win32/Makefile.gcc needs to be adjusted | ||
options.makefile = "win32/Makefile.gcc" | ||
work_makefile = work_path(options.makefile) | ||
mk = File.read work_makefile | ||
File.open work_makefile, "wb" do |f| | ||
f.puts "BINARY_PATH = #{install_path('bin')}" | ||
f.puts "INCLUDE_PATH = #{install_path('include')}" | ||
f.puts "LIBRARY_PATH = #{install_path('lib')}" | ||
|
||
# TODO: change PREFIX if cross-compiling | ||
unless platform.native? | ||
mg.sub!(/^PREFIX\s*=\s*$/, "PREFIX = #{platform.host}-") | ||
end | ||
|
||
# enable shared object | ||
mk.sub!(/^SHARED_MODE\s*=\d*$/, "SHARED_MODE = 1") | ||
|
||
# write the original Makefile content | ||
f.puts mk | ||
end | ||
else | ||
# run will chdir into work_path prior executing the command | ||
run "sh configure --prefix=#{install_path}" | ||
end | ||
end | ||
end |