Commit Graph

375 Commits

Author SHA1 Message Date
Duncaen 500a3c8f49 xbps-src: clean up fetch hook and allow mirroring 2022-09-06 21:41:44 +07:00
classabbyamp 74f4492e5f common/{,environment}/build_style/python3.sh: use python3 build_helper 2022-08-29 23:25:05 -04:00
classabbyamp 5912b3f5b7
common/environment/build-style/go.sh: fix internal linking on i686 2022-08-10 15:17:27 -04:00
Duncaen 11c93a1e79
common: correctly unset build_option_* variables
We can use the bash feature ${!prefix@}/${!prefix*} which expands to
all variables with the prefix.
This avoids leaking build_options between sourced templates.
2022-07-05 17:22:38 +02:00
classabbyamp 5c6ae7a463 common: add disable_parallel_check 2022-06-23 23:08:03 -05:00
Jami Kettunen 9f7f5629c6 common: unset CMAKE_GENERATOR before sourcing templates
When building dependencies of packages this has to be unset to avoid
using e.g. CMAKE_GENERATOR="Unix Makefiles" for a package which expected
to build with the default of make_cmd=ninja, and would subsequently fail
with "ninja: error: loading 'build.ninja': No such file or directory"
during do_build() if do_configure() generated a Makefile instead of a
build.ninja file.
2022-06-05 17:22:54 -03:00
Michal Vasilek 71b11fdbdb xbps-src: add make_check_pre
$make_check_pre can be used for wrapper commands like xvfb-run or
dbus-run-session which are common ways to make tests work. This way many
templates can avoid defining their own do_check function.
2022-05-04 10:46:53 +02:00
Michal Vasilek 769ea65a5e xbps-src: add strict mode 2022-04-07 20:27:41 +02:00
tibequadorian 9c7a51e6c9 common/environment/setup/misc.sh: add ${VIDEOLAN_SITE} 2022-03-20 08:02:18 +01:00
Piotr Wójcik e7111aaed6 build-style/R-cran: allow to override distfiles 2022-01-29 19:51:56 +01:00
Érico Nogueira 7184064103 texlive: update to 20210325.
For ownership.txt changes:

- all files using the texlive version were identical between packages
- tikztosvg had more features in texlive-pictures
2021-12-11 00:18:04 -03:00
John ca73e4b1d2
common/environment: set debug-prefix-map to prevent ccache cache misses
Packages with debug symbols do invalidate their cache with every version
change since $wrksrc does contain the version number and is getting cached

Closes: #33002 [via git-merge-pr]
2021-12-08 13:04:22 +01:00
Daniel Eyßer 06cec8178c common/environment/build-style: add zig-build.sh 2021-11-29 02:11:55 -03:00
Érico Nogueira 224d7a37a6 common/environment/build-style: remove nostrip from go.sh
Hasn't been necessary in Go for a long time [1], so we should take
advantage of that. For an example of the advantages, the 'micro' editor
went from 15MB to 11MB on disk.

[1] https://honnef.co/posts/2016/10/go-and-strip/
2021-11-14 16:23:13 -03:00
Joel Beckmeyer f694021f76 common/environment/setup: properly handle symlinks in vsv 2021-10-29 15:40:25 +02:00
Andrew J. Hesford 9b61ec59f9 python3: update to 3.10.0. 2021-10-09 08:00:19 -04:00
Leah Neukirchen 6089ec47be setup/git.sh: fix finding gitdir 2021-09-28 22:03:26 +02:00
Đoàn Trần Công Danh 4b239f5560 setup/git.sh: parser GIT_COMMITTER_DATE with plumbing command
To avoid:
- Commit's signature
- Future change in git log format
- Revision Walk

Close #33165
2021-09-28 22:16:04 +07:00
Michal Vasilek b30ea3cffe hooks/post-install: add fix permissions hook 2021-08-26 21:46:44 +02:00
Đoàn Trần Công Danh b44a69c772 vcompletion: return failure on wrong arguments 2021-08-08 11:24:20 +07:00
Leah Neukirchen 0c9b07347d darcs: unbreak i686.
Closes #32221.
2021-07-28 14:51:24 +02:00
Érico Nogueira 2a36c42b21 build-style/haskell-stack: broken for i686*.
This commit is only to unlock builders.

Builds error out with:

=> debug-me-1.20200820_2: running do_build ...
=> Using stack config in stack.yaml.
Cabal file info not found for posix-pty-0.2.1.1, updating
Selected mirror https://hackage.haskell.org/
Downloading root
Waiting to acquire cache lock on /builddir/debug-me-1.20200820/.stack/pantry/hackage/hackage-security-lock
fdLock: invalid argument (Invalid argument)

Tracked in: #32221
2021-07-28 02:03:29 -03:00
Đoàn Trần Công Danh d8e2056a8f xbps-src: retire XBPS_PKGDESTDIR
Historically, PKGDESTDIR was only set during pkg_install, and
XBPS_PKGDESTDIR was set to indicate that we're in subpkg's
pkg_install.

However, from 0b95cb8f5d, (Merge xbps-src code to make it usable in
a standalone mode., 2014-03-22), PKGDESTDIR is always set,
regardless of states.

Let's drop all usages of XBPS_PKGDESTDIR.

While we're at it, error out of vmove is used outside of subpkg.
2021-07-11 16:21:29 +07:00
Đoàn Trần Công Danh a653676c88 build-style/cmake: only depends on cmake for non-cmake package
* In the next change, we will remove it from cmake template entirely
2021-07-02 07:28:04 +07:00
Piotr Wójcik 88c9f70cfa build-style/cmake: move CTEST_OUTPUT_ON_FAILURE to environment 2021-06-11 22:45:07 +02:00
Piotr Wójcik 7ffd292bc5 common/environment/check: enable offscreen test for qt 2021-06-11 22:45:07 +02:00
Đoàn Trần Công Danh c310295bfe build-style/cmake: always depends on cmake in host
All packages that build with cmake build-style switched from
cmake-bootstrap to cmake. Remove the conditional.
2021-06-07 15:38:30 +07:00
Enno Boland d2622f0b91
common/environment: update GNOME_SITE to new url 2021-04-09 18:52:36 +02:00
Đoàn Trần Công Danh 97a4afa006 build-style/cmake: do not require ninja if make_cmd is make 2021-03-25 06:58:07 +07:00
Roberto Ricci 436c814fd4 build-style/go: set GO111MODULE=auto 2021-03-15 09:54:49 -03:00
fosslinux 9bdf2f6e4d Revert "common/gnu-configure-args: set exec_prefix to ${prefix}"
This reverts commit c96738a6e9.

This breaks grub-install currently; a temporary rollback until it is
properly fixed.
2021-03-05 04:04:17 -03:00
Đoàn Trần Công Danh c96738a6e9 common/gnu-configure-args: set exec_prefix to ${prefix}
autotools will pass its configure_args to subdir if required,
if we don't init exec_prefix, it will pass --libdir=NONE/lib{32,64} to
subdir configure.
2021-02-24 18:31:34 +07:00
Piotr Wójcik 4ac333c3b1 xbps-src: allow to run without git
This makes possible to binary-bootstrap and build packages
with only base-system using tarball of void-packages.
2021-02-23 18:34:37 +01:00
Đoàn Trần Công Danh f9da7ff3bb vsed: stop collapsing whitespace
MCVE:
	printf '%s  %s\n' a b >afile
	vsed -i -e '/a  b/d' afile

