Commit Graph

294 Commits

Author SHA1 Message Date
Đoàn Trần Công Danh 8c5358f792 xbps-src: set wrksrc to $pkgname-$version unconditionally 2022-11-08 22:30:37 +07:00
Jan Christian Grünhage ca8c4fb08f build-style/cargo: produce auditable binaries 2022-11-03 03:50:11 -04:00
Joel Beckmeyer def53da009 common/build-style/python3-pep517.sh: use full path for TMPDIR
fixes side effects with setuptools_rust / rustc
2022-09-28 10:04:27 -04:00
Đoàn Trần Công Danh 014a230f24 build-style/qmake: remove Qt4 reference 2022-09-18 20:36:36 +07:00
q66 5df385d509 Revert "build-style/waf3: set config dir to /etc"
This reverts commit ca4ee9b002.

--configdir is not supported in some projects
2022-09-11 13:28:49 +00:00
Đoàn Trần Công Danh ca4ee9b002 build-style/waf3: set config dir to /etc 2022-09-06 17:43:20 +07:00
Đoàn Trần Công Danh d6500f65f7 build-style/cmake: sysconfigdir is /etc 2022-09-05 21:01:16 +07:00
Đoàn Trần Công Danh 3936763f57 build-style/scons: use --install-sandbox for $DESTDIR
See https://scons.org/doc/production/HTML/scons-user.html#b-Install

Some projects uses --prefix=$DESTDIR/usr must be fixed.
2022-09-05 20:00:36 +07:00
classabbyamp 74f4492e5f common/{,environment}/build_style/python3.sh: use python3 build_helper 2022-08-29 23:25:05 -04:00
classabbyamp e14cf6cc7a
common/build-style/gnu-makefile.sh: define prefix, PREFIX for build
this allows removing the definition from templates, and avoids issues
where the prefix is used during build.
2022-08-24 14:59:23 -04:00
classabbyamp fc49c6e396 common/build-style/go.sh: error if -s/-w in go_ldflags
-s   Omit the symbol table and debug information.
    -w   Omit the DWARF symbol table.

both are not necessary because xbps-src should strip binaries itself

this does not fit in an xlint because of multiline-string handling woes
2022-08-10 15:01:38 -04:00
Đoàn Trần Công Danh e19f2af481 build-style/cmake: only set QT_HOST_PATH on cross build
They're used by QtBuildInternals to find other components configuration.
With QT_HOST_PATH and QT_HOST_PATH_CMAKE_DIR set, cmake will only look
into those directories.
2022-08-10 22:46:31 +07:00
Đoàn Trần Công Danh a72cf1e3de build-style/cmake: set common Qt options 2022-08-09 20:19:57 +07:00
classabbyamp 124ce2e404 common/build-style: make do_check run in parallel unless disabled 2022-06-23 23:08:03 -05:00
0x5c 52729f37f5 common/build-style/cargo.sh: use offline install
This prevents `cargo install` from wasting time fetching the crate registry.
2022-06-11 03:57:14 -03:00
classabbyamp c011e0e13b common/build-style/python3-*: add support for pytest-xdist
if python3-pytest-xdist is included in checkdepends, use $XBPS_MAKEJOBS
to run tests in parallel.
2022-06-09 21:44:23 -04:00
Andrew J. Hesford 950151c572 build-style/python3-pep517.sh: improve default wheel selection
When naming wheels, hyphens are converted to underscores in package
names. Recognizing this in the build style eliminates manual definition
of `make_install_target` in several templates.
2022-05-16 10:51:58 -04:00
Đoàn Trần Công Danh 90c35c4ac1 common/do_check: move make_check_pre behind env setting
All environment variables setting in command execution must be put
before any non-variables-like, otherwise, they're intepretted as
something else.

Fix: 71b11fdbdb, (xbps-src: add make_check_pre, 2022-02-28)
2022-05-08 08:12:03 +07: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
Đoàn Trần Công Danh 0d75e72b8b build-style/cmake: pass LIBS as CMAKE_*_STANDARD_LIBRARIES
Normally, we can add them into configure_args directly.
However, if we need to link with 2 or more libaries (e.g. -latomic
and -lexecinfo on armv6-musl), we have noway to do it properly:
- configure_args will be splited on whitespace
- cmake denies to recognise CMAKE_*_STANDARD_LIBRARIES as a list,
  hence denies to split on semicolon (";")

Let's pass LIBS as CMAKE_*_STANDARD_LIBRARIES instead.
2022-02-23 21:28:37 +07:00
Isaac Freund 020e1aa54b build-styles: add zig-build
We call this "zig-build" instead of just "zig" as this build-style
relies on usage of the zig build system. In the future, other build
systems such as meson may support zig code. Furthermore, the zig
build system may be used to build C/C++ code as well, not just zig.
2021-11-13 11:46:21 -03:00
q66 e51fe8bfe0 build-style/meson: ensure stdout is unbuffered for continuous log
This should deal with the annoying thing that meson will only print
its configure output all at once at the end.
2021-10-12 22:35:38 +02:00
Érico Nogueira 26d349303e build-style/void-cross: check for kernel-libc-headers/patches
The directory isn't always present, so add the same check as used in
other stages of the build.
2021-10-06 22:11:41 -03:00
Joshua Krämer 636336b1a7 Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style
CMake adds -DNDEBUG with build types Release, MinSizeRel and RelWithDebInfo.
NDEBUG disables assert(), which can improve performance.
2021-07-16 19:48:16 +02:00
Đoàn Trần Công Danh 8361c4807f build-style/perl-module: respect build_wrksrc
`wrksrc` is supposed to be a top-level directory. Should the build
system need to be run inside a sub-directory, `build_wrksrc` should be
used instead. We change to `build_wrksrc` implicitly before `do_build`
and `do_install`.

Let's respect `build_wrksrc` in `perl-module`.
2021-07-08 18:01:11 +07:00
Đoàn Trần Công Danh 614abf4613 build-style: new build-style for sip-build 2021-06-22 21:27:41 +07:00
q66 44f4cad4ec build-style/void-cross: fix after patch -Np1 transition 2021-06-20 17:54:31 +02:00
Piotr Wójcik 88c9f70cfa build-style/cmake: move CTEST_OUTPUT_ON_FAILURE to environment 2021-06-11 22:45:07 +02:00
Andrew J. Hesford fa5500228e build-style/python3-{module,pep517}.sh: improve pytest usage
1. Relying on `python3 -m pytest --help` to test for pytest can fail
   because the pytest packages's __main__ is still invoked; this can
   trigger import problems and falsely indicate that pytest is missing.
   A simpler test is to just confirm that pytest is importable. If so,
   the interpreter returns 0. Otherwise, an ImportError is thrown and
   the interpreter will return 1.

2. Many templates require a custom do_check just to set PYTHONPATH to
   either a build directory (especially for compiled extensions) or some
   subdirectory of the source tree. Setting PYTHONPATH automatically to
   the build directory should drastically reduce the need for custom
   do_check in py3 templates. (This only applies to python3-module.sh
   because pep517 builders will have unpredictable build directories.)

Closes: #31354.
2021-06-08 13:53:15 -04:00
John 644bdb2867 common/build-style/cmake.sh: pass full path of TOOLCHAIN_FILE to cmake 2021-05-06 18:23:18 +02:00
newbluemoon 7d5d4aea2e build-style/void-cross.sh: fix leftover _triplet variable 2021-04-05 01:00:35 +02:00
Đoàn Trần Công Danh 1af5a29d87 build-style/cmake: set CMAKE_BUILD_TYPE to None
- CMAKE_BUILD_TYPE=Release will force -O3 instead of respecting our
  CFLAGS and CXXFLAGS
- Theoretically, we could patch cmake to always use -O2 instead,
  however, patching will break users' expectation when compiling their
  our code.
- RelWithDebInfo could be another option if it's acceptable to always
  have debug symbol available.
- However, some projects ignore all CFLAGS and CXXFLAGS;
- Some other projects relies on CMAKE_BUILD_TYPE=Release to install to
  correct location and/or disable coverage.
- To get away with -O3, we need patching either ways, let's go with
  CMAKE_BUILD_TYPE=None, and patch all problematic softwares.
2021-04-03 09:52:55 +07:00
q66 1088eba15b cross*: drop the cross_triplet and _triplet variables 2021-03-15 23:37:10 +01:00
Đoàn Trần Công Danh 6ed61279a2 build-style/qmake: look for modules in target
- With this added, we can remove qt5*-devel from hostmakedepends
2021-03-08 10:40:33 +07:00
Đoàn Trần Công Danh 313afd12f9 build-style/ruby-module: fix _vendorlibdir because of multilib change 2021-02-24 07:37:52 +07:00
Đoàn Trần Công Danh f821989a2c libtool: stop put /usr/lib{32,64} into RPATH
libtool will insert RPATH if $libdir not in sys_lib_dlsearch_path_spec.
libtool's configure will parse /etc/ld.so.conf for this value.

Without this change the original value is:

- glibc: /lib /usr/lib /usr/lib32 /usr/local/lib
- musl: /lib /usr/lib
2021-02-21 07:44:26 +07:00
John 297fd7327e build-style/meson.sh: move <lang>_args to build-in options section and fix cross compiling of rust code
It seems like meson is dropping rust_args when testing the rust compiler, so we just append them directly to rustc
2021-02-20 13:13:21 +01:00
Đoàn Trần Công Danh 2a1482daeb build-style/cmake: add missing "{}" 2021-02-20 13:11:25 +07:00
Đoàn Trần Công Danh 8e102f22ce build-style/cmake: also fix -isystem for Ninja
Discovered by cross-build failure of gnuradio-osmosdr.

While we're at it, fix flags.make in batch.
2021-02-20 13:09:32 +07:00
Érico Rolim d9c83dbe8b common/build-style: remove go_get from Go style.
Fix Manual accordingly, and also fix indentation to be compatible with
nearby items.

The two packages which set this variable set it explicitly to "no", so
it wasn't relied upon. From its description, it was recommended only for
git packages, which by default don't fit Void's packaging guidelines.
Removing to avoid anyone coming to rely on it.
2021-02-20 02:01:31 -03:00
Érico Rolim 8c41deaff7 common/build-style: fix do_check for cmake.
make was accidentally left hardcoded to query if a test target was
available, which meant tests wouldn't be run for most of the
applications, since they were now using ninja.
2021-02-19 18:56:18 +01:00
Érico Rolim 84a5c1ef7c Revert "build-style/meson.sh: drop unneeded AR export"
This reverts commit 2163ca2d03.

