Pārlūkot izejas kodu

test for zlib with -fPIC

xq114 4 gadi atpakaļ
vecāks
revīzija
ac7f458e27
2 mainītis faili ar 8 papildinājumiem un 2 dzēšanām
  1. 1 1
      packages/o/openexr/xmake.lua
  2. 7 1
      packages/z/zlib/xmake.lua

+ 1 - 1
packages/o/openexr/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.")
 
     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")
 

+ 7 - 1
packages/z/zlib/xmake.lua

@@ -26,10 +26,16 @@ package("zlib")
         end
     end)
 
-    on_install("linux", "macosx", function (package)
+    on_install("macosx", function (package)
         import("package.tools.autoconf").install(package, {"--static"})
     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)
         import("package.tools.autoconf").configure(package, {host = "", "--static"})
         io.gsub("Makefile", "\nAR=.-\n",      "\nAR=" .. (package:build_getenv("ar") or "") .. "\n")