Expect:
- afile should be empty
Actual:
- afile is not empty
2021-02-21 08:33:06 +07:00
John 7c495a8ca8 environment/configure/gnu-configure-args.sh: do not expand exec_prefix
the expansion did at least result in invalid pkgconfig
and cmake files generated in xapian-core
2021-02-17 22:19:33 +01:00
John 04715e12f6 build-style/cmake: use ninja as default generator
closes #28304
2021-02-09 00:19:07 +01:00
John b4f67689a1 autoconf_cache/common-glibc: remove *sys_siglist entries, removed with glibc 2.32 2021-01-24 22:51:04 +01:00
John 599b7fef67 build-style/void-cross: remove enable-obsolete-{rpc,nsl} from glibc
also enable glibc cross toolchains on musl
2021-01-20 15:24:58 +01:00
q66 761b378854 build-style/go: drop 32-bit ppc from gccgo
this will always give us trouble, and probably is not worth
supporting
2021-01-20 14:14:39 +01:00
q66 5922df60c7 xbps-src: make sure to apply FFLAGS properly like CFLAGS 2021-01-03 14:11:02 +01:00
q66 210a2823ef common/build-style: add void-cross
this introduces a new build-style void-cross, which can be used
to write system crosstoolchain templates; this is to reduce the
amount of maintenance, resolve existing problems with the cross
toolchain templates and remove repeated code
2020-12-31 23:48:57 +01:00
Érico Rolim de99c9693f environment/configure/gnu-configure: always include configure_args from
template last.

This makes sure that anything set in templates will override the
defaults.
2020-12-27 22:31:15 -03:00
q66 87d28506e1 build-style: change all build-styles to use /usr/libNN 2020-12-22 22:18:25 +01:00
q66 69b49cfba6 build-style/go: restrict archs for gccgo env too
this is because some archs lack support in gccgo, and some are
not integrated yet in our toolchains
2020-12-17 01:50:52 +01:00
Andrew J. Hesford 2dff49c420 build-style/python3-pep517: new style for PEP517 Python packages 2020-12-08 15:26:38 -05:00
Érico Rolim f97f031010 autoconf_cache/musl-linux: fix sigprocmask value.
It was "1", should have been "yes". This fixes building gettext.
2020-11-20 19:17:38 -03:00
Jürgen Buchmüller 375a75dc07 build-style cmake: depend only if $CHROOT_READY 2020-10-23 11:51:02 +02:00
Andrew J. Hesford e590822d93 python3: update to 3.9.0. 2020-10-10 10:21:09 -04:00
Jürgen Buchmüller 241acab35e .../automake: config.gues fix copy+paste bug 2020-09-23 18:37:09 +02:00
Jürgen Buchmüller a1f6054e90 .../automake: update to latest config.{guess,sub} 2020-09-23 13:30:57 +02:00
Đoàn Trần Công Danh b1a6baed7f vopt_bool: use option as default property
Keep it in-line with vopt_with and vopt_enable.
2020-09-18 16:15:19 +02:00
fosslinux 4acb08c4dc common/environment/build-style/gem.sh: remove archs=noarch. 2020-09-14 01:26:08 +00:00
Zach Dykstra e30979d037 perl-module: add perl to build depends 2020-08-04 15:10:22 +02:00
Érico Rolim d5ca039278 common/environment/setup/install.sh: add vcompletion.
Install function for installing shell completions in the appropriate
place according to the shell used.
2020-07-28 04:24:40 +00:00
fosslinux 102841754a xbps-triggers: add texmf-dist regeneration trigger 2020-07-14 02:38:24 +02:00
fosslinux 92fd1c57cc New build-helper: texmf
Co-authored-by: Piotr Wójcik <chocimier@tlen.pl>
2020-07-14 02:38:24 +02:00
Piotr Wójcik 3318e17163 tree-wide: make python path variables relative 2020-07-01 20:24:23 +02:00
John ea2c703153 common/environment/build: set CCACHE_BASEDIR to wrksrc
this will rewrite total paths to be relative to CCACHE_BASEDIR before caching,
helps prevent cache misses due to changed wrksrc with build systems like cmake
that use total paths in their Makefiles
2020-06-26 15:09:41 -07:00
John 6ce531b231 common: unser PKG_CONFIG before sourcing templates, set PKG_CONFIG also for native 2020-05-29 14:30:06 +02:00
Đoàn Trần Công Danh 2af30cdd78 setup: compute gitrev from outside of chroot
Together with previous commit, `xbps-src` is able to support
git-worktree and shared repository by now.
2020-05-23 06:59:24 +00:00
Đoàn Trần Công Danh 2cd2b99e41 setup: export SOURCE_DATE_EPOCH from outside of chroot
git-worktree(1), and Git shared repository can use a plain text file
named `.git` at the root of working tree, containing `gitdir: <path>` to
point to the real directory that has repository.
See: gitrepository-layout(5).

But, that directory is usually inaccessible inside chroot.

In order to support git-worktree(1) and Git shared repository, compute
SOURCE_DATE_EPOCH from outside of chroot, and the chroot will carry it
over to inside chroot.

I've only tested again xbps-uunshare(1).
2020-05-23 06:59:24 +00:00
Đoàn Trần Công Danh fd61886616 setup/git.sh: prefer git plumbing command
git-ls-files(1) is plumbing command, its output will never change
regardless of configuration, version.

git-status(1) output will be changed depends on configuration.
At least, 986d4dbc7d (common/environment/setup/git.sh: ensure untracked
files are checked., 2017-11-24) was added to address a different output
on `status.showUntrackedFiles`.

By doing this, also reduce a pipe, and a fork-exec.

Technically, git-log(1) is also a porcelain, but I _think_ `%ct` is
stable enough to stay there. If the day has come, that `git-log(1)` can
be replaced with:

    git cat-file commit HEAD |
    sed -ne '/^committer/{s/.* \([0-9]*\) [-+][0-9][0-9][0-9][0-9]$/\1/p;q}'
2020-05-23 06:59:24 +00:00
Đoàn Trần Công Danh 20f9bedefb xbps-src: use $XBPS_GIT_CMD for git 2020-05-23 06:59:24 +00:00
mobinmob 17b5ae8dba common/environment/setup/misc.sh: use https where possible,
remove XORG_HOME variable.
2020-05-18 08:01:34 -07:00
q66 ad7ab5c568 configure/autoconf_cache: endian fix in ppc32 2020-04-30 01:10:21 +02:00
q66 e46ea34662 configure/autoconf_cache: fix long double size on musl 2020-04-30 01:06:51 +02:00
q66 472b244572 configure/autoconf-cache: fix ppc and add ppcle 2020-04-30 01:06:51 +02:00
Piotr Wójcik 8a09d89eac common/hooks: remove pycompile_version, use python_version instead 2020-04-22 20:11:26 +02:00
Andrew J. Hesford 596250e4ea xbps-src: remove default python_version
Closes: #21209 [via git-merge-pr]
2020-04-21 18:45:25 -04:00
q66 02eeac0798 environment/build-style/go: check for empty hostmakedepends 2020-04-17 05:00:39 +02:00
q66 1b2bf53e82 build-style/go: allow usage with gccgo compiler
This checks if gcc-go-tools have been specified in host deps
and if so, use gccgo to build (gcc-go-tools conflicts with go).

Also, since gccgo is not a multi-compiler, we need to override GCCGO
to get cross-builds. The gccgo for target is always installed, as
it's a part of our cross-toolchains.

[ci skip]
2020-04-17 04:53:13 +02:00
Juan RP ac4186c7d2
xbps-src/environment/autoconf_cache: disable lchmod.
lchmod in musl always returns ENOTSUP and this makes some
ruby gems fail, i.e jekyll.
2020-04-12 20:32:57 +02:00
Jürgen Buchmüller c7891063fb build-style/go.sh: support armv5* as well 2020-04-01 10:23:34 +02:00
q66 ec937e4d29 environment/build-style/go.sh: specify a default set of archs
This is necessary so that crossbuilds to unsupported architectures
are not actually attempted. There is a default archs set which
covers all architectures supported by the official compiler,
and setting it in the template can be used to restrict it more.

Also, add missing GOARCHs. These are irrelevant to whether we
can currently build for that arch or not. Just keep it around
as a list of potential archs to support. These are taken from
gccgo, and in case support for anything is added in the official
compiler, they should match.
2020-03-30 05:32:09 +02:00
Đoàn Trần Công Danh c0ab53b2f5 git: update to 2.25.2. 2020-03-18 09:34:32 +01:00
Andy Weidenbaum e8e2b2e90a build-style/perl6-dist: rename to raku-dist. 2020-02-05 09:58:38 +01:00
Leah Neukirchen bd739bd45f environment/build-style/python*-module: makedepends on the appropriate versions. 2019-12-23 17:34:15 +01:00
Leah Neukirchen 915fe2de9f common/environment/setup/python.sh: update to Python 3.8. 2019-12-23 14:11:45 +01:00
q66 80b96a0ea0 common: better location for config.{sub,guess} + update 2019-11-18 20:36:27 +01:00
Doan Tran Cong Danh bbce69f036 vsed: reduce number of digest cmd call
For a vsed call to `nf' files and `nr' regex,
the old code will make `2 * nf * nr' digest calls.
the new code will make `nf * (nr + 1)' digest calls.