Removing `export AR=gcc-ar` was apparently done based on the assumption
that the linked issue (https://github.com/mesonbuild/meson/issues/1646)
had been solved completely on meson's side.

Instead, their solution, seen in
https://github.com/void-linux/void-packages/pull/2815, had been to force
gcc-ar for linking static libraries; by exporting `AR=ar`, we were
accidentally breaking static libraries when LTO is enabled. This was
noticed by leah while we were trying to build qemu-user-static using the
normal libglib-devel package (built with meson, which for us defaults to
enabling LTO).

Unfortunately, while correct, this change wasn't enough to fix the
static glib build, which had to resort to disabling LTO.
2021-02-11 15:22:01 -03:00
John 446425847d build-style/cmake: replace sed monstrosity with ${wrksrc}/${build_wrksrc} 2021-02-09 00:19:27 +01:00
John 04715e12f6 build-style/cmake: use ninja as default generator
closes #28304
2021-02-09 00:19:07 +01:00
Đoàn Trần Công Danh c3b3ef96d9 build-style/qmake: remove RPATH for native build
Fix up for 596a2da188, (build-style/qmake: no rpath, 2021-02-07)
2021-02-08 18:47:23 +07:00
Đoàn Trần Công Danh 596a2da188 build-style/qmake: no rpath
See #27494
Close #28563
2021-02-08 07:05:01 +07:00
Đoàn Trần Công Danh 4ad45b9cb3 build-style/perl-module: put . into @INC
Fixing those build failure:

- perl-Crypt-DH
- perl-Curses-UI
- perl-Data-MessagePack
- perl-Encode-HanExtra
- perl-Gtk2-Notify
- perl-Plack-Middleware-Deflater
- perl-Text-Markdown
- perl-WWW-Curl
2021-02-06 13:10:59 +07:00
Andrew J. Hesford 74e0a12915 build-style/python3-pep517: make sure ./build exists in do_install
This allows templates to override do_build and not have to create the
build subdirectory used as TMPDIR in do_install; failure to create this
directory will cause pip to use (and pollute) /tmp in the masterdir.
2021-02-03 16:30:01 -05:00
q66 b2d670be60 build-style/void-cross: always enable libssp
this way we'll be able to provide libssp(-devel) unconditionally
inside cross-vpkg-dummy, which should be the right thing to do
2021-01-26 20:17:55 +01:00
q66 22962b7118 build-style/void-cross: symlink bin on install
this is needed so that binaries go in sysroot/usr/bin instead
of sysroot/bin
2021-01-26 19:53:19 +01:00
q66 3cee024b0d build-style/void-cross: add minor-versioned gcc sylinks 2021-01-20 15:25:27 +01:00
q66 76f3a1d0b7 build-style/void-cross: remove linux and libucontext arch vars 2021-01-20 15:25:14 +01:00
q66 dd50c1905d build-style/void-cross: fix for newer libucontext + autoguess arch 2021-01-20 15:25:07 +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
John a40f4cd82b build-style/void-cross: disable usage of fixincl, it breaks glibc and does nothing for musl 2021-01-20 15:24:45 +01:00
John 0caccad4cc build-style/void-cross: fix build with 5.10 kernel headers 2021-01-20 15:24:37 +01:00
q66 2d80cf4c49 build-style/void-cross: enable patching binutils 2021-01-20 15:24:32 +01:00
fosslinux 1d74fb6d7b common/build-style/texmf.sh: various improvments.
- do_check (ownership check): only check against latest version of
  package.
- Add comments.
2021-01-19 19:46:52 +01:00
q66 e44dfff752 build-style/void-cross: explicitly enable plugins in binutils
this is already enabled implicitly based on checks, but might as
well make it explicit; it does not actually make any practical
difference though
2021-01-13 21:02:05 +01:00
Andrew Benson b0296b1252 common/build-style/qmake: fix variable name 2021-01-12 13:04:49 -06:00
q66 f2f3c6661b build-style/void-cross: unify binutils options with template a bit 2021-01-07 16:42:47 +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
John 98f239edf8 build-style/cmake.sh: remove handeling of wxWidgets when cross compiing
This can be potentially broken, and the preffered way is to just set the WX_CONFIG env variable
2020-12-30 17:58:36 +01:00
q66 87d28506e1 build-style: change all build-styles to use /usr/libNN 2020-12-22 22:18:25 +01:00
Andrew J. Hesford 7d68e8f4d2 build-style/waf3: rely on qemu build helper in cross builds 2020-12-19 17:53:30 -05:00
q66 068c64c844 build-style/qmake: add ppc(64) cross bits 2020-12-15 23:01:31 +01:00
Andrew J. Hesford a3227ffb48 build-style/python3-module: prefer pytest in do_check
Closes: #25052.
2020-12-09 15:45:53 -05: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 2325ae153b common/build-style/gnu-makefile: pass CXXFLAGS in make invocation. 2020-12-06 22:03:54 -03:00
Đoàn Trần Công Danh b400ac3e81 build-style/cmake: set find_root_path to cross_base/usr 2020-11-28 05:56:03 +07:00
Jürgen Buchmüller bba453427e build-style gnu-makefile: pass $OBJCOPY to make 2020-11-07 16:13:56 +01:00
Đoàn Trần Công Danh 3c1727cf31 build-style/cmake: only look into masterdir libraries
As of it's now, cmake will look into host's libraries, thus
bootstrapping will fail at ccache if host system doesn't have
libzstd-devel installed.
2020-11-01 21:22:23 +01:00
Érico Rolim 5af961ece2 common/build-style/meson.sh: set auto-features to auto.
This allows the build system to detect itself whether it should use
certain features, instead of defaulting to (potentially bad) enabled
status.

Features that aren't detected properly, be it because false positives or
negatives, should be explicitly called out in the templates.
2020-10-18 00:00:00 -03:00
Piotr Wójcik 6efc7dd98d xbps-src: quote wrksrc to allow whitespace 2020-09-03 21:03:32 +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
John 335286d3e2 build-style/meson: add cups and llvm-config to crossfile 2020-07-13 19:14:53 +02:00
John 0e87174b5e build-style/cmake: set CTEST_OUTPUT_ON_FAILURE=TRUE in do_check
Currently a failed output has to be found somewhere in the build directory,
having it output also to stdout makes it far easier to see why it failed
2020-07-11 14:07:29 +02:00
Érico Rolim 2be5dd6156 build-style/cargo: use configure_args in do_check.
Cargo rebuilds the package if the command line arguments aren't the
same, which makes it test the wrong binary.
2020-07-06 09:01:06 +02:00
John 82734d940c
common/xbps-src: set PKG_CONFIG{,FOR_BUILD} env vars 2020-05-26 21:18:27 +02:00
Andy Weidenbaum d4bf579cde build_style/raku-dist.sh: RAKULIB=lib 2020-05-18 13:42:00 +02:00
Đoàn Trần Công Danh 368a1e571d build-style: scons: add lowercase compiler variable 2020-05-18 00:32:13 +02:00
q66 b5fd7971b5 build-style/cmake: recognize ppcle for cross 2020-04-30 01:06:52 +02:00
q66 81e7a17c79 build-style/meson: recognize ppcle for cross 2020-04-30 01:06:52 +02:00
Daniel Eyßer ef4596b546 build-style/cargo.sh: don't use post_install() for leftover removal 2020-04-12 18:43:18 +02:00
travankor 3610a35271 cargo.sh: don't hardcode the path.
Clean up the cargo remnants in the post install phase.
2020-04-07 21:25:12 +02:00
John aecf307fdb common/qmake.sh: reorder args
[ci skip]
2020-04-03 09:19:18 -07:00
John f4d315aaa8
build-style/meson: update for new env var behaviour
meson 0.54 now honors _FOR_BUILD env vars, and we don't have to set CC
and friends to the host system vars. Setting PKG_CONFIG_FOR_BUILD is
needed since otherwise it would pickup our cross wrapper
2020-03-31 16:01:20 +02:00
q66 2163ca2d03 build-style/meson.sh: drop unneeded AR export
This was fixed in Meson upstream ages ago. We have also fixed this
in gcc itself.
2020-03-15 22:03:35 +01:00
Alexander Gehrke a28a777a95 build-style/cargo.sh: also delete /usr/.crates2.json 2020-02-25 12:23:45 +01:00
travankor 3842294972 build-style/cargo.sh: append configure_args to cargo install
Cargo will only activate the default features for a package.
Instead, pass the correct features to cargo install.
2020-02-22 19:09:05 +01:00
John 0adf0a781c build-style/cmake: pass DESTDIR as env var to make install
this ensures that the build-style also works with ninja when setting
-GNinja and make_cmd=ninja
2020-02-06 10:34:36 +01:00
Andy Weidenbaum e8e2b2e90a build-style/perl6-dist: rename to raku-dist. 2020-02-05 09:58:38 +01:00
q66 f317ed5e7e common/build-style/cmake.sh: strip -pipe if present in C(XX)FLAGS
Reason: https://gitlab.kitware.com/cmake/cmake/issues/19590

Our workaround within cmake is not sufficient as it does not
address the issue fully and things still break sometimes. So
work around this in the build-style for the time being (and
drop the cmake patch).

Once this is fixed upstream (probably needs special casing
for the -pipe flag and strip it during compile tests) we
can drop this.
2020-01-11 18:52:12 +01:00
Leah Neukirchen d3968bef3c build-style/python[3]-module: override _PYTHON_SYSCONFIGDATA_NAME
Use the sysconfigdata for the appropriate cross arch.
Upstream change: https://bugs.python.org/issue36235
2019-12-23 17:15:51 +01:00
Leah Neukirchen 915fe2de9f common/environment/setup/python.sh: update to Python 3.8. 2019-12-23 14:11:45 +01:00
John f20e10cd44 Revert "build-style meson: fix _MESON_CPU_FAMILY=ppc64le"
This reverts commit 0d23f73635.
2019-11-27 21:41:55 +01:00
Jürgen Buchmüller 0d23f73635
build-style meson: fix _MESON_CPU_FAMILY=ppc64le
Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
2019-11-27 11:16:20 +01:00
Doan Tran Cong Danh ad5e48816c build-style/go: use glob instead of find 2019-11-16 12:49:56 +01:00
John f4273541b8 New build-helper: qemu 2019-10-26 00:59:41 +02:00
John 260ce1acd2 build_style/meson.sh: add support for using qemu as exe_wrapper 2019-10-16 23:41:46 +02:00