Skip to content

Instantly share code, notes, and snippets.

@starius
Last active October 19, 2015 08:27
Show Gist options
  • Save starius/931118a42fb7793b8b74 to your computer and use it in GitHub Desktop.
Save starius/931118a42fb7793b8b74 to your computer and use it in GitHub Desktop.
Patches for build-pkg.lua after toolchain re-org part 2 (MXE #925)
From f72055247ca050952f30261def8facf5f684f7ad Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Mon, 19 Oct 2015 09:55:41 +0200
Subject: [PATCH] build-pkg: don't blacklist usr/share/cmake
diff --git a/tools/build-pkg.lua b/tools/build-pkg.lua
index 3d71351..2870cad 100755
--- a/tools/build-pkg.lua
+++ b/tools/build-pkg.lua
@@ -43,7 +43,11 @@ local GIT = 'git --work-tree=./usr/ --git-dir=./usr/.git '
local BLACKLIST = {
'^usr/installed/check%-requirements$',
- '^usr/share/',
+ -- usr/share/cmake if useful
+ '^usr/share/doc/',
+ '^usr/share/info/',
+ '^usr/share/man/',
+ '^usr/share/gcc',
'^usr/[^/]+/share/doc/',
'^usr/[^/]+/share/info/',
}
--
1.7.10.4
From 5766e53941d0bbfd4e0ca70d8314c6dd42c0dae4 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Mon, 19 Oct 2015 09:58:09 +0200
Subject: [PATCH] build-pkg: keep deb-control files if MXE_NO_DEBS
diff --git a/tools/build-pkg.lua b/tools/build-pkg.lua
index 2870cad..54036e2 100755
--- a/tools/build-pkg.lua
+++ b/tools/build-pkg.lua
@@ -439,6 +439,9 @@ local function makeDeb(item, list_path, deps, ver)
-- make .deb file
local cmd = 'fakeroot -i deb.fakeroot dpkg-deb -b %s'
os.execute(cmd:format(dirname))
+ else
+ local cmd = 'cp %s %s.deb-control'
+ os.execute(cmd:format(control_fname, dirname))
end
-- cleanup
os.execute(('rm -fr %s deb.fakeroot'):format(dirname))
--
1.7.10.4
From 51530b20c5314dbc67657c74822f4b6c9e9feecc Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Mon, 19 Oct 2015 10:01:52 +0200
Subject: [PATCH] build-pkg: use config.guess to get native target
diff --git a/tools/build-pkg.lua b/tools/build-pkg.lua
index 54036e2..a86c78e 100755
--- a/tools/build-pkg.lua
+++ b/tools/build-pkg.lua
@@ -158,8 +158,9 @@ local function fileExists(name)
end
end
+local NATIVE_TARGET = trim(shell("ext/config.guess"))
local function isCross(target)
- return not isInString('unknown', target)
+ return target ~= NATIVE_TARGET
end
-- return target and package from item name
--
1.7.10.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment