test for zlib with -fPIC

pull/93/head
xq114 5 years ago
parent 57bc55e5af
commit ac7f458e27
  1. 2
      packages/o/openexr/xmake.lua
  2. 8
      packages/z/zlib/xmake.lua

@ -4,7 +4,7 @@ package("openexr")
set_description("OpenEXR provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the motion picture industry.") set_description("OpenEXR provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the motion picture industry.")
add_urls("https://github.com/AcademySoftwareFoundation/openexr/archive/v$(version).tar.gz", add_urls("https://github.com/AcademySoftwareFoundation/openexr/archive/v$(version).tar.gz",
"https://github.com/AcademySoftwareFoundation/openexr") "https://github.com/AcademySoftwareFoundation/openexr.git")
add_versions("2.5.3", "6a6525e6e3907715c6a55887716d7e42d09b54d2457323fcee35a0376960bebf") add_versions("2.5.3", "6a6525e6e3907715c6a55887716d7e42d09b54d2457323fcee35a0376960bebf")

@ -26,10 +26,16 @@ package("zlib")
end end
end) end)
on_install("linux", "macosx", function (package) on_install("macosx", function (package)
import("package.tools.autoconf").install(package, {"--static"}) import("package.tools.autoconf").install(package, {"--static"})
end) end)
on_install("linux", function (package)
import("package.tools.autoconf").configure(package, {"--static"})
io.gsub("Makefile", "\nCFLAGS=(.-)\n", "\nCFLAGS=%1 -fPIC\n")
os.vrun("make install -j4")
end)
on_install("iphoneos", "android@linux,macosx", "mingw@linux,macosx", "cross", function (package) on_install("iphoneos", "android@linux,macosx", "mingw@linux,macosx", "cross", function (package)
import("package.tools.autoconf").configure(package, {host = "", "--static"}) import("package.tools.autoconf").configure(package, {host = "", "--static"})
io.gsub("Makefile", "\nAR=.-\n", "\nAR=" .. (package:build_getenv("ar") or "") .. "\n") io.gsub("Makefile", "\nAR=.-\n", "\nAR=" .. (package:build_getenv("ar") or "") .. "\n")

Loading…
Cancel
Save