Commit Graph

148 Commits

Author SHA1 Message Date
Tony Theodore 38c43b5017 sub makefiles: standardize names and add to build-pkg 2018-03-12 14:28:14 +11:00
Tony Theodore 02e11b8dc1 build-pkg: add usage notes for pkg list and dry run 2018-03-12 14:28:14 +11:00
Tony Theodore b7d071aaca build-pkg.lua: update debian deps and notes for other systems
closes #2065
2018-03-05 21:59:24 +11:00
Tony Theodore 9d39a40a2b Makefile and build-pkg: use {pkg}~{target} directly
Required for the case where a cross package is independent of it's
native package (e.g. libiconv) and the native pkg may not have been
built in the dep chain. Calling:
```
make pkg MXE_TARGETS=...
```
will then cause `make` to build the native pkg as well. (MXE_TARGETS
is still required otherwise it will be picked up from settings.mk)
2017-12-23 08:19:00 +11:00
Tony Theodore 2461c19dab build-pkg: exclude waf cache directory
When `waf` executes, it creates a cache directory in:
`./usr/$(BUILD)/bin/.waf-<version>-<checksum>`

This causes conflicting files in `build-pkg` (see #1840) and should
be blacklisted.
2017-10-31 23:34:15 +11:00
Boris Nagaev e54509e5f0 Merge pull request #1908 from LuaAndC/build-pkg-installed-size
build-pkg, Debian: set Installed-Size field
2017-09-29 02:53:07 +01:00
Boris Nagaev ce28d4e5bf Merge pull request #1907 from LuaAndC/build-pkg-ignore-some-gitkeep
build-pkg: blacklist {installed,lib}/.gitkeep
2017-09-27 00:11:38 +01:00
Boris Nagaev 9c20c227f2 build-pkg, Debian: set Installed-Size field
See https://github.com/mxe/mxe/issues/1886#issuecomment-325927828
2017-09-24 18:22:36 +02:00
Boris Nagaev 74e2d77090 build-pkg: blacklist {installed,lib}/.gitkeep
The following files are installed by both cmake-conf and mxe-conf:

usr/i686-w64-mingw32.shared/installed/.gitkeep
usr/i686-w64-mingw32.static/installed/.gitkeep
usr/x86_64-unknown-linux-gnu/installed/.gitkeep
usr/x86_64-unknown-linux-gnu/lib/.gitkeep
usr/x86_64-w64-mingw32.shared/installed/.gitkeep
usr/x86_64-w64-mingw32.static/installed/.gitkeep

In all cases a package installs other files to the same library, so these
.gitkeep files can be safely added to the blacklist.

See https://github.com/mxe/mxe/issues/1886#issuecomment-331719282
2017-09-24 18:01:04 +02:00
Boris Nagaev c17f035098 build-pkg: pack empty packages as well
See https://github.com/mxe/mxe/issues/1886#issue-253920956
See https://github.com/mxe/mxe/issues/968
2017-09-24 17:49:28 +02:00
Boris Nagaev 9971cb923a Merge pull request #1903 from LuaAndC/misspell
fix typos found by misspell tool
2017-09-24 15:42:51 +01:00
Boris Nagaev d2d244a9ea fix typos found by misspell tool 2017-09-24 16:37:34 +02:00
Boris Nagaev df1ed2b339 build-pkg: ignore all copies of nonetwork.so
See https://github.com/mxe/mxe/issues/1886#issuecomment-325927308
2017-09-24 16:35:41 +02:00
Viktor Szakats 45d34aaac7 more URL updates 2017-03-10 13:59:00 +00:00
Boris Nagaev 19de5951d0 build-pkg: disable usr/share/gtk-doc
This path is buggy.
Packages installing files there have options --disable-gtk-doc
and --disable-gtk-doc-html, but they don't help.
2017-03-05 04:08:11 +01:00
Boris Nagaev 846b981165 build-pkg: system requirements are recommendations
... not dependencies.

fix #1537
2016-10-12 04:11:40 +03:00
Boris Nagaev 4e8c132550 move CNAME to docs/
See https://github.com/mxe/mxe/issues/1500
2016-08-27 12:31:30 +03:00
Boris Nagaev 8e35c23242 move index.html to docs/
See https://github.com/mxe/mxe/issues/1500
2016-08-27 12:31:30 +03:00
Boris Nagaev f5567f2c37 mv versions.json build-matrix.html assets docs/
See https://github.com/mxe/mxe/issues/1500
2016-08-27 12:31:30 +03:00
Boris Nagaev d0e424038e rename doc/ to docs/
See https://github.com/mxe/mxe/issues/1500
2016-08-27 12:31:30 +03:00
Boris Nagaev 6adb5ade12 Copyright headers: point to LICENSE.md and shorten
The following script was applied:

    sed ':a;/part of MXE.$/{N;s/\n//;ba}' -i $(git grep -l 'part of MXE')

    sed 's/\(part of MXE\).*\(See index.html\)/\1. \2/' -i \
        $(git grep -l 'part of MXE.*See index.html')

    before='This file is part of MXE. See index.html for further information.'
    after='This file is part of MXE. See LICENSE.md for licensing information.'
    sed "s/$before/$after/" -i $(git grep -l 'part of MXE')

Then git grep 'index.html for further information' revealed two other files.
One of them was patched manually (patch.mk). Makefile has text
"See index.html for further information" unrelated to licensing.

See https://github.com/mxe/mxe/issues/1500#issuecomment-241340792
2016-08-27 12:31:29 +03:00
Boris Nagaev 1a59d510a6 build-pkg: fix crash if package breaks in 1st pass
fix https://github.com/mxe/mxe/issues/1471
2016-08-03 02:19:43 +03:00
Boris Nagaev 0e45796eeb build-pkg: track all files including gitignored
See https://github.com/mxe/mxe/pull/1443#issuecomment-233181951
2016-07-20 11:37:49 +03:00
Boris Nagaev fba599d2d7 build-pkg: add env. var to change targets
MXE_BUILD_PKG_TARGETS
2016-06-11 21:54:26 +03:00
Boris Nagaev 4d43e1fe47 build-pkg: prefix evn. vars with "MXE_BUILD_PKG"
to distinguish them from environment variables of MXE itself.
2016-06-11 21:51:45 +03:00
Boris Nagaev 3ee3445f90 build-pkg: limit number of retries of downloading
fix #1308
2016-05-02 14:16:07 +03:00
Boris Nagaev c5c610b085 build-pkg, second pass: fix fail on broken package
If a package is found to be broken on the first pass, then
prev_files = nil, because this structure is filled only
for non-broken packages.

See https://github.com/mxe/mxe/pull/1243#issuecomment-211137555
2016-04-20 23:35:13 +03:00
Boris Nagaev 9da2e477d3 build-pkg: provide more info about removed files 2016-04-20 23:35:13 +03:00
Boris Nagaev 6784792540 build-pkg: detect broken symlink and removed file 2016-04-20 23:35:13 +03:00
Boris Nagaev ea511c193c build-pkg: use "git add" with --all
From the warning produced by "git add ." after removing a file with "rm":

> warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal',
> whose behaviour will change in Git 2.0 with respect to paths you removed.
> Paths like 'foo.txt' that are
> removed from your working tree are ignored with this version of Git.
>
> * 'git add --ignore-removal <pathspec>', which is the current default,
>   ignores paths you removed from your working tree.
>
> * 'git add --all <pathspec>' will let you also record the removals.
>
> Run 'git status' to check the paths you removed from your working tree.

$ git status --porcelain
 D foo.txt

$ git add --all .

$ git status --porcelain
D  foo.txt

$ git --version
git version 1.9.1
2016-04-20 23:35:13 +03:00
Boris Nagaev 732169d86a build-pkg: exit with non-zero if second pass fails 2016-04-20 23:35:13 +03:00
Boris Nagaev f3de04c954 build-pkg: provide a way to disable second pass 2016-04-20 23:35:13 +03:00
Boris Nagaev aa4744cea4 build-pkg: add second pass
The second pass is done after the first one. During the second pass,
an item is built in tree of files from all other items. It checks that:

  * packages can be built in any order satisfying dependencies;
  * a package can be rebuilt after its dependee.

For both cases, not only build status is checked but also two sets of
files are compared. Currently content of files is not checked, only
their existance in both passes.

See #1111
2016-04-20 23:35:13 +03:00
Boris Nagaev d25a31bd21 build-pkg: move function isBuilt()
It will be used in buildItem()
2016-04-20 23:35:13 +03:00
Boris Nagaev 1856ae5f8a build-pkg, buildItem(): log pass (first, second) 2016-04-20 23:35:13 +03:00
Boris Nagaev 07a0103247 build-pkg: provide a way to mute removeEmptyDirs() 2016-04-20 23:35:13 +03:00
Boris Nagaev 3f47774f1c build-pkg: add argument pass=first to build funcs 2016-04-20 23:35:13 +03:00
Boris Nagaev 1a1c1ebf00 build-pkg: move top-level code to main() function 2016-04-20 23:35:13 +03:00
Boris Nagaev 8ec0d4dafb build-pkg: set MXE_DIR automatically
Produce a warning if MXE_DIR != /usr/lib/mxe

When making a debug build, it is better to get a warning
than set MXE_DIR manually each time.
2016-01-25 21:56:13 +03:00
Boris Nagaev c26dbd9aec build-pkg: ignore installed/.gitkeep file
It produced the following erroneous warning:

> Item x86_64-unknown-linux-gnu~mxe-conf
> built item x86_64-unknown-linux-gnu~.gitkeep.
2016-01-18 00:30:18 +03:00
Boris Nagaev 6b25bbb150 build-pkg: log and remove empty directories 2016-01-18 00:30:18 +03:00
Boris Nagaev 53d21fac61 build-pkg: touch usr/*/installed/* in build order
See https://git.io/vuDJY
2016-01-18 00:30:18 +03:00
Boris Nagaev 36086a980a build-pkg: refactor function makeItem2Index() 2016-01-18 00:30:18 +03:00
Boris Nagaev d08e5078b9 build-pkg: prevent accidental rebuilds
touch all installed/* files after checkout.
2016-01-18 00:30:18 +03:00
Boris Nagaev 53c384d4c5 build-pkg: resolve merge conflicts manually
`git merge -s recursive -X ours` turned out to fail on binary
files. (I can't reproduce this behaviour in test repo, maybe
it is Git's bug.) So I switched to `checkout --ours`, which
worked in that case.
2016-01-18 00:30:18 +03:00
Boris Nagaev 1840845795 build-pkg: reorder functions
gitCheckout() will use gitCommit()
2016-01-18 00:30:18 +03:00
Boris Nagaev 6706af72c4 build-pkg: check exit status of "git commit" 2016-01-18 00:30:18 +03:00
Boris Nagaev deae4dc3c9 build-pkg: make sure checkout and merge succeed 2016-01-18 00:30:18 +03:00
Boris Nagaev e464f12cd0 build-pkg: merge "resolves" conflicts
Result of build by previous commit:
https://gist.github.com/32309209c467853deedc

If a conflict happens, build-pkg should "resolve" it by selecting
one of versions. Git has a merge strategy "recursive" with an
option "ours" which does exactly what is needed but works only
for two heads. That is why multi-merge was replaced by multiple
merges of two heads.
2016-01-18 00:30:18 +03:00
Boris Nagaev d31bdd48b5 build-pkg: make pkg without independent packages
This is an implementation of detection of undeclared requiremenets
using Git branches.

See #1111
2016-01-18 00:30:18 +03:00