Refereance: https://github.com/void-linux/void-packages/issues/11238
2019-05-14 16:33:30 +02:00
Doan Tran Cong Danh 9374b6938e vsed: strip non-digest part before comparing
Accidentally, this change also fixs a potential bug
if `XBPS_DIGEST_CMD` is changed to something other than
its current value: `xbps-uhelper digest'.

Because the old code compares:
- non-stripped old digest; and
- stripped new digest
2019-05-14 16:33:30 +02:00
Doan Tran Cong Danh c384f85d2b vsed: refactor digest variables' name
We don't specify any specific digest function in this function,
and the old variables' name doesn't reflect the fact that they're
a pair of old and new digest built by the same hash function.
2019-05-14 16:33:30 +02:00
Jürgen Buchmüller f636a5f078
environment/setup/sourcepkg.sh: unset GIR_EXTRA_...
Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
2019-05-07 15:33:47 +02:00
maxice8 df5886d7d7 vsed.sh: use XBPS_DIGEST_CMD instead of sha256sum 2019-04-15 12:18:00 -03:00
Doan Tran Cong Danh 13901bc715 xbps-src: vsv: force linking on forced rebuild
re-run `xbps-src -f install pkg` on packages with service files failed
because the link was created from previous run.
2019-04-15 10:53:55 -03:00
maxice8 c5b6940949 setup/install.sh: remove dirname usage 2019-04-14 06:22:09 -03:00
maxice8 a5bc81adf7 meta: remove supporting code for noarch 2019-03-14 19:22:06 -03:00
maxice8 415e6cd701 meta: remove support code for only_for_archs= 2019-03-14 19:20:07 -03:00
maxice8 15df6ba5b6 meta: link .sh from configure into patch envrionment. 2019-03-03 13:08:23 -03:00
maxice8 1ba87eee57 meta: unset the pre_patch() do_patch() post_patch() 2019-02-27 22:56:19 -03:00
maxice8 1bda166a6c
meta: fix unsetting of only_for_archs 2019-02-26 09:45:25 -03:00
Enno Boland 8f6d534cac vsed: make more compatible with sed commandline semantics. 2019-02-18 17:23:52 -03:00
maxice8 dfd0cde930 setup/install.sh: remove support for 'all' special arg. 2019-02-18 08:32:27 -03:00
maxice8 0f76ad0f76
environment/build-style/gem.sh: set noarch=yes to archs=noarch 2019-02-16 04:02:31 -02:00
Enno Boland 38c457e1aa add compatibility code for noarch/only_for_archs 2019-02-15 13:19:44 +01:00
Enno Boland 6eb37e35b2 common: merge only_for_archs and noarch=yes into one.
* noarch=yes is replaced with archs=noarch
* only_for_archs= is renamed to archs=
* archs= allows the use of wildcards and negations; first matching rule applies:
  * archs="*-musl" will build the pkg only for musl-libcs
  * archs="~*-musl" will build the pkg only on non-musl-libc
  * archs="x86_64-musl ~*-musl" will build for x86_64-musl and any non-musl
    arch.
* archs= defaults to "*"
2019-02-15 13:19:44 +01:00
Piotr Wójcik 43e2545baf build-style/perl-ModuleBuild: add perl to makedepends 2019-01-27 10:09:46 +01:00
maxice8 6e0a917d01
environment/build-style/cargo.sh: use rust build_helper 2019-01-25 20:44:42 -02:00
maxice8 5465d131f6
environment/setup/sourcepkg.sh: unset build_helper 2019-01-25 20:44:41 -02:00
maxice8 670f41a585 environment/fetch: add cmd_fetch variable. 2019-01-21 16:17:02 -02:00