void-packages/srcpkgs/wordgrinder/patches/osexec-bool.patch

32 lines
876 B
Diff

--- build.lua.orig
+++ build.lua
@@ -24,7 +24,7 @@
if package == "builtin" then
return true
end
- return os.execute("pkg-config "..package) == 0
+ return os.execute("pkg-config "..package)
end
local function detect_package(name, package)
@@ -54,7 +54,7 @@
end
local function has_binary(binary)
- return os.execute("type "..binary.." >/dev/null 2>&1") == 0
+ return os.execute("type "..binary.." >/dev/null 2>&1")
end
local function package_flags(package, kind)
@@ -68,8 +68,8 @@
end
local filename = os.tmpname()
- local e = os.execute("pkg-config "..kind.." "..package.." > "..filename)
- if e ~= 0 then
+
+ if os.execute("pkg-config "..kind.." "..package.." > "..filename) == false then
error("required package "..package.." is not available")
end
local s = io.open(filename):read("*a")