void-packages

Void Source Packages
git clone git://ezup.dev/void-packages.git
Log | Files | Refs | README | LICENSE

commit 8025f6ea3dbe127caf38801dabaa435e06c0ab2e
parent 2eb48b3b811dc2e53849d8c316da819abad1ee78
Author: Dash Eclipse <dash@ezup.dev>
Date:   Wed, 15 Jul 2020 11:55:56 +0000

st: add patches st-nordtheme and st-scrollback

st: change font to Fira Code Medium

Diffstat:
A.gitattributes | 2++
A.github/issue_template.md | 14++++++++++++++
A.github/workflows/notify-issue.yaml | 32++++++++++++++++++++++++++++++++
A.github/workflows/notify-pr.yaml | 32++++++++++++++++++++++++++++++++
A.github/workflows/notify-push.yaml | 30++++++++++++++++++++++++++++++
A.gitignore | 12++++++++++++
A.mailmap | 51+++++++++++++++++++++++++++++++++++++++++++++++++++
A.travis.yml | 41+++++++++++++++++++++++++++++++++++++++++
ACONTRIBUTING.md | 117+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ACOPYING | 23+++++++++++++++++++++++
AManual.md | 2009+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
AREADME.md | 521+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/build-helper/gir.sh | 42++++++++++++++++++++++++++++++++++++++++++
Acommon/build-helper/numpy.sh | 36++++++++++++++++++++++++++++++++++++
Acommon/build-helper/qemu.sh | 6++++++
Acommon/build-helper/qmake.sh | 48++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/build-helper/rust.sh | 40++++++++++++++++++++++++++++++++++++++++
Acommon/build-profiles/README | 15+++++++++++++++
Acommon/build-profiles/aarch64-musl.sh | 5+++++
Acommon/build-profiles/aarch64.sh | 5+++++
Acommon/build-profiles/armv6l-musl.sh | 5+++++
Acommon/build-profiles/armv6l.sh | 5+++++
Acommon/build-profiles/armv7l-musl.sh | 5+++++
Acommon/build-profiles/armv7l.sh | 5+++++
Acommon/build-profiles/bootstrap.sh | 3+++
Acommon/build-profiles/i686-musl.sh | 5+++++
Acommon/build-profiles/i686.sh | 5+++++
Acommon/build-profiles/ppc-musl.sh | 5+++++
Acommon/build-profiles/ppc.sh | 5+++++
Acommon/build-profiles/ppc64-musl.sh | 5+++++
Acommon/build-profiles/ppc64.sh | 5+++++
Acommon/build-profiles/ppc64le-musl.sh | 5+++++
Acommon/build-profiles/ppc64le.sh | 5+++++
Acommon/build-profiles/x86_64-musl.sh | 5+++++
Acommon/build-profiles/x86_64.sh | 5+++++
Acommon/build-style/R-cran.sh | 7+++++++
Acommon/build-style/README | 12++++++++++++
Acommon/build-style/cargo.sh | 27+++++++++++++++++++++++++++
Acommon/build-style/cmake.sh | 103+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/build-style/configure.sh | 40++++++++++++++++++++++++++++++++++++++++
Acommon/build-style/fetch.sh | 12++++++++++++
Acommon/build-style/gem.sh | 68++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/build-style/gemspec.sh | 190+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/build-style/gnu-configure.sh | 39+++++++++++++++++++++++++++++++++++++++
Acommon/build-style/gnu-makefile.sh | 41+++++++++++++++++++++++++++++++++++++++++
Acommon/build-style/go.sh | 49+++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/build-style/haskell-stack.sh | 37+++++++++++++++++++++++++++++++++++++
Acommon/build-style/meson.sh | 139+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/build-style/meta.sh | 9+++++++++
Acommon/build-style/perl-ModuleBuild.sh | 52++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/build-style/perl-module.sh | 88+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/build-style/python-module.sh | 96+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/build-style/python2-module.sh | 34++++++++++++++++++++++++++++++++++
Acommon/build-style/python3-module.sh | 58++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/build-style/qmake.sh | 144+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/build-style/raku-dist.sh | 16++++++++++++++++
Acommon/build-style/ruby-module.sh | 9+++++++++
Acommon/build-style/scons.sh | 26++++++++++++++++++++++++++
Acommon/build-style/slashpackage.sh | 35+++++++++++++++++++++++++++++++++++
Acommon/build-style/texmf.sh | 44++++++++++++++++++++++++++++++++++++++++++++
Acommon/build-style/waf.sh | 20++++++++++++++++++++
Acommon/build-style/waf3.sh | 20++++++++++++++++++++
Acommon/chroot-style/README | 13+++++++++++++
Acommon/chroot-style/bwrap.sh | 23+++++++++++++++++++++++
Acommon/chroot-style/ethereal.sh | 135+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/chroot-style/proot.sh | 30++++++++++++++++++++++++++++++
Acommon/chroot-style/uchroot.sh | 21+++++++++++++++++++++
Acommon/chroot-style/uunshare.sh | 21+++++++++++++++++++++
Acommon/cross-profiles/README | 17+++++++++++++++++
Acommon/cross-profiles/aarch64-musl.sh | 10++++++++++
Acommon/cross-profiles/aarch64.sh | 12++++++++++++
Acommon/cross-profiles/armv5te-musl.sh | 2++
Acommon/cross-profiles/armv5te.sh | 2++
Acommon/cross-profiles/armv5tel-musl.sh | 10++++++++++
Acommon/cross-profiles/armv5tel.sh | 10++++++++++
Acommon/cross-profiles/armv6hf-musl.sh | 2++
Acommon/cross-profiles/armv6hf.sh | 2++
Acommon/cross-profiles/armv6l-musl.sh | 10++++++++++
Acommon/cross-profiles/armv6l.sh | 10++++++++++
Acommon/cross-profiles/armv7hf-musl.sh | 2++
Acommon/cross-profiles/armv7hf.sh | 2++
Acommon/cross-profiles/armv7l-musl.sh | 10++++++++++
Acommon/cross-profiles/armv7l.sh | 10++++++++++
Acommon/cross-profiles/i686-musl.sh | 10++++++++++
Acommon/cross-profiles/i686.sh | 10++++++++++
Acommon/cross-profiles/mips-musl.sh | 10++++++++++
Acommon/cross-profiles/mipsel-musl.sh | 10++++++++++
Acommon/cross-profiles/mipselhf-musl.sh | 10++++++++++
Acommon/cross-profiles/mipshf-musl.sh | 10++++++++++
Acommon/cross-profiles/ppc-musl.sh | 10++++++++++
Acommon/cross-profiles/ppc.sh | 10++++++++++
Acommon/cross-profiles/ppc64-musl.sh | 10++++++++++
Acommon/cross-profiles/ppc64.sh | 10++++++++++
Acommon/cross-profiles/ppc64le-musl.sh | 10++++++++++
Acommon/cross-profiles/ppc64le.sh | 10++++++++++
Acommon/cross-profiles/x86_64-musl.sh | 10++++++++++
Acommon/cross-profiles/x86_64.sh | 10++++++++++
Acommon/environment/README | 28++++++++++++++++++++++++++++
Acommon/environment/build-style/.empty | 0
Acommon/environment/build-style/R-cran.sh | 4++++
Acommon/environment/build-style/cargo.sh | 7+++++++
Acommon/environment/build-style/cmake.sh | 1+
Acommon/environment/build-style/gem.sh | 9+++++++++
Acommon/environment/build-style/gemspec.sh | 3+++
Acommon/environment/build-style/go.sh | 41+++++++++++++++++++++++++++++++++++++++++
Acommon/environment/build-style/haskell-stack.sh | 1+
Acommon/environment/build-style/meson.sh | 1+
Acommon/environment/build-style/perl-ModuleBuild.sh | 3+++
Acommon/environment/build-style/perl-module.sh | 1+
Acommon/environment/build-style/python-module.sh | 2++
Acommon/environment/build-style/python2-module.sh | 2++
Acommon/environment/build-style/python3-module.sh | 2++
Acommon/environment/build-style/raku-dist.sh | 3+++
Acommon/environment/build-style/ruby-module.sh | 1+
Acommon/environment/build-style/scons.sh | 1+
Acommon/environment/build-style/texmf.sh | 5+++++
Acommon/environment/build-style/texmf/ownership.txt | 209+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/environment/build-style/waf.sh | 1+
Acommon/environment/build-style/waf3.sh | 1+
Acommon/environment/build/.empty | 0
Acommon/environment/build/bootstrap.sh | 2++
Acommon/environment/build/ccache.sh | 2++
Acommon/environment/build/cross.sh | 2++
Acommon/environment/build/hardening.sh | 2++
Acommon/environment/build/pkg-config.sh | 2++
Acommon/environment/check/bootstrap.sh | 2++
Acommon/environment/check/ccache.sh | 2++
Acommon/environment/check/cross.sh | 2++
Acommon/environment/check/hardening.sh | 2++
Acommon/environment/check/pkg-config.sh | 2++
Acommon/environment/configure/.empty | 0
Acommon/environment/configure/autoconf_cache/aarch64-linux | 147+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/environment/configure/autoconf_cache/arm-common | 232+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/environment/configure/autoconf_cache/arm-linux | 157+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/environment/configure/autoconf_cache/common-glibc | 78++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/environment/configure/autoconf_cache/common-linux | 172+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/environment/configure/autoconf_cache/endian-big | 8++++++++
Acommon/environment/configure/autoconf_cache/endian-little | 8++++++++
Acommon/environment/configure/autoconf_cache/ix86-common | 268+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/environment/configure/autoconf_cache/mips-common | 93+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/environment/configure/autoconf_cache/mips-linux | 78++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/environment/configure/autoconf_cache/mipsel-linux | 78++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/environment/configure/autoconf_cache/musl-linux | 183+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/environment/configure/autoconf_cache/powerpc-common | 14++++++++++++++
Acommon/environment/configure/autoconf_cache/powerpc-linux | 16++++++++++++++++
Acommon/environment/configure/autoconf_cache/powerpc32-linux | 272+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/environment/configure/autoconf_cache/powerpc64-linux | 46++++++++++++++++++++++++++++++++++++++++++++++
Acommon/environment/configure/autoconf_cache/x86_64-linux | 170+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/environment/configure/automake/config.guess | 1476+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/environment/configure/automake/config.sub | 1801+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/environment/configure/bootstrap.sh | 4++++
Acommon/environment/configure/ccache.sh | 1+
Acommon/environment/configure/cross.sh | 5+++++
Acommon/environment/configure/gccspecs/hardened-cc1 | 5+++++
Acommon/environment/configure/gccspecs/hardened-ld | 5+++++
Acommon/environment/configure/gccspecs/hardened-mips-cc1 | 8++++++++
Acommon/environment/configure/gnu-configure-args.sh | 123+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/environment/configure/hardening.sh | 28++++++++++++++++++++++++++++
Acommon/environment/configure/pkg-config.sh | 5+++++
Acommon/environment/extract/.empty | 0
Acommon/environment/fetch/.empty | 0
Acommon/environment/fetch/fetch_cmd.sh | 4++++
Acommon/environment/fetch/misc.sh | 2++
Acommon/environment/install/.empty | 0
Acommon/environment/install/ccache.sh | 2++
Acommon/environment/install/cross.sh | 2++
Acommon/environment/install/extglob.sh | 18++++++++++++++++++
Acommon/environment/install/hardening.sh | 2++
Acommon/environment/install/pkg-config.sh | 2++
Acommon/environment/patch/bootstrap.sh | 2++
Acommon/environment/patch/ccache.sh | 2++
Acommon/environment/patch/cross.sh | 2++
Acommon/environment/patch/gnu-configure-args.sh | 2++
Acommon/environment/patch/hardening.sh | 2++
Acommon/environment/patch/pkg-config.sh | 2++
Acommon/environment/pkg/extglob.sh | 2++
Acommon/environment/setup-subpkg/.empty | 0
Acommon/environment/setup-subpkg/subpkg.sh | 45+++++++++++++++++++++++++++++++++++++++++++++
Acommon/environment/setup/.empty | 0
Acommon/environment/setup/git.sh | 32++++++++++++++++++++++++++++++++
Acommon/environment/setup/install.sh | 260+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/environment/setup/misc.sh | 21+++++++++++++++++++++
Acommon/environment/setup/options.sh | 40++++++++++++++++++++++++++++++++++++++++
Acommon/environment/setup/python.sh | 14++++++++++++++
Acommon/environment/setup/replace-interpreter.sh | 41+++++++++++++++++++++++++++++++++++++++++
Acommon/environment/setup/sourcepkg.sh | 39+++++++++++++++++++++++++++++++++++++++
Acommon/environment/setup/vsed.sh | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/hooks/README | 52++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/hooks/do-build/.empty | 0
Acommon/hooks/do-check/.empty | 0
Acommon/hooks/do-configure/.empty | 0
Acommon/hooks/do-extract/.empty | 0
Acommon/hooks/do-extract/00-distfiles.sh | 172+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/hooks/do-fetch/.empty | 0
Acommon/hooks/do-fetch/00-distfiles.sh | 298+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/hooks/do-install/.empty | 0
Acommon/hooks/do-patch/.empty | 0
Acommon/hooks/do-patch/00-patches.sh | 54++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/hooks/do-pkg/.empty | 0
Acommon/hooks/do-pkg/00-gen-pkg.sh | 171+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/hooks/post-build/.empty | 0
Acommon/hooks/post-check/.empty | 0
Acommon/hooks/post-configure/.empty | 0
Acommon/hooks/post-extract/.empty | 0
Acommon/hooks/post-fetch/.empty | 0
Acommon/hooks/post-install/.empty | 0
Acommon/hooks/post-install/00-compress-info-files.sh | 43+++++++++++++++++++++++++++++++++++++++++++
Acommon/hooks/post-install/00-lib32.sh | 8++++++++
Acommon/hooks/post-install/00-uncompress-manpages.sh | 21+++++++++++++++++++++
Acommon/hooks/post-install/01-remove-localized-manpages.sh | 20++++++++++++++++++++
Acommon/hooks/post-install/01-remove-misc.sh | 11+++++++++++
Acommon/hooks/post-install/02-remove-libtool-archives.sh | 7+++++++
Acommon/hooks/post-install/02-remove-perl-files.sh | 8++++++++
Acommon/hooks/post-install/02-remove-python-bytecode-files.sh | 7+++++++
Acommon/hooks/post-install/03-remove-empty-dirs.sh | 10++++++++++
Acommon/hooks/post-install/04-create-xbps-metadata-scripts.sh | 406+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/hooks/post-install/05-generate-gitrevs.sh | 23+++++++++++++++++++++++
Acommon/hooks/post-install/06-strip-and-debug-pkgs.sh | 149+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/hooks/post-install/10-pkglint-devel-paths.sh | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/hooks/post-install/11-pkglint-elf-in-usrshare.sh | 34++++++++++++++++++++++++++++++++++
Acommon/hooks/post-install/12-rename-python3-c-bindings.sh | 16++++++++++++++++
Acommon/hooks/post-install/13-pkg-config-clean-xbps-cross-base-ref.sh | 22++++++++++++++++++++++
Acommon/hooks/post-install/99-pkglint-warn-cross-cruft.sh | 21+++++++++++++++++++++
Acommon/hooks/post-patch/.empty | 0
Acommon/hooks/post-pkg/.empty | 0
Acommon/hooks/post-pkg/00-register-pkg.sh | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/hooks/pre-build/.empty | 0
Acommon/hooks/pre-build/02-script-wrapper.sh | 2++
Acommon/hooks/pre-check/.empty | 0
Acommon/hooks/pre-configure/.empty | 0
Acommon/hooks/pre-configure/00-gnu-configure-asneeded.sh | 13+++++++++++++
Acommon/hooks/pre-configure/01-override-config.sh | 14++++++++++++++
Acommon/hooks/pre-configure/02-script-wrapper.sh | 215+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/hooks/pre-extract/.empty | 0
Acommon/hooks/pre-fetch/.empty | 0
Acommon/hooks/pre-install/.empty | 0
Acommon/hooks/pre-install/00-lib32.sh | 9+++++++++
Acommon/hooks/pre-install/02-script-wrapper.sh | 2++
Acommon/hooks/pre-install/98-fixup-gir-path.sh | 12++++++++++++
Acommon/hooks/pre-patch/.empty | 0
Acommon/hooks/pre-pkg/.empty | 0
Acommon/hooks/pre-pkg/03-rewrite-python-shebang.sh | 40++++++++++++++++++++++++++++++++++++++++
Acommon/hooks/pre-pkg/04-generate-runtime-deps.sh | 172+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/hooks/pre-pkg/05-prepare-32bit.sh | 172+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/hooks/pre-pkg/06-shlib-provides.sh | 56++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/hooks/pre-pkg/90-set-timestamps.sh | 10++++++++++
Acommon/hooks/pre-pkg/99-pkglint-subpkgs.sh | 44++++++++++++++++++++++++++++++++++++++++++++
Acommon/hooks/pre-pkg/99-pkglint.sh | 183+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/hooks/pre-pkg/999-collected-rdeps.sh | 7+++++++
Acommon/options.description | 101+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/repo-keys/3d:b9:c0:50:41:a7:68:4c:2e:2c:a9:a2:5a:04:b7:3f.plist | 12++++++++++++
Acommon/repo-keys/60:ae:0c:d6:f0:95:17:80:bc:93:46:7a:89:af:a3:2d.plist | 12++++++++++++
Acommon/shlibs | 3983+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/travis/build.sh | 23+++++++++++++++++++++++
Acommon/travis/changed_templates.sh | 17+++++++++++++++++
Acommon/travis/docker.sh | 18++++++++++++++++++
Acommon/travis/fetch-xtools.sh | 10++++++++++
Acommon/travis/fetch_upstream.sh | 12++++++++++++
Acommon/travis/license.lst | 447+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/travis/prepare.sh | 15+++++++++++++++
Acommon/travis/set_mirror.sh | 15+++++++++++++++
Acommon/travis/show_files.sh | 14++++++++++++++
Acommon/travis/xlint.sh | 12++++++++++++
Acommon/wrappers/cross-cc | 37+++++++++++++++++++++++++++++++++++++
Acommon/wrappers/date.sh | 6++++++
Acommon/wrappers/install.sh | 44++++++++++++++++++++++++++++++++++++++++++++
Acommon/wrappers/ldconfig.sh | 8++++++++
Acommon/wrappers/strip.sh | 4++++
Acommon/wrappers/uname.sh | 13+++++++++++++
Acommon/xbps-src/libexec/build.sh | 138+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/xbps-src/libexec/xbps-src-dobuild.sh | 38++++++++++++++++++++++++++++++++++++++
Acommon/xbps-src/libexec/xbps-src-docheck.sh | 43+++++++++++++++++++++++++++++++++++++++++++
Acommon/xbps-src/libexec/xbps-src-doconfigure.sh | 38++++++++++++++++++++++++++++++++++++++
Acommon/xbps-src/libexec/xbps-src-doextract.sh | 75+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/xbps-src/libexec/xbps-src-dofetch.sh | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/xbps-src/libexec/xbps-src-doinstall.sh | 71+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/xbps-src/libexec/xbps-src-dopatch.sh | 37+++++++++++++++++++++++++++++++++++++
Acommon/xbps-src/libexec/xbps-src-dopkg.sh | 49+++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/xbps-src/libexec/xbps-src-prepkg.sh | 51+++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/xbps-src/shutils/build_dependencies.sh | 429+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/xbps-src/shutils/bulk.sh | 120+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/xbps-src/shutils/chroot.sh | 314+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/xbps-src/shutils/common.sh | 659+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/xbps-src/shutils/consistency_check.sh | 81+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/xbps-src/shutils/cross.sh | 136+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/xbps-src/shutils/pkgtarget.sh | 125+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/xbps-src/shutils/purge_distfiles.sh | 85+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/xbps-src/shutils/show.sh | 149+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/xbps-src/shutils/update_check.sh | 193+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acommon/xbps-src/shutils/update_hash_cache.sh | 12++++++++++++
Aetc/defaults.conf | 141+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aetc/defaults.virtual | 38++++++++++++++++++++++++++++++++++++++
Aetc/xbps.d/repos-local-x86_64-multilib.conf | 4++++
Aetc/xbps.d/repos-local.conf | 5+++++
Aetc/xbps.d/repos-remote-aarch64-musl.conf | 4++++
Aetc/xbps.d/repos-remote-aarch64.conf | 4++++
Aetc/xbps.d/repos-remote-musl.conf | 4++++
Aetc/xbps.d/repos-remote-x86_64-multilib.conf | 3+++
Aetc/xbps.d/repos-remote.conf | 4++++
Asrcpkgs/st/patches/st-nordtheme-0.8.2.diff | 100+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrcpkgs/st/patches/st-scrollback-20200419-72e3f6c.diff | 351+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrcpkgs/st/st-terminfo.INSTALL | 5+++++
Asrcpkgs/st/st-terminfo.REMOVE | 8++++++++
Asrcpkgs/st/template | 38++++++++++++++++++++++++++++++++++++++
Axbps-src | 945+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
305 files changed, 23503 insertions(+), 0 deletions(-)

diff --git a/.gitattributes b/.gitattributes @@ -0,0 +1,2 @@ +template linguist-language=bash +common/shlibs merge=union diff --git a/.github/issue_template.md b/.github/issue_template.md @@ -0,0 +1,14 @@ +<!-- Don't request update of package. We have a script for that. https://alpha.de.repo.voidlinux.org/void-updates/void-updates.txt . However, a quality pull request may help. --> +### System + +* xuname: + *output of ``xuname`` (part of xtools)* +* package: + *affected package(s) including the version*: ``xbps-query -p pkgver <pkgname>`` + +### Expected behavior + +### Actual behavior + +### Steps to reproduce the behavior + diff --git a/.github/workflows/notify-issue.yaml b/.github/workflows/notify-issue.yaml @@ -0,0 +1,32 @@ +name: "Issue Notification" +on: + issues: + types: [opened, closed] + +jobs: + ircnotify: + runs-on: ubuntu-latest + timeout-minutes: 3 + steps: + - name: Shorten URL + id: shortener + if: github.repository == 'void-linux/void-packages' + uses: Gottox/url-shortener-action@master + with: + url: "${{ github.event.issue.html_url }}" + - name: "Issue Notification" + uses: Gottox/irc-message-action@master + continue-on-error: true + if: github.repository == 'void-linux/void-packages' + with: + notice: true + channel: "#xbps" + nickname: void-packages + sasl_password: ${{ secrets.freenode_password_void_packages }} + tls: true + message: >- + ${{ github.actor }} + ${{ github.event.action }} issue + #${{ github.event.issue.number }} + “${{ github.event.issue.title }}” + ${{ steps.shortener.outputs.short_url }} diff --git a/.github/workflows/notify-pr.yaml b/.github/workflows/notify-pr.yaml @@ -0,0 +1,32 @@ +name: "Pull Request Notification" +on: + pull_request: + types: [opened, closed] + +jobs: + ircnotify: + runs-on: ubuntu-latest + timeout-minutes: 3 + steps: + - name: Shorten URL + id: shortener + if: github.repository == 'void-linux/void-packages' + uses: Gottox/url-shortener-action@master + with: + url: "${{ github.event.pull_request.html_url }}" + - name: "Pull Request Notification" + uses: Gottox/irc-message-action@master + continue-on-error: true + if: github.repository == 'void-linux/void-packages' + with: + notice: true + channel: "#xbps" + nickname: void-packages + sasl_password: ${{ secrets.freenode_password_void_packages }} + tls: true + message: >- + ${{ github.actor }} + ${{ github.event.action }} pull request + #${{ github.event.pull_request.number }} + “${{ github.event.pull_request.title }}” + ${{ steps.shortener.outputs.short_url }} diff --git a/.github/workflows/notify-push.yaml b/.github/workflows/notify-push.yaml @@ -0,0 +1,30 @@ +name: "Push Notification" +on: + push: + branches: [master] + +jobs: + ircnotify: + runs-on: ubuntu-latest + timeout-minutes: 3 + steps: + - name: Shorten URL + id: shortener + if: github.repository == 'void-linux/void-packages' + uses: Gottox/url-shortener-action@master + with: + url: "${{ github.event.compare }}" + - name: "Push Notification" + uses: Gottox/irc-message-action@master + continue-on-error: true + if: github.repository == 'void-linux/void-packages' + with: + notice: true + channel: "#xbps" + nickname: void-packages + sasl_password: ${{ secrets.freenode_password_void_packages }} + tls: true + message: >- + ${{ github.actor }} + pushed + ${{ steps.shortener.outputs.short_url }} diff --git a/.gitignore b/.gitignore @@ -0,0 +1,12 @@ +*.swo +*.swp +*~ +\#*# +*.o +masterdir* +hostdir* +etc/conf +etc/conf.* +etc/virtual +etc/xbps.d/custom +.xbps-checkvers*.plist diff --git a/.mailmap b/.mailmap @@ -0,0 +1,51 @@ +# git mailmap (see git-shortlog(1)) +# format: New Name <new@address> Old Name <old@address> + +Andrea Brancaleoni <abc@pompel.me> Andrea Brancaleoni <andrea.brancaleoni@cleafy.com> +Andrea Brancaleoni <abc@pompel.me> Andrea Brancaleoni <miwaxe@gmail.com> +Andrea Brancaleoni <abc@pompel.me> Andrea Brancaleoni <virus@gmx.us> +Andrew Benson <abenson+void@gmail.com> Andrew Benson <abenson@gmail.com> +Andrew Benson <abenson+void@gmail.com> Andrewb Benson <abenson+void@gmail.com> +Dominik Honnef <dominik@honnef.co> Dominik Honnef <dominikh@fork-bomb.org> +Duncaen <duncaen@voidlinux.org> Duncaen <mail@duncano.de> +Duncaen <duncaen@voidlinux.org> Duncan Overbruck <administrator@duncano.de> +Duncaen <duncaen@voidlinux.org> Duncan Overbruck <mail@duncano.de> +Enno Boland <gottox@voidlinux.org> Enno Boland <eb@s01.de> +Enno Boland <gottox@voidlinux.org> Enno Boland <g@s01.de> +Enno Boland <gottox@voidlinux.org> Gottox <g@s01.de> +Jan S <jan.schreib@gmail.com> jan-schreib <jan.schreib@gmail.com> +John Regan <john@jrjrtech.com> John Regan <jregan@mesonet.org> +Jürgen Buchmüller <pullmoll@t-online.de> Juergen Buchmueller <pullmoll@t-online.de> +Leah Neukirchen <leah@vuxu.org> Christian Neukirchen <chneukirchen@gmail.com> +Logen Kain <logen@sudotask.com> Logen Kain <walach.of.harkon@gmail.com> +Michael Aldridge <maldridge@VoidLinux.eu> Michael Aldridge <aldridge.mac@gmail.com> +Philipp Hirsch <itself@hanspolo.net> hanspolo <ph.hanspolo@googlemail.com> +Piraty <piraty1@inbox.ru> Piraty <piraty@users.noreply.github.com> +Stefan Mühlinghaus <jazzman@alphabreed.com> Stefan Mühlinghaus <muehlinghaus@mmh.ag> +bougyman <bougyman@voidlinux.eu> bougyman <bougyman@rubyists.com> +bougyman <bougyman@voidlinux.eu> bougyman <bougyman@users.noreply.github.com> +bougyman <bougyman@voidlinux.eu> bougyman <tj@rubyists.com> +chrome-pepper-bot <eb@s01.de> Enno Boland (bot) <g@s01.de> +onekk <carlo.dormeletti@email.it> onekk <carlo.dormeletti@alice.it> +pancake <pancake@nopcode.org> pancake <pancake@flubox.(none)> +pancake <pancake@nopcode.org> radare <pancake@nopcode.org> +xdave <davehome@redthumb.info.tm> davehome <davehome@redthumb.info.tm> +yopito <pierre.bourgin@free.fr> yopito <yopito@users.noreply.github.com> +xo <oh@rotce.de> teldra <teldra@rotce.de> + +Duncaen <duncaen@voidlinux.org> Duncaen <duncaen@voidlinux.eu> +Enno Boland <gottox@voidlinux.org> Enno Boland <gottox@voidlinux.eu> +Juan RP <xtraeme@voidlinux.org> Juan RP <xtraeme@voidlinux.eu> +Toyam Cox <Vaelatern@voidlinux.org> Toyam Cox <Vaelatern@voidlinux.eu> +ananteris <ananteris@voidlinux.org> ananteris <ananteris@voidlinux.eu> +bougyman <bougyman@voidlinux.org> bougyman <bougyman@voidlinux.eu> + +Rasmus Thomsen <oss@cogitri.dev> Rasmus Thomsen <rasmus.thomsen@protonmail.com> +Rasmus Thomsen <oss@cogitri.dev> Rasmus Thomsen <cogitri@exherbo.org> + +Renato Aguiar <renato@renatoaguiar.net> Renato Aguiar <renato@renag.me> +Renato Aguiar <renato@renatoaguiar.net> Renato Aguiar <contact@renatoaguiar.org> +Renato Aguiar <renato@renatoaguiar.net> Renato Aguiar <renato@aguiar.info> +Đoàn Trần Công Danh <congdanhqx@gmail.com> <congdanhqx+sgn@gmail.com> +Đoàn Trần Công Danh <congdanhqx@gmail.com> Doan Tran Cong Danh <congdanhqx@gmail.com> +John <me@johnnynator.dev> John <johnz@posteo.net> diff --git a/.travis.yml b/.travis.yml @@ -0,0 +1,41 @@ +language: bash +dist: bionic + +git: + depth: 200 + +env: + global: + - PATH=$PATH:/tmp/bin + - DOCKER_BASE=voidlinux/masterdir + - TAG=20200607RC01 + + matrix: + - XLINT=1 LICENSE_LIST=common/travis/license.lst + - ARCH=x86_64 BOOTSTRAP=x86_64 + - ARCH=i686 BOOTSTRAP=i686 + - ARCH=aarch64 BOOTSTRAP=x86_64 + - ARCH=armv7l BOOTSTRAP=x86_64 + - ARCH=x86_64-musl BOOTSTRAP=x86_64-musl + - ARCH=armv6l-musl BOOTSTRAP=x86_64-musl + - ARCH=aarch64-musl BOOTSTRAP=x86_64-musl + +install: + - common/travis/docker.sh + +before_script: + - common/travis/set_mirror.sh + - common/travis/prepare.sh + - common/travis/fetch_upstream.sh + - common/travis/changed_templates.sh + - common/travis/fetch-xtools.sh + - common/travis/xlint.sh + +script: + - if [ -z "$XLINT" ]; then docker exec -t void hostrepo/common/travis/build.sh $BOOTSTRAP $ARCH; fi + +after_script: + - if [ -z "$XLINT" ]; then docker exec -t void hostrepo/common/travis/show_files.sh $BOOTSTRAP $ARCH; fi + +notifications: + email: false diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -0,0 +1,117 @@ +# Contributing to void-packages + +void-packages is the backbone of the Void Linux distribution. It contains all the definitions to build packages from source. + +This document describes how you, as a contributor, can help with adding packages, correcting bugs and adding features to void-packages. + +## Getting your packages into Void by yourself + +If you really want to get a package into Void Linux, we recommend you package it yourself. + +We provide a [comprehensive Manual](./Manual.md) on how to create new packages. +There's also a [manual for xbps-src](./README.md), which is used +to build package files from templates. + +For this guide, we assume you have basic knowledge about [git](http://git-scm.org), as well as a [GitHub Account](http://github.com). + +Please note that we do not accept any packages containing non-release versions, such as specific git- or svn-revisions anymore. + +### Creating a new template + +You can use the helper tool `xnew`, from the [xtools](https://github.com/chneukirchen/xtools) package, to create new templates: + + $ xnew pkgname subpkg1 subpkg2 ... + +Templates must have the name `void-packages/srcpkgs/<pkgname>/template`, where `pkgname` is the same as the `pkgname` variable in the template. + +For deeper insights on the contents of template files, please read the [manual](./Manual.md), and be sure to browse the existing template files in the `srcpkgs` directory of this repository for concrete examples. + +When you've finished working on the template file, please check it with `xlint` helper from the [xtools](https://github.com/chneukirchen/xtools) package: + + $ xlint template + +If `xlint` reports any issues, resolve them before committing. + +### Committing your changes + +Once you have built your template file or files, the commit message should have one of the following forms: + +* for new packages, use ```New package: <pkgname>-<version>``` ([example](https://github.com/void-linux/void-packages/commit/176d9655429188aac10cd229827f99b72982ab10)). + +* for package updates, use ```<pkgname>: update to <version>.``` ([example](https://github.com/void-linux/void-packages/commit/b6b82dcbd4aeea5fc37a32e4b6a8dd8bd980d5a3)). + +* for template modifications without a version change, use ```<pkgname>: <reason>``` ([example](https://github.com/void-linux/void-packages/commit/8b68d6bf1eb997cd5e7c095acd040e2c5379c91d)). + +* for package removals, use ```<pkgname>: remove package``` ([example](https://github.com/void-linux/void-packages/commit/83784632d94deee5d038c8e1c4c1dffa922fca21)). + +* for `common/shlibs` modifications, use `common/shlibs: <pkgname>` ([example](https://github.com/void-linux/void-packages/commit/613651c91811cb4fd2e1a6be701c87072d759a9f)). + +If you want to describe your changes in more detail, add an empty line followed by those details ([example](https://github.com/void-linux/void-packages/commit/f1c45a502086ba1952f23ace9084a870ce437bc6)). + +Pull requests are automatically submitted for Continuous Integration (CI) testing to ensure packages build on various combinations of libc and architecture. +Packages that take longer than 50 minutes to build (for example, Firefox or the Linux kernel) will fail CI and should include `[ci skip]` in the last line of the last commit message in the PR to avoid wasting CI builder time. +Use your best judgment on build times based on your local building experience. If you skip CI when submitting a PR, please build and cross-build for a variety of architectures locally, with both glibc and musl, and note your local results in PR comments. +Make sure to cover 64-bit and 32-bit architectures. + +Runtime testing of packages and building with the `-Q` flag or with `XBPS_CHECK_PKGS=yes` set in the environment or `etc/conf` are strongly encouraged. +New packages will not be accepted unless they have been runtime tested. + +For further information, please consult the [manual](https://github.com/void-linux/void-packages/blob/master/Manual.md). + +`xbump`, available in the [xtools](https://github.com/chneukirchen/xtools) package, can be used to commit a new or updated package: + + $ xbump <pkgname> <git commit options> + +`xbump` will use `git commit` to commit the changes with the appropriate commit message. For more fine-grained control over the commit, specific options can be passed to `git commit` by adding them after the package name. + +After committing your changes, please check that the package builds successfully. From the top level directory of your local copy of the `void-packages` repository, run: + + $ ./xbps-src pkg <pkgname> + +Your package must build successfully for at least x86, but we recommend trying to build for armv* as well, e.g.: + + $ ./xbps-src -a armv7l pkg <pkgname> + +For further details, see the output of `./xbps-src -h`. + +### Starting a pull request + +Once you have successfully built the package, you can start a pull request. + +Most pull requests should only contain a single package and dependencies which are not part of void-packages yet. + +If you make updates to packages containing a soname bump, you also need to update `common/shlibs` and revbump all packages that are dependant. +There should be a commit for each package revbump, and those commits should be part of the same pull request. + +When you make changes to your pull request, please *do not close and reopen your pull request*. Instead, just forcibly git push, overwriting any old commits. Closing and opening your pull requests repeatedly spams the Void maintainers. + +#### Travis + +Once you have started a pull request, you will get instant feedback from Travis. It will check if the templates you have changed +comply with the our guidelines. At the moment not all packages comply with the rules, so if you update a package, it may happen that Travis reports errors about places you haven't touched. Please feel free to fix those errors too. + +#### Review + +Most of the time your pull request will contain mistakes. It's nothing bad, it just happens. + +Reviewers will comment on your pull request and point out which changes are needed before the template can be included. + +We recommend having only a single commit for pull request, so if you need to make changes in commits but already have a pull request, use the following commands: + + $ git add <file> + $ git commit --amend + $ git push -f + +#### Closing the pull request + +Once you have applied all requested changes, the reviewers will merge your request. + +If the pull request becomes inactive for some days, the reviewers may or may not warn you when they are about to close it. +If it stays inactive further, it will be closed. + +Please abstain from temporarily closing a pull request while revising the templates. Instead, leave a comment on the PR describing what still needs work, or add "[WIP]" to the PR title. Only close your pull request if you're sure you don't want your changes to be included. + +#### Publishing the package + +Once the reviewers have merged the pull request, our [build server](http://build.voidlinux.org) is automatically triggered and builds +all packages in the pull request for all supported platforms. Upon completion, the packages are available to all Void Linux users. diff --git a/COPYING b/COPYING @@ -0,0 +1,23 @@ + Copyright (c) 2008-2020 Juan Romero Pardines and contributors + Copyright (c) 2017-2020 The Void Linux team and contributors + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Manual.md b/Manual.md @@ -0,0 +1,2009 @@ +# The XBPS source packages manual + +This article contains an exhaustive manual of how to create new source +packages for XBPS, the `Void Linux` native packaging system. + +*Table of Contents* + +* [Introduction](#Introduction) + * [Quality Requirements](#quality_requirements) + * [Package build phases](#buildphase) + * [Package naming conventions](#namingconvention) + * [Libraries](#libs) + * [Language Modules](#language_modules) + * [Language Bindings](#language_bindings) + * [Programs](#programs) + * [Global functions](#global_funcs) + * [Global variables](#global_vars) + * [Available variables](#available_vars) + * [Mandatory variables](#mandatory_vars) + * [Optional variables](#optional_vars) + * [About the depends variables](#explain_depends) + * [Repositories](#repositories) + * [Repositories defined by Branch](#repo_by_branch) + * [Package defined repositories](#pkg_defined_repo) + * [Checking for new upstream releases](#updates) + * [Handling patches](#patches) + * [Build style scripts](#build_scripts) + * [Build helper scripts](#build_helper) + * [Functions](#functions) + * [Build options](#build_options) + * [Runtime dependencies](#deps_runtime) + * [INSTALL and REMOVE files](#install_remove_files) + * [INSTALL.msg and REMOVE.msg files](#install_remove_files_msg) + * [Creating system accounts/groups at runtime](#runtime_account_creation) + * [Writing runit services](#writing_runit_services) + * [32bit packages](#32bit_pkgs) + * [Subpackages](#pkgs_sub) + * [Development packages](#pkgs_development) + * [Data packages](#pkgs_data) + * [Documentation packages](#pkgs_documentation) + * [Python packages](#pkgs_python) + * [Go packages](#pkgs_go) + * [Haskell packages](#pkgs_haskell) + * [Font packages](#pkgs_font) + * [Removing a package](#pkg_remove) + * [XBPS Triggers](#xbps_triggers) + * [appstream-cache](#triggers_appstream_cache) + * [binfmts](#triggers_binfmts) + * [dkms](#triggers_dkms) + * [gconf-schemas](#triggers_gconf_schemas) + * [gdk-pixbuf-loaders](#triggers_gdk_pixbuf_loaders) + * [gio-modules](#triggers_gio_modules) + * [gettings-schemas](#triggers_gsettings_schemas) + * [gtk-icon-cache](#triggers_gtk_icon_cache) + * [gtk-immodules](#triggers_gtk_immodules) + * [gtk-pixbuf-loaders](#triggers_gtk_pixbuf_loaders) + * [gtk3-immodules](#triggers_gtk3_immodules) + * [hwdb.d-dir](#triggers_hwdb.d_dir) + * [info-files](#triggers_info_files) + * [kernel-hooks](#triggers_kernel_hooks) + * [mimedb](#triggers_mimedb) + * [mkdirs](#triggers_mkdirs) + * [pango-modules](#triggers_pango_module) + * [pycompile](#triggers_pycompile) + * [register-shell](#triggers_register_shell) + * [system-accounts](#triggers_system_accounts) + * [texmf-dist](#triggers_texmf_dist) + * [update-desktopdb](#triggers_update_desktopdb) + * [x11-fonts](#triggers_x11_fonts) + * [xml-catalog](#triggers_xml_catalog) + * [Notes](#notes) + * [Contributing via git](#contributing) +* [Help](#help) + +<a id="Introduction"></a> +## Introduction + +The `void-packages` repository contains all `source` packages that are the +recipes to download, compile and build binary packages for `Void`. +Those `source` package files are called `templates`. + +The `template files` are `GNU bash` shell scripts that must define some required/optional +`variables` and `functions` that are processed by `xbps-src` (the package builder) +to generate the resulting binary packages. + +By convention, all templates start with a comment briefly explaining what they +are. In addition, pkgname and version can't have any characters in them that +would require them to be quoted, so they are not quoted. + +A simple `template` example is as follows: + +``` +# Template file for 'foo' +pkgname=foo +version=1.0 +revision=1 +build_style=gnu-configure +short_desc="A short description max 72 chars" +maintainer="name <email>" +license="GPL-3.0-or-later" +homepage="http://www.foo.org" +distfiles="http://www.foo.org/foo-${version}.tar.gz" +checksum="fea0a94d4b605894f3e2d5572e3f96e4413bcad3a085aae7367c2cf07908b2ff" +``` + +The template file contains definitions to download, build and install the +package files to a `fake destdir`, and after this a binary package can be +generated with the definitions specified on it. + +Don't worry if anything is not clear as it should be. The reserved `variables` +and `functions` will be explained later. This `template` file should be created +in a directory matching `$pkgname`, Example: `void-packages/srcpkgs/foo/template`. + +If everything went fine after running + + $ ./xbps-src pkg <pkgname> + +a binary package named `foo-1.0_1.<arch>.xbps` will be generated in the local repository +`hostdir/binpkgs`. + +<a id="quality_requirements"></a> +### Quality Requirements + +To be included in the Void repository, software must meet at least one +of the following requirements. Exceptions to the list are possible, +and might be accepted, but are extremely unlikely. If you believe you have an +exception, start a PR and make an argument for why that particular piece of +software, while not meeting any of the following requirements, is a good candidate for +the Void packages system. + +1. System: The software should be installed system-wide, not per-user. + +1. Compiled: The software needs to be compiled before being used, even if it is + software that is not needed by the whole system. + +1. Required: Another package either within the repository or pending inclusion + requires the package. + +<a id="buildphase"></a> +### Package build phases + +Building a package consist of the following phases: + +- `setup` This phase prepares the environment for building a package. + +- `fetch` This phase downloads required sources for a `source package`, as defined by +the `distfiles` variable or `do_fetch()` function. + +- `extract` This phase extracts the `distfiles` files into `$wrksrc` or executes the `do_extract()` +function, which is the directory to be used to compile the `source package`. + +- `patch` This phase applies all patches in the patches directory of the package and +can be used to perform other operations before configuring the package. + +- `configure` This phase executes the `configuration` of a `source package`, i.e `GNU configure scripts`. + +- `build` This phase compiles/prepares the `source files` via `make` or any other compatible method. + +- `check` This optional phase checks the result of the `build` phase for example by running `make -k check`. + +- `install` This phase installs the `package files` into the package destdir `<masterdir>/destdir/<pkgname>-<version>`, +via `make install` or any other compatible method. + +- `pkg` This phase builds the `binary packages` with files stored in the +`package destdir` and registers them into the local repository. + +- `clean` This phase cleans up the package (if defined). + +`xbps-src` supports running just the specified phase, and if it ran +successfully, the phase will be skipped later (unless its work directory +`${wrksrc}` is removed with `xbps-src clean`). + +<a id="namingconventions"></a> +### Package naming conventions + +<a id="libs"></a> +#### Libraries + +Libraries are packages which provide shared objects (\*.so) in /usr/lib. +They should be named like their upstream package name with the following +exceptions: + +- The package is a subpackage of a front end application and provides +shared objects used by the base package and other third party libraries. In that +case it should be prefixed with 'lib'. An exception from that rule is: If an +executable is only used for building that package, it moves to the -devel +package. + +Example: wireshark -> subpkg libwireshark + +Libraries have to be split into two sub packages: `<name>` and `<name>-devel`. + +- `<name>` should only contain those parts of a package which are needed to run +a linked program. + +- `<name>-devel` should contain all files which are needed to compile a package +against this package. If the library is a sub package, its corresponding +development package should be named `lib<name>-devel` + +<a id="language_modules"></a> +#### Language Modules + +Language modules are extensions to script or compiled languages. Those packages +do not provide any executables themselves, but can be used by other packages +written in the same language. + +The naming convention to those packages is: + +``` +<language>-<name> +``` + +If a package provides both, a module and a executable, it should be split into +a package providing the executable named `<name>` and the module named +`<language>-<name>`. If a package starts with the languages name itself, the +language prefix can be dropped. Short names for languages are no valid substitute +for the language prefix. + +Example: python-pam, perl-URI, python3-pyside2 + +<a id="language_bindings"></a> +#### Language Bindings + +Language Bindings are packages which allow programs or libraries to have +extensions or plugins written in a certain language. + +The naming convention to those packages is: +``` +<name>-<language> +``` + +Example: gimp-python, irssi-perl + +<a id="programs"></a> +#### Programs + +Programs put executables under /usr/bin (or in very special cases in other +.../bin directories) + +For those packages the upstream packages name should be used. Remember that +in contrast to many other distributions, void doesn't lowercase package names. +As a rule of thumb, if the tar.gz of a package contains uppercase letter, then +the package name should contain them too; if it doesn't, the package name +is lowercase. + +Programs can be split into program packages and library packages. The program +package should be named as described above. The library package should be +prefixed with "lib" (see section `Libraries`) + +<a id="global_funcs"></a> +### Global functions + +The following functions are defined by `xbps-src` and can be used on any template: + +- *vinstall()* `vinstall <file> <mode> <targetdir> [<name>]` + + Installs `file` with the specified `mode` into `targetdir` in the pkg `$DESTDIR`. + The optional 4th argument can be used to change the `file name`. + +- *vcopy()* `vcopy <pattern> <targetdir>` + + Copies recursively all files in `pattern` to `targetdir` in the pkg `$DESTDIR`. + +- *vmove()* `vmove <pattern>` + + Moves `pattern` to the specified directory in the pkg `$DESTDIR`. + +- *vmkdir()* `vmkdir <directory> [<mode>]` + + Creates a directory in the pkg `$DESTDIR`. The 2nd optional argument sets the mode of the directory. + +- *vbin()* `vbin <file> [<name>]` + + Installs `file` into `usr/bin` in the pkg `$DESTDIR` with the + permissions 0755. The optional 2nd argument can be used to change + the `file name`. + +- *vman()* `vman <file> [<name>]` + + Installs `file` as a man page. `vman()` parses the name and + determines the section as well as localization. Also transparently + converts gzipped (.gz) and bzipped (.bz2) manpages into plaintext. + Example mappings: + + - `foo.1` -> `${DESTDIR}/usr/share/man/man1/foo.1` + - `foo.fr.1` -> `${DESTDIR}/usr/share/man/fr/man1/foo.1` + - `foo.1p` -> `${DESTDIR}/usr/share/man/man1/foo.1p` + - `foo.1.gz` -> `${DESTDIR}/usr/share/man/man1/foo.1` + - `foo.1.bz2` -> `${DESTDIR}/usr/share/man/man1/foo.1` + +- *vdoc()* `vdoc <file> [<name>]` + + Installs `file` into `usr/share/doc/<pkgname>` in the pkg + `$DESTDIR`. The optional 2nd argument can be used to change the + `file name`. + +- *vconf()* `vconf <file> [<name>]` + + Installs `file` into `etc` in the pkg + `$DESTDIR`. The optional 2nd argument can be used to change the + `file name`. + +- *vsconf()* `vsconf <file> [<name>]` + + Installs `file` into `usr/share/examples/<pkgname>` in the pkg + `$DESTDIR`. The optional 2nd argument can be used to change the + `file name`. + +- <a id="vlicense"></a> + *vlicense()* `vlicense <file> [<name>]` + + Installs `file` into `usr/share/licenses/<pkgname>` in the pkg + `$DESTDIR`. The optional 2nd argument can be used to change the + `file name`. See [license](#var_license) for when to use it. + +- *vsv()* `vsv <service>` + + Installs `service` from `${FILESDIR}` to /etc/sv. The service must + be a directory containing at least a run script. Note the `supervise` + symlink will be created automatically by `vsv` and that the run script + is automatically made executable by this function. + For further information on how to create a new service directory see + [The corresponding section the FAQ](http://smarden.org/runit/faq.html#create). + +- *vsed()* `vsed -i <file> -e <regex>` + + Wrapper around sed that checks sha256sum of a file before and after running + the sed command to detect cases in which the sed call didn't change anything. + Takes any arbitrary amount of files and regexes by calling `-i file` and + `-e regex` repeatedly, at least one file and one regex must be specified. + + Note that vsed will call the sed command for every regex specified against + every file specified, in the order that they are given. + +> Shell wildcards must be properly quoted, Example: `vmove "usr/lib/*.a"`. + +<a id="global_vars"></a> +### Global variables + +The following variables are defined by `xbps-src` and can be used on any template: + +- `makejobs` Set to `-jX` if `XBPS_MAKEJOBS` is defined, to allow parallel jobs with `GNU make`. + +- `sourcepkg` Set to the to main package name, can be used to match the main package +rather than additional binary package names. + +- `CHROOT_READY` Set if the target chroot (masterdir) is ready for chroot builds. + +- `CROSS_BUILD` Set if `xbps-src` is cross compiling a package. + +- `DESTDIR` Full path to the fake destdir used by the source pkg, set to +`<masterdir>/destdir/${sourcepkg}-${version}`. + +- `FILESDIR` Full path to the `files` package directory, i.e `srcpkgs/foo/files`. +The `files` directory can be used to store additional files to be installed +as part of the source package. + +- `PKGDESTDIR` Full path to the fake destdir used by the `pkg_install()` function in +`subpackages`, set to `<masterdir>/destdir/${pkgname}-${version}`. + +- `XBPS_BUILDDIR` Directory to store the `source code` of the source package being processed, +set to `<masterdir>/builddir`. The package `wrksrc` is always stored +in this directory such as `${XBPS_BUILDDIR}/${wrksrc}`. + +- `XBPS_MACHINE` The machine architecture as returned by `xbps-uhelper arch`. + +- `XBPS_ENDIAN` The machine's endianness ("le" or "be"). + +- `XBPS_LIBC` The machine's C library ("glibc" or "musl"). + +- `XBPS_WORDSIZE` The machine's word size in bits (32 or 64). + +- `XBPS_NO_ATOMIC8` The machine lacks native 64-bit atomics (needs libatomic emulation). + +- `XBPS_SRCDISTDIR` Full path to where the `source distfiles` are stored, i.e `$XBPS_HOSTDIR/sources`. + +- `XBPS_SRCPKGDIR` Full path to the `srcpkgs` directory. + +- `XBPS_TARGET_MACHINE` The target machine architecture when cross compiling a package. + +- `XBPS_TARGET_ENDIAN` The target machine's endianness ("le" or "be"). + +- `XBPS_TARGET_LIBC` The target machine's C library ("glibc" or "musl"). + +- `XBPS_TARGET_WORDSIZE` The target machine's word size in bits (32 or 64). + +- `XBPS_TARGET_NO_ATOMIC8` The target machine lacks native 64-bit atomics (needs libatomic emulation). + +- `XBPS_FETCH_CMD` The utility to fetch files from `ftp`, `http` of `https` servers. + +- `XBPS_WRAPPERDIR` Full path to where xbps-src's wrappers for utilities are stored. + +- `XBPS_CROSS_BASE` Full path to where cross-compile dependencies are installed, varies according to the target architecture triplet. i.e `aarch64` -> `aarch64-unknown-linux-gnu`. + +- `XBPS_RUST_TARGET` The target architecture triplet used by `rustc` and `cargo`. + +<a id="available_vars"></a> +### Available variables + +<a id="mandatory_vars"></a> +#### Mandatory variables + +The list of mandatory variables for a template: + +- `homepage` A string pointing to the `upstream` homepage. + + +- <a id="var_license"></a> +`license` A string matching the license's [SPDX Short identifier](https://spdx.org/licenses), +`Public Domain`, or string prefixed with `custom:` for other licenses. +Multiple licenses should be separated by commas, Example: `GPL-3.0-or-later, custom:Hugware`. + + Empty meta-packages that don't include any files + which thus have and require no license, should have set + `license="BSD-2-Clause"`. + + Note: `MIT`, `BSD`, `ISC` and custom licenses + require the license file to be supplied with the binary package. + +- `maintainer` A string in the form of `name <user@domain>`. The + email for this field must be a valid email that you can be reached + at. Packages using `users.noreply.github.com` emails will not be + accepted. + +- `pkgname` A string with the package name, matching `srcpkgs/<pkgname>`. + +- `revision` A number that must be set to 1 when the `source package` is created, or +updated to a new `upstream version`. This should only be increased when +the generated `binary packages` have been modified. + +- `short_desc` A string with a brief description for this package. Max 72 chars. + +- `version` A string with the package version. Must not contain dashes or underscore +and at least one digit is required. Shell's variable substition usage is not allowed. + +<a id="optional_vars"></a> +#### Optional variables + +- `hostmakedepends` The list of `host` dependencies required to build the package, and +that will be installed to the master directory. There is no need to specify a version +because the current version in srcpkgs will always be required. +Example: `hostmakedepends="foo blah"`. + +- `makedepends` The list of `target` dependencies required to build the package, and that +will be installed to the master directory. There is no need to specify a version +because the current version in srcpkgs will always be required. +Example: `makedepends="foo blah"`. + +- `checkdepends` The list of dependencies required to run the package checks, i.e. +the script or make rule specified in the template's `do_check()` function. +Example: `checkdepends="gtest"`. + +- `depends` The list of dependencies required to run the package. These dependencies +are not installed to the master directory, rather are only checked if a binary package +in the local repository exists to satisfy the required version. Dependencies +can be specified with the following version comparators: `<`, `>`, `<=`, `>=` +or `foo-1.0_1` to match an exact version. If version comparator is not +defined (just a package name), the version comparator is automatically set to `>=0`. +Example: `depends="foo blah>=1.0"`. See the `Runtime dependencies` section for more information. + +- `bootstrap` If enabled the source package is considered to be part of the `bootstrap` +process and required to be able to build packages in the chroot. Only a +small number of packages must set this property. + +- `conflicts` An optional list of packages conflicting with this package. +Conflicts can be specified with the following version comparators: `<`, `>`, `<=`, `>=` +or `foo-1.0_1` to match an exact version. If version comparator is not +defined (just a package name), the version comparator is automatically set to `>=0`. +Example: `conflicts="foo blah>=0.42.3"`. + +- `distfiles` The full URL to the `upstream` source distribution files. Multiple files +can be separated by whitespaces. The files must end in `.tar.lzma`, `.tar.xz`, +`.txz`, `.tar.bz2`, `.tbz`, `.tar.gz`, `.tgz`, `.gz`, `.bz2`, `.tar` or +`.zip`. To define a target filename, append `>filename` to the URL. +Example: + distfiles="http://foo.org/foo-1.0.tar.gz http://foo.org/bar-1.0.tar.gz>bar.tar.gz" + + To avoid repetition, several variables for common hosting sites + exist: + + | Variable | Value | + |------------------|-------------------------------------------------| + | CPAN_SITE | https://cpan.perl.org/modules/by-module | + | DEBIAN_SITE | http://ftp.debian.org/debian/pool | + | FREEDESKTOP_SITE | https://freedesktop.org/software | + | GNOME_SITE | https://ftp.gnome.org/pub/GNOME/sources | + | GNU_SITE | https://ftp.gnu.org/gnu | + | KERNEL_SITE | https://www.kernel.org/pub/linux | + | MOZILLA_SITE | https://ftp.mozilla.org/pub | + | NONGNU_SITE | https://download.savannah.nongnu.org/releases | + | PYPI_SITE | https://files.pythonhosted.org/packages/source | + | SOURCEFORGE_SITE | https://downloads.sourceforge.net/sourceforge | + | UBUNTU_SITE | http://archive.ubuntu.com/ubuntu/pool | + | XORG_SITE | https://www.x.org/releases/individual | + | KDE_SITE | https://download.kde.org/stable | + +- `checksum` The `sha256` digests matching `${distfiles}`. Multiple files can be +separated by blanks. Please note that the order must be the same than +was used in `${distfiles}`. Example: `checksum="kkas00xjkjas"` + +If a distfile changes its checksum for every download because it is packaged +on the fly on the server, like e.g. snapshot tarballs from any of the +`https://*.googlesource.com/` sites, the checksum of the `archive contents` +can be specified by prepending a commercial at (@). +For tarballs you can find the contents checksum by using the command +`tar xf <tarball.ext> --to-stdout | sha256sum`. + +- `wrksrc` The directory name where the package sources are extracted, by default +set to `${pkgname}-${version}`. If the top level directory of a package's `distfile` is different from the default, `wrksrc` must be set to the top level directory name inside the archive. + +- `build_wrksrc` A directory relative to `${wrksrc}` that will be used when building the package. + +- `create_wrksrc` Enable it to create the `${wrksrc}` directory. Required if a package +contains multiple `distfiles`. + +- `build_style` This specifies the `build method` for a package. Read below to know more +about the available package `build methods` or effect of leaving this not set. + +- `build_helper` Whitespace-separated list of files in `common/build-helper` to be +sourced and its variables be made available on the template. i.e. `build_helper="rust"`. + +- `configure_script` The name of the `configure` script to execute at the `configure` phase if +`${build_style}` is set to `configure` or `gnu-configure` build methods. +By default set to `./configure`. + +- `configure_args` The arguments to be passed in to the `configure` script if `${build_style}` +is set to `configure` or `gnu-configure` build methods. By default, prefix +must be set to `/usr`. In `gnu-configure` packages, some options are already +set by default: `--prefix=/usr --sysconfdir=/etc --infodir=/usr/share/info --mandir=/usr/share/man --localstatedir=/var`. + +- `make_cmd` The executable to run at the `build` phase if `${build_style}` is set to +`configure`, `gnu-configure` or `gnu-makefile` build methods. +By default set to `make`. + +- `make_build_args` The arguments to be passed in to `${make_cmd}` at the build phase if +`${build_style}` is set to `configure`, `gnu-configure` or `gnu-makefile` +build methods. Unset by default. + +- `make_check_args` The arguments to be passed in to `${make_cmd}` at the check phase if +`${build_style}` is set to `configure`, `gnu-configure` or `gnu-makefile` +build methods. Unset by default. + +- `make_install_args` The arguments to be passed in to `${make_cmd}` at the `install-destdir` +phase if `${build_style}` is set to `configure`, `gnu-configure` or +`gnu-makefile` build methods. By default set to +`PREFIX=/usr DESTDIR=${DESTDIR}`. + +- `make_build_target` The target to be passed in to `${make_cmd}` at the build phase if +`${build_style}` is set to `configure`, `gnu-configure` or `gnu-makefile` +build methods. Unset by default (`all` target). + +- `make_check_target` The target to be passed in to `${make_cmd}` at the check phase if +`${build_style}` is set to `configure`, `gnu-configure` or `gnu-makefile` +build methods. By default set to `check`. + +- `make_install_target` The target to be passed in to `${make_cmd}` at the `install-destdir` phase +if `${build_style}` is set to `configure`, `gnu-configure` or `gnu-makefile` +build methods. By default set to `install`. + +- `patch_args` The arguments to be passed in to the `patch(1)` command when applying +patches to the package sources during `do_patch()`. Patches are stored in +`srcpkgs/<pkgname>/patches` and must be in `-p0` format. By default set to `-Np0`. + +- `disable_parallel_build` If set the package won't be built in parallel +and `XBPS_MAKEJOBS` has no effect. + +- `keep_libtool_archives` If enabled the `GNU Libtool` archives won't be removed. By default those +files are always removed automatically. + +- `skip_extraction` A list of filenames that should not be extracted in the `extract` phase. +This must match the basename of any url defined in `${distfiles}`. +Example: `skip_extraction="foo-${version}.tar.gz"`. + +- `nodebug` If enabled -dbg packages won't be generated even if `XBPS_DEBUG_PKGS` is set. + +- `conf_files` A list of configuration files the binary package owns; this expects full +paths, wildcards will be extended, and multiple entries can be separated by blanks. +Example: `conf_files="/etc/foo.conf /etc/foo2.conf /etc/foo/*.conf"`. + +- `mutable_files` A list of files the binary package owns, with the expectation + that those files will be changed. These act a lot like `conf_files` but + without the assumption that a human will edit them. + +- `make_dirs` A list of entries defining directories and permissions to be + created at install time. Each entry should be space separated, and will + itself contain spaces. `make_dirs="/dir 0750 user group"`. User and group and + mode are required on every line, even if they are `755 root root`. By + convention, there is only one entry of `dir perms user group` per line. + +- `repository` Defines the repository in which the package will be placed. See + *Repositories* for a list of valid repositories. + +- `nostrip` If set, the ELF binaries with debugging symbols won't be stripped. By +default all binaries are stripped. + +- `nostrip_files` White-space separated list of ELF binaries that won't be stripped of +debugging symbols. + +- `noshlibprovides` If set, the ELF binaries won't be inspected to collect the provided +sonames in shared libraries. + +- `noverifyrdeps` If set, the ELF binaries and shared libaries won't be inspected to collect +their reverse dependencies. You need to specify all dependencies in the `depends` when you +need to set this. + +- `skiprdeps` White space separated list of filenames specified by their absolute path in +the `$DESTDIR` which will not be scanned for runtime dependencies. This may be useful to +skip files which are not meant to be run or loaded on the host but are to be sent to some +target device or emulation. + +- `nocross` If set, cross compilation won't be allowed and will exit immediately. +This should be set to a string describing why it fails, or a link to a travis +buildlog demonstrating the failure. + +- `restricted` If set, xbps-src will refuse to build the package unless +`etc/conf` has `XBPS_ALLOW_RESTRICTED=yes`. The primary builders for Void +Linux do not have this setting, so the primary repositories will not have any +restricted package. This is useful for packages where the license forbids +redistribution. + +- `subpackages` A white space separated list of subpackages (matching `foo_package()`) +to override the guessed list. Only use this if a specific order of subpackages is required, +otherwise the default would work in most cases. + +- `broken` If set, building the package won't be allowed because its state is currently broken. +This should be set to a string describing why it is broken, or a link to a travis +buildlog demonstrating the failure. + +- `shlib_provides` A white space separated list of additional sonames the package provides on. +This appends to the generated file rather than replacing it. + +- `shlib_requires` A white space separated list of additional sonames the package requires. +This appends to the generated file rather than replacing it. + +- `nopie` Only needs to be set to something to make active, disables building the package with hardening + features (PIE, relro, etc). Not necessary for most packages. + +- `reverts` xbps supports a unique feature which allows to downgrade from broken +packages automatically. In the `reverts` field one can define a list of broken +pkgver the resulting package should revert. This field *must* be defined before +`version` and `revision` fields in order to work as expected. The versions +defined in `reverts` must be bigger than the one defined in `version`. +Example: + + ``` + reverts="2.0_1 2.0_2" + version=1.9 + revision=2 + ``` + +- `alternatives` A white space separated list of supported alternatives the package provides. +A list is composed of three components separated by a colon: group, symlink and target. +Example: `alternatives="vi:/usr/bin/vi:/usr/bin/nvi ex:/usr/bin/ex:/usr/bin/nvi-ex"`. + +- `font_dirs` A white space separated list of directories specified by an absolute path where a +font package installs its fonts. +It is used in the `x11-fonts` xbps-trigger to rebuild the font cache during install/removal +of the package. +Example: `font_dirs="/usr/share/fonts/TTF /usr/share/fonts/X11/misc"` + +- `dkms_modules` A white space separated list of Dynamic Kernel Module Support (dkms) modules +that will be installed and removed by the `dkms` xbps-trigger with the install/removal of the +package. +The format is a white space separated pair of strings that represent the name of the module, +most of the time `pkgname`, and the version of the module, most of the time `version`. +Example: `dkms_modules="$pkgname $version zfs 4.14"` + +- `register_shell` A white space separated list of shells defined by absolute path to be +registered into the system shells database. It is used by the `register-shell` trigger. +Example: `register_shell="/bin/tcsh /bin/csh"` + +- `tags` A white space separated list of tags (categories) that are registered into the +package metadata and can be queried with `xbps-query` by users. +Example for qutebrowser: `tags="browser chromium-based qt5 python3"` + +- `perl_configure_dirs` A white space separate list of directories relative to `wrksrc` +that contain Makefile.PL files that need to be processes for the package to work. It is +used in the perl-module build_style and has no use outside of it. +Example: `perl_configure_dirs="blob/bob foo/blah"` + +- `preserve` If set, files owned by the package in the system are not removed when +the package is updated, reinstalled or removed. This is mostly useful for kernel packages +that shouldn't remove the kernel files when they are removed in case it might break the +user's booting and module loading. Otherwise in the majority of cases it should not be +used. + +- `fetch_cmd` Executable to be used to fetch URLs in `distfiles` during the `do_fetch` phase. + +- `archs` Whitespace separated list of architectures that a package can be +built for, available architectures can be found under `common/cross-profiles` +alongside the `noarch` value for packages that do not contain any machine code. +Examples: + + ``` + # Build package only for musl architectures + archs="*-musl" + # Build package for x86_64-musl and any non-musl architecture + archs="x86_64-musl ~*-musl" + # Default value (all arches) + archs="*" + # Packages that do not depend on architecture-specific objects + archs=noarch + ``` + +<a id="explain_depends"></a> +#### About the many types of `depends` variable. + +So far we have listed four types of `depends`, there are `hostmakedepends`, +`makedepends`, `checkdepends` and plain old `depends`.To understand the difference +between them, understand this: Void Linux cross compiles for many arches. +Sometimes in a build process, certain programs must be run, for example `yacc`, or the +compiler itself for a C program. Those programs get put in `hostmakedepends`. +When the build runs, those will be installed on the host to help the build +complete. + +Then there are those things for which a package either links against or +includes header files. These are `makedepends`, and regardless of the +architecture of the build machine, the architecture of the target machine must +be used. Typically the `makedepends` will be the only one of the three types of +`depends` to include `-devel` packages, and typically only `-devel` packages. + +Then there are those things that are required for a package to run its testsuite +`dejagnu` or libraries it must link to when building test binaries like `cmocka`. +These are `checkdepends` and they are installed like they are part of `makedepends`. +the difference is that they are only installed when `XBPS_CHECK_PKGS` is defined. + +The final variable, `depends`, is for those things the package needs at +runtime and without which is unusable, and that xbps can't auto-detect. +These are not all the packages the package needs at runtime, but only those +that are not linked against. This variable is most useful for non-compiled +programs. + +Finally, as a general rule, if something compiles the exact same way whether or +not you add a particular package to `makedepends` or `hostmakedepends`, it +shouldn't be added. + +<a id="repositories"></a> +#### Repositories + +<a id="repo_by_branch"></a> +##### Repositories defined by Branch + +The global repository takes the name of +the current branch, except if the name of the branch is master. Then the resulting +repository will be at the global scope. The usage scenario is that the user can +update multiple packages in a second branch without polluting his local repository. + +<a id="pkg_defined_repo"></a> +##### Package defined Repositories + +The second way to define a repository is by setting the `repository` variable in +a template. This way the maintainer can define repositories for a specific +package or a group of packages. This is currently used to distinguish between +closed source packages, which are put in the `nonfree` repository and other +packages which are at the root-repository. + +The following repository names are valid: + +* `nonfree`: Repository for closed source packages. + +<a id="updates"></a> +### Checking for new upstream releases + +New upstream versions can be automatically checked using +`./xbps-src update-check <pkgname>`. In some cases you need to override +the sensible defaults by assigning the following variables in a `update` +file in the same directory as the relevant `template` file: + +- `site` contains the URL where the version number is + mentioned. If unset, defaults to `homepage` and the directories where +`distfiles` reside. + +- `pkgname` is the package name the default pattern checks for. +If unset, defaults to `pkgname` from the template. + +- `pattern` is a perl-compatible regular expression +matching the version number. Anchor the version number using `\K` +and `(?=...)`. Example: `pattern='<b>\K[\d.]+(?=</b>)'`, this +matches a version number enclosed in `<b>...</b>` tags. + +- `ignore` is a space-separated list of shell globs that match +version numbers which are not taken into account for checking newer +versions. Example: `ignore="*b*"` + +- `version` is the version number used to compare against +upstream versions. Example: `version=${version//./_}` + +- `single_directory` can be set to disable +detecting directory containing one version of sources in url, +then searching new version in adjacent directories. + +- `vdprefix` is a perl-compatible regular expression matching +part that precedes numeric part of version directory +in url. Defaults to `(|v|$pkgname)[-_.]*`. + +- `vdsuffix` is a perl-compatible regular expression matching +part that follows numeric part of version directory +in url. Defaults to `(|\.x)`. + +<a id="patches"></a> +### Handling patches + +Sometimes software needs to be patched, most commonly to fix bugs that have +been found or to fix compilation with new software. + +To handle this, xbps-src has patching functionality. It will look for all files +that match the glob `srcpkgs/$pkgname/patches/*.{diff,patch}` and will +automatically apply all files it finds using `patch(1)` with `-Np0`. This happens +during the `do_patch()` phase. The variable `PATCHESDIR` is +available in the template, pointing to the `patches` directory. + +The patching behaviour can be changed in the following ways: + +- A file called `series` can be created in the `patches` directory with a newline +separated list of patches to be applied in the order presented. When present +xbps-src will only apply patches named in the `series` file. + +- A file with the same name as one of the patches but with `.args` as extension can +be used to set the args passed to `patch(1)`. As an example, if `foo.patch` requires +special arguments to be passed to `patch(1)` that can't be used when applying other +patches, `foo.patch.args` can be created containing those args. + +<a id="build_scripts"></a> +### build style scripts + +The `build_style` variable specifies the build method to build and install a +package. It expects the name of any available script in the +`void-packages/common/build-style` directory. Please note that required packages +to execute a `build_style` script must be defined via `$hostmakedepends`. + +The current list of available `build_style` scripts is the following: + +- If `build_style` is not set, the template must (at least) define +`do_install()` function and optionally more build phases such as +`do_configure()`, `do_build()`, etc., and may overwrite default `do_fetch()` and +`do_extract()` that fetch and extract files defined in `distfiles` variable. + +- `cargo` For packages written in rust that use Cargo for building. +Configuration arguments (such as `--features`) can be defined in the variable +`configure_args` and are passed to cargo during `do_build`. + +- `cmake` For packages that use the CMake build system, configuration arguments +can be passed in via `configure_args`. The `cmake_builddir` variable may be +defined to specify the directory for building under `build_wrksrc` instead of +the default `build`. + +- `configure` For packages that use non-GNU configure scripts, at least `--prefix=/usr` +should be passed in via `configure_args`. + +- `fetch` For packages that only fetch files and are installed as is via `do_install()`. + +- `gnu-configure` For packages that use GNU configure scripts, additional configuration +arguments can be passed in via `configure_args`. + +- `gnu-makefile` For packages that use GNU make, build arguments can be passed in via +`make_build_args` and install arguments via `make_install_args`. The build +target can be overridden via `make_build_target` and the install target +via `make_install_target`. This build style tries to compensate for makefiles +that do not respect environment variables, so well written makefiles, those +that do such things as append (`+=`) to variables, should have `make_use_env` +set in the body of the template. + +- `go` For programs written in Go that follow the standard package + structure. The variable `go_import_path` must be set to the package's + import path, e.g. `github.com/github/hub` for the `hub` program. If + the variable `go_get` is set to `yes`, the package will be + downloaded with `go get`. Otherwise (the default) it's expected that + the distfile contains the package. In both cases, dependencies will + be downloaded with `go get`. + +- `meta` For `meta-packages`, i.e packages that only install local files or simply +depend on additional packages. This build style does not install +dependencies to the root directory, and only checks if a binary package is +available in repositories. + +- `R-cran` For packages that are available on The Comprehensive R Archive +Network (CRAN). The build style requires the `pkgname` to start with +`R-cran-` and any dashes (`-`) in the CRAN-given version to be replaced +with the character `r` in the `version` variable. The `distfiles` +location will automatically be set as well as the package made to depend +on `R`. + +- `gemspec` For packages that use +[gemspec](https://guides.rubygems.org/specification-reference/) files for building a ruby +gem and then installing it. The gem command can be overridden by `gem_cmd`. `configure_args` +can be used to pass arguments during compilation. If your package does not make use of compiled +extensions consider using the `gem` build style instead. + +- `gem` For packages that are installed using gems from [RubyGems](https://rubygems.org/). +The gem command can be overridden by `gem_cmd`. `archs` is set to `noarch` unconditionally +and `distfiles` is set by the build style if the template does not do so. If your gem +provides extensions which must be compiled consider using the `gemspec` build style instead. + +- `ruby-module` For packages that are ruby modules and are installable via `ruby install.rb`. +Additional install arguments can be specified via `make_install_args`. + +- `perl-ModuleBuild` For packages that use the Perl +[Module::Build](https://metacpan.org/pod/Module::Build) method. + +- `perl-module` For packages that use the Perl +[ExtUtils::MakeMaker](http://perldoc.perl.org/ExtUtils/MakeMaker.html) build method. + +- `raku-dist` For packages that use the Raku `raku-install-dist` build method with rakudo. + +- `waf3` For packages that use the Python3 `waf` build method with python3. + +- `waf` For packages that use the Python `waf` method with python2. + +- `slashpackage` For packages that use the /package hierarchy and package/compile to build, +such as `daemontools` or any `djb` software. + +- `qmake` For packages that use Qt4/Qt5 qmake profiles (`*.pro`), qmake arguments +for the configure phase can be passed in via `configure_args`, make build arguments can +be passed in via `make_build_args` and install arguments via `make_install_args`. The build +target can be overridden via `make_build_target` and the install target +via `make_install_target`. + +- `meson` For packages that use the Meson Build system, configuration options can be passed +via `configure_args`, the meson command can be overridden by `meson_cmd` and the location of +the out of source build by `meson_builddir` + +For packages that use the Python module build method (`setup.py`), you +can choose one of the following: + +- `python-module` to build *both* Python 2.x and 3.x modules + +- `python2-module` to build Python 2.x only modules + +- `python3-module` to build Python 3.x only modules + +Environment variables for a specific `build_style` can be declared in a filename +matching the `build_style` name, Example: + + `common/environment/build-style/gnu-configure.sh` + +- `texmf` For texmf zip/tarballs that need to go into /usr/share/texmf-dist. Includes +duplicates handling. + +<a id="build_helper"></a> +### build helper scripts + +The `build_helper` variable specifies shell snippets to be sourced that will create a +suitable environment for working with certain sets of packages. + +The current list of available `build_helper` scripts is the following: + +- `rust` specifies environment variables required for cross-compiling crates via cargo and +for compiling cargo -sys crates. + +- `gir` specifies dependencies for native and cross builds to deal with +GObject Introspection. The following variables may be set in the template to handle +cross builds which require additional hinting or exhibit problems. `GIR_EXTRA_LIBS_PATH` defines +additional paths to be searched when linking target binaries to be introspected. +`GIR_EXTRA_OPTIONS` defines additional options for the `g-ir-scanner-qemuwrapper` calling +`qemu-<target_arch>-static` when running the target binary. You can for example specify +`GIR_EXTRA_OPTIONS="-strace"` to see a trace of what happens when running that binary. + +- `qemu` sets additional variables for the `cmake` and `meson` build styles to allow +executing cross-compiled binaries inside qemu. +It sets `CMAKE_CROSSCOMPILING_EMULATOR` for cmake and `exe_wrapper` for meson +to `qemu-<target_arch>-static` and `QEMU_LD_PREFIX` to `XBPS_CROSS_BASE` + +- `qmake` creates the `qt.conf` configuration file (cf. `qmake` `build_style`) +needed for cross builds and a qmake-wrapper to make `qmake` use this configuration. +This aims to fix cross-builds for when the build-style is mixed: e.g. when in a +`gnu-configure` style the configure script calls `qmake` or a `Makefile` in +`gnu-makefile` style, respectively. + +<a id="functions"></a> +### Functions + +The following functions can be defined to change the behavior of how the +package is downloaded, compiled and installed. + +- `pre_fetch()` Actions to execute before `do_fetch()`. + +- `do_fetch()` if defined and `distfiles` is not set, use it to fetch the required sources. + +- `post_fetch()` Actions to execute after `do_fetch()`. + +- `pre_extract()` Actions to execute after `post_fetch()`. + +- `do_extract()` if defined and `distfiles` is not set, use it to extract the required sources. + +- `post_extract()` Actions to execute after `do_extract()`. + +- `pre_patch()` Actions to execute after `post_extract()`. + +- `do_patch()` if defined use it to prepare the build environment and run hooks to apply patches. + +- `post_patch()` Actions to execute after `do_patch()`. + +- `pre_configure()` Actions to execute after `post_patch()`. + +- `do_configure()` Actions to execute to configure the package; `${configure_args}` should +still be passed in if it's a GNU configure script. + +- `post_configure()` Actions to execute after `do_configure()`. + +- `pre_build()` Actions to execute after `post_configure()`. + +- `do_build()` Actions to execute to build the package. + +- `post_build()` Actions to execute after `do_build()`. + +- `pre_install()` Actions to execute after `post_build()`. + +- `do_install()` Actions to execute to install the package files into the `fake destdir`. + +- `post_install()` Actions to execute after `do_install()`. + +- `do_clean()` Actions to execute to clean up after a successful package phase. + +> A function defined in a template has preference over the same function +defined by a `build_style` script. + +Current working directory for functions is set as follows: + +- For pre_fetch, pre_extract, do_clean: `<masterdir>`. + +- For do_fetch, post_fetch: `XBPS_BUILDDIR`. + +- For do_extract, post_extract, pre_patch, do_patch, post_patch: `wrksrc`. + +- For pre_configure through post_install: `build_wrksrc` +if it is defined, otherwise `wrksrc`. + +<a id="build_options"></a> +### Build options + +Some packages might be built with different build options to enable/disable +additional features; The XBPS source packages collection allows you to do this with some simple tweaks +to the `template` file. + +The following variables may be set to allow package build options: + +- `build_options` Sets the build options supported by the source package. + +- `build_options_default` Sets the default build options to be used by the source package. + +- `desc_option_<option>` Sets the description for the build option `option`. This must match the +keyword set in *build_options*. Note that if the build option is generic enough, its description +should be added to `common/options.description` instead. + +After defining those required variables, you can check for the +`build_option_<option>` variable to know if it has been set and adapt the source +package accordingly. Additionally, the following functions are available: + +- *vopt_if()* `vopt_if <option> <if_true> [<if_false>]` + + Outputs `if_true` if `option` is set, or `if_false` if it isn't set. + +- *vopt_with()* `vopt_with <option> [<flag>]` + + Outputs `--with-<flag>` if the option is set, or `--without-<flag>` + otherwise. If `flag` isn't set, it defaults to `option`. + + Examples: + + - `vopt_with dbus` + - `vopt_with xml xml2` + +- *vopt_enable()* `vopt_enable <option> [<flag>]` + + Same as `vopt_with`, but uses `--enable-<flag>` and + `--disable-<flag>` respectively. + +- *vopt_conflict()* `vopt_conflict <option 1> <option 2>` + + Emits an error and exits if both options are set at the same time. + +- *vopt_bool()* `vopt_bool <option> <property>` + + Outputs `-D<property>=true` if the option is set, or + `-D<property>=false` otherwise. + +The following example shows how to change a source package that uses GNU +configure to enable a new build option to support PNG images: + +``` +# Template file for 'foo' +pkgname=foo +version=1.0 +revision=1 +build_style=gnu-configure +configure_args="... $(vopt_with png)" +makedepends="... $(vopt_if png libpng-devel)" +... + +# Package build options +build_options="png" +desc_option_png="Enable support for PNG images" + +# To build the package by default with the `png` option: +# +# build_options_default="png" + +... + +``` + +The supported build options for a source package can be shown with `xbps-src`: + + $ ./xbps-src show-options foo + +Build options can be enabled with the `-o` flag of `xbps-src`: + + $ ./xbps-src -o option,option1 <cmd> foo + +Build options can be disabled by prefixing them with `~`: + + $ ./xbps-src -o ~option,~option1 <cmd> foo + +Both ways can be used together to enable and/or disable multiple options +at the same time with `xbps-src`: + + $ ./xbps-src -o option,~option1,~option2 <cmd> foo + +The build options can also be shown for binary packages via `xbps-query(8)`: + + $ xbps-query -R --property=build-options foo + +Permanent global package build options can be set via `XBPS_PKG_OPTIONS` variable in the +`etc/conf` configuration file. Per package build options can be set via +`XBPS_PKG_OPTIONS_<pkgname>`. + +> NOTE: if `pkgname` contains `dashes`, those should be replaced by `underscores` +Example: `XBPS_PKG_OPTIONS_xorg_server=opt`. + +The list of supported package build options and its description is defined in the +`common/options.description` file. + +<a id="deps_runtime"></a> +#### Runtime dependencies + +Dependencies for ELF objects are detected automatically by `xbps-src`, hence runtime +dependencies must not be specified in templates via `$depends` with the following exceptions: + +- ELF objects using dlopen(3). +- non ELF objects, i.e perl/python/ruby/etc modules. +- Overriding the minimal version specified in the `shlibs` file. + +The runtime dependencies for ELF objects are detected by checking which SONAMEs +they require and then the SONAMEs are mapped to a binary package name with a minimal +required version. The `shlibs` file in the `void-packages/common` directory +sets up the `<SONAME> <pkgname>>=<version>` mappings. + +For example the `foo-1.0_1` package provides the `libfoo.so.1` SONAME and +software requiring this library will link to `libfoo`; the resulting binary +package will have a run-time dependency to `foo>=1.0_1` package as specified in +`common/shlibs`: + +``` +# common/shlibs +... +libfoo.so.1 foo-1.0_1 +... +``` + +- The first field specifies the SONAME. +- The second field specified the package name and minimal version required. +- A third optional field (usually set to `ignore`) can be used to skip checks in soname bumps. + +Dependencies declared via `${depends}` are not installed to the master directory, rather are +only checked if they exist as binary packages, and are built automatically by `xbps-src` if +the specified version is not in the local repository. + +As a special case, `virtual` dependencies may be specified as runtime dependencies in the +`${depends}` template variable. Several different packages can provide common functionality by +declaring a virtual name and version in the `${provides}` template variable (e.g., +`provides="vpkg-0.1_1"`). Packages that rely on the common functionality without concern for the +specific provider can declare a dependency on the virtual package name with the prefix `virtual?` +(e.g., `depends="virtual?vpkg-0.1_1"`). When a package is built by `xbps-src`, providers for any +virtual packages will be confirmed to exist and will be built if necessary. A map from virtual +packages to their default providers is defined in `etc/default.virtual`. Individual mappings can be +overridden by local preferences in `etc/virtual`. Comments in `etc/default.virtual` provide more +information on this map. + +<a id="install_remove_files"></a> +### INSTALL and REMOVE files + +The INSTALL and REMOVE shell snippets can be used to execute certain actions at a specified +stage when a binary package is installed, updated or removed. There are some variables +that are always set by `xbps` when the scripts are executed: + +- `$ACTION`: to conditionalize its actions: `pre` or `post`. +- `$PKGNAME`: the package name. +- `$VERSION`: the package version. +- `$UPDATE`: set to `yes` if package is being upgraded, `no` if package is being `installed` or `removed`. +- `$CONF_FILE`: full path to `xbps.conf`. +- `$ARCH`: the target architecture it is running on. + +An example of how an `INSTALL` or `REMOVE` script shall be created is shown below: + +``` +# INSTALL +case "$ACTION" in +pre) + # Actions to execute before the package files are unpacked. + ... + ;; +post) + if [ "$UPDATE" = "yes" ]; then + # actions to execute if package is being updated. + ... + else + # actions to execute if package is being installed. + ... + fi + ;; +esac +``` + +subpackages can also have their own `INSTALL` and `REMOVE` files, simply create them +as `srcpkgs/<pkgname>/<subpkg>.INSTALL` or `srcpkgs/<pkgname>/<subpkg>.REMOVE` respectively. + +> NOTE: always use paths relative to the current working directory, otherwise if the scripts cannot +be executed via `chroot(2)` won't work correctly. + +> NOTE: do not use INSTALL/REMOVE scripts to print messages, see the next section for +more information. + +<a id="install_remove_files_msg"></a> +### INSTALL.msg and REMOVE.msg files + +The `INSTALL.msg` and `REMOVE.msg` files can be used to print a message at post-install +or pre-remove time, respectively. + +Ideally those files should not exceed 80 chars per line. + +subpackages can also have their own `INSTALL.msg` and `REMOVE.msg` files, simply create them +as `srcpkgs/<pkgname>/<subpkg>.INSTALL.msg` or `srcpkgs/<pkgname>/<subpkg>.REMOVE.msg` respectively. + +<a id="runtime_account_creation"></a> +### Creating system accounts/groups at runtime + +There's a trigger along with some variables that are specifically to create +**system users and groups** when the binary package is being configured. +The following variables can be used for this purpose: + +- `system_groups` This specifies the names of the new *system groups* to be created, separated +by blanks. Optionally the **gid** can be specified by delimiting it with a +colon, i.e `system_groups="mygroup:78"` or `system_groups="foo blah:8000"`. + +- `system_accounts` This specifies the names of the new **system users/groups** to be created, +separated by blanks, i.e `system_accounts="_foo _blah:22"`. Optionally the **uid** and **gid** +can be specified by delimiting it with a colon, i.e `system_accounts="_foo:48"`. +Additional variables for the **system accounts** can be specified to change its behavior: + + - `<account>_homedir` the home directory for the user. If unset defaults to `/var/empty`. + - `<account>_shell` the shell for the new user. If unset defaults to `/sbin/nologin`. + - `<account>_descr` the description for the new user. If unset defaults to `<account> unprivileged user`. + - `<account>_groups` additional groups to be added to for the new user. + - `<account>_pgroup` to set the primary group, by default primary group is set to `<account>`. + +The **system user** is created by using a dynamically allocated **uid/gid** in your system +and it's created as a `system account`, unless the **uid** is set. A new group will be created for the +specified `system account` and used exclusively for this purpose. + +System accounts must be prefixed with an underscore to prevent clashing with names of user +accounts. + +> NOTE: The underscore policy does not apply to old packages, due to the inevitable breakage of +> changing the username only new packages should follow it. + +<a id="writing_runit_services"></a> +### Writing runit services + +Void Linux uses [runit](http://smarden.org/runit/) for booting and supervision of services. + +Most information about how to write them can be found in their +[FAQ](http://smarden.org/runit/faq.html#create). The following are guidelines specific to +Void Linux on how to write services. + +If the service daemon supports CLI flags, consider adding support for changing it via the +`OPTS` variable by reading a file called `conf` in the same directory as the daemon. + +```sh +#!/bin/sh +[ -r conf ] && . ./conf +exec daemon ${OPTS:- --flag-enabled-by-default} +``` + +If the service requires the creation of a directory under `/run` or its link `/var/run` +for storing runtime information (like Pidfiles) write it into the service file. It +is advised to use `install` if you need to create it with specific permissions instead +of `mkdir -p`. + +```sh +#!/bin/sh +install -d -m0700 /run/foo +exec foo +``` + +```sh +#!/bin/sh +install -d -m0700 -o bar -g bar /run/bar +exec bar +``` + +If the service requires directories in parts of the system that are not generally in +temporary filesystems. Then use the `make_dirs` variable in the template to create +those directories when the package is installed. + +<a id="32bit_pkgs"></a> +### 32bit packages + +32bit packages are built automatically when the builder is x86 (32bit), but +there are some variables that can change the behavior: + +- `lib32depends` If this variable is set, dependencies listed here will be used rather than +those detected automatically by `xbps-src` and **depends**. Please note that +dependencies must be specified with version comparators, Example: +`lib32depends="foo>=0 blah<2.0"`. + +- `lib32disabled` If this variable is set, no 32bit package will be built. + +- `lib32files` Additional files to be added to the **32bit** package. This expect absolute +paths separated by blanks, Example: `lib32files="/usr/bin/blah /usr/include/blah."`. + +- `lib32symlinks` Makes a symlink of the target filename stored in the `lib32` directory. +This expects the basename of the target file, Example: `lib32symlinks="foo"`. + +- `lib32mode` If unset, only shared/static libraries and pkg-config files will be copied to the +**32bit** package. If set to `full` all files will be copied to the 32bit package, unmodified. + +<a id="pkgs_sub"></a> +### Subpackages + +In the example shown above just a binary package is generated, but with some +simple tweaks multiple binary packages can be generated from a single +template/build, this is called `subpackages`. + +To create additional `subpackages` the `template` must define a new function +with this naming: `<subpkgname>_package()`, Example: + +``` +# Template file for 'foo' +pkgname=foo +version=1.0 +revision=1 +build_style=gnu-configure +short_desc="A short description max 72 chars" +maintainer="name <email>" +license="GPL-3.0-or-later" +homepage="http://www.foo.org" +distfiles="http://www.foo.org/foo-${version}.tar.gz" +checksum="fea0a94d4b605894f3e2d5572e3f96e4413bcad3a085aae7367c2cf07908b2ff" + +# foo-devel is a subpkg +foo-devel_package() { + short_desc+=" - development files" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/include + vmove "usr/lib/*.a" + vmove "usr/lib/*.so" + vmove usr/lib/pkgconfig + } +} +``` + +All subpackages need an additional symlink to the `main` pkg, otherwise dependencies +requiring those packages won't find its `template` Example: + +``` + /srcpkgs + |- foo <- directory (main pkg) + | |- template + |- foo-devel <- symlink to `foo` +``` + +The main package should specify all required `build dependencies` to be able to build +all subpackages defined in the template. + +An important point of `subpackages` is that they are processed after the main +package has run its `install` phase. The `pkg_install()` function specified on them +commonly is used to move files from the `main` package destdir to the `subpackage` destdir. + +The helper functions `vinstall`, `vmkdir`, `vcopy` and `vmove` are just wrappers that simplify +the process of creating, copying and moving files/directories between the `main` package +destdir (`$DESTDIR`) to the `subpackage` destdir (`$PKGDESTDIR`). + +Subpackages are processed always in alphabetical order; To force a custom order, +the `subpackages` variable can be declared with the wanted order. + +<a id="pkgs_development"></a> +### Development packages + +A development package, commonly generated as a subpackage, shall only contain +files required for development, that is, headers, static libraries, shared +library symlinks, pkg-config files, API documentation or any other script +that is only useful when developing for the target software. + +A development package should depend on packages that are required to link +against the provided shared libraries, i.e if `libfoo` provides the +`libfoo.so.2` shared library and the linking needs `-lbar`, the package +providing the `libbar` shared library should be added as a dependency; +and most likely it shall depend on its development package. + +If a development package provides a `pkg-config` file, you should verify +what dependencies the package needs for dynamic or static linking, and add +the appropriate `development` packages as dependencies. + +Development packages for the C and C++ languages usually `vmove` the +following subset of files from the main package: + +* Header files `usr/include` +* Static libraries `usr/lib/*.a` +* Shared library symbolic links `usr/lib/*.so` +* Cmake rules `usr/lib/cmake` `usr/share/cmake` +* Package config files `usr/lib/pkgconfig` `usr/share/pkgconfig` +* Autoconf macros `usr/share/aclocal` +* Gobject introspection XML files `usr/share/gir-1.0` +* Vala bindings `usr/share/vala` + +<a id="pkgs_data"></a> +### Data packages + +Another common subpackage type is the `-data` subpackage. This subpackage +type used to split architecture independent, big(ger) or huge amounts +of data from a package's main and architecture dependent part. It is up +to you to decide, if a `-data` subpackage makes sense for your package. +This type is common for games (graphics, sound and music), part libraries (CAD) +or card material (maps). Data subpackages are almost always `archs=noarch`. +The main package must then have `depends="${pkgname}-data-${version}_${revision}"`, +possibly in addition to other, non-automatic depends. + +<a id="pkgs_documentation"></a> +### Documentation packages + +Packages intended for user interaction do not always unconditionally require +their documentation part. A user who does not want to e.g. develop +with Qt5 will not need to install the (huge) qt5-doc package. +An expert may not need it or opt to use an online version. + +In general a `-doc` package is useful, if the main package can be used both with +or without documentation and the size of the documentation isn't really small. +The base package and the `-devel` subpackage should be kept small so that when +building packages depending on a specific package there is no need to install large +amounts of documentation for no reason. Thus the size of the documentation part should +be your guidance to decide whether or not to split off a `-doc` subpackage. + +<a id="pkgs_python"></a> +### Python packages + +Python packages should be built with the `python{,2,3}-module` build style, if possible. +This sets some environment variables required to allow cross compilation. Support to allow +building a python module for multiple versions from a single template is also possible. + +Python packages that rely on `python3-setuptools` should generally map `setup_requires` +dependencies in `setup.py` to `hostmakedepends` in the template and `install_requires` +dependencies to `depends` in the template; include `python3` in `depends` if there are no other +python dependencies. If the package includes a compiled extension, the `python3-devel` packages +should be added to `makedepends`, as should any python packages that also provide native libraries +against which the extension will be linked (even if that package is also included in +`hostmakedepends` to satisfy `setuptools`). + +**NB**: Python `setuptools` will attempt to use `pip` or `EasyInstall` to fetch any missing +dependencies at build time. If you notice warnings about `EasyInstall` deprecation or python eggs +present in `${wrksrc}/.eggs` after building the package, then those packages should be added to +`hostmakedepends`. + +The following variables may influence how the python packages are built and configured +at post-install time: + +- `pycompile_module`: By default, files and directories installed into +`usr/lib/pythonX.X/site-packages`, excluding `*-info` and `*.so`, are byte-compiled +at install time as python modules. This variable expects subset of them that +should be byte-compiled, if default is wrong. Multiple python modules may be specified separated +by blanks, Example: `pycompile_module="foo blah"`. If a python module installs a file into +`site-packages` rather than a directory, use the name of the file, Example: +`pycompile_module="fnord.py"`. + +- `pycompile_dirs`: this variable expects the python directories that should be `byte-compiled` +recursively by the target python version. This differs from `pycompile_module` in that any +path may be specified, Example: `pycompile_dirs="usr/share/foo"`. + +- `python_version`: this variable expects the supported Python major version. +By default it's set to `2`. This variable is needed for multi-language +applications (e.g., the application is written in C while the command is +written in Python) or just single Python file ones that live in `/usr/bin`. + +> NOTE: you need to define it *only* for non-Python modules. + +Also, a set of useful variables are defined to use in the templates: + +| Variable | Value | +|-------------|----------------------------------| +| py2_ver | 2.X | +| py2_lib | usr/lib/python2.X | +| py2_sitelib | usr/lib/python2.X/site-packages | +| py2_inc | usr/include/python2.X | +| py3_ver | 3.X | +| py3_lib | usr/lib/python3.X | +| py3_sitelib | usr/lib/python3.X/site-packages | +| py3_inc | usr/include/python3.Xm | + +> NOTE: it's expected that additional subpkgs must be generated to allow packaging for multiple +python versions. + +<a id="pkgs_go"></a> +### Go packages + +Go packages should be built with the `go` build style, if possible. +The `go` build style takes care of downloading Go dependencies and +setting up cross compilation. + +The following template variables influence how Go packages are built: + +- `go_import_path`: The import path of the package included in the + distfile, as it would be used with `go get`. For example, GitHub's + `hub` program has the import path `github.com/github/hub`. This + variable is required. +- `go_package`: A space-separated list of import paths of the packages + that should be built. Defaults to `go_import_path`. +- `go_get`: If set to yes, the package specified via `go_import_path` + will be downloaded with `go get`. Otherwise, a distfile has to be + provided. This option should only be used with `-git` (or similar) + packages; using a versioned distfile is preferred. +- `go_build_tags`: An optional, space-separated list of build tags to + pass to Go. +- `go_mod_mode`: The module download mode to use. May be `off` to ignore + any go.mod files, `default` to use Go's default behavior, or anything + accepted by `go build -mod MODE`. Defaults to `vendor` if there's + a vendor directory, otherwise `default`. + +The following environment variables influence how Go packages are built: + +- `XBPS_MAKEJOBS`: Value passed to the `-p` flag of `go install`, to + control the parallelism of the Go compiler. + +Occasionally it is necessary to perform operations from within the Go +source tree. This is usually needed by programs using go-bindata or +otherwise preping some assets. If possible do this in pre_build(). +The path to the package's source inside `$GOPATH` is available as +`$GOSRCPATH`. + +<a id="pkgs_haskell"></a> +### Haskell packages + +We build Haskell package using `stack` from +[Stackage](http://www.stackage.org/), generally the LTS versions. +Haskell templates need to have host dependencies on `ghc` and `stack`, +and set build style to `haskell-stack`. + +The following variables influence how Haskell packages are built: + +- `stackage`: The Stackage version used to build the package, e.g. + `lts-3.5`. Alternatively: + - You can prepare a `stack.yaml` configuration for the project and put it + into `files/stack.yaml`. + - If a `stack.yaml` file is present in the source files, it will be used +- `make_build_args`: This is passed as-is to `stack build ...`, so + you can add your `--flag ...` parameters there. + +<a id="pkgs_font"></a> +### Font packages + +Font packages are very straightforward to write, they are always set with the +following variables: + +- `archs=noarch`: Font packages don't install arch specific files. +- `depends="font-util"`: because they are required for regenerating the font +cache during the install/removal of the package +- `font_dirs`: which should be set to the directory where the package +installs its fonts + +<a id="pkg_remove"></a> +### Removing a package + +Follows a list of things that should be done to help guarantee that a +package template removal and by extension its binary packages from +Void Linux's repositories goes smoothly. + +Before removing a package template: + +- Guarantee that no package depends on it or any of its subpackages. +For that you can search the templates for references to the package +with `grep -r '\bpkg\b' srcpkgs/`. +- Guarantee that no package depends on shlibs provided by it. + +When removing the package template: + +- Remove all symlinks that point to the package. +`find srcpkgs/ -lname <pkg>` should be enough. +- If the package provides shlibs make sure to remove them from +common/shlibs. +- Some packages use patches and files from other packages using symlinks, +generally those packages are the same but have been split as to avoid +cyclic dependencies. Make sure that the package you're removing is not +the source of those patches/files. +- Remove package template. +- Remove the package from the repository index +or contact a team member that can do so. + +<a id="xbps_triggers"></a> +### XBPS Triggers + +XBPS triggers are a collection of snippets of code, provided by the `xbps-triggers` +package, that are added to the INSTALL/REMOVE scripts of packages either manually +by setting the `triggers` variable in the template, or automatically, when specific +conditions are met. + +The following is a list of all available triggers, their current status, what each +of them does and what conditions need to be for it to be included automatically on a +package. + +This is not a complete overview of the package. It is recommended to read the variables +referenced and the triggers themselves. + +<a id="triggers_appstream_cache"></a> +#### appstream-cache + +The appstream-cache trigger is responsible for rebuilding the appstream metadata cache. + +During installation it executes `appstreamcli refresh-cache --verbose --force --datapath +$APPSTREAM_PATHS --cachepath var/cache/app-info/gv`. By default APPSTREAM_PATHS are all the +paths that appstreamcli will look into for metadata files. + +The directories searched by appstreamcli are: + +- `usr/share/appdata` +- `usr/share/app-info` +- `var/lib/app-info` +- `var/cache/app-info` + +During removal of the `AppStream` package it will remove the `var/cache/app-info/gv` +directory. + +It is automatically added to packages that have XML files under one of the directories +searched by appstreamcli. + +<a id="triggers_binfmts"></a> +#### binfmts + +The binfmts trigger is responsible for registration and removal of arbitrary +executable binary formats, know as binfmts. + +During installation/removal it uses `update-binfmts` from the `binfmt-support` package +to register/remove entries from the arbitrary executable binary formats database. + +To include the trigger use the `binfmts` variable, as the trigger won't do anything unless +it is defined. + +<a id="triggers_dkms"></a> +#### dkms + +The dkms trigger is responsible for compiling and removing dynamic kernel modules of a +package. + +During installation the trigger compiles and installs the dynamic module for all `linux` +packages that have their corresponding linux-headers package installed. During removal +the corresponding module will be removed + +To include the trigger use the `dkms_modules` variable, as the trigger won't do anything +unless it is defined. + +<a id="triggers_gconf_schemas"></a> +#### gconf-schemas + +The gconf-schemas trigger is responsible for registering and removing .schemas and +.entries files into the schemas database directory + +During installation it uses `gconftool-2` to install .schemas and .entries files into +`usr/share/gconf/schemas`. During removal it uses `gconftool-2` to remove the entries +and schemas belonging to the package that is being removed from the database. + +To include it add `gconf-schemas` to `triggers` and add the appropriate .schemas in +the `gconf_schemas` variable and .entries in `gconf_entries`. + +It is automatically added to packages that have `/usr/share/gconf/schemas` present +as a directory. All files with the schemas file extension under that directory +are passed to the trigger. + +<a id="triggers_gdk_pixbuf_loaders"></a> +#### gdk-pixbuf-loaders + +The gdk-pixbuf-loaders trigger is responsible for maintaining the GDK Pixbuf loaders cache. + +During installation it runs `gdk-pixbuf-query-loaders --update-cache` and also deletes +the obsolete `etc/gtk-2.0/gdk-pixbuf.loaders` file if present. During removal of the +gdk-pixbuf package it removes the cache file if present. Normally at +`usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache`. + +It can be added by defining `gdk-pixbuf-loaders` in the `triggers` variable. It is also +added automatically to any package that has the path `usr/lib/gdk-pixbuf-2.0/2.10.0/loaders` +available as a directory. + +<a id="triggers_gio_modules"></a> +#### gio-modules + +The gio-modules trigger is responsible for updating the Glib GIO module cache with +`gio-querymodules` from the `glib` package + +During install and removal it just runs `gio-querymodules` to update the cache file +present under `usr/lib/gio/modules`. + +It is automatically added to packages that have `/usr/lib/gio/modules` present +as a directory. + +<a id="triggers_gsettings_schemas"></a> +#### gsettings-schemas + +The gsettings-schemas trigger is responsible for compiling Glib's GSettings XML +schema files during installation and removing the compiled files during removal. + +During installation it uses `glib-compile-schemas` from `glib` to compile the +schemas into files with the suffix .compiled into `/usr/share/glib-2.0/schemas`. + +During removal of the glib package it deletes all files inside +`/usr/share/glib-2.0/schemas` that end with .compiled. + +It is automatically added to packages that have `/usr/share/glib-2.0/schemas` present +as a directory. + +<a id="triggers_gtk_icon_cache"></a> +#### gtk-icon-cache + +The gtk-icon-cache trigger is responsible for updating the gtk+ icon cache. + +During installation it uses `gtk-update-icon-cache` to update the icon cache. + +During removal of the gtk+ package it deletes the `icon-theme.cache` file +in the directories defined by the variable `gtk_iconcache_dirs`. + +It is automatically added on packages that have `/usr/share/icons` available +as a directory, all directories under that directory have their absolute path +passed to the trigger. + +<a id="triggers_gtk_immodules"></a> +#### gtk-immodules + +The gtk-immodules trigger is responsible for updating the IM (Input Method) modules +file for gtk+. + +During installation it uses `gtk-query-immodules-2.0 --update-cache` to update the +cache file. It also removes the obsolete configuration file `etc/gtk-2.0/gtk.immodules` +if present. + +During removal of the `gtk+` package it removes the cache file which is located at +`usr/lib/gtk-2.0/2.10.0/immodules.cache`. + +It is automatically added to packages that have `/usr/lib/gtk-2.0/2.10.0/immodules` +present as a directory. + +<a id="triggers_gtk_pixbuf_loaders"></a> +#### gtk-pixbuf-loaders + +gtk-pixbuf-loaders is the old name for the current `gdk-pixbuf-loaders` trigger and is +in the process of being removed. It currently re-execs into `gdk-pixbuf-loaders` as a +compatibility measure. + +For information about how it works refer to [gdk-pixbuf-loaders](#triggers_gdk_pixbuf_loaders). + +<a id="triggers_gtk3_immodules"></a> +#### gtk3-immodules + +The gtk3-immodules trigger is responsible for updating the IM (Input Method) modules +file for gtk+3. + +During installation it executes `gtk-query-immodules-3.0 --update-cache` to update the +cache file. It also removes the obsolete configuration file `etc/gtk-3.0/gtk.immodules` +if present. + +During removal of the `gtk+3` package it removes the cache file which is located at +`usr/lib/gtk-3.0/3.0.0/immodules.cache`. + +It is automatically added to packages that have `/usr/lib/gtk-3.0/3.0.0/immodules` +present as a directory. + +<a id="triggers_hwdb.d_dir"></a> +#### hwdb.d-dir + +The hwdb.d-dir trigger is responsible for updating the hardware database. + +During installation and removal it runs `usr/bin/udevadm hwdb --root=. --update`. + +It is automatically added to packages that have `/usr/lib/udev/hwdb.d` present +as a directory. + +<a id="triggers_info_files"></a> +#### info-files + +The info-files trigger is responsible for registering and unregistering the GNU info +files of a package. + +It checks the existence of the info files presented to it and if it is running under +another architecture. + +During installation it uses `install-info` to register info files into +`usr/share/info`. + +During removal it uses `install-info --delete` to remove the info files from the +registry located at `usr/share/info`. + +If it is running under another architecture it tries to use the host's `install-info` +utility. + +<a id="triggers_kernel_hooks"></a> +#### kernel-hooks + +The kernel-hooks trigger is responsible for running scripts during installation/removal +of kernel packages. + +The available targets are pre-install, pre-remove, post-install and post-remove. + +When run it will try to run all executables found under `etc/kernel.d/$TARGET`. The +`TARGET` variable is one of the 4 targets available for the trigger. It will also +create the directory if it isn't present. + +During updates it won't try to run any executables when running with the pre-remove +target. + +It is automatically added if the helper variable `kernel_hooks_version` is defined. +However it is not obligatory to have it defined. + +<a id="triggers_mimedb"></a> +#### mimedb + +The mimedb trigger is responsible for updating the shared-mime-info database. + +In all runs it will just execute `update-mime-database -n usr/share/mime`. + +It is automatically added to packages that have `/usr/share/mime` available as +a directory. + +<a id="triggers_mkdirs"></a> +#### mkdirs + +The mkdirs trigger is responsible for creating and removing directories dictated +by the `make_dirs` variable. + +During installation it takes the `make_dirs` variable and splits it into groups of +4 variables. + +- dir = full path to the directory +- mode = Unix permissions for the directory +- uid = name of the owning user +- gid = name of the owning group + +It will continue to split the values of `make_dirs` into groups of 4 until the values +end. + +During installation it will create a directory with `dir` then set mode with `mode` +and permission with `uid:gid`. + +During removal it will delete the directory using `rmdir`. + +To include this trigger use the `make_dirs` variable, as the trigger won't do anything +unless it is defined. + +<a id="triggers_pango_module"></a> +#### pango-modules + +The pango-modules trigger is currently being removed since upstream has removed the +code responsible for it. + +It used to update the pango modules file with `pango-modulesquery` during installation +of any package. + +Currently it removes `etc/pango/pango.modules` file during removal of the pango package. + +It can be added by defining `pango-modules` in the `triggers` variable and has no way to get +added automatically to a package. + +<a id="triggers_pycompile"></a> +#### pycompile + +The pycompile trigger is responsible for compiling python code into native +bytecode and removing generated bytecode. + +During installation it will compile all python code under the paths it is given by +`pycompile_dirs` and all modules described in `pycompile_module` into native bytecode and +update the ldconfig(8) cache. + +During removal it will remove all the native bytecode and update the ldconfig(8) cache. + +To include this trigger use the variables `pycompile_dirs` and `pycompile_module`. The +trigger won't do anything unless at least one of those variables is defined. + +A `python_version` variable can be set to direct behaviour of the trigger. + +<a id="triggers_register_shell"></a> +#### register-shell + +The register-shell trigger is responsible for registering and removing shell entries +into `etc/shells`. + +During installation it will append the `etc/shells` file with the new shell and also +change the permissions to `644` on the file. + +During removal it will use `sed` to delete the shell from the file. + +To include this trigger use the `register_shell` variable, as the trigger won't do +anything unless it is defined. + +<a id="triggers_system_accounts"></a> +#### system-accounts + +The system-accounts trigger is responsible for creating and disabling system accounts +and groups. + +During removal it will disable the account by setting the Shell to /bin/false, +Home to /var/empty, and appending ' - for uninstalled package $pkgname' to the +Description. +Example: `transmission unprivileged user - for uninstalled package transmission` + +This trigger can only be used by using the `system_accounts` variable. + +<a id="triggers_texmf_dist"></a> +#### texmf-dist + +The texmf-dist trigger is responsible for regenerating TeXLive's texmf databases. + +During both installation and removal, it regenerates both the texhash and format +databases using `texhash` and `fmtutil-sys`, to add or remove any new hashes or +formats. + +It runs on every package that changes /usr/share/texmf-dist. This is likely overkill, +but it is much cleaner rather than checking each format directory and each directory +that is hashed. In addition, it is very likely any package touching /usr/share/texmf-dist +requires one of these triggers anyway. + +<a id="triggers_update_desktopdb"></a> +#### update-desktopdb + +The update-desktopdb trigger is responsible for updating the system's MIME database. + +During installation it will execute `update-desktop-database usr/share/applications` +which will result in a cache file being created at `usr/share/applications/mimeinfo.cache`. + +During removal of the `desktop-file-utils` package it will remove the cache file that +was created during installation. + +It is automatically added to packages that have `/usr/share/applications` available as +a directory. + +<a id="triggers_x11_fonts"></a> +#### x11-fonts + +The x11-fonts trigger is responsible for rebuilding the fonts.dir and fonts.scale files +for packages that install X11 fonts, and update fontconfig's cache for these fonts. + +During installation and removal it executes `mkfontdir`, `mkfontscale` and `fc-cache` for +all font directories it was given via the `font_dirs` variable. + +To include this trigger use the `font_dirs` variable, as the trigger won't do anything +unless it is defined. + +<a id="triggers_xml_catalog"></a> +#### xml-catalog + +The xml-catalog trigger is responsible for registering and removing SGML/XML catalog entries. + +During installation it uses `xmlcatmgr` to register all catalogs, passed to it by the +`sgml_entries` and `xml_entries` variables, in `usr/share/sgml/catalog` and +`usr/share/xml/catalog` respectively. + +During removal it uses `xmlcatmgr` to remove all catalogs passed to it by the +`sgml_entries` and `xml_entries` variables, in `usr/share/sgml/catalog` and +`usr/share/xml/catalog` respectively. + +To include this trigger use the `sgml_entries` variable or/and the `xml_entries` variable, +as the trigger won't do anything unless either of them are defined. + +<a id="notes"></a> +### Notes + +- Make sure that all software is configured to use the `/usr` prefix. + +- Binaries should always be installed at `/usr/bin`. + +- Manual pages should always be installed at `/usr/share/man`. + +- If a software provides **shared libraries** and headers, probably you should +create a `development package` that contains `headers`, `static libraries` +and other files required for development (not required at runtime). + +- If you are updating a package please be careful with SONAME bumps, check +the installed files (`./xbps-src show-files pkg`) before pushing new updates. + +- Make sure that binaries are not stripped by the software, let xbps-src do this; +otherwise the `debug` packages won't have debugging symbols. + +<a id="contributing"></a> +### Contributing via git + +Fork the voidlinux `void-packages` git repository on github and clone it: + + $ git clone git@github.com:<user>/void-packages.git + +See [CONTRIBUTING.md](./CONTRIBUTING.md) for information on how to format your +commits and other tips for contributing. + +Once you've made changes to your `forked` repository you can submit +a github pull request; see https://help.github.com/articles/fork-a-repo for more information. + +To keep your forked repository always up to date, setup the `upstream` remote +to pull in new changes: + + $ git remote add upstream git://github.com/void-linux/void-packages.git + $ git pull --rebase upstream master + +<a id="help"></a> +## Help + +If after reading this `manual` you still need some kind of help, please join +us at `#xbps` via IRC at `irc.freenode.net`. diff --git a/README.md b/README.md @@ -0,0 +1,521 @@ +## The XBPS source packages collection + +This repository contains the XBPS source packages collection to build binary packages +for the Void Linux distribution. + +The included `xbps-src` script will fetch and compile the sources, and install its +files into a `fake destdir` to generate XBPS binary packages that can be installed +or queried through the `xbps-install(1)` and `xbps-query(1)` utilities, respectively. + +See [Contributing](./CONTRIBUTING.md) for a general overview of how to contribute and the +[Manual](./Manual.md) for details of how to create source packages. + +### Table of Contents + +- [Requirements](#requirements) +- [Quick start](#quick-start) +- [chroot methods](#chroot-methods) +- [Install the bootstrap packages](#install-bootstrap) +- [Configuration](#configuration) +- [Directory hierarchy](#directory-hierarchy) +- [Building packages](#building-packages) +- [Package build options](#build-options) +- [Sharing and signing your local repositories](#sharing-and-signing) +- [Rebuilding and overwriting existing local packages](#rebuilding) +- [Enabling distcc for distributed compilation](#distcc) +- [Distfiles mirrors](#distfiles-mirrors) +- [Cross compiling packages for a target architecture](#cross-compiling) +- [Using xbps-src in a foreign Linux distribution](#foreign) +- [Remaking the masterdir](#remaking-masterdir) +- [Keeping your masterdir uptodate](#updating-masterdir) +- [Building 32bit packages on x86_64](#building-32bit) +- [Building packages natively for the musl C library](#building-for-musl) +- [Building void base-system from scratch](#building-base-system) + +### Requirements + +- GNU bash +- xbps >= 0.56 +- curl(1) - required by `xbps-src update-check` +- flock(1) - util-linux +- bsdtar or GNU tar (in that order of preference) +- install(1) - GNU coreutils +- objcopy(1), objdump(1), strip(1): binutils +- other common POSIX utilities included by default in almost all UNIX systems. + +`xbps-src` requires a utility to chroot and bind mount existing directories +into a `masterdir` that is used as its main `chroot` directory. `xbps-src` supports +multiple utilities to accomplish this task: + + - `bwrap` - bubblewrap, see https://github.com/projectatomic/bubblewrap. + - `ethereal` - only useful for one-shot containers, i.e docker (used with travis). + - `xbps-uunshare(1)` - XBPS utility that uses `user_namespaces(7)` (part of xbps, default). + - `xbps-uchroot(1)` - XBPS utility that uses `namespaces` and must be `setgid` (part of xbps). + - `proot(1)` - utility that implements chroot/bind mounts in user space, see https://proot-me.github.io/. + +> NOTE: `xbps-src` does not allow building as root anymore. Use one of the chroot +methods shown above. + +<a name="quick-start"></a> +### Quick start + +Clone the `void-packages` git repository and install the bootstrap packages: + +``` +$ git clone git://github.com/void-linux/void-packages.git +$ cd void-packages +$ ./xbps-src binary-bootstrap +``` + +Build a package by specifying the `pkg` target and the package name: + +``` +$ ./xbps-src pkg <package_name> +``` + +Use `./xbps-src -h` to list all available targets and options. + +To build packages marked as 'restricted', modify `etc/conf`: + +``` +$ echo XBPS_ALLOW_RESTRICTED=yes >> etc/conf +``` + +Once built, the package will be available in `hostdir/binpkgs` or an appropriate subdirectory (e.g. `hostdir/binpkgs/nonfree`). To install the package: + +``` +# xbps-install --repository hostdir/binpkgs <package_name> +``` + +Alternatively, packages can be installed with the `xi` utility, from the `xtools` package. `xi` takes the repository of the current working directory into account. + +``` +# xi <package_name> +``` + +<a name="chroot-methods"></a> +### chroot methods + +#### xbps-uunshare(1) (default) + +This utility requires these Linux kernel options: + +- CONFIG\_NAMESPACES +- CONFIG\_IPC\_NS +- CONFIG\_UTS\_NS +- CONFIG\_USER\_NS + +This is the default method, and if your system does not support any of the required kernel +options it will fail with `EINVAL (Invalid argument)`. + +#### xbps-uchroot(1) + +This utility requires these Linux kernel options: + +- CONFIG\_NAMESPACES +- CONFIG\_IPC\_NS +- CONFIG\_PID\_NS +- CONFIG\_UTS\_NS + +Your user must be added to a special group to be able to use `xbps-uchroot(1)` and the +executable must be `setgid`: + + # chown root:<group> xbps-uchroot + # chmod 4750 xbps-uchroot + # usermod -a -G <group> <user> + +> NOTE: by default in void you shouldn't do this manually, your user must be a member of +the `xbuilder` group. + +To enable it: + + $ cd void-packages + $ echo XBPS_CHROOT_CMD=uchroot >> etc/conf + +If for some reason it's erroring out as `ERROR clone (Operation not permitted)`, check that +your user is a member of the required `group` and that `xbps-uchroot(1)` utility has the +proper permissions and owner/group as explained above. + +#### proot(1) + +The `proot(1)` utility implements chroot and bind mounts support completely in user space, +and can be used if your Linux kernel does not have support for namespaces. See https://proot-me.github.io/. +for more information. + +To enable it: + + $ cd void-packages + $ echo XBPS_CHROOT_CMD=proot >> etc/conf + +<a name="install-bootstrap"></a> +### Install the bootstrap packages + +There is a set of packages that makes up the initial build container, called the `bootstrap`. +These packages are installed into the `masterdir` in order to create the container. + +The primary and recommended way to set up this container is using the `binary-bootstrap` +command. This will use pre-existing binary packages, either from remote `xbps` repositories +or from your local repository. + +There is also the `bootstrap` command, which will build all necessary `bootstrap` packages from +scratch. This is usually not recommended, since those packages are built using your host system's +toolchain and are neither fully featured nor reproducible (your host system may influence the +build) and thus should only be used as a stage 0 for bootstrapping new Void systems. + +If you still choose to use `bootstrap`, use the resulting stage 0 container to rebuild all +`bootstrap` packages again, then use `binary-bootstrap` (stage 1) and rebuild the `bootstrap` +packages once more (to gain stage 2, and then use `binary-bootstrap` again). Once you've done +that, you will have a `bootstrap` set equivalent to using `binary-bootstrap` in the first place. + +Also keep in mind that a full source `bootstrap` is time consuming and will require having an +assortment of utilities installed in your host system, such as `binutils`, `gcc`, `perl`, +`texinfo` and others. + +### Configuration + +The `etc/defaults.conf` file contains the possible settings that can be overridden +through the `etc/conf` configuration file for the `xbps-src` utility; if that file +does not exist, will try to read configuration settings from `$XDG_CONFIG_HOME/xbps-src.conf`, `~/.config/xbps-src.conf`, `~/.xbps-src.conf`. + +If you want to customize default `CFLAGS`, `CXXFLAGS` and `LDFLAGS`, don't override +those defined in `etc/defaults.conf`, set them on `etc/conf` instead i.e: + + $ echo 'XBPS_CFLAGS="your flags here"' >> etc/conf + $ echo 'XBPS_LDFLAGS="your flags here"' >> etc/conf + +Native and cross compiler/linker flags are set per architecture in `common/build-profiles` +and `common/cross-profiles` respectively. Ideally those settings are good enough by default, +and there's no need to set your own unless you know what you are doing. + +#### Virtual packages + +The `etc/defaults.virtual` file contains the default replacements for virtual packages, +used as dependencies in the source packages tree. + +If you want to customize those replacements, copy `etc/defaults.virtual` to `etc/virtual` +and edit it accordingly to your needs. + +<a name="directory-hierarchy"></a> +### Directory hierarchy + +The following directory hierarchy is used with a default configuration file: + + /void-packages + |- common + |- etc + |- srcpkgs + | |- xbps + | |- template + | + |- hostdir + | |- binpkgs ... + | |- ccache ... + | |- distcc-<arch> ... + | |- repocache ... + | |- sources ... + | + |- masterdir + | |- builddir -> ... + | |- destdir -> ... + | |- host -> bind mounted from <hostdir> + | |- void-packages -> bind mounted from <void-packages> + + +The description of these directories is as follows: + + - `masterdir`: master directory to be used as rootfs to build/install packages. + - `builddir`: to unpack package source tarballs and where packages are built. + - `destdir`: to install packages, aka **fake destdir**. + - `hostdir/ccache`: to store ccache data if the `XBPS_CCACHE` option is enabled. + - `hostdir/distcc-<arch>`: to store distcc data if the `XBPS_DISTCC` option is enabled. + - `hostdir/repocache`: to store binary packages from remote repositories. + - `hostdir/sources`: to store package sources. + - `hostdir/binpkgs`: local repository to store generated binary packages. + +<a name="building-packages"></a> +### Building packages + +The simplest form of building package is accomplished by running the `pkg` target in `xbps-src`: + +``` +$ cd void-packages +$ ./xbps-src pkg <pkgname> +``` + +When the package and its required dependencies are built, the binary packages will be created +and registered in the default local repository at `hostdir/binpkgs`; the path to this local repository can be added to +any xbps configuration file (see xbps.d(5)) or by explicitly appending them via cmdline, i.e: + + $ xbps-install --repository=hostdir/binpkgs ... + $ xbps-query --repository=hostdir/binpkgs ... + +By default **xbps-src** will try to resolve package dependencies in this order: + + - If a dependency exists in the local repository, use it (`hostdir/binpkgs`). + - If a dependency exists in a remote repository, use it. + - If a dependency exists in a source package, use it. + +It is possible to avoid using remote repositories completely by using the `-N` flag. + +> The default local repository may contain multiple *sub-repositories*: `debug`, `multilib`, etc. + +<a name="build-options"></a> +### Package build options + +The supported build options for a source package can be shown with `xbps-src show-options`: + + $ ./xbps-src show-options foo + +Build options can be enabled with the `-o` flag of `xbps-src`: + + $ ./xbps-src -o option,option1 pkg foo + +Build options can be disabled by prefixing them with `~`: + + $ ./xbps-src -o ~option,~option1 pkg foo + +Both ways can be used together to enable and/or disable multiple options +at the same time with `xbps-src`: + + $ ./xbps-src -o option,~option1,~option2 pkg foo + +The build options can also be shown for binary packages via `xbps-query(1)`: + + $ xbps-query -R --property=build-options foo + +> NOTE: if you build a package with a custom option, and that package is available +in an official void repository, an update will ignore those options. Put that package +on `hold` mode via `xbps-pkgdb(1)`, i.e `xbps-pkgdb -m hold foo` to ignore updates +with `xbps-install -u`. Once the package is on `hold`, the only way to update it +is by declaring it explicitly: `xbps-install -u foo`. + +Permanent global package build options can be set via `XBPS_PKG_OPTIONS` variable in the +`etc/conf` configuration file. Per package build options can be set via +`XBPS_PKG_OPTIONS_<pkgname>`. + +> NOTE: if `pkgname` contains `dashes`, those should be replaced by `underscores` +i.e `XBPS_PKG_OPTIONS_xorg_server=opt`. + +The list of supported package build options and its description is defined in the +`common/options.description` file or in the `template` file. + +<a name="sharing-and-signing"></a> +### Sharing and signing your local repositories + +To share a local repository remotely it's mandatory to sign it and the binary packages +stored on it. This is accomplished with the `xbps-rindex(1)` utility. + +First a RSA key must be created with `openssl(1)` or `ssh-keygen(1)`: + + $ openssl genrsa -des3 -out privkey.pem 4096 + +or + + $ ssh-keygen -t rsa -b 4096 -m PEM -f privkey.pem + +> Only RSA keys in PEM format are currently accepted by xbps. + +Once the RSA private key is ready you can use it to initialize the repository metadata: + + $ xbps-rindex --sign --signedby "I'm Groot" --privkey privkey.pem $PWD/hostdir/binpkgs + +And then make a signature per package: + + $ xbps-rindex --sign-pkg --privkey privkey.pem $PWD/hostdir/binpkgs/*.xbps + +> If --privkey is unset, it defaults to `~/.ssh/id_rsa`. + +If the RSA key was protected with a passphrase you'll have to type it, or alternatively set +it via the `XBPS_PASSPHRASE` environment variable. + +Once the binary packages have been signed, check the repository contains the appropriate `hex fingerprint`: + + $ xbps-query --repository=hostdir/binpkgs -vL + ... + +Each time a binary package is created, a package signature must be created with `--sign-pkg`. + +> It is not possible to sign a repository with multiple RSA keys. + +<a name="rebuilding"></a> +### Rebuilding and overwriting existing local packages + +If for whatever reason a package has been built and it is available in your local repository +and you have to rebuild it without bumping its `version` or `revision` fields, it is possible +to accomplish this task easily with `xbps-src`: + + $ ./xbps-src -f pkg xbps + +Reinstalling this package in your target `rootdir` can be easily done too: + + $ xbps-install --repository=/path/to/local/repo -yff xbps-0.25_1 + +> Please note that the `package expression` must be properly defined to explicitly pick up +the package from the desired repository. + +<a name="distcc"></a> +### Enabling distcc for distributed compilation + +Setup the slaves (machines that will compile the code): + + # xbps-install -Sy distcc + +Modify the configuration to allow your local network machines to use distcc (e.g. `192.168.2.0/24`): + + # echo "192.168.2.0/24" >> /etc/distcc/clients.allow + +Enable and start the `distccd` service: + + # ln -s /etc/sv/distccd /var/service + +Install distcc on the host (machine that executes xbps-src) as well. +Unless you want to use the host as slave from other machines, there is no need +to modify the configuration. + +On the host you can now enable distcc in the `void-packages/etc/conf` file: + + XBPS_DISTCC=yes + XBPS_DISTCC_HOSTS="localhost/2 --localslots_cpp=24 192.168.2.101/9 192.168.2.102/2" + XBPS_MAKEJOBS=16 + +The example values assume a localhost CPU with 4 cores of which at most 2 are used for compiler jobs. +The number of slots for preprocessor jobs is set to 24 in order to have enough preprocessed data for other CPUs to compile. +The slave 192.168.2.101 has a CPU with 8 cores and the /9 for the number of jobs is a saturating choice. +The slave 192.168.2.102 is set to run at most 2 compile jobs to keep its load low, even if its CPU has 4 cores. +The XBPS_MAKEJOBS setting is increased to 16 to account for the possible parallelism (2 + 9 + 2 + some slack). + +<a name="distfiles-mirrors"></a> +### Distfiles mirror(s) + +In etc/conf you may optionally define a mirror or a list of mirrors to search for distfiles. + + $ echo 'XBPS_DISTFILES_MIRROR="ftp://192.168.100.5/gentoo/distfiles"' >> etc/conf + +If more than one mirror is to be searched, you can either specify multiple URLs separated +with blanks, or add to the variable like this + + $ echo 'XBPS_DISTFILES_MIRROR+=" https://sources.voidlinux.org/"' >> etc/conf + +Make sure to put the blank after the first double quote in this case. + +The mirrors are searched in order for the distfiles to build a package until the +checksum of the downloaded file matches the one specified in the template. + +Ultimately, if no mirror carries the distfile, or in case all downloads failed the +checksum verification, the original download location is used. + +If you use `proot` or `uchroot` for your XBPS_CHROOT_CMD, you may also specify a local path +using the `file://` prefix or simply an absolute path on your build host (e.g. /mnt/distfiles). +Mirror locations specified this way are bind mounted inside the chroot environment +under $XBPS_MASTERDIR and searched for distfiles just the same as remote locations. + +<a name="cross-compiling"></a> +### Cross compiling packages for a target architecture + +Currently `xbps-src` can cross build packages for some target architectures with a cross compiler. +The supported target is shown with `./xbps-src -h`. + +If a source package has been adapted to be **cross buildable** `xbps-src` will automatically build the binary package(s) with a simple command: + + $ ./xbps-src -a <target> pkg <pkgname> + +If the build for whatever reason fails, might be a new build issue or simply because it hasn't been adapted to be **cross compiled**. + +<a name="foreign"></a> +### Using xbps-src in a foreign Linux distribution + +xbps-src can be used in any recent Linux distribution matching the CPU architecture. + +To use xbps-src in your Linux distribution use the following instructions. Let's start downloading the xbps static binaries: + + $ wget http://alpha.de.repo.voidlinux.org/static/xbps-static-latest.<arch>-musl.tar.xz + $ mkdir ~/XBPS + $ tar xvf xbps-static-latest.<arch>.tar.xz -C ~/XBPS + $ export PATH=~/XBPS/usr/bin:$PATH + +If your system does not support `user namespaces`, a privileged group is required to be able to use +`xbps-uchroot(1)` with xbps-src, by default it's set to the `xbuilder` group, change this to your desired group: + + # chown root:<group> ~/XBPS/usr/bin/xbps-uchroot.static + # chmod 4750 ~/XBPS/usr/bin/xbps-uchroot.static + +Clone the `void-packages` git repository: + + $ git clone git://github.com/void-linux/void-packages + +and `xbps-src` should be fully functional; just start the `bootstrap` process, i.e: + + $ ./xbps-src binary-bootstrap + +The default masterdir is created in the current working directory, i.e `void-packages/masterdir`. + +<a name="remaking-masterdir"></a> +### Remaking the masterdir + +If for some reason you must update xbps-src and the `bootstrap-update` target is not enough, it's possible to recreate a masterdir with two simple commands (please note that `zap` keeps your `ccache/distcc/host` directories intact): + + $ ./xbps-src zap + $ ./xbps-src binary-bootstrap + +<a name="updating-masterdir"></a> +### Keeping your masterdir uptodate + +Sometimes the bootstrap packages must be updated to the latest available version in repositories, this is accomplished with the `bootstrap-update` target: + + $ ./xbps-src bootstrap-update + +<a name="building-32bit"></a> +### Building 32bit packages on x86_64 + +Two ways are available to build 32bit packages on x86\_64: + + - cross compilation mode + - native mode with a 32bit masterdir + +The first mode (cross compilation) is as easy as: + + $ ./xbps-src -a i686 pkg ... + +The second mode (native) needs a new x86 `masterdir`: + + $ ./xbps-src -m masterdir-x86 binary-bootstrap i686 + $ ./xbps-src -m masterdir-x86 ... + +<a name="building-for-musl"></a> +### Building packages natively for the musl C library + +A native build environment is required to be able to cross compile the bootstrap packages for the musl C library; this is accomplished by installing them via `binary-bootstrap`: + + $ ./xbps-src binary-bootstrap + +Now cross compile `base-chroot-musl` for your native architecture: + + $ ./xbps-src -a x86_64-musl pkg base-chroot-musl + +Wait until all packages are built and when ready, prepare a new masterdir with the musl packages: + + $ ./xbps-src -m masterdir-x86_64-musl binary-bootstrap x86_64-musl + +Your new masterdir is now ready to build packages natively for the musl C library. Try: + + $ ./xbps-src -m masterdir-x86_64-musl chroot + $ ldd + +To see if the musl C dynamic linker is working as expected. + +<a name="building-base-system"></a> +### Building void base-system from scratch + +To rebuild all packages in `base-system` for your native architecture: + + $ ./xbps-src -N pkg base-system + +It's also possible to cross compile everything from scratch: + + $ ./xbps-src -a <target> -N pkg base-system + +Once the build has finished, you can specify the path to the local repository to `void-mklive`, i.e: + + # cd void-mklive + # make + # ./mklive.sh ... -r /path/to/hostdir/binpkgs diff --git a/common/build-helper/gir.sh b/common/build-helper/gir.sh @@ -0,0 +1,42 @@ +# +# gir - build-helper for gobject-introspection +# +# This build-helper is used for packages that make use of +# the GObject introspection middleware layer. +# + +# Check if the 'gir' build_option is set or if there is no +# 'gir' build_option. +if [ "$build_option_gir" ] || [[ $build_options != *"gir"* ]]; then + if [[ $hostmakedepends != *"gobject-introspection"* ]]; then + # Provide the host tooling, g-ir-scanner, g-ir-compiler + # and its wrappers. + hostmakedepends+=" gobject-introspection" + fi + + if [ "$CROSS_BUILD" ]; then + # Required for running binaries produced from g-ir-compiler + # via g-ir-scanner-qemuwrapper + hostmakedepends+=" qemu-user-static" + + # Required for running the g-ir-scanner-lddwrapper + hostmakedepends+=" prelink-cross" + + if [[ $makedepends != *"gobject-introspection"* ]]; then + # Provide basic .gir types like GLib, GObject, DBus, Gio, cairo + # and tooling like g-ir-compiler + makedepends+=" gobject-introspection" + fi + + export VAPIGEN_VAPIDIRS=${XBPS_CROSS_BASE}/usr/share/vala/vapi + export VAPIGEN_GIRDIRS=${XBPS_CROSS_BASE}/usr/share/gir-1.0 + + # Provide some packages in hostmakedepends if they are in makedepends + for f in gtk+3-devel python-gobject-devel python3-gobject-devel; do + if [[ $makedepends == *"${f}"* ]]; then + hostmakedepends+=" ${f}" + fi + done + unset f + fi +fi diff --git a/common/build-helper/numpy.sh b/common/build-helper/numpy.sh @@ -0,0 +1,36 @@ +# +# numpy - build-helper for packages that compile against python3-numpy +# +# This build-helper makes sure packages can find python3-numpy libraries and +# headers on the target architecture rather than the host, as well as making +# sure the gfortran cross compiler is properly identified. + +# Even for cross compilation, numpy should be available on the host to ensure +# that the host interpreter doesn't complain about missing deps +if [[ $hostmakedepends != *"python3-numpy"* ]]; then + hostmakedepends+=" python3-numpy" +fi + +if [ "$CROSS_BUILD" ]; then + if [[ $makedepends != *"python3-numpy"* ]]; then + makedepends+=" python3-numpy" + fi + + # python3-setuptools finds numpy libs and headers on the host first; + # addding search paths up front allows the target to take priority + CFLAGS+=" -I${XBPS_CROSS_BASE}/${py3_sitelib}/numpy/core/include" + LDFLAGS+=" -L${XBPS_CROSS_BASE}/${py3_sitelib}/numpy/core/lib" + + # distutils from python3-numpy looks to environment variables F77 and + # F90 rather than the XBPS-set FC + export F77="${FC}" + export F90="${FC}" + + # When compiling and linking FORTRAN, distutils from python3-numpy + # refuses respect any linker name except "gfortran"; symlink to the + # cross-compiler to that the right linker and compiler will be used + if _gfortran=$(command -v "${FC}"); then + ln -sf "${_gfortran}" "${XBPS_WRAPPERDIR}/gfortran" + fi + unset _gfortran +fi diff --git a/common/build-helper/qemu.sh b/common/build-helper/qemu.sh @@ -0,0 +1,6 @@ +if [ "$CROSS_BUILD" ]; then + export QEMU_LD_PREFIX=${XBPS_CROSS_BASE} + if [[ $hostmakedepends != *"qemu-user-static"* ]]; then + hostmakedepends+=" qemu-user-static" + fi +fi diff --git a/common/build-helper/qmake.sh b/common/build-helper/qmake.sh @@ -0,0 +1,48 @@ +# This build-helper sets up qmake’s cross environment +# in cases the build-style is mixed, +# e.g. when in a gnu-configure style the configure +# script calls qmake or a makefile in a gnu-makefile style, +# respectively. + +if [ "$CROSS_BUILD" ]; then + cat > "${XBPS_WRAPPERDIR}/qt.conf" <<_EOF +[Paths] +Sysroot=${XBPS_CROSS_BASE} +Prefix=${XBPS_CROSS_BASE}/usr +ArchData=${XBPS_CROSS_BASE}/usr/lib/qt5 +Data=${XBPS_CROSS_BASE}/usr/share/qt5 +Documentation=${XBPS_CROSS_BASE}/usr/share/doc/qt5 +Headers=${XBPS_CROSS_BASE}/usr/include/qt5 +Libraries=${XBPS_CROSS_BASE}/usr/lib +LibraryExecutables=/usr/lib/qt5/libexec +Binaries=/usr/lib/qt5/bin +Tests=${XBPS_CROSS_BASE}/usr/tests +Plugins=/usr/lib/qt5/plugins +Imports=${XBPS_CROSS_BASE}/usr/lib/qt5/imports +Qml2Imports=${XBPS_CROSS_BASE}/usr/lib/qt5/qml +Translations=${XBPS_CROSS_BASE}/usr/share/qt5/translations +Settings=${XBPS_CROSS_BASE}/etc/xdg +Examples=${XBPS_CROSS_BASE}/usr/share/qt5/examples +HostPrefix=/usr +HostData=/usr/lib/qt5 +HostBinaries=/usr/lib/qt5/bin +HostLibraries=/usr/lib +Spec=linux-g++ +TargetSpec=linux-g++ +_EOF + + # create the qmake-wrapper here because it only + # makes sense together with the qmake build-helper + # and not to interfere with e.g. the qmake build-style + cat > "${XBPS_WRAPPERDIR}/qmake" <<_EOF +#!/bin/sh +exec /usr/lib/qt5/bin/qmake "\$@" \ + QMAKE_CC=$CC QMAKE_CXX=$CXX QMAKE_LINK=$CXX QMAKE_LINK_C=$CC \ + QMAKE_CFLAGS+="${CFLAGS}" QMAKE_CXXFLAGS+="${CXXFLAGS}" \ + QMAKE_LFLAGS+="${LDFLAGS}" \ + -qtconf "${XBPS_WRAPPERDIR}/qt.conf" +_EOF + + chmod 755 ${XBPS_WRAPPERDIR}/qmake + cp -p ${XBPS_WRAPPERDIR}/qmake{,-qt5} +fi diff --git a/common/build-helper/rust.sh b/common/build-helper/rust.sh @@ -0,0 +1,40 @@ +# Define equivalent of TOML config in environment +# [build] +# jobs = $XBPS_MAKEJOBS +export CARGO_BUILD_JOBS="$XBPS_MAKEJOBS" +export CARGO_HOME="/host/cargo" + +if [ "$CROSS_BUILD" ]; then + # Define equivalent of TOML config in environment + # [target.${RUST_TARGET}] + # linker = ${CC} + _XBPS_CROSS_RUST_TARGET_ENV="${XBPS_CROSS_RUST_TARGET^^}" + _XBPS_CROSS_RUST_TARGET_ENV="${_XBPS_CROSS_RUST_TARGET_ENV//-/_}" + export CARGO_TARGET_${_XBPS_CROSS_RUST_TARGET_ENV}_LINKER="$CC" + unset _XBPS_CROSS_RUST_TARGET_ENV + + # Define equivalent of TOML config in environment + # [build] + # target = ${RUST_TARGET} + export CARGO_BUILD_TARGET="$RUST_TARGET" +else + unset CARGO_BUILD_TARGET +fi + +# For cross-compiling rust -sys crates +export PKG_CONFIG_ALLOW_CROSS=1 + +# gettext-rs +export GETTEXT_BIN_DIR=/usr/bin +export GETTEXT_LIB_DIR="${XBPS_CROSS_BASE}/usr/lib/gettext" +export GETTEXT_INCLUDE_DIR="${XBPS_CROSS_BASE}/usr/include" + +# libssh2-sys +export LIBSSH2_SYS_USE_PKG_CONFIG=1 + +# sodium-sys +export SODIUM_LIB_DIR="${XBPS_CROSS_BASE}/usr/include" +export SODIUM_INC_DIR="${XBPS_CROSS_BASE}/usr/lib" + +# openssl-sys +export OPENSSL_NO_VENDOR=1 diff --git a/common/build-profiles/README b/common/build-profiles/README @@ -0,0 +1,15 @@ +BUILD PROFILES +============== + +This directory contains build profiles to set properties on native builds +for a specific architecture: + + - XBPS_TRIPLET (the compiler triplet) + - XBPS_CFLAGS (C compiler flags for host compiler) + - XBPS_CXXFLAGS (C++ compiler flags for the host compiler) + - XBPS_FFLAGS (Fortran compiler flags for the host compiler) + - XBPS_RUST_TARGET (the compiler triplet for usage by cargo) + +These properties are also set in a cross environment, but the compiler +flags are not added into the global flags. XBPS_RUST_TARGET is also +exposed as RUST_BUILD instead of RUST_TARGET. diff --git a/common/build-profiles/aarch64-musl.sh b/common/build-profiles/aarch64-musl.sh @@ -0,0 +1,5 @@ +XBPS_TARGET_CFLAGS="-march=armv8-a" +XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" +XBPS_TRIPLET="aarch64-unknown-linux-musl" +XBPS_RUST_TARGET="$XBPS_TRIPLET" diff --git a/common/build-profiles/aarch64.sh b/common/build-profiles/aarch64.sh @@ -0,0 +1,5 @@ +XBPS_TARGET_CFLAGS="-march=armv8-a" +XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" +XBPS_TRIPLET="aarch64-unknown-linux-gnu" +XBPS_RUST_TARGET="$XBPS_TRIPLET" diff --git a/common/build-profiles/armv6l-musl.sh b/common/build-profiles/armv6l-musl.sh @@ -0,0 +1,5 @@ +XBPS_TARGET_CFLAGS="-march=armv6 -mfpu=vfp -mfloat-abi=hard" +XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" +XBPS_TRIPLET="armv6l-linux-musleabihf" +XBPS_RUST_TARGET="arm-unknown-linux-musleabihf" diff --git a/common/build-profiles/armv6l.sh b/common/build-profiles/armv6l.sh @@ -0,0 +1,5 @@ +XBPS_TARGET_CFLAGS="-march=armv6 -mfpu=vfp -mfloat-abi=hard" +XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" +XBPS_TRIPLET="armv6l-unknown-linux-gnueabihf" +XBPS_RUST_TARGET="arm-unknown-linux-gnueabihf" diff --git a/common/build-profiles/armv7l-musl.sh b/common/build-profiles/armv7l-musl.sh @@ -0,0 +1,5 @@ +XBPS_TARGET_CFLAGS="-march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard" +XBPS_TARGET_CXXFLAGS="$XBPS_CXXFLAGS" +XBPS_TARGET_FFLAGS="" +XBPS_TRIPLET="armv7l-linux-musleabihf" +XBPS_RUST_TARGET="armv7-unknown-linux-musleabihf" diff --git a/common/build-profiles/armv7l.sh b/common/build-profiles/armv7l.sh @@ -0,0 +1,5 @@ +XBPS_TARGET_CFLAGS="-march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard" +XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" +XBPS_TRIPLET="armv7l-unknown-linux-gnueabihf" +XBPS_RUST_TARGET="armv7-unknown-linux-gnueabihf" diff --git a/common/build-profiles/bootstrap.sh b/common/build-profiles/bootstrap.sh @@ -0,0 +1,3 @@ +XBPS_CFLAGS="-O2 -pipe" +XBPS_CXXFLAGS="$XBPS_CFLAGS" +XBPS_FFLAGS="-fPIC -pipe" diff --git a/common/build-profiles/i686-musl.sh b/common/build-profiles/i686-musl.sh @@ -0,0 +1,5 @@ +XBPS_TARGET_CFLAGS="-mtune=i686" +XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" +XBPS_TRIPLET="i686-pc-linux-musl" +XBPS_RUST_TARGET="i686-unknown-linux-musl" diff --git a/common/build-profiles/i686.sh b/common/build-profiles/i686.sh @@ -0,0 +1,5 @@ +XBPS_TARGET_CFLAGS="-mtune=i686" +XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" +XBPS_TRIPLET="i686-pc-linux-gnu" +XBPS_RUST_TARGET="i686-unknown-linux-gnu" diff --git a/common/build-profiles/ppc-musl.sh b/common/build-profiles/ppc-musl.sh @@ -0,0 +1,5 @@ +XBPS_TARGET_CFLAGS="-mcpu=powerpc -mno-altivec -mtune=G4 -mlong-double-64" +XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" +XBPS_TRIPLET="powerpc-linux-musl" +XBPS_RUST_TARGET="powerpc-unknown-linux-musl" diff --git a/common/build-profiles/ppc.sh b/common/build-profiles/ppc.sh @@ -0,0 +1,5 @@ +XBPS_TARGET_CFLAGS="-mcpu=powerpc -mno-altivec -mtune=G4" +XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" +XBPS_TRIPLET="powerpc-linux-gnu" +XBPS_RUST_TARGET="powerpc-unknown-linux-gnu" diff --git a/common/build-profiles/ppc64-musl.sh b/common/build-profiles/ppc64-musl.sh @@ -0,0 +1,5 @@ +XBPS_TARGET_CFLAGS="-mcpu=970 -mtune=power9 -maltivec -mlong-double-64 -mabi=elfv2" +XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" +XBPS_TRIPLET="powerpc64-unknown-linux-musl" +XBPS_RUST_TARGET="$XBPS_TRIPLET" diff --git a/common/build-profiles/ppc64.sh b/common/build-profiles/ppc64.sh @@ -0,0 +1,5 @@ +XBPS_TARGET_CFLAGS="-mcpu=970 -mtune=power9 -maltivec -mabi=elfv2" +XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" +XBPS_TRIPLET="powerpc64-unknown-linux-gnu" +XBPS_RUST_TARGET="$XBPS_TRIPLET" diff --git a/common/build-profiles/ppc64le-musl.sh b/common/build-profiles/ppc64le-musl.sh @@ -0,0 +1,5 @@ +XBPS_TARGET_CFLAGS="-mcpu=powerpc64le -mtune=power9 -maltivec -mlong-double-64 -mabi=elfv2" +XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" +XBPS_TRIPLET="powerpc64le-unknown-linux-musl" +XBPS_RUST_TARGET="$XBPS_TRIPLET" diff --git a/common/build-profiles/ppc64le.sh b/common/build-profiles/ppc64le.sh @@ -0,0 +1,5 @@ +XBPS_TARGET_CFLAGS="-mcpu=powerpc64le -mtune=power9 -maltivec -mabi=elfv2" +XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" +XBPS_TRIPLET="powerpc64le-unknown-linux-gnu" +XBPS_RUST_TARGET="$XBPS_TRIPLET" diff --git a/common/build-profiles/x86_64-musl.sh b/common/build-profiles/x86_64-musl.sh @@ -0,0 +1,5 @@ +XBPS_TARGET_CFLAGS="-mtune=generic" +XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" +XBPS_TRIPLET="x86_64-unknown-linux-musl" +XBPS_RUST_TARGET="${XBPS_TRIPLET}" diff --git a/common/build-profiles/x86_64.sh b/common/build-profiles/x86_64.sh @@ -0,0 +1,5 @@ +XBPS_TARGET_CFLAGS="-mtune=generic" +XBPS_TARGET_CXXFLAGS="$XBPS_TARGET_CFLAGS" +XBPS_TARGET_FFLAGS="" +XBPS_TRIPLET="x86_64-unknown-linux-gnu" +XBPS_RUST_TARGET="${XBPS_TRIPLET}" diff --git a/common/build-style/R-cran.sh b/common/build-style/R-cran.sh @@ -0,0 +1,7 @@ +# +# This helper is for templates using R-cran. +# +do_install() { + mkdir -p ${DESTDIR}/usr/lib/R/library + ( cd .. && R CMD INSTALL -l ${DESTDIR}/usr/lib/R/library ${pkgname#R-cran-} ) +} diff --git a/common/build-style/README b/common/build-style/README @@ -0,0 +1,12 @@ +BUILD STYLES +============ + +These shell snippets provide support for multiple build systems, i.e GNU configure, +CMake, etc. A build style file must provide at least the following functions: + + - do_configure + - do_build + - do_install + +If a source package defines its own do_xxx() function, the function defined in +the build style file is simply ignored. diff --git a/common/build-style/cargo.sh b/common/build-style/cargo.sh @@ -0,0 +1,27 @@ +# +# This helper is for building rust projects which use cargo for building +# + +do_build() { + : ${make_cmd:=cargo} + + ${make_cmd} build --release --target ${RUST_TARGET} ${configure_args} +} + +do_check() { + : ${make_cmd:=cargo} + + ${make_cmd} test --release --target ${RUST_TARGET} ${configure_args} \ + ${make_check_args} +} + +do_install() { + : ${make_cmd:=cargo} + : ${make_install_args:=--path .} + + ${make_cmd} install --target ${RUST_TARGET} --root="${DESTDIR}/usr" \ + --locked ${configure_args} ${make_install_args} + + rm -f "${DESTDIR}"/usr/.crates.toml + rm -f "${DESTDIR}"/usr/.crates2.json +} diff --git a/common/build-style/cmake.sh b/common/build-style/cmake.sh @@ -0,0 +1,103 @@ +# +# This helper is for templates using cmake. +# +do_configure() { + local cmake_args= + [ ! -d ${cmake_builddir:=build} ] && mkdir -p ${cmake_builddir} + cd ${cmake_builddir} + + if [ "$CROSS_BUILD" ]; then + case "$XBPS_TARGET_MACHINE" in + x86_64*) _CMAKE_SYSTEM_PROCESSOR=x86_64 ;; + i686*) _CMAKE_SYSTEM_PROCESSOR=x86 ;; + aarch64*) _CMAKE_SYSTEM_PROCESSOR=aarch64 ;; + arm*) _CMAKE_SYSTEM_PROCESSOR=arm ;; + mips*) _CMAKE_SYSTEM_PROCESSOR=mips ;; + ppc64le*) _CMAKE_SYSTEM_PROCESSOR=ppc64le ;; + ppc64*) _CMAKE_SYSTEM_PROCESSOR=ppc64 ;; + ppcle*) _CMAKE_SYSTEM_PROCESSOR=ppcle ;; + ppc*) _CMAKE_SYSTEM_PROCESSOR=ppc ;; + *) _CMAKE_SYSTEM_PROCESSOR=generic ;; + esac + if [ -x "${XBPS_CROSS_BASE}/usr/bin/wx-config-gtk3" ]; then + wx_config=wx-config-gtk3 + fi + cat > cross_${XBPS_CROSS_TRIPLET}.cmake <<_EOF +SET(CMAKE_SYSTEM_NAME Linux) +SET(CMAKE_SYSTEM_VERSION 1) + +SET(CMAKE_C_COMPILER ${CC}) +SET(CMAKE_CXX_COMPILER ${CXX}) +SET(CMAKE_CROSSCOMPILING TRUE) + +SET(CMAKE_SYSTEM_PROCESSOR ${_CMAKE_SYSTEM_PROCESSOR}) + +SET(CMAKE_FIND_ROOT_PATH ${XBPS_CROSS_BASE}) + +SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + +SET(wxWidgets_CONFIG_EXECUTABLE ${XBPS_WRAPPERDIR}/${wx_config:=wx-config}) +_EOF + cmake_args+=" -DCMAKE_TOOLCHAIN_FILE=cross_${XBPS_CROSS_TRIPLET}.cmake" + fi + cmake_args+=" -DCMAKE_INSTALL_PREFIX=/usr" + cmake_args+=" -DCMAKE_BUILD_TYPE=Release" + + if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then + cmake_args+=" -DCMAKE_INSTALL_LIBDIR=lib32" + else + cmake_args+=" -DCMAKE_INSTALL_LIBDIR=lib" + fi + + if [[ $build_helper = *"qemu"* ]]; then + echo "SET(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-${XBPS_TARGET_QEMU_MACHINE}-static)" \ + >> cross_${XBPS_CROSS_TRIPLET}.cmake + fi + + cmake_args+=" -DCMAKE_INSTALL_SBINDIR=bin" + + # Override flags: https://gitlab.kitware.com/cmake/cmake/issues/19590 + CFLAGS="${CFLAGS/ -pipe / }" CXXFLAGS="${CXXFLAGS/ -pipe / }" \ + cmake ${cmake_args} ${configure_args} $(echo ${cmake_builddir}|sed \ + -e 's|[^/]$|/|' -e 's|[^/]*||g' -e 's|/|../|g') + + # Replace -isystem with -I for Qt4 and Qt5 packages + find -name flags.make -exec sed -i "{}" -e"s;-isystem;-I;g" \; +} + +do_build() { + : ${make_cmd:=make} + + cd ${cmake_builddir:=build} + ${make_cmd} ${makejobs} ${make_build_args} ${make_build_target} +} + +do_check() { + cd ${cmake_builddir:=build} + + if [ -z "$make_cmd" ] && [ -z "$make_check_target" ]; then + if make -q test 2>/dev/null; then + : + else + if [ $? -eq 2 ]; then + msg_warn 'No target to "make test".\n' + return 0 + fi + fi + fi + + : ${make_cmd:=make} + : ${make_check_target:=test} + + CTEST_OUTPUT_ON_FAILURE=TRUE ${make_cmd} ${make_check_args} ${make_check_target} +} + +do_install() { + : ${make_cmd:=make} + : ${make_install_target:=install} + + cd ${cmake_builddir:=build} + DESTDIR=${DESTDIR} ${make_cmd} ${make_install_args} ${make_install_target} +} diff --git a/common/build-style/configure.sh b/common/build-style/configure.sh @@ -0,0 +1,40 @@ +# +# This helper is for templates using configure scripts (not generated +# by the GNU autotools). +# +do_configure() { + : ${configure_script:=./configure} + + ${configure_script} ${configure_args} +} + +do_build() { + : ${make_cmd:=make} + + ${make_cmd} ${makejobs} ${make_build_args} ${make_build_target} +} + +do_check() { + if [ -z "$make_cmd" ] && [ -z "$make_check_target" ]; then + if make -q check 2>/dev/null; then + : + else + if [ $? -eq 2 ]; then + msg_warn 'No target to "make check".\n' + return 0 + fi + fi + fi + + : ${make_cmd:=make} + : ${make_check_target:=check} + + ${make_cmd} ${make_check_args} ${make_check_target} +} + +do_install() { + : ${make_cmd:=make} + : ${make_install_target:=install} + + ${make_cmd} DESTDIR=${DESTDIR} ${make_install_args} ${make_install_target} +} diff --git a/common/build-style/fetch.sh b/common/build-style/fetch.sh @@ -0,0 +1,12 @@ +# fetch build_style: fetches and copies files to ${wrksrc}. + +do_extract() { + local f curfile + + mkdir -p ${wrksrc} + for f in ${distfiles}; do + curfile="${f#*>}" + curfile="${curfile##*/}" + cp ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${curfile} ${wrksrc}/${curfile} + done +} diff --git a/common/build-style/gem.sh b/common/build-style/gem.sh @@ -0,0 +1,68 @@ +# +# This helper is for templates using gem files from RubyGems. +# +do_install() { + : ${gem_cmd:=gem} + + local _GEMDIR _INSTDIR + + _GEMDIR=$($gem_cmd env gemdir) + _INSTDIR=${DESTDIR}/${_GEMDIR}/gems/${pkgname#ruby-}-${version} + + $gem_cmd install \ + --local \ + --install-dir ${DESTDIR}/${_GEMDIR} \ + --bindir ${DESTDIR}/usr/bin \ + --ignore-dependencies \ + --no-document \ + --verbose \ + ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${pkgname#ruby-}-${version}.gem + + # Remove cache + rm -rf ${DESTDIR}/${_GEMDIR}/cache + + # Remove ext directory. they are only source code and configuration + # The actual extensions are guarded in an arch path + rm -rf ${_INSTDIR}/ext + + # Remove installed tests and benchmarks + rm -rf ${_INSTDIR}/{test,tests,autotest,benchmark,benchmarks,script,examples,demo} + + # Remove files shipped on the root of the gem, most of the time they are useless + find ${_INSTDIR} -maxdepth 1 -type f -delete + + # Remove unnecessary files + find ${DESTDIR}/${_GEMDIR}/extensions \( -name mkmf.log -o -name gem_make.out \) -delete + + # Place manpages in usr/share/man/man[0-9] + if [ -d ${_INSTDIR}/man ]; then + find ${_INSTDIR}/man -type f -name '*.[0-8n]' | while read -r m; do + vman ${m} + done + fi + + rm -rf "${_INSTDIR}/man" + + # Place executables in /usr/bin + if [ -d "${_INSTDIR}/bin" ]; then + for f in "${_INSTDIR}"/bin/*; do + vbin "${f}" + done + fi + + rm -rf ${_INSTDIR}/bin + + # Place conf files in their places + if [ -d ${_INSTDIR}/etc ]; then + find ${_INSTDIR}/etc -type f | while read -r c; do + vmkdir ${c%/*}/ + mv ${c} "${DESTDIR}/${c##*${_INSTDIR}/etc/}/" + done + fi + + rm -rf ${_INSTDIR}/etc + + # Ignore the ~> operator, replace it with >= + sed 's|~>|>=|g' \ + -i ${DESTDIR}/${_GEMDIR}/specifications/${pkgname#ruby-}-${version}.gemspec +} diff --git a/common/build-style/gemspec.sh b/common/build-style/gemspec.sh @@ -0,0 +1,190 @@ +# +# This helper is for templates using gemspec files from upstream or Rubygems. +# +do_build() { + : ${gem_cmd:=gem} + : ${gemspec:=${pkgname#ruby-}.gemspec} + + # Fix packages that keep Gem.gemspec as the name instead of the proper + # $pkgname.gemspec + if [ -f Gem.gemspec ]; then + gemspec=Gem.gemspec + fi + + if [ -f .gemspec ]; then + gemspec=.gemspec + fi + + # Hardcode name and version just in case they try something funny like + # requiring RELEASE to be on the environment to not append -rc0 to version + # Some even forget to update the version in the gemspec after releasing + sed -ri "s|(\.name .*)=.*|\1 = \"${pkgname#ruby-}\"|g" $gemspec + sed -ri "s|(\.version .*)=.*|\1 = \"${version}\"|g" $gemspec + + # Replace use of `git ls-files` with find, use printf so we can print without starting + # dot-slash path + sed -i 's|`git ls-files`|`find . -type f -printf "%P\\n"`|g' $gemspec + + # Sadly ruby isn't capable of handling nullbytes in a command so we have to use + # -print0, then try using sed to remove the suffix + # The end result is: + # `find . -type f -print0 | sed -e "s@\\./@@g"` + sed -i 's|`git ls-files -z`|`find . -type f -print0 \| sed -e "s@\\\\./@@g"`|g' $gemspec + + if [ "$CROSS_BUILD" ]; then + + local _TARGET_PLATFORM + + _TARGET_PLATFORM="$(ruby -r \ + $(find ${XBPS_CROSS_BASE}/usr/lib/ruby -iname rbconfig.rb) \ + -e 'puts RbConfig::CONFIG["arch"]' 2>/dev/null)" + + # Patch all instances of extconf that use create_makefile + for f in $(find . -type f -name 'extconf.rb'); do + if [ ! -f ${f}.orig ]; then + # Create a .extconf file that forces the Makefile to use our environment + # this allows us to cross-compile like it is done with meson cross-files + cat<<EOF>append +\$CPPFLAGS = ENV['CPPFLAGS'] if ENV['CPPFLAGS'] +RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC'] +RbConfig::MAKEFILE_CONFIG['CXX'] = ENV['CXX'] if ENV['CXX'] +RbConfig::MAKEFILE_CONFIG['LD'] = ENV['LD'] if ENV['LD'] +RbConfig::MAKEFILE_CONFIG['CFLAGS'] = ENV['CFLAGS'] if ENV['CFLAGS'] +RbConfig::MAKEFILE_CONFIG['CPPFLAGS'] = ENV['CPPFLAGS'] if ENV['CPPFLAGS'] +RbConfig::MAKEFILE_CONFIG['CXXFLAGS'] = ENV['CXXFLAGS'] if ENV['CXXFLAGS'] +EOF + cat $f > append2 + # Use sed and enable verbose mode + cat<<EOF>>append2 +system("sed -i 's|^V =.*|V = 1|' Makefile") +system("sed -i 's|^CFLAGS.*|CFLAGS = \$(CCDLFLAGS) ${VOID_TARGET_CFLAGS} \$(ARCH_FLAG)|' Makefile") +system("sed -i 's|^topdir.*|topdir = ${XBPS_CROSS_BASE}/usr/include/ruby-\$(ruby_version)|' Makefile") +system("sed -i 's|^hdrdir.*|hdrdir = ${XBPS_CROSS_BASE}/usr/include/ruby-\$(ruby_version)|' Makefile") +system("sed -i 's|^arch_hdrdir.*|arch_hdrdir = ${XBPS_CROSS_BASE}/usr/include/ruby-\$(ruby_version)/\$(arch)|' Makefile") +system("sed -i 's|^arch =.*|arch = ${_TARGET_PLATFORM}|' Makefile") +system("sed -i 's|^dldflags =.*|dldflags = ${LDFLAGS}|' Makefile") +EOF + + # Create a backup which we will restore later + cp $f ${f}.orig + + # Patch extconf.rb for cross compile + cat append append2 > $f + fi + done + fi + + # If we are downloading a gem file then create a spec out of it + for f in $distfiles; do + if [ "${f##*.}" = "gem" ]; then + $gem_cmd spec \ + "${XBPS_SRCDISTDIR}/${pkgname}-${version}/${f##*/}" \ + --ruby > $gemspec + fi + done + + sed 's|~>|>=|g' -i $gemspec + + $gem_cmd build --verbose ${gemspec} + + if [ "$CROSS_BUILD" ]; then + # Restore previous extconf.rb which we ship. + find . -type f -name 'extconf.rb.orig' | while read -r f; do + mv $f ${f%.*} + done + fi +} + +do_install() { + : ${gem_cmd:=gem} + + local _GEMDIR _INSTDIR + + _GEMDIR=$($gem_cmd env gemdir) + _INSTDIR=${DESTDIR}/${_GEMDIR}/gems/${pkgname#ruby-}-${version} + + # Ruby is very eager to add CFLAGS everywhere there is a compilation + # but we do both cross compilation of the modules and host compilation + # for checks, so unset CFLAGS and keep it in a separate value. + # We will manually pass CFLAGS as VOID_TAGET_CFLAGS to cross-compilation + # And ruby will use rbconfig.rb to get the proper CFLAGS for host compilation + VOID_TARGET_CFLAGS="$CFLAGS" + export VOID_TARGET_CFLAGS + unset CFLAGS + + $gem_cmd install \ + --local \ + --install-dir ${DESTDIR}/${_GEMDIR} \ + --bindir ${DESTDIR}/usr/bin \ + --ignore-dependencies \ + --no-document \ + --verbose \ + "${pkgname#ruby-}-${version}.gem" \ + -- $configure_args + + # Remove cache + rm -rf ${DESTDIR}/${_GEMDIR}/cache + + # Remove ext directory, they are only source code and configuration + # The actual extensions are in a arch path guarded + rm -rf ${_INSTDIR}/ext + + # Remove duplicated library that is available in a arch guarded + # extension + rm -rf ${_INSTDIR}/lib/*.so + + # Remove installed tests and benchmarks + rm -rf ${_INSTDIR}/{test,tests,autotest,benchmark,benchmarks,script,examples,demo} + + # Remove files shipped on the root of the gem, most of the time they are useless + find ${_INSTDIR} -maxdepth 1 -type f -delete + + # Remove unnecessary files + find ${DESTDIR}/${_GEMDIR}/extensions \( -name mkmf.log -o -name gem_make.out \) -delete + + # Place manpages in usr/share/man/man[0-9] + if [ -d ${_INSTDIR}/man ]; then + find ${_INSTDIR}/man -type f -name '*.[0-8n]' | while read -r m; do + vman ${m} + done + fi + + rm -rf "${_INSTDIR}/man" + + # Place executables in /usr/bin + if [ -d "${_INSTDIR}/bin" ]; then + for f in "${_INSTDIR}"/bin/*; do + vbin "${f}" + done + fi + + rm -rf ${_INSTDIR}/bin + + # Place conf files in their places + if [ -d ${_INSTDIR}/etc ]; then + find ${_INSTDIR}/etc -type f | while read -r c; do + vmkdir ${c%/*}/ + mv ${c} "${DESTDIR}/${c##*${_INSTDIR}/etc/}/" + done + fi + + rm -rf ${_INSTDIR}/etc + + if [ "$CROSS_BUILD" ]; then + + local _TARGET_PLATFORM _TARGET_EXT_DIR + + # Get arch of the target and host platform by reading the rbconfig.rb + # of the cross ruby + _TARGET_PLATFORM="$(ruby -r \ + $(find ${XBPS_CROSS_BASE}/usr/lib/ruby -iname rbconfig.rb) \ + -e 'puts RbConfig::CONFIG["arch"]' 2>/dev/null)" + + # Path to the extensions on a package, ruby installs against the platform + # of the host, so we have to move them to the correct place + _TARGET_EXT_DIR="${DESTDIR}/${_GEMDIR}/extensions/${_TARGET_PLATFORM}" + + find ${DESTDIR}/${_GEMDIR}/extensions -maxdepth 1 -type d \ + -exec mv '{}' ${_TARGET_EXT_DIR} \; + fi +} diff --git a/common/build-style/gnu-configure.sh b/common/build-style/gnu-configure.sh @@ -0,0 +1,39 @@ +# +# This helper is for templates using GNU configure scripts. +# +do_configure() { + : ${configure_script:=./configure} + + ${configure_script} ${configure_args} +} + +do_build() { + : ${make_cmd:=make} + + ${make_cmd} ${makejobs} ${make_build_args} ${make_build_target} +} + +do_check() { + if [ -z "$make_cmd" ] && [ -z "$make_check_target" ]; then + if make -q check 2>/dev/null; then + : + else + if [ $? -eq 2 ]; then + msg_warn 'No target to "make check".\n' + return 0 + fi + fi + fi + + : ${make_cmd:=make} + : ${make_check_target:=check} + + ${make_cmd} ${make_check_args} ${make_check_target} +} + +do_install() { + : ${make_cmd:=make} + : ${make_install_target:=install} + + ${make_cmd} DESTDIR=${DESTDIR} ${make_install_args} ${make_install_target} +} diff --git a/common/build-style/gnu-makefile.sh b/common/build-style/gnu-makefile.sh @@ -0,0 +1,41 @@ +# +# This helper is for templates using GNU Makefiles. +# +do_build() { + : ${make_cmd:=make} + + if [ -z "$make_use_env" ]; then + ${make_cmd} \ + CC="$CC" CXX="$CXX" LD="$LD" AR="$AR" RANLIB="$RANLIB" \ + CPP="$CPP" AS="$AS" OBJDUMP="$OBJDUMP" \ + CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \ + ${makejobs} ${make_build_args} ${make_build_target} + else + ${make_cmd} ${makejobs} ${make_build_args} ${make_build_target} + fi +} + +do_check() { + if [ -z "$make_cmd" ] && [ -z "$make_check_target" ]; then + if make -q check 2>/dev/null; then + : + else + if [ $? -eq 2 ]; then + msg_warn 'No target to "make check".\n' + return 0 + fi + fi + fi + + : ${make_cmd:=make} + : ${make_check_target:=check} + + ${make_cmd} ${make_check_args} ${make_check_target} +} + +do_install() { + : ${make_cmd:=make} + : ${make_install_target:=install} + + ${make_cmd} STRIP=true PREFIX=/usr DESTDIR=${DESTDIR} ${make_install_args} ${make_install_target} +} diff --git a/common/build-style/go.sh b/common/build-style/go.sh @@ -0,0 +1,49 @@ +# +# This helper is for templates for Go packages. +# + +do_configure() { + # $go_import_path must be set, or we can't link $PWD into $GOSRCPATH + # nor build from modules + if [ -z "$go_import_path" ]; then + msg_error "\"\$go_import_path\" not set on $pkgname template.\n" + fi + + # This isn't really configuration, but its needed by packages + # that do unusual things with the build where the expect to be + # able to cd into the $GOSRCPATH + if [ "${go_mod_mode}" != "off" ] && [ -f go.mod ]; then + # Skip GOPATH symlink for Go modules + msg_normal "Building $pkgname using Go modules.\n" + elif [ "${go_get}" != "yes" ]; then + mkdir -p ${GOSRCPATH%/*}/ + ln -fs "$PWD" "${GOSRCPATH}" + fi +} + +do_build() { + go_package=${go_package:-$go_import_path} + # Build using Go modules if there's a go.mod file + if [ "${go_mod_mode}" != "off" ] && [ -f go.mod ]; then + if [ -z "${go_mod_mode}" ] && [ -d vendor ]; then + msg_normal "Using vendor dir for $pkgname Go dependencies.\n" + go_mod_mode=vendor + elif [ "${go_mod_mode}" = "default" ]; then + # Allow templates to explicitly opt into the go tool's + # default behavior. + go_mod_mode= + fi + go install -p "$XBPS_MAKEJOBS" -mod="${go_mod_mode}" -x -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package} + else + # Otherwise, build using GOPATH + go get -p "$XBPS_MAKEJOBS" -x -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package} + fi +} + +do_install() { + for f in ${GOPATH}/bin/* ${GOPATH}/bin/**/*; do + if [ -f "$f" ] && [ -x "$f" ]; then + vbin "$f" + fi + done +} diff --git a/common/build-style/haskell-stack.sh b/common/build-style/haskell-stack.sh @@ -0,0 +1,37 @@ +# +# This helper is for templates built using Haskell stack. +# +# make_build_args="stack-build-flags" +# stackage="lts-X.Y" # or include a stack.yaml in $FILESDIR +# +do_build() { + # use --skip-ghc-check to really force stack to use the ghc in the system + # --system-ghc still downloads if stackage ghc version does not match ours + # this fails on all platforms other than x86_64 glibc when we bump ghc + local _stack_args="--system-ghc --skip-ghc-check" + + if [ -f "${FILESDIR}/stack.yaml" ]; then + msg_normal "Using stack config in stack.yaml.\n" + cp "${FILESDIR}/stack.yaml" . + elif [ -z "$stackage" -a -f "stack.yaml" ]; then + msg_normal "Using stack.yaml from downloaded source.\n" + else + if [ -z "$stackage" ]; then + msg_error "Stackage version not set in \$stackage.\n" + fi + msg_normal "Using stackage resolver ${stackage}.\n" + STACK_ROOT=$wrksrc/.stack \ + stack init ${_stack_args} --force --resolver ${stackage} + fi + + STACK_ROOT=$wrksrc/.stack stack ${_stack_args} ${makejobs} build \ + ${make_build_args} +} + +do_install() { + local _stack_args="--system-ghc --skip-ghc-check" + + vmkdir usr/bin + STACK_ROOT=$wrksrc/.stack stack ${_stack_args} install \ + ${make_build_args} --local-bin-path=${DESTDIR}/usr/bin +} diff --git a/common/build-style/meson.sh b/common/build-style/meson.sh @@ -0,0 +1,139 @@ +# +# This helper is for templates using meson. +# +do_patch() { + : ${meson_crossfile:=xbps_meson.cross} + + if [ "$CROSS_BUILD" ]; then + _MESON_TARGET_ENDIAN=little + # drop the -musl suffix to the target cpu, meson doesn't recognize it + _MESON_TARGET_CPU=${XBPS_TARGET_MACHINE/-musl/} + case "$XBPS_TARGET_MACHINE" in + mips|mips-musl|mipshf-musl) + _MESON_TARGET_ENDIAN=big + _MESON_CPU_FAMILY=mips + ;; + armv*) + _MESON_CPU_FAMILY=arm + ;; + i686*) + _MESON_CPU_FAMILY=x86 + ;; + ppc64le*) + _MESON_CPU_FAMILY=ppc64 + ;; + ppc64*) + _MESON_TARGET_ENDIAN=big + _MESON_CPU_FAMILY=ppc64 + ;; + ppcle*) + _MESON_CPU_FAMILY=ppc + ;; + ppc*) + _MESON_TARGET_ENDIAN=big + _MESON_CPU_FAMILY=ppc + ;; + *) + # if we reached here that means that the cpu and cpu_family + # are the same like 'x86_64' and 'aarch64' + _MESON_CPU_FAMILY=${_MESON_TARGET_CPU} + ;; + esac + + # Record cross-compiling information in cross file. + # CFLAGS and LDFLAGS must be set as c_args and c_link_args. + cat > ${meson_crossfile} <<EOF +[binaries] +c = '${CC}' +cpp = '${CXX}' +ar = '${XBPS_CROSS_TRIPLET}-gcc-ar' +nm = '${NM}' +ld = '${LD}' +strip = '${STRIP}' +readelf = '${READELF}' +objcopy = '${OBJCOPY}' +pkgconfig = '${PKG_CONFIG}' +rust = 'rustc' +g-ir-scanner = '${XBPS_CROSS_BASE}/usr/bin/g-ir-scanner' +g-ir-compiler = '${XBPS_CROSS_BASE}/usr/bin/g-ir-compiler' +g-ir-generate = '${XBPS_CROSS_BASE}/usr/bin/g-ir-generate' +llvm-config = '/usr/bin/llvm-config' +cups-config = '${XBPS_CROSS_BASE}/usr/bin/cups-config' + +[properties] +needs_exe_wrapper = true +c_args = ['$(echo ${CFLAGS} | sed -r "s/\s+/','/g")'] +c_link_args = ['$(echo ${LDFLAGS} | sed -r "s/\s+/','/g")'] + +cpp_args = ['$(echo ${CXXFLAGS} | sed -r "s/\s+/','/g")'] +cpp_link_args = ['$(echo ${LDFLAGS} | sed -r "s/\s+/','/g")'] + +[host_machine] +system = 'linux' +cpu_family = '${_MESON_CPU_FAMILY}' +cpu = '${_MESON_TARGET_CPU}' +endian = '${_MESON_TARGET_ENDIAN}' +EOF + if [[ $build_helper = *"qemu"* ]]; then + sed -e "/\[binaries\]/ a exe_wrapper = '/usr/bin/qemu-${XBPS_TARGET_QEMU_MACHINE}-static'" \ + -i ${meson_crossfile} + fi + + unset _MESON_CPU_FAMILY _MESON_TARGET_CPU _MESON_TARGET_ENDIAN + fi +} + +do_configure() { + : ${meson_cmd:=meson} + : ${meson_builddir:=build} + : ${meson_crossfile:=xbps_meson.cross} + + if [ "$CROSS_BUILD" ]; then + configure_args+=" --cross-file=${meson_crossfile}" + fi + + ${meson_cmd} \ + --prefix=/usr \ + --libdir=/usr/lib \ + --libexecdir=/usr/libexec \ + --bindir=/usr/bin \ + --sbindir=/usr/bin \ + --includedir=/usr/include \ + --datadir=/usr/share \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localedir=/usr/share/locale \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --sharedstatedir=/var/lib \ + --buildtype=plain \ + --auto-features=enabled \ + --wrap-mode=nodownload \ + -Db_lto=true -Db_ndebug=true \ + -Db_staticpic=true \ + ${configure_args} . ${meson_builddir} +} + +do_build() { + : ${make_cmd:=ninja} + : ${make_build_target:=all} + : ${meson_builddir:=build} + + ${make_cmd} -C ${meson_builddir} ${makejobs} ${make_build_args} ${make_build_target} +} + +do_check() { + : ${make_cmd:=ninja} + : ${make_check_target:=test} + : ${meson_builddir:=build} + + ${make_cmd} -C ${meson_builddir} ${makejobs} ${make_check_args} ${make_check_target} +} + +do_install() { + : ${make_cmd:=ninja} + : ${make_install_target:=install} + : ${meson_builddir:=build} + + DESTDIR=${DESTDIR} ${make_cmd} -C ${meson_builddir} ${make_install_args} ${make_install_target} +} diff --git a/common/build-style/meta.sh b/common/build-style/meta.sh @@ -0,0 +1,9 @@ +# meta pkg build style; do nothing. + +do_fetch() { + : +} + +do_install() { + : +} diff --git a/common/build-style/perl-ModuleBuild.sh b/common/build-style/perl-ModuleBuild.sh @@ -0,0 +1,52 @@ +# +# This helper does the required steps to be able to build and install +# perl modules with the Module::Build method into the correct location. +# +# Required vars to be set by a template: +# +# build_style=perl-ModuleBuild +# +do_configure() { + if [ -f Build.PL ]; then + # When cross compiling Module::Build reads in the build flags from the host perl, not the target: + # extract the target specific flags (the ones also set in perl’s template) from + # the target perl configuration and use them to override Module::Build’s default + _conf="${XBPS_CROSS_BASE}/usr/lib/perl5/core_perl/Config_heavy.pl" + _optimize=$(sed -n "s;^optimize='\(.*\)';\1;p" $_conf) + _ccflags=$(sed -n "s;^ccflags='\(.*\)';\1;p" $_conf) + _lddlflags=$(sed -n "s;^lddlflags='\(.*\)';\1;p" $_conf) + _ldflags=$(sed -n "s;^ldflags='\(.*\)';\1;p" $_conf) + _archlibexp=$(sed -n "s;^archlibexp='\(.*\)';\1;p" $_conf) + + PERL_MM_USE_DEFAULT=1 PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$DESTDIR'" \ + PERL_MB_OPT="--installdirs vendor --destdir '$DESTDIR'" \ + LD="$CC" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \ + perl Build.PL --config optimize="$_optimize" --config ccflags="$_ccflags" \ + --config lddlflags="$_lddlflags" --config ldflags="$_ldflags" \ + --config archlibexp="${XBPS_CROSS_BASE}${_archlibexp}" \ + ${configure_args} INSTALLDIRS=vendor + else + msg_error "$pkgver: cannot find Build.PL for perl module!\n" + fi +} + +do_build() { + if [ ! -x ./Build ]; then + msg_error "$pkgver: cannot find ./Build script!\n" + fi + LD="$CC" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" ./Build ${make_build_args} +} + +do_check() { + if [ ! -x ./Build ]; then + msg_error "$pkgver: cannot find ./Build script!\n" + fi + ./Build test +} + +do_install() { + if [ ! -x ./Build ]; then + msg_error "$pkgver: cannot find ./Build script!\n" + fi + ./Build ${make_install_args} install +} diff --git a/common/build-style/perl-module.sh b/common/build-style/perl-module.sh @@ -0,0 +1,88 @@ +# +# This helper does the required steps to be able to build and install +# perl modules that use MakeMaker into the correct location. +# +# Required vars to be set by a template: +# +# build_style=perl-module +# +# Optionally if the module needs more directories to be configured other +# than $XBPS_BUILDDIR/$wrksrc, one can use (relative to $wrksrc): +# +# perl_configure_dirs="blob/bob foo/blah" +# +do_configure() { + local perlmkf + + local perlprefix=${XBPS_STATEDIR}/perlprefix-${XBPS_TARGET_MACHINE} + mkdir -p $perlprefix + if [ -d "$XBPS_CROSS_BASE/usr/lib/perl5/core_perl" ]; then + cp "$XBPS_CROSS_BASE/usr/lib/perl5/core_perl/Config"*.p? $perlprefix + cp "$XBPS_CROSS_BASE/usr/lib/perl5/core_perl/Errno.pm" $perlprefix + sed -i -e "s;archlibexp => '\(.*\)';archlibexp => '${XBPS_CROSS_BASE}\1';" \ + ${perlprefix}/Config.pm + sed -i -e "s;^archlibexp='\(.*\)';archlibexp='${XBPS_CROSS_BASE}\1';" \ + ${perlprefix}/Config_heavy.pl + else + cp "/usr/lib/perl5/core_perl/Config"*.p? $perlprefix + cp "/usr/lib/perl5/core_perl/Errno.pm" $perlprefix + fi + export PERL5LIB=$perlprefix + + if [ -f ${wrksrc}/Makefile.PL ]; then + sed -i "s,/usr/include,${XBPS_CROSS_BASE}/usr/include,g" ${wrksrc}/Makefile.PL + fi + + if [ -z "$perl_configure_dirs" ]; then + perlmkf="$wrksrc/Makefile.PL" + if [ ! -f $perlmkf ]; then + msg_error "*** ERROR couldn't find $perlmkf, aborting ***\n" + fi + + cd $wrksrc + PERL_MM_USE_DEFAULT=1 GCC="$CC" CC="$CC" LD="$CC" \ + OPTIMIZE="$CFLAGS" \ + CFLAGS="$CFLAGS -I${XBPS_CROSS_BASE}/usr/include" \ + LDFLAGS="$LDFLAGS -L${XBPS_CROSS_BASE}/usr/lib -lperl" \ + LDDLFLAGS="-shared $CFLAGS -L${XBPS_CROSS_BASE}/usr/lib" \ + perl Makefile.PL ${configure_args} INSTALLDIRS=vendor + fi + + for i in ${perl_configure_dirs}; do + perlmkf="$wrksrc/$i/Makefile.PL" + if [ -f $perlmkf ]; then + cd $wrksrc/$i + PERL_MM_USE_DEFAULT=1 GCC="$CC" CC="$CC" LD="$CC" \ + OPTIMIZE="$CFLAGS" \ + CFLAGS="$CFLAGS -I${XBPS_CROSS_BASE}/usr/include" \ + LDFLAGS="$LDFLAGS -L${XBPS_CROSS_BASE}/usr/lib -lperl" \ + LDDLFLAGS="-shared $CFLAGS -L${XBPS_CROSS_BASE}/usr/lib -lperl" \ + perl Makefile.PL ${make_build_args} INSTALLDIRS=vendor + else + msg_error "*** ERROR: couldn't find $perlmkf, aborting **\n" + fi + done +} + +do_build() { + : ${make_cmd:=make} + + ${make_cmd} CC="$CC" LD="$CC" CFLAGS="$CFLAGS" OPTIMIZE="$CFLAGS" \ + LDFLAGS="$LDFLAGS -L${XBPS_CROSS_BASE}/usr/lib -lperl" \ + LDDLFLAGS="-shared $CFLAGS -L${XBPS_CROSS_BASE}/usr/lib -lperl" \ + ${makejobs} ${make_build_args} ${make_build_target} +} + +do_check() { + : ${make_cmd:=make} + : ${make_check_target:=test} + + ${make_cmd} ${make_check_args} ${make_check_target} +} + +do_install() { + : ${make_cmd:=make} + : ${make_install_target:=install} + + ${make_cmd} DESTDIR=${DESTDIR} ${make_install_args} ${make_install_target} +} diff --git a/common/build-style/python-module.sh b/common/build-style/python-module.sh @@ -0,0 +1,96 @@ +# +# This helper is for templates installing python modules. +# + +do_build() { + : ${python_versions:="2.7 $py3_ver"} + local pyver= tmp_cflags="$CFLAGS" tmp_ldflags="$LDFLAGS" + + for pyver in $python_versions; do + if [ -n "$CROSS_BUILD" ]; then + CFLAGS="$tmp_cflags" + LDFLAGS="$tmp_ldflags" + ADDENV= + + PYPREFIX="$XBPS_CROSS_BASE" + CFLAGS+=" -I${XBPS_CROSS_BASE}/include/python${pyver} -I${XBPS_CROSS_BASE}/usr/include" + LDFLAGS+=" -L${XBPS_CROSS_BASE}/lib/python${pyver} -L${XBPS_CROSS_BASE}/usr/lib" + CC="${XBPS_CROSS_TRIPLET}-gcc -pthread $CFLAGS $LDFLAGS" + LDSHARED="${CC} -shared $LDFLAGS" + case $pyver in + 3.*) + for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do + f=${f##*/} + _PYTHON_SYSCONFIGDATA_NAME=${f%.py} + done + ADDENV+=" PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}" + ADDENV+=" _PYTHON_SYSCONFIGDATA_NAME="$_PYTHON_SYSCONFIGDATA_NAME"" + esac + env CC="$CC" LDSHARED="$LDSHARED" $ADDENV \ + PYPREFIX="$PYPREFIX" CFLAGS="$CFLAGS" \ + LDFLAGS="$LDFLAGS" python${pyver} setup.py \ + build --build-base=build-${pyver} ${make_build_args} + else + python${pyver} setup.py build --build-base=build-${pyver} ${make_build_args} + fi + done +} + +do_check() { + : ${python_versions:="2.7 $py3_ver"} + + for pyver in $python_versions; do + ln -s build-${pyver} build + if [ -z "$make_check_target" ]; then + if ! python${pyver} setup.py --help test >/dev/null 2>&1; then + msg_warn "No command 'test' defined by setup.py for python${pyver}.\n" + rm build + return 0 + fi + fi + + python${pyver} setup.py ${make_check_target:-test} ${make_check_args} + rm build + done +} + +do_install() { + : ${python_versions:="2.7 $py3_ver"} + local pyver= + + for pyver in $python_versions; do + if [ -n "$CROSS_BUILD" ]; then + ADDENV= + PYPREFIX="$XBPS_CROSS_BASE" + CFLAGS+=" -I${XBPS_CROSS_BASE}/include/python${pyver} -I${XBPS_CROSS_BASE}/usr/include" + LDFLAGS+=" -L${XBPS_CROSS_BASE}/lib/python${pyver} -L${XBPS_CROSS_BASE}/usr/lib" + CC="${XBPS_CROSS_TRIPLET}-gcc -pthread $CFLAGS $LDFLAGS" + LDSHARED="${CC} -shared $LDFLAGS" + case $pyver in + 3.*) + for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do + f=${f##*/} + _PYTHON_SYSCONFIGDATA_NAME=${f%.py} + done + ADDENV+=" PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}" + ADDENV+=" _PYTHON_SYSCONFIGDATA_NAME="$_PYTHON_SYSCONFIGDATA_NAME"" + esac + env CC="$CC" LDSHARED="$LDSHARED" $ADDENV \ + PYPREFIX="$PYPREFIX" CFLAGS="$CFLAGS" \ + LDFLAGS="$LDFLAGS" python${pyver} setup.py \ + build --build-base=build-${pyver} \ + install --prefix=/usr --root=${DESTDIR} ${make_install_args} + else + python${pyver} setup.py build --build-base=build-${pyver} \ + install --prefix=/usr --root=${DESTDIR} ${make_install_args} + fi + + # Rename unversioned scripts to avoid name conflicts. + if [ -d ${DESTDIR}/usr/bin ]; then + find ${DESTDIR}/usr/bin -type f ! -name "*[[:digit:]]" | while IFS= read -r f _; do + mv "${f}" "${f}${pyver%.*}" + echo "[python-module] Unversioned script renamed to '${f#$DESTDIR}${pyver%.*}'" + done + fi + done +} diff --git a/common/build-style/python2-module.sh b/common/build-style/python2-module.sh @@ -0,0 +1,34 @@ +# +# This helper is for templates installing python2-only modules. +# + +do_build() { + if [ -n "$CROSS_BUILD" ]; then + PYPREFIX="$XBPS_CROSS_BASE" + CFLAGS+=" -I${XBPS_CROSS_BASE}/${py2_inc} -I${XBPS_CROSS_BASE}/usr/include" + LDFLAGS+=" -L${XBPS_CROSS_BASE}/${py2_lib} -L${XBPS_CROSS_BASE}/usr/lib" + CC="${XBPS_CROSS_TRIPLET}-gcc -pthread $CFLAGS $LDFLAGS" + LDSHARED="${CC} -shared $LDFLAGS" + env CC="$CC" LDSHARED="$LDSHARED" \ + PYPREFIX="$PYPREFIX" CFLAGS="$CFLAGS" \ + LDFLAGS="$LDFLAGS" python2 setup.py build ${make_build_args} + else + python2 setup.py build ${make_build_args} + fi +} + +do_install() { + if [ -n "$CROSS_BUILD" ]; then + PYPREFIX="$XBPS_CROSS_BASE" + CFLAGS+=" -I${XBPS_CROSS_BASE}/${py2_inc} -I${XBPS_CROSS_BASE}/usr/include" + LDFLAGS+=" -L${XBPS_CROSS_BASE}/${py2_lib} -L${XBPS_CROSS_BASE}/usr/lib" + CC="${XBPS_CROSS_TRIPLET}-gcc -pthread $CFLAGS $LDFLAGS" + LDSHARED="${CC} -shared $LDFLAGS" + env CC="$CC" LDSHARED="$LDSHARED" \ + PYPREFIX="$PYPREFIX" CFLAGS="$CFLAGS" \ + LDFLAGS="$LDFLAGS" python2 setup.py \ + install --prefix=/usr --root=${DESTDIR} ${make_install_args} + else + python2 setup.py install --prefix=/usr --root=${DESTDIR} ${make_install_args} + fi +} diff --git a/common/build-style/python3-module.sh b/common/build-style/python3-module.sh @@ -0,0 +1,58 @@ +# +# This helper is for templates installing python3-only modules. +# + +do_build() { + if [ -n "$CROSS_BUILD" ]; then + PYPREFIX="$XBPS_CROSS_BASE" + CFLAGS+=" -I${XBPS_CROSS_BASE}/${py3_inc} -I${XBPS_CROSS_BASE}/usr/include" + LDFLAGS+=" -L${XBPS_CROSS_BASE}/${py3_lib} -L${XBPS_CROSS_BASE}/usr/lib" + CC="${XBPS_CROSS_TRIPLET}-gcc -pthread $CFLAGS $LDFLAGS" + LDSHARED="${CC} -shared $LDFLAGS" + for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do + f=${f##*/} + _PYTHON_SYSCONFIGDATA_NAME=${f%.py} + done + env CC="$CC" LDSHARED="$LDSHARED" \ + PYPREFIX="$PYPREFIX" CFLAGS="$CFLAGS" \ + PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib} \ + _PYTHON_SYSCONFIGDATA_NAME="$_PYTHON_SYSCONFIGDATA_NAME" \ + LDFLAGS="$LDFLAGS" python3 setup.py build ${make_build_args} + else + python3 setup.py build ${make_build_args} + fi +} + +do_check() { + if [ -z "$make_check_target" ]; then + if ! python3 setup.py --help test >/dev/null 2>&1; then + msg_warn "No command 'test' defined by setup.py.\n" + return 0 + fi + fi + + : ${make_check_target:=test} + python3 setup.py ${make_check_target} ${make_check_args} +} + +do_install() { + if [ -n "$CROSS_BUILD" ]; then + PYPREFIX="$XBPS_CROSS_BASE" + CFLAGS+=" -I${XBPS_CROSS_BASE}/${py3_inc} -I${XBPS_CROSS_BASE}/usr/include" + LDFLAGS+=" -L${XBPS_CROSS_BASE}/${py3_lib} -L${XBPS_CROSS_BASE}/usr/lib" + CC="${XBPS_CROSS_TRIPLET}-gcc -pthread $CFLAGS $LDFLAGS" + LDSHARED="${CC} -shared $LDFLAGS" + for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do + f=${f##*/} + _PYTHON_SYSCONFIGDATA_NAME=${f%.py} + done + env CC="$CC" LDSHARED="$LDSHARED" \ + PYPREFIX="$PYPREFIX" CFLAGS="$CFLAGS" \ + PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib} \ + _PYTHON_SYSCONFIGDATA_NAME="$_PYTHON_SYSCONFIGDATA_NAME" \ + LDFLAGS="$LDFLAGS" python3 setup.py \ + install --prefix=/usr --root=${DESTDIR} ${make_install_args} + else + python3 setup.py install --prefix=/usr --root=${DESTDIR} ${make_install_args} + fi +} diff --git a/common/build-style/qmake.sh b/common/build-style/qmake.sh @@ -0,0 +1,144 @@ +# +# This helper is for templates using Qt4/Qt5 qmake. +# +do_configure() { + local qmake + local qmake_args + if [ -x "/usr/lib/qt5/bin/qmake" ]; then + # Qt5 qmake + qmake="/usr/lib/qt5/bin/qmake" + fi + if [ -x "/usr/lib/qt/bin/qmake" ]; then + # Qt4 qmake + qmake="/usr/lib/qt/bin/qmake" + fi + if [ -z "${qmake}" ]; then + msg_error "${pkgver}: Could not find qmake - missing in hostdepends?\n" + fi + if [ "$CROSS_BUILD" ] && [ "$qmake" == "/usr/lib/qt5/bin/qmake" ]; then + case $XBPS_TARGET_MACHINE in + i686*) _qt_arch=i386;; + x86_64*) _qt_arch=x86_64;; + aarch64*) _qt_arch=arm64;; + arm*) _qt_arch=arm;; + mips*) _qt_arch=mips;; + esac + mkdir -p "${wrksrc}/.target-spec/linux-g++" + cat > "${wrksrc}/.target-spec/linux-g++/qmake.conf" <<_EOF +MAKEFILE_GENERATOR = UNIX +CONFIG += incremental +QMAKE_INCREMENTAL_STYLE = sublib + +include(/usr/lib/qt5/mkspecs/common/linux.conf) +include(/usr/lib/qt5/mkspecs/common/gcc-base-unix.conf) +include(/usr/lib/qt5/mkspecs/common/g++-unix.conf) + +QMAKE_TARGET_CONFIG = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/qconfig.pri +QMAKE_TARGET_MODULE = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/qmodule.pri +QMAKE_CC = ${CC} +QMAKE_CXX = ${CXX} +QMAKE_LINK = ${CXX} +QMAKE_LINK_C = ${CC} +QMAKE_LINK_SHLIB = ${CXX} + +QMAKE_AR = ${XBPS_CROSS_TRIPLET}-gcc-ar cqs +QMAKE_OBJCOPY = ${OBJCOPY} +QMAKE_NM = ${NM} -P +QMAKE_STRIP = ${STRIP} + +QMAKE_CFLAGS = ${CFLAGS} +QMAKE_CXXFLAGS = ${CXXFLAGS} +QMAKE_LFLAGS = ${LDFLAGS} +load(qt_config) +_EOF + echo "#include \"${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/linux-g++/qplatformdefs.h\"" > "${wrksrc}/.target-spec/linux-g++/qplatformdefs.h" + + mkdir -p "${wrksrc}/.host-spec/linux-g++" + cat > "${wrksrc}/.host-spec/linux-g++/qmake.conf" <<_EOF +MAKEFILE_GENERATOR = UNIX +CONFIG += incremental +QMAKE_INCREMENTAL_STYLE = sublib + +include(/usr/lib/qt5/mkspecs/common/linux.conf) +include(/usr/lib/qt5/mkspecs/common/gcc-base-unix.conf) +include(/usr/lib/qt5/mkspecs/common/g++-unix.conf) + +QMAKE_TARGET_CONFIG = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/qconfig.pri +QMAKE_TARGET_MODULE = ${XBPS_CROSS_BASE}/usr/lib/qt5/mkspecs/qmodule.pri +QMAKE_CC = ${CC_host} +QMAKE_CXX = ${CXX_host} +QMAKE_LINK = ${CXX_host} +QMAKE_LINK_C = ${CC_host} +QMAKE_LINK_SHLIB = ${CXX_host} + +QMAKE_AR = gcc-ar cqs +QMAKE_OBJCOPY = ${OBJCOPY_host} +QMAKE_NM = ${NM_host} -P +QMAKE_STRIP = ${STRIP_host} + +QMAKE_CFLAGS = ${CFLAGS_host} +QMAKE_CXXFLAGS = ${CXXFLAGS_host} +QMAKE_LFLAGS = ${LDFLAGS_host} +load(qt_config) +_EOF +echo '#include "/usr/lib/qt5/mkspecs/linux-g++/qplatformdefs.h"' > "${wrksrc}/.host-spec/linux-g++/qplatformdefs.h" + cat > "${wrksrc}/qt.conf" <<_EOF +[Paths] +Sysroot=${XBPS_CROSS_BASE} +Prefix=/usr +ArchData=${XBPS_CROSS_BASE}/usr/lib/qt5 +Data=${XBPS_CROSS_BASE}/usr/share/qt5 +Documentation=${XBPS_CROSS_BASE}/usr/share/doc/qt5 +Headers=${XBPS_CROSS_BASE}/usr/include/qt5 +Libraries=${XBPS_CROSS_BASE}/usr/lib +LibraryExecutables=/usr/lib/qt5/libexec +Binaries=/usr/lib/qt5/bin +Tests=${XBPS_CROSS_BASE}/usr/tests +Plugins=/usr/lib/qt5/plugins +Imports=${XBPS_CROSS_BASE}/usr/lib/qt5/imports +Qml2Imports=${XBPS_CROSS_BASE}/usr/lib/qt5/qml +Translations=${XBPS_CROSS_BASE}/usr/share/qt5/translations +Settings=${XBPS_CROSS_BASE}/etc/xdg +Examples=${XBPS_CROSS_BASE}/usr/share/qt5/examples +HostPrefix=/usr +HostData=/usr/lib/qt5 +HostBinaries=/usr/lib/qt5/bin +HostLibraries=/usr/lib +Spec=${wrksrc}/.host-spec/linux-g++ +TargetSpec=${wrksrc}/.target-spec/linux-g++ +_EOF + qmake_args="-qtconf ${wrksrc}/qt.conf PKG_CONFIG_EXECUTABLE=${XBPS_WRAPPERDIR}/${PKG_CONFIG}" + ${qmake} ${qmake_args} \ + PREFIX=/usr \ + QT_INSTALL_PREFIX=/usr \ + LIB=/usr/lib \ + QT_TARGET_ARCH=$_qt_arch \ + ${configure_args} + else + ${qmake} ${qmake_args} \ + PREFIX=/usr \ + QT_INSTALL_PREFIX=/usr \ + LIB=/usr/lib \ + QMAKE_CC=$CC QMAKE_CXX=$CXX \ + QMAKE_LINK=$CXX QMAKE_LINK_C=$CC \ + QMAKE_CFLAGS="${CFLAGS}" \ + QMAKE_CXXFLAGS="${CXXFLAGS}" \ + QMAKE_LFLAGS="${LDFLAGS}" \ + ${configure_args} + fi +} + +do_build() { + : ${make_cmd:=make} + + ${make_cmd} ${makejobs} ${make_build_args} ${make_build_target} \ + CC="$CC" CXX="$CXX" LINK="$CXX" +} + +do_install() { + : ${make_cmd:=make} + : ${make_install_target:=install} + + ${make_cmd} STRIP=true PREFIX=/usr DESTDIR=${DESTDIR} \ + INSTALL_ROOT=${DESTDIR} ${make_install_args} ${make_install_target} +} diff --git a/common/build-style/raku-dist.sh b/common/build-style/raku-dist.sh @@ -0,0 +1,16 @@ +# +# This helper is for Raku package templates. +# + +do_check() { + RAKULIB=lib prove -r -e raku t/ +} + +do_install() { + export RAKUDO_LOG_PRECOMP=1 + export RAKUDO_RERESOLVE_DEPENDENCIES=0 + raku-install-dist \ + --to=${DESTDIR}/usr/lib/raku/vendor \ + --for=vendor \ + --from=. +} diff --git a/common/build-style/ruby-module.sh b/common/build-style/ruby-module.sh @@ -0,0 +1,9 @@ +# +# This helper is for templates installing ruby modules. +# + +do_install() { + local _vendorlibdir=$(ruby -e 'puts RbConfig::CONFIG["vendorlibdir"]') + + LANG=C ruby install.rb --destdir=${DESTDIR} --sitelibdir=${_vendorlibdir} ${make_install_args} +} diff --git a/common/build-style/scons.sh b/common/build-style/scons.sh @@ -0,0 +1,26 @@ +# +# This helper is for templates using scons. +# +do_build() { + : ${make_cmd:=scons} + + ${make_cmd} ${makejobs} CC=$CC CXX=$CXX CCFLAGS="$CFLAGS" \ + cc=$CC cxx=$CXX ccflags="$CFLAGS" \ + CXXFLAGS="$CXXFLAGS" LINKFLAGS="$LDFLAGS" \ + cxxflags="$CXXFLAGS" linkflags="$LDFLAGS" \ + RANLIB="$RANLIB" ranlib="$RANLIB" \ + prefix=/usr destdir=${DESTDIR} DESTDIR=${DESTDIR} \ + ${make_build_args} ${make_build_target} +} +do_install() { + : ${make_cmd:=scons} + : ${make_install_target:=install} + + ${make_cmd} ${makejobs} CC=$CC CXX=$CXX CCFLAGS="$CFLAGS" \ + cc=$CC cxx=$CXX ccflags="$CFLAGS" \ + CXXFLAGS="$CXXFLAGS" LINKFLAGS="$LDFLAGS" \ + cxxflags="$CXXFLAGS" linkflags="$LDFLAGS" \ + RANLIB="$RANLIB" ranlib="$RANLIB" \ + prefix=/usr destdir=${DESTDIR} DESTDIR=${DESTDIR} \ + ${make_install_args} ${make_install_target} +} diff --git a/common/build-style/slashpackage.sh b/common/build-style/slashpackage.sh @@ -0,0 +1,35 @@ +# +# This helper is for templates building slashpackage software. +# http://cr.yp.to/slashpackage.html +# +# required variables +# +# build_style=slashpackage +# wrksrc=<category> +# build_wrksrc=${pkgname}-${version} +# distfiles=<download link> +# +# example (daemontools) +# +# Template file for 'daemontools' +# pkgname=daemontools +# version=0.76 +# revision=1 +# wrksrc=admin +# build_wrksrc=${pkgname}-${version} +# build_style=slashpackage +# short_desc="A collection of tools for managing UNIX services" +# maintainer="bougyman <tj@geoforce.com>" +# license="Public Domain" +# homepage="http://cr.yp.to/daemontools.html" +# distfiles="http://cr.yp.to/daemontools/${pkgname}-${version}.tar.gz" + +do_build() { + package/compile +} + +do_install() { + for command in command/*; do + vbin $command + done +} diff --git a/common/build-style/texmf.sh b/common/build-style/texmf.sh @@ -0,0 +1,44 @@ +do_build() { + local f p + mkdir -p "build/usr/share/texmf-dist" + find . -maxdepth 1 -print -name "*.tar.xz" \ + -exec bsdtar -C "build/usr/share/texmf-dist" -xf {} \; + cd "build/usr/share/texmf-dist/" + if [ -d "texmf-dist" ] ; then + rsync -ar texmf-dist/ ./ + rm -rf texmf-dist/ + fi + rm -f LICENSE* + while IFS=' ' read -r f p ; do + if [ "$p" = "$pkgname" ] && ! [ -e "$f" ]; then + msg_error "$pkgver: missing file $f\n" + elif [ "$p" != "$pkgname" ] && [ -e "$f" ]; then + echo "removed $f" + mkdir -p ../texlive/removed + echo "$f" >> ../texlive/removed/$pkgname.txt + rm -f "$f" + fi + done < "${XBPS_COMMONDIR}/environment/build-style/texmf/ownership.txt" +} + +do_check() { + local f p exitcode=0 + cd build + while read p; do + if [[ ${p%-*} =~ .*-bin$ ]] || [ "${p%-*}" = "$pkgname" ]; then + continue + fi + echo checking conflicts with ${p}... + while IFS= read -r f; do + if [ -e ".$f" ]; then + msg_red "both contain file $f\n" + exitcode=1 + fi + done < <(xbps-query -Rf $p | sed 's/ -> .*//') + done < <(xbps-query -Rs texlive -p pkgver | cut -d : -f 1) + return $exitcode +} + +do_install() { + vcopy build/usr . +} diff --git a/common/build-style/waf.sh b/common/build-style/waf.sh @@ -0,0 +1,20 @@ +# +# This helper is for templates using WAF to build/install. +# +do_configure() { + : ${configure_script:=waf} + + PYTHON=/usr/bin/python2 python2 ${configure_script} configure --prefix=/usr --libdir=/usr/lib ${configure_args} +} + +do_build() { + : ${configure_script:=waf} + + PYTHON=/usr/bin/python2 python2 ${configure_script} build ${make_build_args} +} + +do_install() { + : ${configure_script:=waf} + + PYTHON=/usr/bin/python2 python2 ${configure_script} install --destdir=${DESTDIR} ${make_install_args} +} diff --git a/common/build-style/waf3.sh b/common/build-style/waf3.sh @@ -0,0 +1,20 @@ +# +# This helper is for templates using WAF with python3 to build/install. +# +do_configure() { + : ${configure_script:=waf} + + PYTHON=/usr/bin/python3 python3 ${configure_script} configure --prefix=/usr --libdir=/usr/lib ${configure_args} +} + +do_build() { + : ${configure_script:=waf} + + PYTHON=/usr/bin/python3 python3 ${configure_script} build ${make_build_args} +} + +do_install() { + : ${configure_script:=waf} + + PYTHON=/usr/bin/python3 python3 ${configure_script} install --destdir=${DESTDIR} ${make_install_args} +} diff --git a/common/chroot-style/README b/common/chroot-style/README @@ -0,0 +1,13 @@ +CHROOT STYLES +============= + +This directory contains scripts to perform the chroot operation with xbps-src. +The scripts should accept at least 5 arguments: + + - $1 (MASTERDIR) masterdir to chroot + - $2 (DISTDIR) path to the void-packages directory + - $3 (HOSTDIR) path to hostdir + - $4 (EXTRA_ARGS) additional arguments to be passed + - $5 (CMD) command to execute + - $@ remaining arguments to pass + diff --git a/common/chroot-style/bwrap.sh b/common/chroot-style/bwrap.sh @@ -0,0 +1,23 @@ +#!/bin/sh +# +# This chroot script uses bubblewrap (see https://github.com/projectatomic/bubblewrap) +# +set -e +readonly MASTERDIR="$1" +readonly DISTDIR="$2" +readonly HOSTDIR="$3" +readonly EXTRA_ARGS="$4" +shift 4 + +if ! command -v bwrap >/dev/null 2>&1; then + exit 1 +fi + +if [ -z "$MASTERDIR" -o -z "$DISTDIR" ]; then + echo "$0 MASTERDIR/DISTDIR not set" + exit 1 +fi + +bwrap --dev-bind "$MASTERDIR" / --dev-bind "$DISTDIR" /void-packages \ + --dev /dev --tmpfs /tmp --proc /proc \ + ${HOSTDIR:+--dev-bind "$HOSTDIR" /host} $EXTRA_ARGS "$@" diff --git a/common/chroot-style/ethereal.sh b/common/chroot-style/ethereal.sh @@ -0,0 +1,135 @@ +#!/bin/sh +# +# This chroot script uses symlinks to emulate being in a chroot using +# the host system as the masterdir +# +# It will damage your host system, only use it in disposable +# containers. +# +# 2 extra steps required when using this chroot-style: +# 1. Symlink / to masterdir inside the void-packages repo +# 2. write the arch of the host system, as dictated by xbps-uhelper arch +# into /.xbps_chroot_init +# +# The supported way to make use of thie chroot-style is to create +# a root filesystem that has base-chroot and git installed and +# have it inside a container engine like Docker. +# +# Docker example: +# $ mkdir -p /tmp/image +# $ xbps-install -y -r /tmp/image \ +# -R http://mirrors.servercentral.com/voidlinux/current \ +# -S base-chroot +# $ tar -pC /tmp/image -c . | sudo docker import - voidlinux/masterdir +# $ rm -rf /tmp/image +# # docker run --rm -it \ +# -e XBPS_CHROOT_CMD=ethereal \ +# -e XBPS_ALLOW_CHROOT_BREAKOUT=yes \ +# -v $(pwd):/hostrepo voidlinux/masterdir \ +# /bin/bash -c 'ln -s / /hostrepo/masterdir && /hostrepo/xbps-src pkg <pkgname>' +# + +readonly MASTERDIR="$1" +readonly DISTDIR="$2" +readonly HOSTDIR="$3" +readonly EXTRA_ARGS="$4" +readonly CMD="$5" +shift 5 + +if [ -z "$MASTERDIR" -o -z "$DISTDIR" ]; then + echo "$0 MASTERDIR/DISTDIR not set" + exit 1 +fi + +msg_red() { + # error messages in bold/red + [ -n "$NOCOLORS" ] || printf >&2 "\033[1m\033[31m" + printf "=> ERROR: %s\\n" "$@" >&2 + [ -n "$NOCOLORS" ] || printf >&2 "\033[m" +} + +fake_mount() { + # If we already have a symlink from the desired place + # to the base location then just return 0 + if [ -L "$2" -a "$(readlink "$2")" = "$1" ]; then + return 0 + fi + + if [ -d "$2" ] && ! rmdir "$2" >/dev/null 2>&1; then + msg_red "Failed to remove $2, not empty ?\n" + exit 1 + fi + + [ -f "$2" -o -L "$2" ] && rm -f "$2" + + ln -s "$1" "$2" + echo "linked $2 -> $1" +} + +if [ "${XBPS_ALLOW_CHROOT_BREAKOUT}" != "yes" ]; then + msg_red "chroot-style 'ethereal' requires XBPS_ALLOW_CHROOT_BREAKOUT=yes\n" + msg_red "This chroot-style is meant for disposable containers and will destroy your system\n" + exit 1 +fi + +if [ ! -L "$MASTERDIR" -o "$(readlink "$MASTERDIR")" != "/" ]; then + msg_red "$MASTERDIR isn't symlinked to /!\n" + exit 1 +fi + +fake_mount "$DISTDIR" "$MASTERDIR"/void-packages + +# Do the same for hostdir +if [ -n "$HOSTDIR" ]; then + fake_mount "$HOSTDIR" "$MASTERDIR"/host +fi + +# xbps-src may send some other binds, parse them here +while getopts 'b:' c -- "$EXTRA_ARGS"; do + # Skip everything that's not a bind + [ "$c" = "b" ] || continue + + from="${OPTARG%:*}" + to="${OPTARG#*:}" + + fake_mount "$from" "$to" + + mounts="${mounts} $to" +done + +# Store current directory for returning later +OLDPWD="$(pwd)" + +# To give the illusion we entered the chroot, cd to / +cd / || { + msg_red "Failed to change directory to root!\n" + exit 1 ; } + +# Tell xbps-src that we are "in the chroot" +# Start with `env` so our environment var's stay the same +env IN_CHROOT=1 $CMD $@ + +# Store return of the command we care about +ret="$?" + +# Return to OLDPWD +cd "${OLDPWD}" + +# Remove the symlink and restore an empty dir to simulate +# an umount operation. +if [ -n "$HOSTDIR" ]; then + rm -f "$MASTERDIR"/host + mkdir -p "$MASTERDIR"/host +fi + +# Same as the operation above, do it all for all mountpoints +# that were passed to us. +for m in $mounts; do + rm -f "$m" + mkdir -p "$m" +done + +rm -f "$MASTERDIR"/void-packages +mkdir -p "$MASTERDIR"/void-packages + +exit $ret diff --git a/common/chroot-style/proot.sh b/common/chroot-style/proot.sh @@ -0,0 +1,30 @@ +#!/bin/sh +# +# This chroot script uses proot (see http://proot.me) +# +readonly MASTERDIR="$1" +readonly DISTDIR="$2" +readonly HOSTDIR="$3" +readonly EXTRA_ARGS="$4" +shift 4 + +if ! command -v proot >/dev/null 2>&1; then + exit 1 +fi + +if [ -z "$MASTERDIR" -o -z "$DISTDIR" ]; then + echo "$0 MASTERDIR/DISTDIR not set" + exit 1 +fi + +# proot does not properly return the resultcode. Workaround this +RESULT=$(mktemp) || exit 1 + +PROOT_NO_SECCOMP=1 proot -r $MASTERDIR -w / -b "$RESULT:/.result" -b $DISTDIR:/void-packages \ + ${HOSTDIR:+-b $HOSTDIR:/host} -b /proc:/proc -b /dev:/dev \ + -b /sys:/sys $EXTRA_ARGS /bin/sh -c '$@; echo $? > /.result' $0 $@ + +rv=$(cat "$RESULT") +rm "$RESULT" + +exit $rv diff --git a/common/chroot-style/uchroot.sh b/common/chroot-style/uchroot.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# +# This chroot script uses xbps-uchroot(8). +# +readonly MASTERDIR="$1" +readonly DISTDIR="$2" +readonly HOSTDIR="$3" +readonly EXTRA_ARGS="$4" +readonly CMD="$5" +shift 5 + +if ! command -v xbps-uchroot >/dev/null 2>&1; then + exit 1 +fi + +if [ -z "$MASTERDIR" -o -z "$DISTDIR" ]; then + echo "$0 MASTERDIR/DISTDIR not set" + exit 1 +fi + +exec xbps-uchroot $EXTRA_ARGS -b $DISTDIR:/void-packages ${HOSTDIR:+-b $HOSTDIR:/host} -- $MASTERDIR $CMD $@ diff --git a/common/chroot-style/uunshare.sh b/common/chroot-style/uunshare.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# +# This chroot script uses xbps-uunshare(8) with user_namespaces(7). +# +readonly MASTERDIR="$1" +readonly DISTDIR="$2" +readonly HOSTDIR="$3" +readonly EXTRA_ARGS="$4" +readonly CMD="$5" +shift 5 + +if ! command -v xbps-uunshare >/dev/null 2>&1; then + exit 1 +fi + +if [ -z "$MASTERDIR" -o -z "$DISTDIR" ]; then + echo "$0 MASTERDIR/DISTDIR not set" + exit 1 +fi + +exec xbps-uunshare $EXTRA_ARGS -b $DISTDIR:/void-packages ${HOSTDIR:+-b $HOSTDIR:/host} -- $MASTERDIR $CMD $@ diff --git a/common/cross-profiles/README b/common/cross-profiles/README @@ -0,0 +1,17 @@ +CROSS PROFILES +============== + +This directory contains cross profiles to allow cross compilation for the specified target. +A cross profile file must provide the following variables: + + - XBPS_TARGET_MACHINE (as returned by uname -m + optional -musl suffix) + - XBPS_CROSS_TRIPLET (the cross compiler triplet) + - XBPS_CROSS_CFLAGS (C compiler flags for the cross compiler) + - XBPS_CROSS_CXXFLAGS (C++ compiler flags for the cross compiler) + - XBPS_CROSS_FFLAGS (Fortran compiler flags for the cross compiler) + - XBPS_CROSS_CPPFLAGS (Preprocessor flags for the cross compiler) + - XBPS_CROSS_LDFLAGS (Linker flags for the cross compiler) + - XBPS_CROSS_RUST_TARGET (the rust triplet for the rust cross compiler) + - XBPS_CROSS_RUSTFLAGS (rust compiler flags for the cross compiler) + +A source package matching `cross-${XBPS_CROSS_TRIPLET}' must also exist. diff --git a/common/cross-profiles/aarch64-musl.sh b/common/cross-profiles/aarch64-musl.sh @@ -0,0 +1,10 @@ +# Cross build profile for ARMv8. + +XBPS_TARGET_MACHINE="aarch64-musl" +XBPS_TARGET_QEMU_MACHINE="aarch64" +XBPS_CROSS_TRIPLET="aarch64-linux-musl" +XBPS_CROSS_CFLAGS="-march=armv8-a" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="aarch64-unknown-linux-musl" diff --git a/common/cross-profiles/aarch64.sh b/common/cross-profiles/aarch64.sh @@ -0,0 +1,12 @@ +# Cross build profile for ARMv8. + +XBPS_TARGET_MACHINE="aarch64" +XBPS_TARGET_QEMU_MACHINE="aarch64" +XBPS_CROSS_TRIPLET="aarch64-linux-gnu" +XBPS_CFLAGS="-O2 -pipe" # XXX not yet supported: -fstack-protector-strong +XBPS_CXXFLAGS="$XBPS_CFLAGS" +XBPS_CROSS_CFLAGS="-march=armv8-a" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="aarch64-unknown-linux-gnu" diff --git a/common/cross-profiles/armv5te-musl.sh b/common/cross-profiles/armv5te-musl.sh @@ -0,0 +1 @@ +armv5tel-musl.sh+ \ No newline at end of file diff --git a/common/cross-profiles/armv5te.sh b/common/cross-profiles/armv5te.sh @@ -0,0 +1 @@ +armv5tel.sh+ \ No newline at end of file diff --git a/common/cross-profiles/armv5tel-musl.sh b/common/cross-profiles/armv5tel-musl.sh @@ -0,0 +1,10 @@ +# Cross build profile for ARM GNU EABI5 Soft Float and Musl libc. + +XBPS_TARGET_MACHINE="armv5tel-musl" +XBPS_TARGET_QEMU_MACHINE="arm" +XBPS_CROSS_TRIPLET="arm-linux-musleabi" +XBPS_CROSS_CFLAGS="-march=armv5te -msoft-float -mfloat-abi=soft" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="arm-unknown-linux-musleabi" diff --git a/common/cross-profiles/armv5tel.sh b/common/cross-profiles/armv5tel.sh @@ -0,0 +1,10 @@ +# Cross build profile for ARM GNU EABI5 Soft Float. + +XBPS_TARGET_MACHINE="armv5tel" +XBPS_TARGET_QEMU_MACHINE="arm" +XBPS_CROSS_TRIPLET="arm-linux-gnueabi" +XBPS_CROSS_CFLAGS="-march=armv5te -msoft-float -mfloat-abi=soft" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="arm-unknown-linux-gnueabi" diff --git a/common/cross-profiles/armv6hf-musl.sh b/common/cross-profiles/armv6hf-musl.sh @@ -0,0 +1 @@ +armv6l-musl.sh+ \ No newline at end of file diff --git a/common/cross-profiles/armv6hf.sh b/common/cross-profiles/armv6hf.sh @@ -0,0 +1 @@ +armv6l.sh+ \ No newline at end of file diff --git a/common/cross-profiles/armv6l-musl.sh b/common/cross-profiles/armv6l-musl.sh @@ -0,0 +1,10 @@ +# Cross build profile for ARM EABI5 Hard Float and Musl libc. + +XBPS_TARGET_MACHINE="armv6l-musl" +XBPS_TARGET_QEMU_MACHINE="arm" +XBPS_CROSS_TRIPLET="arm-linux-musleabihf" +XBPS_CROSS_CFLAGS="-march=armv6 -mfpu=vfp -mfloat-abi=hard" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="arm-unknown-linux-musleabihf" diff --git a/common/cross-profiles/armv6l.sh b/common/cross-profiles/armv6l.sh @@ -0,0 +1,10 @@ +# Cross build profile for ARM GNU EABI5 Hard Float. + +XBPS_TARGET_MACHINE="armv6l" +XBPS_TARGET_QEMU_MACHINE="arm" +XBPS_CROSS_TRIPLET="arm-linux-gnueabihf" +XBPS_CROSS_CFLAGS="-march=armv6 -mfpu=vfp -mfloat-abi=hard" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="arm-unknown-linux-gnueabihf" diff --git a/common/cross-profiles/armv7hf-musl.sh b/common/cross-profiles/armv7hf-musl.sh @@ -0,0 +1 @@ +armv7l-musl.sh+ \ No newline at end of file diff --git a/common/cross-profiles/armv7hf.sh b/common/cross-profiles/armv7hf.sh @@ -0,0 +1 @@ +armv7l.sh+ \ No newline at end of file diff --git a/common/cross-profiles/armv7l-musl.sh b/common/cross-profiles/armv7l-musl.sh @@ -0,0 +1,10 @@ +# Cross build profile for ARMv7 EABI Hard Float and Musl libc. + +XBPS_TARGET_MACHINE="armv7l-musl" +XBPS_TARGET_QEMU_MACHINE="arm" +XBPS_CROSS_TRIPLET="armv7l-linux-musleabihf" +XBPS_CROSS_CFLAGS="-march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="armv7-unknown-linux-musleabihf" diff --git a/common/cross-profiles/armv7l.sh b/common/cross-profiles/armv7l.sh @@ -0,0 +1,10 @@ +# Cross build profile for ARMv7 GNU EABI Hard Float. + +XBPS_TARGET_MACHINE="armv7l" +XBPS_TARGET_QEMU_MACHINE="arm" +XBPS_CROSS_TRIPLET="armv7l-linux-gnueabihf" +XBPS_CROSS_CFLAGS="-march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="armv7-unknown-linux-gnueabihf" diff --git a/common/cross-profiles/i686-musl.sh b/common/cross-profiles/i686-musl.sh @@ -0,0 +1,10 @@ +# Cross build profile for i686 and Musl libc. + +XBPS_TARGET_MACHINE="i686-musl" +XBPS_TARGET_QEMU_MACHINE="i386" +XBPS_CROSS_TRIPLET="i686-linux-musl" +XBPS_CROSS_CFLAGS="-march=i686" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="i686-unknown-linux-musl" diff --git a/common/cross-profiles/i686.sh b/common/cross-profiles/i686.sh @@ -0,0 +1,10 @@ +# Cross build profile for i686 GNU. + +XBPS_TARGET_MACHINE="i686" +XBPS_TARGET_QEMU_MACHINE="i386" +XBPS_CROSS_TRIPLET="i686-pc-linux-gnu" +XBPS_CROSS_CFLAGS="-march=i686" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="i686-unknown-linux-gnu" diff --git a/common/cross-profiles/mips-musl.sh b/common/cross-profiles/mips-musl.sh @@ -0,0 +1,10 @@ +# Cross build profile for MIPS32 BE soft float. + +XBPS_TARGET_MACHINE="mips-musl" +XBPS_TARGET_QEMU_MACHINE="mips" +XBPS_CROSS_TRIPLET="mips-linux-musl" +XBPS_CROSS_CFLAGS="-mtune=mips32r2 -mabi=32 -msoft-float" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="mips-unknown-linux-musl" diff --git a/common/cross-profiles/mipsel-musl.sh b/common/cross-profiles/mipsel-musl.sh @@ -0,0 +1,10 @@ +# Cross build profile for MIPS32 LE soft float. + +XBPS_TARGET_MACHINE="mipsel-musl" +XBPS_TARGET_QEMU_MACHINE="mipsel" +XBPS_CROSS_TRIPLET="mipsel-linux-musl" +XBPS_CROSS_CFLAGS="-mtune=mips32r2 -mabi=32 -msoft-float" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="mipsel-unknown-linux-musl" diff --git a/common/cross-profiles/mipselhf-musl.sh b/common/cross-profiles/mipselhf-musl.sh @@ -0,0 +1,10 @@ +# Cross build profile for MIPS32 LE hardfloat. + +XBPS_TARGET_MACHINE="mipselhf-musl" +XBPS_TARGET_QEMU_MACHINE="mipsel" +XBPS_CROSS_TRIPLET="mipsel-linux-muslhf" +XBPS_CROSS_CFLAGS="-mtune=mips32r2 -mabi=32 -mhard-float" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="mipsel-unknown-linux-musl" diff --git a/common/cross-profiles/mipshf-musl.sh b/common/cross-profiles/mipshf-musl.sh @@ -0,0 +1,10 @@ +# Cross build profile for MIPS32 BE hard float. + +XBPS_TARGET_MACHINE="mipshf-musl" +XBPS_TARGET_QEMU_MACHINE="mips" +XBPS_CROSS_TRIPLET="mips-linux-muslhf" +XBPS_CROSS_CFLAGS="-mtune=mips32r2 -mabi=32 -mhard-float" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="mips-unknown-linux-musl" diff --git a/common/cross-profiles/ppc-musl.sh b/common/cross-profiles/ppc-musl.sh @@ -0,0 +1,10 @@ +# Cross build profile for PowerPC. + +XBPS_TARGET_MACHINE="ppc-musl" +XBPS_TARGET_QEMU_MACHINE="ppc" +XBPS_CROSS_TRIPLET="powerpc-linux-musl" +XBPS_CROSS_CFLAGS="-mcpu=powerpc -mno-altivec -mtune=G4 -mlong-double-64" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="powerpc-unknown-linux-musl" diff --git a/common/cross-profiles/ppc.sh b/common/cross-profiles/ppc.sh @@ -0,0 +1,10 @@ +# Cross build profile for PowerPC. + +XBPS_TARGET_MACHINE="ppc" +XBPS_TARGET_QEMU_MACHINE="ppc" +XBPS_CROSS_TRIPLET="powerpc-linux-gnu" +XBPS_CROSS_CFLAGS="-mcpu=powerpc -mno-altivec -mtune=G4" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="powerpc-unknown-linux-gnu" diff --git a/common/cross-profiles/ppc64-musl.sh b/common/cross-profiles/ppc64-musl.sh @@ -0,0 +1,10 @@ +# Cross build profile for ppc64 big-endian musl. + +XBPS_TARGET_MACHINE="ppc64-musl" +XBPS_TARGET_QEMU_MACHINE="ppc64" +XBPS_CROSS_TRIPLET="powerpc64-linux-musl" +XBPS_CROSS_CFLAGS="-mcpu=970 -mtune=power9 -maltivec -mlong-double-64 -mabi=elfv2" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="powerpc64-unknown-linux-musl" diff --git a/common/cross-profiles/ppc64.sh b/common/cross-profiles/ppc64.sh @@ -0,0 +1,10 @@ +# Cross build profile for ppc64 big-endian GNU. + +XBPS_TARGET_MACHINE="ppc64" +XBPS_TARGET_QEMU_MACHINE="ppc64" +XBPS_CROSS_TRIPLET="powerpc64-linux-gnu" +XBPS_CROSS_CFLAGS="-mcpu=970 -mtune=power9 -maltivec -mabi=elfv2" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="powerpc64-unknown-linux-gnu" diff --git a/common/cross-profiles/ppc64le-musl.sh b/common/cross-profiles/ppc64le-musl.sh @@ -0,0 +1,10 @@ +# Cross build profile for ppc64 little-endian musl. + +XBPS_TARGET_MACHINE="ppc64le-musl" +XBPS_TARGET_QEMU_MACHINE="ppc64le" +XBPS_CROSS_TRIPLET="powerpc64le-linux-musl" +XBPS_CROSS_CFLAGS="-mcpu=powerpc64le -mtune=power9 -maltivec -mlong-double-64 -mabi=elfv2" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="powerpc64le-unknown-linux-musl" diff --git a/common/cross-profiles/ppc64le.sh b/common/cross-profiles/ppc64le.sh @@ -0,0 +1,10 @@ +# Cross build profile for ppc64 little-endian GNU. + +XBPS_TARGET_MACHINE="ppc64le" +XBPS_TARGET_QEMU_MACHINE="ppc64le" +XBPS_CROSS_TRIPLET="powerpc64le-linux-gnu" +XBPS_CROSS_CFLAGS="-mcpu=powerpc64le -mtune=power9 -maltivec -mabi=elfv2" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="powerpc64le-unknown-linux-gnu" diff --git a/common/cross-profiles/x86_64-musl.sh b/common/cross-profiles/x86_64-musl.sh @@ -0,0 +1,10 @@ +# Cross build profile for x86_64 and Musl libc. + +XBPS_TARGET_MACHINE="x86_64-musl" +XBPS_TARGET_QEMU_MACHINE="x86_64" +XBPS_CROSS_TRIPLET="x86_64-linux-musl" +XBPS_CROSS_CFLAGS="-mtune=generic" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="x86_64-unknown-linux-musl" diff --git a/common/cross-profiles/x86_64.sh b/common/cross-profiles/x86_64.sh @@ -0,0 +1,10 @@ +# Cross build profile for x86_64 GNU. + +XBPS_TARGET_MACHINE="x86_64" +XBPS_TARGET_QEMU_MACHINE="x86_64" +XBPS_CROSS_TRIPLET="x86_64-linux-gnu" +XBPS_CROSS_CFLAGS="-mtune=generic" +XBPS_CROSS_CXXFLAGS="$XBPS_CROSS_CFLAGS" +XBPS_CROSS_FFLAGS="" +XBPS_CROSS_RUSTFLAGS="--sysroot=${XBPS_CROSS_BASE}/usr" +XBPS_CROSS_RUST_TARGET="x86_64-unknown-linux-gnu" diff --git a/common/environment/README b/common/environment/README @@ -0,0 +1,28 @@ +ENVIRONMENT SHELL SNIPPETS +========================== + +This directory contains shell files (must not be executable nor contain a shebang) +that are read by xbps-src when building source packages. The shell files +are read in lexical order (as ordered by shell rules). + +These files shall set or unset environment variables while building packages. +Only files with the `.sh' extension are read, so this file will be simply ignored. + +The following directories are used to set the order in which the shell snippets +should be read by xbps-src: + + * build-style (to set vars for a specific build_style helper) + * setup (before reading template) + * setup-subpkg (before running the subpkg <pkgname>_package() function) + * fetch (before running fetch phase) + * extract (before running extract phase) + * configure (before running configure phase) + * build (before running build phase) + * check (before running check phase) + * install (before running install phase) + * pkg (before running pkg phase) + +NOTES +~~~~~ +* Symlinks can be created (relative) to make a shell snippet available in + multiple phases. diff --git a/common/environment/build-style/.empty b/common/environment/build-style/.empty diff --git a/common/environment/build-style/R-cran.sh b/common/environment/build-style/R-cran.sh @@ -0,0 +1,4 @@ +makedepends+=" R" +depends+=" R" +distfiles="https://cran.r-project.org/src/contrib/${pkgname#R-cran-}_${version//r/-}.tar.gz" +wrksrc="${XBPS_BUILDDIR}/${pkgname#R-cran-}" diff --git a/common/environment/build-style/cargo.sh b/common/environment/build-style/cargo.sh @@ -0,0 +1,7 @@ +hostmakedepends+=" cargo" + +if [ "$CROSS_BUILD" ]; then + makedepends+=" rust-std" +fi + +build_helper+=" rust" diff --git a/common/environment/build-style/cmake.sh b/common/environment/build-style/cmake.sh @@ -0,0 +1 @@ +hostmakedepends+=" cmake" diff --git a/common/environment/build-style/gem.sh b/common/environment/build-style/gem.sh @@ -0,0 +1,9 @@ +lib32disabled=yes +hostmakedepends+=" ruby" +depends+=" ruby" +archs=noarch + +# default to rubygems +if [ -z "$distfiles" ]; then + distfiles="https://rubygems.org/downloads/${pkgname#ruby-}-${version}.gem" +fi diff --git a/common/environment/build-style/gemspec.sh b/common/environment/build-style/gemspec.sh @@ -0,0 +1,3 @@ +lib32disabled=yes +hostmakedepends+=" ruby-devel" +makedepends+=" ruby-devel" diff --git a/common/environment/build-style/go.sh b/common/environment/build-style/go.sh @@ -0,0 +1,41 @@ +if [ -z "$hostmakedepends" -o "${hostmakedepends##*gcc-go-tools*}" ]; then + # gc compiler + if [ -z "$archs" ]; then + archs="aarch64* armv[567]* i686* x86_64* ppc64le*" + fi + hostmakedepends+=" go" + nopie=yes +else + # gccgo compiler + if [ "$CROSS_BUILD" ]; then + # target compiler to use; otherwise it'll just call gccgo + export GCCGO="${XBPS_CROSS_TRIPLET}-gccgo" + fi +fi +nostrip=yes + +case "$XBPS_TARGET_MACHINE" in + aarch64*) export GOARCH=arm64;; + armv5*) export GOARCH=arm; export GOARM=5;; + armv6*) export GOARCH=arm; export GOARM=6;; + armv7*) export GOARCH=arm; export GOARM=7;; + i686*) export GOARCH=386;; + x86_64*) export GOARCH=amd64;; + ppc64le*) export GOARCH=ppc64le;; + ppc64*) export GOARCH=ppc64;; + ppc*) export GOARCH=ppc;; + mipsel*) export GOARCH=mipsle;; + mips*) export GOARCH=mips;; +esac + +export GOPATH="${wrksrc}/_build-${pkgname}-xbps" +GOSRCPATH="${GOPATH}/src/${go_import_path}" +export CGO_CFLAGS="$CFLAGS" +export CGO_CPPFLAGS="$CPPFLAGS" +export CGO_CXXFLAGS="$CXXFLAGS" +export CGO_LDFLAGS="$LDFLAGS" +export CGO_ENABLED=1 +case "$XBPS_TARGET_MACHINE" in + *-musl) export GOCACHE="${XBPS_HOSTDIR}/gocache-muslc" ;; + *) export GOCACHE="${XBPS_HOSTDIR}/gocache-glibc" ;; +esac diff --git a/common/environment/build-style/haskell-stack.sh b/common/environment/build-style/haskell-stack.sh @@ -0,0 +1 @@ +hostmakedepends+=" ghc stack" diff --git a/common/environment/build-style/meson.sh b/common/environment/build-style/meson.sh @@ -0,0 +1 @@ +hostmakedepends+=" meson" diff --git a/common/environment/build-style/perl-ModuleBuild.sh b/common/environment/build-style/perl-ModuleBuild.sh @@ -0,0 +1,3 @@ +hostmakedepends+=" perl" +makedepends+=" perl" +lib32disabled=yes diff --git a/common/environment/build-style/perl-module.sh b/common/environment/build-style/perl-module.sh @@ -0,0 +1 @@ +lib32disabled=yes diff --git a/common/environment/build-style/python-module.sh b/common/environment/build-style/python-module.sh @@ -0,0 +1,2 @@ +lib32disabled=yes +makedepends+=" python python3" diff --git a/common/environment/build-style/python2-module.sh b/common/environment/build-style/python2-module.sh @@ -0,0 +1,2 @@ +lib32disabled=yes +makedepends+=" python" diff --git a/common/environment/build-style/python3-module.sh b/common/environment/build-style/python3-module.sh @@ -0,0 +1,2 @@ +lib32disabled=yes +makedepends+=" python3" diff --git a/common/environment/build-style/raku-dist.sh b/common/environment/build-style/raku-dist.sh @@ -0,0 +1,3 @@ +depends+=" rakudo" +checkdepends+=" perl" +hostmakedepends+=" rakudo" diff --git a/common/environment/build-style/ruby-module.sh b/common/environment/build-style/ruby-module.sh @@ -0,0 +1 @@ +lib32disabled=yes diff --git a/common/environment/build-style/scons.sh b/common/environment/build-style/scons.sh @@ -0,0 +1 @@ +hostmakedepends+=" scons" diff --git a/common/environment/build-style/texmf.sh b/common/environment/build-style/texmf.sh @@ -0,0 +1,5 @@ +# rsync isn't needed for everything but it's far easier to just put it here +hostmakedepends+=" rsync" +# python_version isn't needed for everything either +python_version=3 +create_wrksrc=yes diff --git a/common/environment/build-style/texmf/ownership.txt b/common/environment/build-style/texmf/ownership.txt @@ -0,0 +1,209 @@ +dvipdfmx/dvipdfmx.cfg texlive +dvips/base/color.pro texlive +dvips/base/crop.pro texlive +dvips/base/finclude.pro texlive +dvips/base/hps.pro texlive +dvips/base/special.pro texlive +dvips/base/texc.pro texlive +dvips/base/tex.pro texlive +dvips/base/texps.pro texlive +dvips/gsftopk/render.ps texlive +dvips/xdvi/config.xdvi texlive +fonts/cmap/dvipdfmx/EUC-UCS2 texlive +fonts/enc/dvips/base/dvips-all.enc texlive +fonts/map/dvipdfmx/cid-x.map texlive +fonts/map/glyphlist/glyphlist.txt texlive +fonts/map/glyphlist/pdfglyphlist.txt texlive +psutils/paper.cfg texlive +scripts/a2ping/a2ping.pl texlive +scripts/accfonts/mkt1font texlive +scripts/accfonts/vpl2ovp texlive +scripts/accfonts/vpl2vpl texlive +scripts/adhocfilelist/adhocfilelist.sh texlive +scripts/arara/arara.sh texlive +scripts/attachfile2/pdfatfi.pl texlive +scripts/authorindex/authorindex texlive +scripts/bib2gls/bib2gls.sh texlive +scripts/bib2gls/convertgls2bib.sh texlive +scripts/bibexport/bibexport.sh texlive +scripts/bundledoc/arlatex texlive +scripts/bundledoc/bundledoc texlive +scripts/cachepic/cachepic.tlu texlive-pictures +scripts/checkcites/checkcites.lua texlive +scripts/checklistings/checklistings.sh texlive +scripts/chklref/chklref.pl texlive +scripts/cjk-gs-integrate/cjk-gs-integrate.pl texlive +scripts/clojure-pamphlet/pamphletangler texlive +scripts/cluttex/cluttex.lua texlive +scripts/context/perl/mptopdf.pl texlive +scripts/context/stubs/unix/contextjit texlive +scripts/context/stubs/unix/context texlive +scripts/context/stubs/unix/luatools texlive +scripts/context/stubs/unix/mtxrunjit texlive +scripts/context/stubs/unix/mtxrun texlive +scripts/context/stubs/unix/texexec texlive +scripts/context/stubs/unix/texmfstart texlive +scripts/convbkmk/convbkmk.rb texlive-langjapanese +scripts/crossrefware/bbl2bib.pl texlive +scripts/crossrefware/bibdoiadd.pl texlive +scripts/crossrefware/bibmradd.pl texlive +scripts/crossrefware/biburl2doi.pl texlive +scripts/crossrefware/bibzbladd.pl texlive +scripts/crossrefware/ltx2crossrefxml.pl texlive +scripts/ctanbib/ctanbib texlive +scripts/ctanify/ctanify texlive +scripts/ctan-o-mat/ctan-o-mat.pl texlive +scripts/ctanupload/ctanupload.pl texlive +scripts/de-macro/de-macro texlive +scripts/diadia/diadia.lua texlive-humanities +scripts/dosepsbin/dosepsbin.pl texlive +scripts/dtxgen/dtxgen texlive +scripts/dviasm/dviasm.py texlive +scripts/dviinfox/dviinfox.pl texlive +scripts/epspdf/epspdftk.tcl texlive +scripts/epspdf/epspdf.tlu texlive +scripts/epstopdf/epstopdf.pl texlive +scripts/exceltex/exceltex texlive +scripts/fig4latex/fig4latex texlive-pictures +scripts/findhyph/findhyph texlive +scripts/fontools/afm2afm texlive +scripts/fontools/autoinst texlive +scripts/fontools/ot2kpx texlive +scripts/fragmaster/fragmaster.pl texlive +scripts/getmap/getmapdl.lua texlive +scripts/glossaries/makeglossaries-lite.lua texlive +scripts/glossaries/makeglossaries texlive +scripts/installfont/installfont-tl texlive +scripts/jfmutil/jfmutil.pl texlive +scripts/ketcindy/ketcindy.pl texlive +scripts/kotex-utils/jamo-normalize.pl texlive-langkorean +scripts/kotex-utils/komkindex.pl texlive-langkorean +scripts/kotex-utils/ttf2kotexfont.pl texlive-langkorean +scripts/l3build/l3build.lua texlive-latexextra +scripts/latex2man/latex2man texlive +scripts/latex2nemeth/latex2nemeth texlive +scripts/latexdiff/latexdiff.pl texlive +scripts/latexdiff/latexdiff-vc.pl texlive +scripts/latexdiff/latexrevise.pl texlive +scripts/latexfileversion/latexfileversion texlive +scripts/latex-git-log/latex-git-log texlive +scripts/latexindent/latexindent.pl texlive +scripts/latexmk/latexmk.pl texlive +scripts/latexpand/latexpand texlive +scripts/latex-papersize/latex-papersize.py texlive +scripts/lilyglyphs/lily-glyph-commands.py texlive-music +scripts/lilyglyphs/lily-image-commands.py texlive-music +scripts/lilyglyphs/lily-rebuild-pdfs.py texlive-music +scripts/listbib/listbib texlive +scripts/listings-ext/listings-ext.sh texlive +scripts/ltxfileinfo/ltxfileinfo texlive +scripts/ltximg/ltximg.pl texlive +scripts/luaotfload/luaotfload-tool.lua texlive +scripts/lwarp/lwarpmk.lua texlive +scripts/make4ht/make4ht texlive +scripts/makedtx/makedtx.pl texlive +scripts/match_parens/match_parens texlive +scripts/mathspic/mathspic.pl texlive-pictures +scripts/mf2pt1/mf2pt1.pl texlive +scripts/mkgrkindex/mkgrkindex texlive-langgreek +scripts/mkjobtexmf/mkjobtexmf.pl texlive +scripts/mkpic/mkpic texlive-pictures +scripts/m-tx/m-tx.lua texlive-music +scripts/multibibliography/multibibliography.pl texlive +scripts/musixtex/musixflx.lua texlive-music +scripts/musixtex/musixtex.lua texlive-music +scripts/pax/pdfannotextractor.pl texlive +scripts/pdfbook2/pdfbook2 texlive +scripts/pdfcrop/pdfcrop.pl texlive +scripts/pdfjam/pdfjam texlive +scripts/pdflatexpicscale/pdflatexpicscale.pl texlive +scripts/pdftex-quiet/pdftex-quiet texlive +scripts/pdfxup/pdfxup texlive +scripts/pedigree-perl/pedigree.pl texlive-pstricks +scripts/perltex/perltex.pl texlive +scripts/petri-nets/pn2pdf texlive +scripts/pfarrei/a5toa4.tlu texlive +scripts/pfarrei/pfarrei.tlu texlive +scripts/pkfix-helper/pkfix-helper texlive +scripts/pkfix/pkfix.pl texlive +scripts/pmxchords/pmxchords.lua texlive-music +scripts/ps2eps/ps2eps.pl texlive +scripts/pst2pdf/pst2pdf.pl texlive-pstricks +scripts/pst-pdf/ps4pdf texlive-pstricks +scripts/psutils/extractres.pl texlive +scripts/psutils/includeres.pl texlive +scripts/psutils/psjoin.pl texlive +scripts/ptex2pdf/ptex2pdf.lua texlive +scripts/ptex-fontmaps/kanji-config-updmap.pl texlive-langjapanese +scripts/ptex-fontmaps/kanji-config-updmap-sys.sh texlive-langjapanese +scripts/ptex-fontmaps/kanji-config-updmap-user.sh texlive-langjapanese +scripts/ptex-fontmaps/kanji-fontmap-creator.pl texlive-langjapanese +scripts/purifyeps/purifyeps texlive +scripts/pygmentex/pygmentex.py texlive-latexextra +scripts/pythontex/depythontex.py texlive +scripts/pythontex/pythontex.py texlive +scripts/rubik/rubikrotation.pl texlive-games +scripts/simpdftex/simpdftex texlive +scripts/splitindex/splitindex.pl texlive +scripts/srcredact/srcredact.pl texlive +scripts/sty2dtx/sty2dtx.pl texlive +scripts/svn-multi/svn-multi.pl texlive +scripts/tex4ebook/tex4ebook texlive +scripts/texcount/texcount.pl texlive +scripts/texdef/texdef.pl texlive +scripts/texdiff/texdiff texlive +scripts/texdirflatten/texdirflatten texlive +scripts/texdoc/texdoc.tlu texlive +scripts/texdoctk/texdoctk.pl texlive +scripts/texfot/texfot.pl texlive +scripts/texlive-extra/allcm.sh texlive +scripts/texlive-extra/allneeded.sh texlive +scripts/texlive-extra/dvi2fax.sh texlive +scripts/texlive-extra/dvired.sh texlive +scripts/texlive-extra/e2pall.pl texlive +scripts/texlive-extra/fontinst.sh texlive +scripts/texlive-extra/kpsetool.sh texlive +scripts/texlive-extra/kpsewhere.sh texlive +scripts/texlive-extra/ps2frag.sh texlive +scripts/texlive-extra/pslatex.sh texlive +scripts/texlive-extra/rubibtex.sh texlive-langcyrillic +scripts/texlive-extra/rumakeindex.sh texlive-langcyrillic +scripts/texlive-extra/texconfig-dialog.sh texlive +scripts/texlive-extra/texconfig.sh texlive +scripts/texlive-extra/texconfig-sys.sh texlive +scripts/texlive-extra/texlinks.sh texlive +scripts/texlive/fmtutil.pl texlive +scripts/texlive/fmtutil-sys.sh texlive +scripts/texlive/fmtutil-user.sh texlive +scripts/texlive/mktexlsr texlive +scripts/texlive/mktexmf texlive +scripts/texlive/mktexpk texlive +scripts/texlive/mktextfm texlive +scripts/texliveonfly/texliveonfly.py texlive +scripts/texlive/rungs.tlu texlive +scripts/texlive/tlmgr.pl texlive +scripts/texlive/updmap.pl texlive +scripts/texlive/updmap-sys.sh texlive +scripts/texlive/updmap-user.sh texlive +scripts/texloganalyser/texloganalyser texlive +scripts/texosquery/texosquery-jre5.sh texlive +scripts/texosquery/texosquery-jre8.sh texlive +scripts/texosquery/texosquery.sh texlive +scripts/texplate/texplate.sh texlive +scripts/thumbpdf/thumbpdf.pl texlive +scripts/tlshell/tlshell.tcl texlive +scripts/typeoutfileinfo/typeoutfileinfo.sh texlive +scripts/ulqda/ulqda.pl texlive-science +scripts/urlbst/urlbst texlive +scripts/vpe/vpe.pl texlive +scripts/webquiz/webquiz.py texlive +scripts/wordcount/wordcount.sh texlive +scripts/xindex/xindex.lua texlive +scripts/yplan/yplan texlive +texconfig/tcfmgr.map texlive +texconfig/tcfmgr texlive +web2c/fmtutil.cnf texlive +web2c/texmf.cnf texlive +xdvi/pixmap/toolbar2.xpm texlive +xdvi/pixmap/toolbar.xpm texlive +xdvi/XDvi texlive diff --git a/common/environment/build-style/waf.sh b/common/environment/build-style/waf.sh @@ -0,0 +1 @@ +hostmakedepends+=" python" diff --git a/common/environment/build-style/waf3.sh b/common/environment/build-style/waf3.sh @@ -0,0 +1 @@ +hostmakedepends+=" python3" diff --git a/common/environment/build/.empty b/common/environment/build/.empty diff --git a/common/environment/build/bootstrap.sh b/common/environment/build/bootstrap.sh @@ -0,0 +1 @@ +../configure/bootstrap.sh+ \ No newline at end of file diff --git a/common/environment/build/ccache.sh b/common/environment/build/ccache.sh @@ -0,0 +1 @@ +../configure/ccache.sh+ \ No newline at end of file diff --git a/common/environment/build/cross.sh b/common/environment/build/cross.sh @@ -0,0 +1 @@ +../configure/cross.sh+ \ No newline at end of file diff --git a/common/environment/build/hardening.sh b/common/environment/build/hardening.sh @@ -0,0 +1 @@ +../configure/hardening.sh+ \ No newline at end of file diff --git a/common/environment/build/pkg-config.sh b/common/environment/build/pkg-config.sh @@ -0,0 +1 @@ +../configure/pkg-config.sh+ \ No newline at end of file diff --git a/common/environment/check/bootstrap.sh b/common/environment/check/bootstrap.sh @@ -0,0 +1 @@ +../configure/bootstrap.sh+ \ No newline at end of file diff --git a/common/environment/check/ccache.sh b/common/environment/check/ccache.sh @@ -0,0 +1 @@ +../configure/ccache.sh+ \ No newline at end of file diff --git a/common/environment/check/cross.sh b/common/environment/check/cross.sh @@ -0,0 +1 @@ +../configure/cross.sh+ \ No newline at end of file diff --git a/common/environment/check/hardening.sh b/common/environment/check/hardening.sh @@ -0,0 +1 @@ +../configure/hardening.sh+ \ No newline at end of file diff --git a/common/environment/check/pkg-config.sh b/common/environment/check/pkg-config.sh @@ -0,0 +1 @@ +../configure/pkg-config.sh+ \ No newline at end of file diff --git a/common/environment/configure/.empty b/common/environment/configure/.empty diff --git a/common/environment/configure/autoconf_cache/aarch64-linux b/common/environment/configure/autoconf_cache/aarch64-linux @@ -0,0 +1,147 @@ +## # general +ac_cv_va_val_copy=${ac_cv_va_val_copy=yes} +ac_cv_func_lstat_dereferences_slashed_symlink=${ac_cv_func_lstat_dereferences_slashed_symlink=yes} +## ac_cv_func_lstat_empty_string_bug=${ac_cv_func_lstat_empty_string_bug=no} +## ac_cv_func_posix_getpwnam_r=${ac_cv_func_posix_getpwnam_r=yes} +## ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed=no} +## ac_cv_func_stat_empty_string_bug=${ac_cv_func_stat_empty_string_bug=no} +## ac_cv_func_stat_ignores_trailing_slash=${ac_cv_func_stat_ignores_trailing_slash=no} +## ac_libnet_have_packet_socket=${ac_libnet_have_packet_socket=yes} +## ac_cv_linux_vers=${ac_cv_linux_vers=2} +## ac_cv_need_trio=${ac_cv_need_trio=no} +ac_cv_sizeof___int64=0 +ac_cv_sizeof_char=1 +ac_cv_sizeof_int=4 +ac_cv_sizeof_long=8 +ac_cv_sizeof_long_long=8 +ac_cv_sizeof_short=2 +ac_cv_sizeof_size_t=8 +ac_cv_sizeof_ssize_t=8 +ac_cv_sizeof_void_p=8 +ac_cv_sizeof_unsigned_int=4 +ac_cv_sizeof_unsigned_long=8 +ac_cv_sizeof_bool=1 +## ac_cv_sizeof_long_double=${ac_cv_sizeof_long_double=16} +## ac_cv_sizeof_long_int=${ac_cv_sizeof_long_int=8} +## ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long=8} +## ac_cv_sizeof_off_t=${ac_cv_sizeof_off_t=8} +ac_cv_sizeof_unsigned_short=2 +## ac_cv_sizeof_short_int=${ac_cv_sizeof_short_int=2} +## ac_cv_sizeof_size_t=${ac_cv_sizeof_size_t=8} +## ac_cv_sizeof_uid_t=${ac_cv_sizeof_uid_t=4} +## ac_cv_sizeof_gid_t=${ac_cv_sizeof_gid_t=4} +## ac_cv_sizeof_ino_t=${ac_cv_sizeof_ino_t=8} +## ac_cv_sizeof_dev_t=${ac_cv_sizeof_dev_t=8} +## ac_cv_sizeof_void_p=${ac_cv_sizeof_void_p=8} +## ac_cv_strerror_r_SUSv3=${ac_cv_strerror_r_SUSv3=no} +## db_cv_alignp_t=${db_cv_alignp_t='unsigned long long'} +## db_cv_align_t=${db_cv_align_t='unsigned long long'} +## db_cv_fcntl_f_setfd=${db_cv_fcntl_f_setfd=yes} +## db_cv_sprintf_count=${db_cv_sprintf_count=yes} +## ac_cv_sizeof_struct_iovec=16 + +# glib +glib_cv_hasinline=${glib_cv_hasinline=yes} +glib_cv_has__inline=${glib_cv_has__inline=yes} +glib_cv_has__inline__=${glib_cv_has__inline__=yes} +glib_cv_long_long_format=${glib_cv_long_long_format=ll} +glib_cv_rtldglobal_broken=${glib_cv_rtldglobal_broken=no} +glib_cv_stack_grows=${glib_cv_stack_grows=no} +glib_cv_uscore=${glib_cv_uscore=no} +glib_cv_va_val_copy=${glib_cv_va_val_copy=yes} +ac_cv_alignof_guint32=4 +ac_cv_alignof_guint64=8 +ac_cv_alignof_unsigned_long=8 +ac_cv_alignof_char=1 +ac_cv_alignof_double=8 + +## nano_cv_func_regexec_segv_emptystr=${nano_cv_func_regexec_segv_emptystr=no} +## samba_cv_HAVE_VA_COPY=${samba_cv_HAVE_VA_COPY=yes} +## utils_cv_sys_open_max=${utils_cv_sys_open_max=1015} + +# gettext +am_cv_func_working_getline=${am_cv_func_working_getline=yes} + +#gcc +ac_cv_lib_m_sin=${ac_cv_lib_m_sin=yes} + +#orbit +libIDL_cv_long_long_format=ll + +## # ORBit2 +## ac_cv_alignof_CORBA_boolean=1 +## ac_cv_alignof_CORBA_char=1 +## ac_cv_alignof_CORBA_double=8 +## ac_cv_alignof_CORBA_float=4 +## ac_cv_alignof_CORBA_long=4 +## ac_cv_alignof_CORBA_long_double=8 +## ac_cv_alignof_CORBA_long_long=8 +## ac_cv_alignof_CORBA_octet=1 +## ac_cv_alignof_CORBA_pointer=8 +## ac_cv_alignof_CORBA_short=2 +## ac_cv_alignof_CORBA_struct=1 +## ac_cv_alignof_CORBA_wchar=2 +## +## lf_cv_sane_realloc=yes +as_cv_unaligned_access=${as_cv_unaligned_access=no} +## +## #unfs3 +## nfsd_cv_broken_setfsuid=${nfsd_cv_broken_setfsuid=0} +## nfsd_cv_func_statfs=${nfsd_cv_func_statfs=statfs2_bsize} +## nfsd_cv_bsd_signals=${nfsd_cv_bsd_signals=yes} + +#apr +apr_cv_tcp_nodelay_with_cork=${apr_cv_tcp_nodelay_with_cork=yes} + +# lftp +lftp_cv_va_val_copy=${lftp_cv_va_val_copy=yes} + +# slrn +slrn_cv_va_val_copy=${slrn_cv_va_val_copy=yes} + +# cvs +cvs_cv_func_printf_ptr=${cvs_cv_func_printf_ptr=yes} + +## # at-spi2-core +ac_cv_alignof_dbind_pointer=8 +ac_cv_alignof_dbind_struct=1 +ac_cv_alignof_dbus_bool_t=4 +ac_cv_alignof_dbus_int16_t=2 +ac_cv_alignof_dbus_int32_t=4 +ac_cv_alignof_dbus_int64_t=8 + +## # socat +sc_cv_type_dev_basic='6 /* unsigned long */' +sc_cv_type_gidt_basic='4 /* unsigned int */' +sc_cv_type_longlong=yes +sc_cv_type_modet_basic='4 /* unsigned int */' +sc_cv_type_off64=yes +sc_cv_type_off64_basic='5 /* long */' +sc_cv_type_off_basic='5 /* long */' +sc_cv_type_pidt_basic='3 /* int */' +sc_cv_type_rlimit_rlimmax_basic='6 /* unsigned long */' +sc_cv_type_sa_family_t=yes +sc_cv_type_sighandler=yes +sc_cv_type_sizet_basic='6 /* unsigned long */' +sc_cv_type_socklen=yes +sc_cv_type_socklent_basic='4 /* unsigned int */' +sc_cv_type_stat64=yes +sc_cv_type_stat64_stblksize_basic='3 /* int */' +sc_cv_type_stat64_stblocks_basic='5 /* long */' +sc_cv_type_stat64_stdev_basic='6 /* unsigned long */' +sc_cv_type_stat64_stino_basic='6 /* unsigned long */' +sc_cv_type_stat64_stnlink_basic='4 /* unsigned int */' +sc_cv_type_stat64_stsize_basic='5 /* long */' +sc_cv_type_stat_stblksize_basic='3 /* int */' +sc_cv_type_stat_stblocks_basic='5 /* long */' +sc_cv_type_stat_stino_basic='6 /* unsigned long */' +sc_cv_type_stat_stnlink_basic='4 /* unsigned int */' +sc_cv_type_stat_stsize_basic='5 /* long */' +sc_cv_type_struct_timeval_tv_usec='5 /* long */' +sc_cv_type_timet_basic='5 /* long */' +sc_cv_type_uidt_basic='4 /* unsigned int */' +sc_cv_type_uint16=yes +sc_cv_type_uint32=yes +sc_cv_type_uint64=yes +sc_cv_type_uint8=yes +sc_cv_typeof_struct_cmsghdr_cmsg_len='6 /* unsigned long */' diff --git a/common/environment/configure/autoconf_cache/arm-common b/common/environment/configure/autoconf_cache/arm-common @@ -0,0 +1,232 @@ +# general +ac_cv_va_val_copy=${ac_cv_va_val_copy=yes} +ac_cv_func_lstat_dereferences_slashed_symlink=${ac_cv_func_lstat_dereferences_slashed_symlink=yes} +ac_cv_func_lstat_empty_string_bug=${ac_cv_func_lstat_empty_string_bug=no} +ac_cv_func_stat_empty_string_bug=${ac_cv_func_stat_empty_string_bug=no} +ac_cv_func_stat_ignores_trailing_slash=${ac_cv_func_stat_ignores_trailing_slash=no} +ac_cv_header_netinet_sctp_h=${ac_cv_header_netinet_sctp_h=no} +ac_cv_header_netinet_sctp_uio_h=${ac_cv_header_netinet_sctp_uio_h=no} +ac_cv_sctp=${ac_cv_sctp=no} +ac_cv_sizeof_struct_iovec=8 + +# apache +ac_cv_func_pthread_key_delete=${ac_cv_func_pthread_key_delete=yes} +apr_cv_process_shared_works=${apr_cv_process_shared_works=no} +ac_cv_sizeof_ssize_t=${ac_cv_sizeof_ssize_t=4} +apr_cv_tcp_nodelay_with_cork=${apr_cv_tcp_nodelay_with_cork=yes} + +# bash +ac_cv_c_long_double=${ac_cv_c_long_double=yes} + +# coreutils +utils_cv_sys_open_max=${utils_cv_sys_open_max=1019} + +# cvs +cvs_cv_func_printf_ptr=${cvs_cv_func_printf_ptr=yes} + +# db (sleepycat) +db_cv_fcntl_f_setfd=${db_cv_fcntl_f_setfd=yes} +db_cv_sprintf_count=${db_cv_sprintf_count=yes} +db_cv_align_t=${db_cv_align_t='unsigned long long'} +db_cv_alignp_t=${db_cv_alignp_t='unsigned long'} + +# D-BUS +ac_cv_func_posix_getpwnam_r=${ac_cv_func_posix_getpwnam_r=yes} + +# edb +db_cv_spinlocks=${db_cv_spinlocks=no} + +# ettercap +ettercap_cv_type_socklen_t=${ettercap_cv_type_socklen_t=yes} + +# fget +compat_cv_func_snprintf_works=${compat_cv_func_snprintf_works=yes} +compat_cv_func_basename_works=${compat_cv_func_basename_works=no} +compat_cv_func_dirname_works=${compat_cv_func_dirname_works=no} + +# fnmatch +ac_cv_func_fnmatch_works=${ac_cv_func_fnmatch_works=yes} + +# gettext +am_cv_func_working_getline=${am_cv_func_working_getline=yes} + +# glib +glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24} +glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4} +glib_cv_stack_grows=${glib_cv_stack_grows=no} +glib_cv_uscore=${glib_cv_uscore=no} +glib_cv_use_pid_surrogate=${glib_cv_use_pid_surrogate=yes} +glib_cv_has__inline=${glib_cv_has__inline=yes} +glib_cv_has__inline__=${glib_cv_has__inline__=yes} +glib_cv_hasinline=${glib_cv_hasinline=yes} +glib_cv_sane_realloc=${glib_cv_sane_realloc=yes} +glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24} +glib_cv_uscore=${glib_cv_uscore=no} +glib_cv_va_val_copy=${glib_cv_va_val_copy=yes} +glib_cv_rtldglobal_broken=${glib_cv_rtldglobal_broken=no} +glib_cv_sys_pthread_mutex_trylock_posix=${glib_cv_sys_pthread_mutex_trylock_posix=yes} +glib_cv_sys_pthread_getspecific_posix=${glib_cv_sys_pthread_getspecific_posix=yes} +glib_cv_sys_pthread_cond_timedwait_posix=${glib_cv_sys_pthread_cond_timedwait_posix=yes} + +# glib-2.0 +glib_cv_long_long_format=${glib_cv_long_long_format=ll} +glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24} +glib_cv_sizeof_intmax_t=${glib_cv_sizeof_intmax_t=8} +glib_cv_sizeof_ptrdiff_t=${glib_cv_sizeof_ptrdiff_t=4} +glib_cv_sizeof_size_t=${glib_cv_sizeof_size_t=4} +glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4} +glib_cv_sys_use_pid_niceness_surrogate=${glib_cv_sys_use_pid_niceness_surrogate=yes} +ac_cv_alignof_guint32=4 +ac_cv_alignof_guint64=8 +ac_cv_alignof_unsigned_long=4 + +#gstreamer +as_cv_unaligned_access=${as_cv_unaligned_access=no} + +# httppc +ac_cv_strerror_r_SUSv3=${ac_cv_strerror_r_SUSv3=no} + +# jikes +ac_cv_sizeof_wchar_t=4 + +# lftp +ac_cv_need_trio=${ac_cv_need_trio=no} +lftp_cv_va_val_copy=${lftp_cv_va_val_copy=yes} + +# libesmtp +acx_working_snprintf=${acx_working_snprintf=yes} + +# libidl +libIDL_cv_long_long_format=${libIDL_cv_long_long_format=ll} + +# libnet +ac_libnet_have_packet_socket=${ac_libnet_have_packet_socket=yes} + +# libpcap +ac_cv_linux_vers=${ac_cv_linux_vers=2} + +# libxfce4util +with_broken_putenv=${with_broken_putenv=no} + +# links +ac_cv_lib_png_png_create_info_struct=${ac_cv_lib_png_png_create_info_struct=yes} + +# mysql +mysql_cv_func_atomic_sub=${mysql_cv_func_atomic_sub=no} +mysql_cv_func_atomic_add=${mysql_cv_func_atomic_add=no} + +# nano +ac_cv_regexec_segfault_emptystr=${ac_cv_regexec_segfault_emptystr=no} +nano_cv_func_regexec_segv_emptystr=${nano_cv_func_regexec_segv_emptystr=no} + +# ORBit2 +ac_cv_alignof_CORBA_boolean=1 +ac_cv_alignof_CORBA_char=1 +ac_cv_alignof_CORBA_double=8 +ac_cv_alignof_CORBA_float=4 +ac_cv_alignof_CORBA_long=4 +ac_cv_alignof_CORBA_long_double=8 +ac_cv_alignof_CORBA_long_long=8 +ac_cv_alignof_CORBA_octet=1 +ac_cv_alignof_CORBA_pointer=4 +ac_cv_alignof_CORBA_short=2 +ac_cv_alignof_CORBA_struct=1 +ac_cv_alignof_CORBA_wchar=2 + +# php +ac_cv_pread=${ac_cv_pread=no} +ac_cv_pwrite=${ac_cv_pwrite=no} +php_cv_lib_cookie_io_functions_use_off64_t=${php_cv_lib_cookie_io_functions_use_off64_t=yes} + +# rsync +rsync_cv_HAVE_BROKEN_LARGEFILE=${rsync_cv_HAVE_BROKEN_LARGEFILE=no} +rsync_cv_HAVE_SOCKETPAIR=${rsync_cv_HAVE_SOCKETPAIR=yes} +rsync_cv_HAVE_LONGLONG=${rsync_cv_HAVE_LONGLONG=yes} +rsync_cv_HAVE_OFF64_T=${rsync_cv_HAVE_OFF64_T=no} +rsync_cv_HAVE_SHORT_INO_T=${rsync_cv_HAVE_SHORT_INO_T=no} +rsync_cv_HAVE_UNSIGNED_CHAR=${rsync_cv_HAVE_UNSIGNED_CHAR=no} +rsync_cv_HAVE_BROKEN_READDIR=${rsync_cv_HAVE_BROKEN_READDIR=no} +rsync_cv_HAVE_GETTIMEOFDAY_TZ=${rsync_cv_HAVE_GETTIMEOFDAY_TZ=yes} +rsync_cv_HAVE_C99_VSNPRINTF=${rsync_cv_HAVE_C99_VSNPRINTF=yes} +rsync_cv_HAVE_SECURE_MKSTEMP=${rsync_cv_HAVE_SECURE_MKSTEMP=yes} +rsync_cv_REPLACE_INET_NTOA=${rsync_cv_REPLACE_INET_NTOA=no} +rsync_cv_REPLACE_INET_ATON=${rsync_cv_REPLACE_INET_ATON=no} + +# screen +screen_cv_sys_bcopy_overlap=${screen_cv_sys_bcopy_overlap=no} +screen_cv_sys_memcpy_overlap=${screen_cv_sys_memcpy_overlap=no} +screen_cv_sys_memmove_overlap=${screen_cv_sys_memmove_overlap=no} +screen_cv_sys_fifo_broken_impl=${screen_cv_sys_fifo_broken_impl=yes} +screen_cv_sys_fifo_usable=${screen_cv_sys_fifo_usable=yes} +screen_cv_sys_select_broken_retval=${screen_cv_sys_select_broken_retval=no} +screen_cv_sys_sockets_nofs=${screen_cv_sys_sockets_nofs=no} +screen_cv_sys_sockets_usable=${screen_cv_sys_sockets_usable=yes} +screen_cv_sys_terminfo_used=${screen_cv_sys_terminfo_used=yes} + +# slrn +slrn_cv_va_val_copy=${slrn_cv_va_val_copy=yes} + +# socat +sc_cv_sys_crdly_shift=9 +sc_cv_sys_csize_shift=4 +sc_cv_sys_tabdly_shift=11 +sc_cv_type_dev_basic='8 /* unsigned long long */' +sc_cv_type_gidt_basic='4 /* unsigned int */' +sc_cv_type_longlong=yes +sc_cv_type_modet_basic='4 /* unsigned int */' +sc_cv_type_off64=no +sc_cv_type_off64_basic='0 /* unknown */' +sc_cv_type_off_basic='3 /* int */' +sc_cv_type_pidt_basic='3 /* int */' +sc_cv_type_rlimit_rlimmax_basic='4 /* unsigned int */' +sc_cv_type_sa_family_t=yes +sc_cv_type_sighandler=no +sc_cv_type_sizet_basic='4 /* unsigned int */' +sc_cv_type_socklen=yes +sc_cv_type_socklent_basic='4 /* unsigned int */' +sc_cv_type_stat64=no +sc_cv_type_stat64_stblksize_basic='0 /* unknown */' +sc_cv_type_stat64_stblocks_basic='0 /* unknown */' +sc_cv_type_stat64_stdev_basic='0 /* unknown */' +sc_cv_type_stat64_stino_basic='0 /* unknown */' +sc_cv_type_stat64_stnlink_basic='0 /* unknown */' +sc_cv_type_stat64_stsize_basic='0 /* unknown */' +sc_cv_type_stat_stblksize_basic='3 /* int */' +sc_cv_type_stat_stblocks_basic='3 /* int */' +sc_cv_type_stat_stino_basic='4 /* unsigned int */' +sc_cv_type_stat_stnlink_basic='4 /* unsigned int */' +sc_cv_type_stat_stsize_basic='3 /* int */' +sc_cv_type_struct_timeval_tv_usec='3 /* int */' +sc_cv_type_timet_basic='3 /* int */' +sc_cv_type_uidt_basic='4 /* unsigned int */' +sc_cv_type_uint16=yes +sc_cv_type_uint32=yes +sc_cv_type_uint64=yes +sc_cv_type_uint8=yes +sc_cv_typeof_struct_cmsghdr_cmsg_len='4 /* unsigned int */' + +# ssh +ac_cv_have_space_d_name_in_struct_dirent=${ac_cv_dirent_have_space_d_name=yes} +ac_cv_have_broken_snprintf=${ac_cv_have_broken_snprintf=no} +ac_cv_have_accrights_in_msghdr=${ac_cv_have_accrights_in_msghdr=no} +ac_cv_have_control_in_msghdr=${ac_cv_have_control_in_msghdr=yes} +ac_cv_have_openpty_ctty_bug=${ac_cv_have_openpty_ctty_bug=yes} + +# startup-notification +lf_cv_sane_realloc=yes + +# xffm +jm_cv_func_working_readdir=yes + +# evolution-data-server +ac_cv_libiconv_utf8=${ac_cv_libiconv_utf8=yes} + +# at-spi2-core +ac_cv_alignof_char=1 +ac_cv_alignof_dbind_pointer=4 +ac_cv_alignof_dbind_struct=1 +ac_cv_alignof_dbus_bool_t=4 +ac_cv_alignof_dbus_int16_t=2 +ac_cv_alignof_dbus_int32_t=4 +ac_cv_alignof_dbus_int64_t=8 +ac_cv_alignof_double=8 diff --git a/common/environment/configure/autoconf_cache/arm-linux b/common/environment/configure/autoconf_cache/arm-linux @@ -0,0 +1,157 @@ +ac_cv_func_setvbuf_reversed=no +ac_cv_sizeof___int64=${ac_cv_sizeof___int64=0} +ac_cv_sizeof_char=${ac_cv_sizeof_char=1} +ac_cv_sizeof_wchar_t=${ac_cv_sizeof_wchar_t=4} +ac_cv_sizeof_unsigned_char=${ac_cv_sizeof_unsigned_char=1} +ac_cv_sizeof_bool=${ac_cv_sizeof_bool=1} +ac_cv_sizeof_char_p=${ac_cv_sizeof_int_p=4} +ac_cv_sizeof_int=${ac_cv_sizeof_int=4} +ac_cv_sizeof_int_p=${ac_cv_sizeof_int_p=4} +ac_cv_sizeof_long=${ac_cv_sizeof_long=4} +ac_cv_sizeof_long_int=${ac_cv_sizeof_long_int=4} +ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long=8} +ac_cv_sizeof_off_t=${ac_cv_sizeof_off_t=4} +ac_cv_sizeof_short=${ac_cv_sizeof_short=2} +ac_cv_sizeof_short_int=${ac_cv_sizeof_short_int=2} +ac_cv_sizeof_size_t=${ac_cv_sizeof_size_t=4} +ac_cv_sizeof_void_p=${ac_cv_sizeof_void_p=4} +ac_cv_sizeof_long_p=${ac_cv_sizeof_long_p=4} +ac_cv_sizeof_float=${ac_cv_sizeof_float=4} +ac_cv_sizeof_double=${ac_cv_sizeof_double=8} +ac_cv_sizeof_long_double=${ac_cv_sizeof_long_double=8} +ac_cv_sizeof_ptrdiff_t=${glib_cv_sizeof_ptrdiff_t=4} +ac_cv_sizeof_unsigned_short=${ac_cv_sizeof_unsigned_short=2} +ac_cv_sizeof_unsigned=${ac_cv_sizeof_unsigned=4} +ac_cv_sizeof_unsigned_int=${ac_cv_sizeof_unsigned_int=4} +ac_cv_sizeof_unsigned_long=${ac_cv_sizeof_unsigned_long=4} +ac_cv_sizeof_unsigned_long_long=${ac_cv_sizeof_unsigned_long_long=8} +ac_cv_sizeof_signed_char=${ac_cv_sizeof_signed_char=1} + +ac_cv_uchar=${ac_cv_uchar=no} +ac_cv_uint=${ac_cv_uint=yes} +ac_cv_ulong=${ac_cv_ulong=yes} +ac_cv_ushort=${ac_cv_ushort=yes} +ac_cv_time_r_type=${ac_cv_time_r_type=POSIX} + +# samba +samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=${samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes} +samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=${samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no} +samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=${samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no} +samba_cv_HAVE_BROKEN_GETGROUPS=${samba_cv_HAVE_BROKEN_GETGROUPS=no} +samba_cv_HAVE_BROKEN_LINUX_SENDFILE=${samba_cv_HAVE_BROKEN_LINUX_SENDFILE=yes} +samba_cv_HAVE_BROKEN_READDIR=${samba_cv_HAVE_BROKEN_READDIR=yes} +samba_cv_HAVE_BROKEN_READDIR_NAME=${samba_cv_HAVE_BROKEN_READDIR_NAME=no} +samba_cv_HAVE_C99_VSNPRINTF=${samba_cv_HAVE_C99_VSNPRINTF=yes} +samba_cv_HAVE_DEV64_T=${samba_cv_HAVE_DEV64_T=no} +samba_cv_HAVE_DEVICE_MAJOR_FN=${samba_cv_HAVE_DEVICE_MAJOR_FN=yes} +samba_cv_HAVE_DEVICE_MINOR_FN=${samba_cv_HAVE_DEVICE_MINOR_FN=yes} +samba_cv_HAVE_DQB_FSOFTLIMIT=${samba_cv_HAVE_DQB_FSOFTLIMIT=no} +samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=${samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes} +samba_cv_HAVE_FAM_H=${samba_cv_HAVE_FAM_H=no} +samba_cv_HAVE_FCNTL_LOCK=${samba_cv_HAVE_FCNTL_LOCK=yes} +samba_cv_HAVE_FTRUNCATE_EXTEND=${samba_cv_HAVE_FTRUNCATE_EXTEND=yes} +samba_cv_HAVE_FUNCTION_MACRO=${samba_cv_HAVE_FUNCTION_MACRO=yes} +samba_cv_HAVE_GETTIMEOFDAY_TZ=${samba_cv_HAVE_GETTIMEOFDAY_TZ=yes} +samba_cv_HAVE_INO64_T=${samba_cv_HAVE_INO64_T=no} +samba_cv_HAVE_INT16_FROM_RPC_RPC_H=${samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no} +samba_cv_HAVE_INT32_FROM_RPC_RPC_H=${samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no} +samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=${samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes} +samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=${samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes} +samba_cv_HAVE_KERNEL_SHARE_MODES=${samba_cv_HAVE_KERNEL_SHARE_MODES=yes} +samba_cv_HAVE_MAKEDEV=${samba_cv_HAVE_MAKEDEV=yes} +samba_cv_HAVE_MMAP=${samba_cv_HAVE_MMAP=yes} +samba_cv_HAVE_NATIVE_ICONV=${samba_cv_HAVE_NATIVE_ICONV=yes} +samba_cv_HAVE_OFF64_T=${samba_cv_HAVE_OFF64_T=no} +samba_cv_HAVE_ROOT=${samba_cv_HAVE_ROOT=yes} +samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=${samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no} +samba_cv_HAVE_SECURE_MKSTEMP=${samba_cv_HAVE_SECURE_MKSTEMP=yes} +samba_cv_HAVE_SENDFILE=${samba_cv_HAVE_SENDFILE=yes} +samba_cv_HAVE_SENDFILE64=${samba_cv_HAVE_SENDFILE64=yes} +samba_cv_HAVE_SOCK_SIN_LEN=${samba_cv_HAVE_SOCK_SIN_LEN=no} +samba_cv_HAVE_STAT_ST_BLKSIZE=${samba_cv_HAVE_STAT_ST_BLKSIZE=yes} +samba_cv_HAVE_STAT_ST_BLOCKS=${samba_cv_HAVE_STAT_ST_BLOCKS=yes} +samba_cv_HAVE_STRUCT_DIR64=${samba_cv_HAVE_STRUCT_DIR64=no} +samba_cv_HAVE_STRUCT_DIRENT64=${samba_cv_HAVE_STRUCT_DIRENT64=yes} +samba_cv_HAVE_STRUCT_FLOCK64=${samba_cv_HAVE_STRUCT_FLOCK64=yes} +samba_cv_HAVE_TRUNCATED_SALT=${samba_cv_HAVE_TRUNCATED_SALT=no} +samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=${samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no} +samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=${samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no} +samba_cv_HAVE_UNSIGNED_CHAR=${samba_cv_HAVE_UNSIGNED_CHAR=yes} +samba_cv_HAVE_UTIMBUF=${samba_cv_HAVE_UTIMBUF=yes} +samba_cv_HAVE_UT_UT_ADDR=${samba_cv_HAVE_UT_UT_ADDR=yes} +samba_cv_HAVE_UT_UT_EXIT=${samba_cv_HAVE_UT_UT_EXIT=yes} +samba_cv_HAVE_UT_UT_HOST=${samba_cv_HAVE_UT_UT_HOST=yes} +samba_cv_HAVE_UT_UT_ID=${samba_cv_HAVE_UT_UT_ID=yes} +samba_cv_HAVE_UT_UT_NAME=${samba_cv_HAVE_UT_UT_NAME=yes} +samba_cv_HAVE_UT_UT_PID=${samba_cv_HAVE_UT_UT_PID=yes} +samba_cv_HAVE_UT_UT_TIME=${samba_cv_HAVE_UT_UT_TIME=yes} +samba_cv_HAVE_UT_UT_TV=${samba_cv_HAVE_UT_UT_TV=yes} +samba_cv_HAVE_UT_UT_TYPE=${samba_cv_HAVE_UT_UT_TYPE=yes} +samba_cv_HAVE_UT_UT_USER=${samba_cv_HAVE_UT_UT_USER=yes} +samba_cv_HAVE_UX_UT_SYSLEN=${samba_cv_HAVE_UX_UT_SYSLEN=no} +samba_cv_HAVE_VA_COPY=${samba_cv_HAVE_VA_COPY=yes} +samba_cv_HAVE_WORKING_AF_LOCAL=${samba_cv_HAVE_WORKING_AF_LOCAL=yes} +samba_cv_HAVE_Werror=${samba_cv_HAVE_Werror=yes} +samba_cv_PUTUTLINE_RETURNS_UTMP=${samba_cv_PUTUTLINE_RETURNS_UTMP=yes} +samba_cv_QUOTA_WORKS=${samba_cv_QUOTA_WORKS=yes} +samba_cv_REALPATH_TAKES_NULL=${samba_cv_REALPATH_TAKES_NULL=yes} +samba_cv_REPLACE_GETPASS=${samba_cv_REPLACE_GETPASS=yes} +samba_cv_REPLACE_INET_NTOA=${samba_cv_REPLACE_INET_NTOA=no} +samba_cv_REPLACE_READDIR=${samba_cv_REPLACE_READDIR=no} +samba_cv_RUN_QUOTA_TESTS=${samba_cv_RUN_QUOTA_TESTS=yes} +samba_cv_SEEKDIR_RETURNS_VOID=${samba_cv_SEEKDIR_RETURNS_VOID=yes} +samba_cv_SIZEOF_DEV_T=${samba_cv_SIZEOF_DEV_T=yes} +samba_cv_SIZEOF_INO_T=${samba_cv_SIZEOF_INO_T=yes} +samba_cv_SIZEOF_OFF_T=${samba_cv_SIZEOF_OFF_T=yes} +samba_cv_SYSCONF_SC_NGROUPS_MAX=${samba_cv_SYSCONF_SC_NGROUPS_MAX=yes} +samba_cv_SYSCONF_SC_NPROCESSORS_ONLN=${samba_cv_SYSCONF_SC_NPROCESSORS_ONLN=yes} +samba_cv_SYSCONF_SC_NPROC_ONLN=${samba_cv_SYSCONF_SC_NPROC_ONLN=no} +samba_cv_SYSCONF_SC_PAGESIZE=${samba_cv_SYSCONF_SC_PAGESIZE=yes} +samba_cv_SYSQUOTA_FOUND=${samba_cv_SYSQUOTA_FOUND=yes} +samba_cv_SYSQUOTA_WORKS=${samba_cv_SYSQUOTA_WORKS=yes} +samba_cv_SYSQUOTA_WORKS_XFS=${samba_cv_SYSQUOTA_WORKS_XFS=yes} +samba_cv_TRY_QUOTAS=${samba_cv_TRY_QUOTAS=no} +samba_cv_TRY_SYS_QUOTAS=${samba_cv_TRY_SYS_QUOTAS=yes} +samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=yes} +samba_cv_WE_USE_SYS_QUOTAS=${samba_cv_WE_USE_SYS_QUOTAS=yes} +samba_cv_WITH_AFS=${samba_cv_WITH_AFS=no} +samba_cv_WITH_FAKE_KASERVER=${samba_cv_WITH_FAKE_KASERVER=no} +samba_cv_WITH_QUOTAS=${samba_cv_WITH_QUOTAS=auto} +samba_cv_WITH_SYS_QUOTAS=${samba_cv_WITH_SYS_QUOTAS=auto} +samba_cv_WITH_VFS_AFSACL=${samba_cv_WITH_VFS_AFSACL=no} +samba_cv_compiler_supports_ll=${samba_cv_compiler_supports_ll=yes} +samba_cv_found_xfs_header=${samba_cv_found_xfs_header=yes} +samba_cv_have_longlong=${samba_cv_have_longlong=yes} +samba_cv_have_setresgid=${samba_cv_have_setresgid=yes} +samba_cv_have_setresuid=${samba_cv_have_setresuid=yes} +samba_cv_immediate_structures=${samba_cv_immediate_structures=yes} +samba_cv_optimize_out_funcation_calls=${samba_cv_optimize_out_funcation_calls=yes} +samba_cv_sig_atomic_t=${samba_cv_sig_atomic_t=yes} +samba_cv_socklen_t=${samba_cv_socklen_t=yes} +samba_cv_struct_timespec=${samba_cv_struct_timespec=yes} +samba_cv_sysquotas_file=${samba_cv_sysquotas_file=lib/sysquotas_linux.c} +samba_cv_unixsocket=${samba_cv_unixsocket=yes} +samba_cv_volatile=${samba_cv_volatile=yes} + +#older sambe defines +samba_cv_USE_SETEUID=${samba_cv_USE_SETEUID=yes} +samba_cv_USE_SETREUID=${samba_cv_USE_SETREUID=yes} +samba_cv_USE_SETUIDX=${samba_cv_USE_SETUIDX=yes} +samba_cv_LINUX_LFS_SUPPORT=${samba_cv_LINUX_LFS_SUPPORT=yes} + +# clamav +clamav_av_func_working_snprintf_long=${clamav_av_func_working_snprintf_long=yes} +clamav_av_have_in_port_t=${clamav_av_have_in_port_t=yes} +clamav_av_have_in_addr_t=${clamav_av_have_in_addr_t=yes} +ac_cv_func_mmap_fixed_mapped=${ac_cv_func_mmap_fixed_mapped=yes} + +#dbus +ac_cv_have_abstract_sockets=${ac_cv_have_abstract_sockets=yes} + +# guile +ac_cv_func_pthread_attr_getstack=${ac_cv_func_pthread_attr_getstack=yes} + +# gnet +ac_cv_member_struct_sockaddr_sa_len=${ac_cv_member_struct_sockaddr_sa_len=no} +ac_cv_gnet_have_abstract_sockets=${ac_cv_gnet_have_abstract_sockets=no} +gnet_sockaddr_family_field_name=${gnet_sockaddr_family_field_name=ss_family} diff --git a/common/environment/configure/autoconf_cache/common-glibc b/common/environment/configure/autoconf_cache/common-glibc @@ -0,0 +1,78 @@ +# general +ac_cv_have_decl_sys_siglist=${ac_cv_have_decl_sys_siglist=yes} + +# bash +bash_cv_under_sys_siglist=${bash_cv_under_sys_siglist=yes} +bash_cv_sys_siglist=${bash_cv_sys_siglist=yes} + +# clamav +clamav_av_func_working_snprintf_long=${clamav_av_func_working_snprintf_long=yes} +clamav_av_have_in_port_t=${clamav_av_have_in_port_t=yes} +clamav_av_have_in_addr_t=${clamav_av_have_in_addr_t=yes} +ac_cv_func_mmap_fixed_mapped=${ac_cv_func_mmap_fixed_mapped=yes} + +# coreutils +fu_cv_sys_stat_statfs2_bsize=${fu_cv_sys_stat_statfs2_bsize=yes} + +# glib +glib_cv_strlcpy=${glib_cv_strlcpy=no} +ac_cv_func_printf_unix98=${ac_cv_func_printf_unix98=yes} +ac_cv_func_snprintf_c99=${ac_cv_func_snprintf_c99=yes} +ac_cv_func_vsnprintf_c99=${ac_cv_func_vsnprintf_c99=yes} +glib_cv_compliant_posix_memalign=${glib_cv_compliant_posix_memalign=1} +glib_cv_long_long_format=${glib_cv_long_long_format=ll} +# glib-1.x requires this and pkgconfig-native / pkgconfig-nativesdk use +# that to avoid a dependency loop. +glib_cv___va_copy=${glib_cv___va_copy=yes} +glib_cv_va_copy=${glib_cv_va_copy=yes} +glib_cv_have_qsort_r=${glib_cv_have_qsort_r=yes} + +#dbus-glib +ac_cv_have_abstract_sockets=${ac_cv_have_abstract_sockets=yes} + +# git +ac_cv_iconv_omits_bom=${ac_cv_iconv_omits_bom=no} + +# gnucash +am_cv_scanf_lld=${am_cv_scanf_lld=yes} + +# guile +ac_cv_func_pthread_attr_getstack=${ac_cv_func_pthread_attr_getstack=yes} + +#gcc-zlib +ac_cv_func_getpagesize=${ac_cv_func_getpagesize=yes} +ac_cv_func_memcpy=${ac_cv_func_memcpy=yes} +ac_cv_func_strerror=${ac_cv_func_strerror=yes} + +# squid +ac_cv_af_unix_large_dgram=${ac_cv_af_unix_large_dgram=yes} +ac_cv_func_setresuid=${ac_cv_func_setresuid=yes} +ac_cv_func_va_copy=${ac_cv_func_va_copy=yes} +ac_cv_func___va_copy=${ac_cv_func___va_copy=yes} +ac_cv_epoll_works=${ac_cv_epoll_works=yes} + +ac_cv_check_sjlj=ssjlj + +# m4 +gt_cv_locale_fr=${gt_cv_locale_fr=fr_FR} +gl_cv_func_btowc_eof=${gl_cv_func_btowc_eof=yes} +gl_cv_func_wcrtomb_retval=${gl_cv_func_wcrtomb_retval=yes} +gl_cv_func_wctob_works=${gl_cv_func_wctob_works=yes} +gl_cv_func_mbrtowc_incomplete_state=${gl_cv_func_mbrtowc_incomplete_state=yes} +gl_cv_func_mbrtowc_sanitycheck=${gl_cv_func_mbrtowc_sanitycheck=yes} +gl_cv_func_mbrtowc_null_arg=${gl_cv_func_mbrtowc_null_arg=yes} +gl_cv_func_mbrtowc_retval=${gl_cv_func_mbrtowc_retval=yes} +gl_cv_func_mbrtowc_nul_retval=${gl_cv_func_mbrtowc_nul_retval=yes} + +# va_copy and _va_copy +ac_cv_va_copy=${ac_cv_va_copy=yes} +ac_cv___va_copy=${ac_cv___va_copy=yes} +ac_cv_func_va_copy=${ac_cv_func_va_copy=yes} +ac_cv_func___va_copy=${ac_cv_func___va_copy=yes} + +# Xorg +xorg_cv_malloc0_returns_null=${xorg_cv_malloc0_returns_null=yes} + +# socat +ac_cv_ispeed_offset=${ac_cv_ispeed_offset=13} +sc_cv_termios_ispeed=${sc_cv_termios_ispeed=yes} diff --git a/common/environment/configure/autoconf_cache/common-linux b/common/environment/configure/autoconf_cache/common-linux @@ -0,0 +1,172 @@ +# general +ac_cv_func_realloc_works=${ac_cv_func_realloc_works=yes} +ac_cv_func_realloc_0_nonnull=${ac_cv_func_realloc_0_nonnull=yes} +ac_cv_func_malloc_works=${ac_cv_func_malloc_works=yes} +ac_cv_func_malloc_0_nonnull=${ac_cv_func_malloc_0_nonnull=yes} +ac_cv_func_memcmp_working=${ac_cv_func_memcmp_working=yes} +ac_cv_func_getpgrp_void=yes +ac_cv_func_setpgrp_void=yes +ac_cv_func_setgrent_void=yes +ac_cv_func_getgrgid_r=${ac_cv_func_getgrgid_r=yes} +ac_cv_func_getpwuid_r=${ac_cv_func_getpwuid_r=yes} +ac_cv_func_posix_getpwuid_r=${ac_cv_func_posix_getpwuid_r=yes} +ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=yes} +ac_cv_type_uid_t={ac_cv_type_uid_t=yes} +ac_cv_func_getaddrinfo=${ac_cv_func_getaddrinfo=yes} +ac_cv_func_strdup=yes +ac_cv_func_strtod=yes +ac_cv_func_fork=yes +ac_cv_func_fork=yes +ac_cv_func_fork_works=yes +ac_cv_func_chown_works=yes +ac_cv_func_working_mktime=yes +ac_cv_func_getgroups=yes +ac_cv_func_getgroups_works=yes +ac_cv_func_pread=yes +ac_cv_func_pwrite=yes +ac_cv_file__dev_random=yes +ac_cv_file__dev_urandom=yes + +# ruby +ac_cv_func_isnan=yes +ac_cv_func_isinf=yes + +# apr +ac_cv_file__dev_zero=${ac_cv_file__dev_zero=yes} +ac_cv_sizeof_pid_t=${ac_cv_sizeof_pid_t=4} +ac_cv_func_strcoll_works=yes + +# samba +samba_cv_HAVE_IFACE_AIX=${samba_cv_HAVE_IFACE_AIX=no} +samba_cv_HAVE_IFACE_IFCONF=${samba_cv_HAVE_IFACE_IFCONF=yes} +samba_cv_HAVE_IFACE_IFREQ=${samba_cv_HAVE_IFACE_IFREQ=yes} +samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=${samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no} + +# db +db_cv_path_ar=${db_cv_path_ar=/usr/bin/ar} +db_cv_path_chmod=${db_cv_path_chmod=/bin/chmod} +db_cv_path_cp=${db_cv_path_cp=/bin/cp} +db_cv_path_ln=${db_cv_path_ln=/bin/ln} +db_cv_path_mkdir=${db_cv_path_mkdir=/bin/mkdir} +db_cv_path_ranlib=${db_cv_path_ranlib=/usr/bin/ranlib} +db_cv_path_rm=${db_cv_path_rm=/bin/rm} +db_cv_path_sh=${db_cv_path_sh=/bin/sh} +db_cv_path_strip=${db_cv_path_strip=/usr/bin/strip} + +# bash +bash_cv_have_mbstate_t=${bash_cv_have_mbstate_t=yes} +bash_cv_must_reinstall_sighandlers=${bash_cv_must_reinstall_sighandlers=no} +bash_cv_func_strcoll_broken=${bash_cv_func_strcoll_broken=no} +bash_cv_dup2_broken=${bash_cv_dup2_broken=no} +bash_cv_opendir_not_robust=${bash_cv_opendir_not_robust=no} +bash_cv_type_rlimit=${bash_cv_type_rlimit=rlim_t} +bash_cv_getenv_redef=${bash_cv_getenv_redef=yes} +bash_cv_ulimit_maxfds=${bash_cv_ulimit_maxfds=yes} +bash_cv_getcwd_calls_popen=${bash_cv_getcwd_calls_popen=no} +bash_cv_printf_a_format=${bash_cv_printf_a_format=yes} +bash_cv_pgrp_pipe=${bash_cv_pgrp_pipe=no} +bash_cv_job_control_missing=${bash_cv_job_control_missing=present} +bash_cv_sys_named_pipes=${bash_cv_sys_named_pipes=present} +bash_cv_unusable_rtsigs=${bash_cv_unusable_rtsigs=no} +bash_cv_func_snprintf=yes +bash_cv_func_vsnprintf=yes +bash_cv_func_sigsetjmp=present +bash_cv_getcwd_malloc=yes +bash_cv_void_sighandler=yes +bash_cv_func_ctype_nonascii=no +bash_cv_wcontinued_broken=no +bash_cv_wexitstatus_offset=8 +bash_cv_wcwidth_broken=no + +# cgdb +ac_cv_file__dev_ptmx=yes +ac_cv_file__dev_ptc=no + +# git +ac_cv_snprintf_returns_bogus=no +ac_cv_fread_reads_directories=yes + +# gnulib +gl_cv_func_fstatat_zero_flag=yes +gl_cv_func_memchr_works=yes +gl_cv_func_dup2_works=yes +gl_cv_func_utimensat_works=yes +gl_cv_func_readlink_works=yes +gl_cv_func_readlinkat_works=yes +gl_cv_func_symlinkat_works=yes +gl_cv_func_unsetenv_works=yes +gl_cv_func_rmdir_works=yes +gl_cv_func_chown_slash_works=yes +gl_cv_func_chown_ctime_works=yes +gl_cv_func_chown_follows_symlink=yes +gl_cv_func_lstat_dereferences_slashed_symlink=yes +gl_cv_func_getcwd_null=yes +gl_cv_func_select_detects_ebadf=yes +gl_cv_func_unlink_honors_slashes=yes +gl_cv_func_snprintf_retval_c99=yes +gl_cv_func_strerror_0_works=yes +gl_cv_func_printf_sizes_c99=yes +gl_cv_func_printf_infinite=yes +gl_cv_func_printf_infinite_long_double=yes +gl_cv_func_printf_directive_a=yes +gl_cv_func_printf_directive_f=yes +gl_cv_func_printf_flag_zero=yes +gl_cv_func_printf_enomem=yes +gl_cv_func_wcwidth_works=yes +gl_cv_func_ungetc_works=yes +gl_cv_func_fchownat_empty_filename_works=yes +gl_cv_func_fcntl_f_dupfd_works=yes +gl_cv_func_fdopendir_works=yes +gl_cv_func_fpurge_works=yes +gl_cv_func_futimens_works=yes +gl_cv_func_getgroups_works=yes +gl_cv_func_isnanl_works=yes +gl_cv_func_link_works=yes +gl_cv_func_linkat_slash=yes +gl_cv_func_mkdir_trailing_slash_works=yes +gl_cv_func_mkdir_trailing_dot_works=yes +gl_cv_func_mkfifo_works=yes +gl_cv_func_mknod_works=yes +gl_cv_func_rename_slash_dst_works=yes +gl_cv_func_rename_slash_src_works=yes +gl_cv_func_rename_link_works=yes +gl_cv_func_rename_dest_works=yes +gl_cv_func_setenv_works=yes +gl_cv_func_stat_file_slash=yes +gl_cv_func_strtod_works=yes +gl_cv_func_symlink_works=yes +gl_cv_func_unlink_honors_slashes=yes +gl_cv_func_perror_works=yes +gl_cv_func_stpncpy=yes +gl_cv_func_realpath_works=yes +gl_cv_func_remove_dir_works=yes + +# mysql +ac_cv_sys_restartable_syscalls=${ac_cv_sys_restartable_syscalls=yes} +ac_cv_conv_longlong_to_float=${ac_cv_conv_longlong_to_float=yes} + +# TCL +tcl_cv_api_serial=${tcl_cv_api_serial=termios} + +# python +ac_cv_have_long_long_format=yes + +# socat +ac_cv_have_c99_snprintf=yes + +# apache +ac_cv_o_nonblock_inherited=${ac_cv_o_nonblock_inherited=no} + +# varnish +ac_cv_have_viz=yes +ac_cv_so_rcvtimeo_works=yes +ac_cv_so_sndtimeo_works=yes + +# libtar +compat_cv_func_makedev_three_args=no + +# exo +ac_cv_strftime_extensions=yes + +# time +ac_cv_func_wait3=yes diff --git a/common/environment/configure/autoconf_cache/endian-big b/common/environment/configure/autoconf_cache/endian-big @@ -0,0 +1,8 @@ +ac_cv_c_littleendian=${ac_cv_c_littleendian=no} +ac_cv_c_bigendian=${ac_cv_c_bigendian=yes} + +# libnet +ac_cv_libnet_endianess=${ac_cv_libnet_endianess=big} + +# libmemcached +ac_cv_c_endian=big diff --git a/common/environment/configure/autoconf_cache/endian-little b/common/environment/configure/autoconf_cache/endian-little @@ -0,0 +1,8 @@ +ac_cv_c_littleendian=${ac_cv_c_littleendian=yes} +ac_cv_c_bigendian=${ac_cv_c_bigendian=no} + +# libnet +ac_cv_libnet_endianess=${ac_cv_libnet_endianess=lil} + +# libmemcached +ac_cv_c_endian=little diff --git a/common/environment/configure/autoconf_cache/ix86-common b/common/environment/configure/autoconf_cache/ix86-common @@ -0,0 +1,268 @@ +# general +ac_cv_sizeof_char=${ac_cv_sizeof_char=1} +ac_cv_sizeof_unsigned_char=${ac_cv_sizeof_unsigned_char=1} +ac_cv_sizeof_char_p=${ac_cv_sizeof_char_p=4} +ac_cv_sizeof_unsigned_char_p=${ac_cv_sizeof_unsigned_char_p=4} +ac_cv_sizeof_int=${ac_cv_sizeof_int=4} +ac_cv_sizeof_unsigned_int=${ac_cv_sizeof_unsigned_int=4} +ac_cv_sizeof_int_p=${ac_cv_sizeof_int_p=4} +ac_cv_sizeof_long=${ac_cv_sizeof_long=4} +ac_cv_sizeof_unsigned_long=${ac_cv_sizeof_unsigned_long=4} +ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long=8} +ac_cv_sizeof_unsigned_long_long=${ac_cv_sizeof_unsigned_long_long=8} +ac_cv_sizeof_short=${ac_cv_sizeof_short=2} +ac_cv_sizeof_unsigned_short=${ac_cv_sizeof_unsigned_short=2} +ac_cv_sizeof_size_t=${ac_cv_sizeof_size_t=4} +ac_cv_sizeof_ssize_t=${ac_cv_sizeof_ssize_t=4} +ac_cv_sizeof_void_p=${ac_cv_sizeof_void_p=4} +ac_cv_sizeof_long_p=${ac_cv_sizeof_long_p=4} +ac_cv_sizeof_float=${ac_cv_sizeof_float=4} +ac_cv_sizeof_off_t=${ac_cv_sizeof_off_t=4} +ac_cv_sizeof_uid_t=${ac_cv_sizeof_uid_t=4} +ac_cv_sizeof_gid_t=${ac_cv_sizeof_gid_t=4} +ac_cv_sizeof_ino_t=${ac_cv_sizeof_ino_t=4} +ac_cv_sizeof_dev_t=${ac_cv_sizeof_dev_t=8} +ac_cv_func_lstat_dereferences_slashed_symlink=${ac_cv_func_lstat_dereferences_slashed_symlink=yes} +ac_cv_func_lstat_empty_string_bug=${ac_cv_func_lstat_empty_string_bug=no} +ac_cv_func_pthread_key_delete=${ac_cv_func_pthread_key_delete=yes} +ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed=no} +ac_cv_func_stat_empty_string_bug=${ac_cv_func_stat_empty_string_bug=no} +ac_cv_func_stat_ignores_trailing_slash=${ac_cv_func_stat_ignores_trailing_slash=no} +ac_cv_va_val_copy=${ac_cv_va_val_copy=yes} +ac_cv_sizeof_struct_iovec=8 + +ac_cv_header_netinet_sctp_h=${ac_cv_header_netinet_sctp_h=no} +ac_cv_header_netinet_sctp_uio_h=${ac_cv_header_netinet_sctp_uio_h=no} +ac_cv_linux_vers=${ac_cv_linux_vers=2} +ac_cv_sctp=${ac_cv_sctp=no} + +apr_cv_process_shared_works=${apr_cv_process_shared_works=no} +apr_cv_tcp_nodelay_with_cork=${apr_cv_tcp_nodelay_with_cork=yes} + +ac_cv_path_ESD_CONFIG=no +lf_cv_sane_realloc=yes +jm_cv_func_gettimeofday_clobber=no +samba_cv_HAVE_GETTIMEOFDAY_TZ=yes +bf_lsbf=1 +ac_cv_uchar=${ac_cv_uchar=no} +ac_cv_uint=${ac_cv_uint=yes} +ac_cv_ulong=${ac_cv_ulong=yes} +ac_cv_ushort=${ac_cv_ushort=yes} + +# audacity +ac_cv_file_lib_src_libmad_frame_h=${ac_cv_file_lib_src_libmad_frame_h=no} + +# bash +ac_cv_c_long_double=${ac_cv_c_long_double=yes} + +# clamav +clamav_av_func_working_snprintf_long=${clamav_av_func_working_snprintf_long=yes} +clamav_av_have_in_port_t=${clamav_av_have_in_port_t=yes} +clamav_av_have_in_addr_t=${clamav_av_have_in_addr_t=yes} +ac_cv_func_mmap_fixed_mapped=${ac_cv_func_mmap_fixed_mapped=yes} + +# cvs +cvs_cv_func_printf_ptr=${cvs_cv_func_printf_ptr=yes} + +# db +db_cv_alignp_t=${db_cv_alignp_t='unsigned long'} +db_cv_align_t=${db_cv_align_t='unsigned long long'} +db_cv_fcntl_f_setfd=${db_cv_fcntl_f_setfd=yes} +db_cv_sprintf_count=${db_cv_sprintf_count=yes} + +# D-BUS +ac_cv_func_posix_getpwnam_r=${ac_cv_func_posix_getpwnam_r=yes} + +# ettercap +ettercap_cv_type_socklen_t=${ettercap_cv_type_socklen_t=yes} + +# gettext +am_cv_func_working_getline=${am_cv_func_working_getline=yes} + +# glib +glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4} +glib_cv_has__inline=${glib_cv_has__inline=yes} +glib_cv_has__inline__=${glib_cv_has__inline__=yes} +glib_cv_hasinline=${glib_cv_hasinline=yes} +glib_cv_sane_realloc=${glib_cv_sane_realloc=yes} +glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24} +glib_cv_sys_pthread_cond_timedwait_posix=${glib_cv_sys_pthread_cond_timedwait_posix=yes} +glib_cv_sys_pthread_getspecific_posix=${glib_cv_sys_pthread_getspecific_posix=yes} +glib_cv_sys_pthread_mutex_trylock_posix=${glib_cv_sys_pthread_mutex_trylock_posix=yes} +glib_cv_uscore=${glib_cv_uscore=no} +glib_cv_va_val_copy=${glib_cv_va_val_copy=yes} +glib_cv_rtldglobal_broken=${glib_cv_rtldglobal_broken=yes} + +# glib-2.0 +glib_cv_stack_grows=${glib_cv_stack_grows=no} +utils_cv_sys_open_max=${utils_cv_sys_open_max=1015} +glib_cv_use_pid_surrogate=${glib_cv_use_pid_surrogate=yes} +ac_cv_alignof_guint32=4 +ac_cv_alignof_guint64=4 +ac_cv_alignof_unsigned_long=4 + +# guile +ac_cv_uchar=${ac_cv_uchar=no} +ac_cv_uint=${ac_cv_uint=yes} +ac_cv_ulong=${ac_cv_ulong=yes} +ac_cv_ushort=${ac_cv_ushort=yes} + +# intercom +ac_cv_func_fnmatch_works=${ac_cv_func_fnmatch_works=yes} + +# jikes-native +ac_cv_sizeof_wchar_t=4 + +# lftp +ac_cv_need_trio=${ac_cv_need_trio=no} +lftp_cv_va_val_copy=${lftp_cv_va_val_copy=yes} + +# libidl +libIDL_cv_long_long_format=${libIDL_cv_long_long_format=ll} + +# libnet +ac_cv_lbl_unaligned_fail=${ac_cv_lbl_unaligned_fail=no} +ac_libnet_have_packet_socket=${ac_libnet_have_packet_socket=yes} + +# libxfce4util +with_broken_putenv=${with_broken_putenv=no} + +# mysql +mysql_cv_func_atomic_sub=${mysql_cv_func_atomic_sub=yes} +mysql_cv_func_atomic_add=${mysql_cv_func_atomic_add=yes} + +# ORBit2 +ac_cv_alignof_CORBA_boolean=1 +ac_cv_alignof_CORBA_char=1 +ac_cv_alignof_CORBA_double=4 +ac_cv_alignof_CORBA_float=4 +ac_cv_alignof_CORBA_long=4 +ac_cv_alignof_CORBA_long_double=4 +ac_cv_alignof_CORBA_long_long=4 +ac_cv_alignof_CORBA_octet=1 +ac_cv_alignof_CORBA_pointer=4 +ac_cv_alignof_CORBA_short=2 +ac_cv_alignof_CORBA_struct=4 +ac_cv_alignof_CORBA_wchar=2 + +# php +ac_cv_pread=${ac_cv_pread=no} +ac_cv_pwrite=${ac_cv_pwrite=no} +php_cv_lib_cookie_io_functions_use_off64_t=${php_cv_lib_cookie_io_functions_use_off64_t=yes} + +# rsync +rsync_cv_HAVE_BROKEN_LARGEFILE=${rsync_cv_HAVE_BROKEN_LARGEFILE=no} +rsync_cv_HAVE_SOCKETPAIR=${rsync_cv_HAVE_SOCKETPAIR=yes} +rsync_cv_HAVE_LONGLONG=${rsync_cv_HAVE_LONGLONG=yes} +rsync_cv_HAVE_OFF64_T=${rsync_cv_HAVE_OFF64_T=no} +rsync_cv_HAVE_SHORT_INO_T=${rsync_cv_HAVE_SHORT_INO_T=no} +rsync_cv_HAVE_UNSIGNED_CHAR=${rsync_cv_HAVE_UNSIGNED_CHAR=no} +rsync_cv_HAVE_BROKEN_READDIR=${rsync_cv_HAVE_BROKEN_READDIR=no} +rsync_cv_HAVE_GETTIMEOFDAY_TZ=${rsync_cv_HAVE_GETTIMEOFDAY_TZ=yes} +rsync_cv_HAVE_C99_VSNPRINTF=${rsync_cv_HAVE_C99_VSNPRINTF=yes} +rsync_cv_HAVE_SECURE_MKSTEMP=${rsync_cv_HAVE_SECURE_MKSTEMP=yes} +rsync_cv_REPLACE_INET_NTOA=${rsync_cv_REPLACE_INET_NTOA=no} +rsync_cv_REPLACE_INET_ATON=${rsync_cv_REPLACE_INET_ATON=no} + +# samba +samba_cv_HAVE_GETTIMEOFDAY_TZ=${samba_cv_HAVE_GETTIMEOFDAY_TZ=yes} + +# socat +sc_cv_type_dev_basic='8 /* unsigned long long */' +sc_cv_type_gidt_basic='4 /* unsigned int */' +sc_cv_type_longlong=yes +sc_cv_type_modet_basic='4 /* unsigned int */' +sc_cv_type_off64=no +sc_cv_type_off64_basic='0 /* unknown */' +sc_cv_type_off_basic='3 /* int */' +sc_cv_type_pidt_basic='3 /* int */' +sc_cv_type_rlimit_rlimmax_basic='4 /* unsigned int */' +sc_cv_type_sa_family_t=yes +sc_cv_type_sighandler=no +sc_cv_type_sizet_basic='4 /* unsigned int */' +sc_cv_type_socklen=yes +sc_cv_type_socklent_basic='4 /* unsigned int */' +sc_cv_type_stat64=no +sc_cv_type_stat64_stblksize_basic='0 /* unknown */' +sc_cv_type_stat64_stblocks_basic='0 /* unknown */' +sc_cv_type_stat64_stdev_basic='0 /* unknown */' +sc_cv_type_stat64_stino_basic='0 /* unknown */' +sc_cv_type_stat64_stnlink_basic='0 /* unknown */' +sc_cv_type_stat64_stsize_basic='0 /* unknown */' +sc_cv_type_stat_stblksize_basic='3 /* int */' +sc_cv_type_stat_stblocks_basic='3 /* int */' +sc_cv_type_stat_stino_basic='4 /* unsigned int */' +sc_cv_type_stat_stnlink_basic='4 /* unsigned int */' +sc_cv_type_stat_stsize_basic='3 /* int */' +sc_cv_type_struct_timeval_tv_usec='3 /* int */' +sc_cv_type_timet_basic='3 /* int */' +sc_cv_type_uidt_basic='4 /* unsigned int */' +sc_cv_type_uint16=yes +sc_cv_type_uint32=yes +sc_cv_type_uint64=yes +sc_cv_type_uint8=yes +sc_cv_typeof_struct_cmsghdr_cmsg_len='4 /* unsigned int */' + +# screen +screen_cv_sys_bcopy_overlap=${screen_cv_sys_bcopy_overlap=no} +screen_cv_sys_memcpy_overlap=${screen_cv_sys_memcpy_overlap=no} +screen_cv_sys_memmove_overlap=${screen_cv_sys_memmove_overlap=no} +screen_cv_sys_fifo_broken_impl=${screen_cv_sys_fifo_broken_impl=yes} +screen_cv_sys_fifo_usable=${screen_cv_sys_fifo_usable=yes} +screen_cv_sys_select_broken_retval=${screen_cv_sys_select_broken_retval=no} +screen_cv_sys_sockets_nofs=${screen_cv_sys_sockets_nofs=no} +screen_cv_sys_sockets_usable=${screen_cv_sys_sockets_usable=yes} +screen_cv_sys_terminfo_used=${screen_cv_sys_terminfo_used=yes} + +# slrn +slrn_cv_va_val_copy=${slrn_cv_va_val_copy=yes} + +# ssh +ac_cv_have_space_d_name_in_struct_dirent=${ac_cv_dirent_have_space_d_name=yes} +ac_cv_have_broken_snprintf=${ac_cv_have_broken_snprintf=no} +ac_cv_have_accrights_in_msghdr=${ac_cv_have_accrights_in_msghdr=no} +ac_cv_have_control_in_msghdr=${ac_cv_have_control_in_msghdr=yes} +ac_cv_type_struct_timespec=${ac_cv_type_struct_timespec=yes} +ac_cv_have_openpty_ctty_bug=${ac_cv_have_openpty_ctty_bug=yes} + +# startup-notification +lf_cv_sane_realloc=yes + +# xffm +jm_cv_func_working_readdir=yes + +# xorg X11R7 +ac_cv_sys_linker_h=${ac_cv_sys_linker_h=no} +ac_cv_file__usr_share_X11_sgml_defs_ent=${ac_cv_file__usr_share_X11_sgml_defs_ent=no} + +# evolution-data-server +ac_cv_libiconv_utf8=${ac_cv_libiconv_utf8=yes} + +#dbus +ac_cv_have_abstract_sockets=${ac_cv_have_abstract_sockets=yes} + +#libpciaccess +have_mtrr_h=yes + +#mozilla +moz_cv_size_of_JS_BYTES_PER_WORD=4 +moz_cv_align_of_JS_ALIGN_OF_POINTER=4 +moz_cv_size_of_JS_BYTES_PER_DOUBLE=8 + +#ofono +ac_cv_lib_c_signalfd=${ac_cv_lib_c_signalfd=yes} + +#unfs3 +nfsd_cv_broken_setfsuid=${nfsd_cv_broken_setfsuid=0} +nfsd_cv_func_statfs=${nfsd_cv_func_statfs=statfs2_bsize} +nfsd_cv_bsd_signals=${nfsd_cv_bsd_signals=yes} + +# at-spi2-core +ac_cv_alignof_char=1 +ac_cv_alignof_dbind_pointer=4 +ac_cv_alignof_dbind_struct=1 +ac_cv_alignof_dbus_bool_t=4 +ac_cv_alignof_dbus_int16_t=2 +ac_cv_alignof_dbus_int32_t=4 +ac_cv_alignof_dbus_int64_t=4 +ac_cv_alignof_double=4 diff --git a/common/environment/configure/autoconf_cache/mips-common b/common/environment/configure/autoconf_cache/mips-common @@ -0,0 +1,93 @@ +# general +ac_cv_va_val_copy=${ac_cv_va_val_copy=yes} +ac_cv_sizeof_struct_iovec=8 + +# cvs +cvs_cv_func_printf_ptr=${cvs_cv_func_printf_ptr=yes} + +# screen +screen_cv_sys_bcopy_overlap=${screen_cv_sys_bcopy_overlap=no} +screen_cv_sys_memcpy_overlap=${screen_cv_sys_memcpy_overlap=no} +screen_cv_sys_memmove_overlap=${screen_cv_sys_memmove_overlap=no} +screen_cv_sys_fifo_broken_impl=${screen_cv_sys_fifo_broken_impl=yes} +screen_cv_sys_fifo_usable=${screen_cv_sys_fifo_usable=yes} +screen_cv_sys_select_broken_retval=${screen_cv_sys_select_broken_retval=no} +screen_cv_sys_sockets_nofs=${screen_cv_sys_sockets_nofs=no} +screen_cv_sys_sockets_usable=${screen_cv_sys_sockets_usable=yes} +screen_cv_sys_terminfo_used=${screen_cv_sys_terminfo_used=yes} + +# socat +sc_cv_type_dev_basic='8 /* unsigned long long */' +sc_cv_type_gidt_basic='4 /* unsigned int */' +sc_cv_type_longlong=yes +sc_cv_type_modet_basic='4 /* unsigned int */' +sc_cv_type_off64=no +sc_cv_type_off64_basic='0 /* unknown */' +sc_cv_type_off_basic='3 /* int */' +sc_cv_type_pidt_basic='3 /* int */' +sc_cv_type_rlimit_rlimmax_basic='4 /* unsigned int */' +sc_cv_type_sa_family_t=yes +sc_cv_type_sighandler=no +sc_cv_type_sizet_basic='4 /* unsigned int */' +sc_cv_type_socklen=yes +sc_cv_type_socklent_basic='4 /* unsigned int */' +sc_cv_type_stat64=no +sc_cv_type_stat64_stblksize_basic='0 /* unknown */' +sc_cv_type_stat64_stblocks_basic='0 /* unknown */' +sc_cv_type_stat64_stdev_basic='0 /* unknown */' +sc_cv_type_stat64_stino_basic='0 /* unknown */' +sc_cv_type_stat64_stnlink_basic='0 /* unknown */' +sc_cv_type_stat64_stsize_basic='0 /* unknown */' +sc_cv_type_stat_stblksize_basic='3 /* int */' +sc_cv_type_stat_stblocks_basic='3 /* int */' +sc_cv_type_stat_stino_basic='4 /* unsigned int */' +sc_cv_type_stat_stnlink_basic='4 /* unsigned int */' +sc_cv_type_stat_stsize_basic='3 /* int */' +sc_cv_type_struct_timeval_tv_usec='3 /* int */' +sc_cv_type_timet_basic='3 /* int */' +sc_cv_type_uidt_basic='4 /* unsigned int */' +sc_cv_type_uint16=yes +sc_cv_type_uint32=yes +sc_cv_type_uint64=yes +sc_cv_type_uint8=yes +sc_cv_typeof_struct_cmsghdr_cmsg_len='4 /* unsigned int */' + +# ORBit2 +ac_cv_alignof_CORBA_octet=1 +ac_cv_alignof_CORBA_boolean=1 +ac_cv_alignof_CORBA_char=1 +ac_cv_alignof_CORBA_wchar=2 +ac_cv_alignof_CORBA_short=2 +ac_cv_alignof_CORBA_long=4 +ac_cv_alignof_CORBA_long_long=8 +ac_cv_alignof_CORBA_float=4 +ac_cv_alignof_CORBA_double=8 +ac_cv_alignof_CORBA_long_double=8 +ac_cv_alignof_CORBA_pointer=4 +ac_cv_alignof_CORBA_struct=1 + +# apache +ac_cv_func_pthread_key_delete=${ac_cv_func_pthread_key_delete=yes} +apr_cv_process_shared_works=${apr_cv_process_shared_works=no} +ac_cv_sizeof_ssize_t=${ac_cv_sizeof_ssize_t=4} +apr_cv_tcp_nodelay_with_cork=${apr_cv_tcp_nodelay_with_cork=yes} + +# glib +glib_cv_va_val_copy=${glib_cv_va_val_copy=yes} +ac_cv_alignof_guint32=4 +ac_cv_alignof_guint64=8 +ac_cv_alignof_unsigned_long=4 + + +# slrn +slrn_cv_va_val_copy=${slrn_cv_va_val_copy=yes} + +# at-spi2-core +ac_cv_alignof_char=1 +ac_cv_alignof_dbind_pointer=4 +ac_cv_alignof_dbind_struct=1 +ac_cv_alignof_dbus_bool_t=4 +ac_cv_alignof_dbus_int16_t=2 +ac_cv_alignof_dbus_int32_t=4 +ac_cv_alignof_dbus_int64_t=8 +ac_cv_alignof_double=8 diff --git a/common/environment/configure/autoconf_cache/mips-linux b/common/environment/configure/autoconf_cache/mips-linux @@ -0,0 +1,78 @@ +# general +ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed=no} + +# bash +ac_cv_c_long_double=${ac_cv_c_long_double=no} + +# openssh +ac_cv_have_accrights_in_msghdr=${ac_cv_have_accrights_in_msghdr=no} +ac_cv_have_broken_snprintf=${ac_cv_have_broken_snprintf=no} +ac_cv_have_control_in_msghdr=${ac_cv_have_control_in_msghdr=yes} +ac_cv_have_openpty_ctty_bug=${ac_cv_have_openpty_ctty_bug=no} +ac_cv_have_space_d_name_in_struct_dirent=${ac_cv_have_space_d_name_in_struct_dirent=yes} + +# fget +compat_cv_func_snprintf_works=${compat_cv_func_snprintf_works=yes} + +# glib +glib_cv___va_copy=${glib_cv___va_copy=yes} +glib_cv_has__inline=${glib_cv_has__inline=yes} +glib_cv_has__inline__=${glib_cv_has__inline__=yes} +glib_cv_hasinline=${glib_cv_hasinline=yes} +glib_cv_long_long_format=${glib_cv_long_long_format=ll} +glib_cv_rtldglobal_broken=${glib_cv_rtldglobal_broken=no} +glib_cv_sane_realloc=${glib_cv_sane_realloc=yes} +glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24} +glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4} +glib_cv_stack_grows=${glib_cv_stack_grows=no} +glib_cv_uscore=${glib_cv_uscore=no} + +# glib-2.0 +glib_cv_stack_grows=${glib_cv_stack_grows=no} +utils_cv_sys_open_max=${utils_cv_sys_open_max=1015} +glib_cv_use_pid_surrogate=${glib_cv_use_pid_surrogate=yes} + +# libpcap +ac_cv_linux_vers=${ac_cv_linux_vers=2} + +# startup-notification +lf_cv_sane_realloc=${lf_cv_sane_realloc=yes} + +# libidl +libIDL_cv_long_long_format=${libIDL_cv_long_long_format=ll} + +# ncftp +wi_cv_struct_timeval_tv_sec=${wi_cv_struct_timeval_tv_sec=long} +wi_cv_struct_timeval_tv_usec=${wi_cv_struct_timeval_tv_usec=long} + +# db +db_cv_align_t=${db_cv_align_t='unsigned long long'} +db_cv_alignp_t=${db_cv_alignp_t='unsigned long'} +db_cv_fcntl_f_setfd=${db_cv_fcntl_f_setfd=yes} +db_cv_sprintf_count=${db_cv_sprintf_count=yes} + +# rrdtool +rd_cv_ieee_works=${rd_cv_ieee_works=yes} +# ac_cv_path_PERL=${ac_cv_path_PERL=no} + +# gettext +am_cv_func_working_getline=${am_cv_func_working_getline=yes} + +# samba +samba_cv_HAVE_GETTIMEOFDAY_TZ=${samba_cv_HAVE_GETTIMEOFDAY_TZ=yes} + +# vim +ac_cv_sizeof_int=${ac_cv_sizeof_int=4} + +# intercom +ac_cv_func_fnmatch_works=${ac_cv_func_fnmatch_works=yes} + +# lmbench +ac_cv_uint=${ac_cv_unit=yes} + +# D-BUS +ac_cv_func_posix_getpwnam_r=${ac_cv_func_posix_getpwnam_r=yes} + +# evolution-data-server +ac_cv_libiconv_utf8=${ac_cv_libiconv_utf8=yes} + diff --git a/common/environment/configure/autoconf_cache/mipsel-linux b/common/environment/configure/autoconf_cache/mipsel-linux @@ -0,0 +1,78 @@ +# general +ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed=no} + +# bash +ac_cv_c_long_double=${ac_cv_c_long_double=no} + +# openssh +ac_cv_have_accrights_in_msghdr=${ac_cv_have_accrights_in_msghdr=no} +ac_cv_have_broken_snprintf=${ac_cv_have_broken_snprintf=no} +ac_cv_have_control_in_msghdr=${ac_cv_have_control_in_msghdr=yes} +ac_cv_have_openpty_ctty_bug=${ac_cv_have_openpty_ctty_bug=no} +ac_cv_have_space_d_name_in_struct_dirent=${ac_cv_have_space_d_name_in_struct_dirent=yes} + +# fget +compat_cv_func_snprintf_works=${compat_cv_func_snprintf_works=yes} + +# glib +glib_cv___va_copy=${glib_cv___va_copy=yes} +glib_cv_has__inline=${glib_cv_has__inline=yes} +glib_cv_has__inline__=${glib_cv_has__inline__=yes} +glib_cv_hasinline=${glib_cv_hasinline=yes} +glib_cv_long_long_format=${glib_cv_long_long_format=ll} +glib_cv_rtldglobal_broken=${glib_cv_rtldglobal_broken=no} +glib_cv_sane_realloc=${glib_cv_sane_realloc=yes} +glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24} +glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4} +glib_cv_stack_grows=${glib_cv_stack_grows=no} +glib_cv_uscore=${glib_cv_uscore=no} + +# glib-2.0 +glib_cv_stack_grows=${glib_cv_stack_grows=no} +utils_cv_sys_open_max=${utils_cv_sys_open_max=1015} +glib_cv_use_pid_surrogate=${glib_cv_use_pid_surrogate=yes} + +# libpcap +ac_cv_linux_vers=${ac_cv_linux_vers=2} + +# startup-notification +lf_cv_sane_realloc=${lf_cv_sane_realloc=yes} + +# libidl +libIDL_cv_long_long_format=${libIDL_cv_long_long_format=ll} + +# ncftp +wi_cv_struct_timeval_tv_sec=${wi_cv_struct_timeval_tv_sec=long} +wi_cv_struct_timeval_tv_usec=${wi_cv_struct_timeval_tv_usec=long} +wi_cv_unix_domain_sockets=${wi_cv_unix_domain_sockets=yes} + +# db +db_cv_align_t=${db_cv_align_t='unsigned long long'} +db_cv_alignp_t=${db_cv_alignp_t='unsigned long'} +db_cv_fcntl_f_setfd=${db_cv_fcntl_f_setfd=yes} +db_cv_sprintf_count=${db_cv_sprintf_count=yes} + +# rrdtool +rd_cv_ieee_works=${rd_cv_ieee_works=yes} +# ac_cv_path_PERL=${ac_cv_path_PERL=no} + +# gettext +am_cv_func_working_getline=${am_cv_func_working_getline=yes} + +# samba +samba_cv_HAVE_GETTIMEOFDAY_TZ=${samba_cv_HAVE_GETTIMEOFDAY_TZ=yes} + +# vim +ac_cv_sizeof_int=${ac_cv_sizeof_int=4} + +# intercom +ac_cv_func_fnmatch_works=${ac_cv_func_fnmatch_works=yes} + +#lmbench +ac_cv_uint=${ac_cv_unit=yes} + +# D-BUS +ac_cv_func_posix_getpwnam_r=${ac_cv_func_posix_getpwnam_r=yes} + +# evolution-data-server +ac_cv_libiconv_utf8=${ac_cv_libiconv_utf8=yes} diff --git a/common/environment/configure/autoconf_cache/musl-linux b/common/environment/configure/autoconf_cache/musl-linux @@ -0,0 +1,183 @@ +# gnulib overrides +# +gl_cv_func_isnanl_works=yes +gl_cv_header_working_stdint_h=yes +gl_cv_func_fpurge_works=yes +gl_cv_func_fcntl_f_dupfd_cloexec=yes +gl_cv_func_getcwd_path_max=yes +gl_cv_func_fprintf_posix=yes +gl_cv_func_printf_sizes_c99=yes +gl_cv_func_printf_long_double=yes +gl_cv_func_printf_infinite=yes +gl_cv_func_printf_infinite_long_double=yes +gl_cv_func_printf_directive_a=yes +gl_cv_func_printf_directive_f=yes +gl_cv_func_printf_directive_n=yes +gl_cv_func_printf_directive_ls=yes +gl_cv_func_printf_positions=yes +gl_cv_func_printf_flag_grouping=yes +gl_cv_func_printf_flag_leftadjust=yes +gl_cv_func_printf_flag_zero=yes +gl_cv_func_printf_precision=yes +gl_cv_func_printf_enomem=yes +gl_cv_header_wchar_h_correct_inline=yes +gl_cv_decl_null_works=yes +gl_cv_func_malloc_posix=yes +gl_cv_func_memchr_works=yes +gl_cv_have_include_next=yes +gt_cv_inttypes_pri_broken=no +gl_cv_promoted_mode_t=mode_t +gl_cv_func_mbrtowc_sanitycheck=yes +gl_cv_sys_struct_timespec_in_time_h=yes +gl_cv_func_iswcntrl_works=yes +gl_cv_func_dup2_works=yes +gl_cv_func_fcntl_f_dupfd_works=yes +gl_cv_func_fseeko=yes +# the following flag, according to fseeko.m4, is needed to skip the fseeko replacement +gl_cv_func_fflush_stdin=yes +gl_cv_func_gettimeofday_clobber=no +gl_cv_func_gettimeofday_posix_signature=yes +gl_cv_func_lseek_pipe=yes +gl_cv_func_mbrtowc_retval=yes +gl_cv_func_posix_spawn_works=yes +gl_cv_func_sigprocmask=1 +gl_cv_func_spawnattr_setschedparam=yes +gl_cv_func_spawnattr_setschedpolicy=yes +gl_cv_func_stat_dir_slash=yes +gl_cv_func_strndup_works=yes +gl_cv_func_unsetenv_works=yes +gl_cv_func_working_strerror=yes +gl_cv_have_raw_decl_atoll=yes +gl_cv_have_raw_decl_btowc=yes +gl_cv_have_raw_decl_chown=yes +gl_cv_have_raw_decl_dprintf=yes +gl_cv_have_raw_decl_dup2=yes +gl_cv_have_raw_decl_dup3=yes +gl_cv_have_raw_decl_endusershell=yes +gl_cv_have_raw_decl_environ=yes +gl_cv_have_raw_decl_faccessat=yes +gl_cv_have_raw_decl_fchdir=yes +gl_cv_have_raw_decl_fchmodat=yes +gl_cv_have_raw_decl_fchownat=yes +gl_cv_have_raw_decl_fcntl=yes +gl_cv_have_raw_decl_fseeko=yes +gl_cv_have_raw_decl_fstatat=yes +gl_cv_have_raw_decl_fsync=yes +gl_cv_have_raw_decl_ftello=yes +gl_cv_have_raw_decl_ftruncate=yes +gl_cv_have_raw_decl_futimens=yes +gl_cv_have_raw_decl_getcwd=yes +gl_cv_have_raw_decl_getdelim=yes +gl_cv_have_raw_decl_getdomainname=yes +gl_cv_have_raw_decl_getdtablesize=yes +gl_cv_have_raw_decl_getgroups=yes +gl_cv_have_raw_decl_gethostname=yes +gl_cv_have_raw_decl_getline=yes +gl_cv_have_raw_decl_getlogin=yes +gl_cv_have_raw_decl_getlogin_r=yes +gl_cv_have_raw_decl_getpagesize=yes +gl_cv_have_raw_decl_getsubopt=yes +gl_cv_have_raw_decl_getusershell=yes +gl_cv_have_raw_decl_grantpt=yes +gl_cv_have_raw_decl_lchown=yes +gl_cv_have_raw_decl_link=yes +gl_cv_have_raw_decl_linkat=yes +gl_cv_have_raw_decl_lseek=yes +gl_cv_have_raw_decl_lstat=yes +gl_cv_have_raw_decl_mbsinit=yes +gl_cv_have_raw_decl_mbrlen=yes +gl_cv_have_raw_decl_mbrtowc=yes +gl_cv_have_raw_decl_memmem=yes +gl_cv_have_raw_decl_mempcpy=yes +gl_cv_have_raw_decl_memrchr=yes +gl_cv_have_raw_decl_mkdirat=yes +gl_cv_have_raw_decl_mkdtemp=yes +gl_cv_have_raw_decl_mkfifo=yes +gl_cv_have_raw_decl_mknod=yes +gl_cv_have_raw_decl_mknodat=yes +gl_cv_have_raw_decl_mkstemp=yes +gl_cv_have_raw_decl_openat=yes +gl_cv_have_raw_decl_pipe2=yes +gl_cv_have_raw_decl_posix_spawnattr_setpgroup=yes +gl_cv_have_raw_decl_popen=yes +gl_cv_have_raw_decl_pread=yes +gl_cv_have_raw_decl_ptsname=yes +gl_cv_have_raw_decl_rawmemchr=yes +gl_cv_have_raw_decl_readlink=yes +gl_cv_have_raw_decl_readlinkat=yes +gl_cv_have_raw_decl_realpath=yes +gl_cv_have_raw_decl_renameat=yes +gl_cv_have_raw_decl_rmdir=yes +gl_cv_have_raw_decl_setenv=yes +gl_cv_have_raw_decl_setusershell=yes +gl_cv_have_raw_decl_sigaction=yes +gl_cv_have_raw_decl_sigaddset=yes +gl_cv_have_raw_decl_sigdelset=yes +gl_cv_have_raw_decl_sigemptyset=yes +gl_cv_have_raw_decl_sigfillset=yes +gl_cv_have_raw_decl_sigismember=yes +gl_cv_have_raw_decl_sigpending=yes +gl_cv_have_raw_decl_sigprocmask=yes +gl_cv_have_raw_decl_sleep=yes +gl_cv_have_raw_decl_snprintf=yes +gl_cv_have_raw_decl_stat=yes +gl_cv_have_raw_decl_stpcpy=yes +gl_cv_have_raw_decl_stpncpy=yes +gl_cv_have_raw_decl_strcasestr=yes +gl_cv_have_raw_decl_strchrnul=yes +gl_cv_have_raw_decl_strncat=yes +gl_cv_have_raw_decl_strnlen=yes +gl_cv_have_raw_decl_strpbrk=yes +gl_cv_have_raw_decl_strsep=yes +gl_cv_have_raw_decl_strsignal=yes +gl_cv_have_raw_decl_strtod=yes +gl_cv_have_raw_decl_strtok_r=yes +gl_cv_have_raw_decl_strtoll=yes +gl_cv_have_raw_decl_strtoull=yes +gl_cv_have_raw_decl_strverscmp=yes +gl_cv_have_raw_decl_symlink=yes +gl_cv_have_raw_decl_symlinkat=yes +gl_cv_have_raw_decl_tmpfile=yes +gl_cv_have_raw_decl_ttyname_r=yes +gl_cv_have_raw_decl_unlinkat=yes +gl_cv_have_raw_decl_unlink=yes +gl_cv_have_raw_decl_unlockpt=yes +gl_cv_have_raw_decl_unsetenv=yes +gl_cv_have_raw_decl_usleep=yes +gl_cv_have_raw_decl_vdprintf=yes +gl_cv_have_raw_decl_vsnprintf=yes +gl_cv_have_raw_decl_wcsrtombs=yes +gl_cv_have_raw_decl_wcrtomb=yes +gl_cv_have_raw_decl_wcsnrtombs=yes +gl_cv_have_raw_decl_wctob=yes +gl_cv_have_raw_decl_wcwidth=yes +gl_cv_header_inttypes_h=yes +gl_cv_header_errno_h_complete=yes +gl_cv_header_working_fcntl_h=yes +gl_cv_header_stdint_h=yes +gl_cv_size_max=yes +gl_cv_sys_struct_timeval=yes +gl_cv_sys_struct_utimbuf=yes + +# this gnulib test is especially stupid, it invokes UB and hangs for +# an entire minute +gl_cv_func_working_mktime=yes + +# Force detection of musl's gettext +gt_func_gnugettext_libc=yes +gt_cv_func_gnugettext1_libc=yes +gt_cv_func_gnugettext2_libc=yes +gt_cv_func_gnugettext3_libc=yes +ac_cv_sys_file_offset_bits=64 +ac_cv_sizeof_off_t=8 +ac_cv_sizeof_ino_t=8 +ac_cv_sizeof_blkcnt_t=8 + +# Force detection of musl's iconv +ac_cv_libiconv_utf8=yes + +# musl omits BOM on UTF-16 and UTF-32 +ac_cv_iconv_omits_bom=yes + +# omit lchmod always returns ENOTSUP +ac_cv_func_lchmod=no diff --git a/common/environment/configure/autoconf_cache/powerpc-common b/common/environment/configure/autoconf_cache/powerpc-common @@ -0,0 +1,14 @@ +# glib +ac_cv_alignof_guint32=4 +ac_cv_alignof_guint64=8 +ac_cv_alignof_unsigned_long=4 + +# at-spi2-core +ac_cv_alignof_char=1 +ac_cv_alignof_dbind_pointer=4 +ac_cv_alignof_dbind_struct=1 +ac_cv_alignof_dbus_bool_t=4 +ac_cv_alignof_dbus_int16_t=2 +ac_cv_alignof_dbus_int32_t=4 +ac_cv_alignof_dbus_int64_t=8 +ac_cv_alignof_double=8 diff --git a/common/environment/configure/autoconf_cache/powerpc-linux b/common/environment/configure/autoconf_cache/powerpc-linux @@ -0,0 +1,16 @@ +# general +ac_cv_va_val_copy=${ac_cv_va_val_copy=yes} + +# startup-notification +lf_cv_sane_realloc=yes + +# glib +glib_cv_stack_grows=${glib_cv_stack_grows=no} +glib_cv_uscore=${glib_cv_uscore=no} +glib_cv_va_val_copy=${glib_cv_va_val_copy=yes} + +# lftp +lftp_cv_va_val_copy=${lftp_cv_va_val_copy=yes} + +# slrn +slrn_cv_va_val_copy=${slrn_cv_va_val_copy=yes} diff --git a/common/environment/configure/autoconf_cache/powerpc32-linux b/common/environment/configure/autoconf_cache/powerpc32-linux @@ -0,0 +1,272 @@ +ac_cv_func_setvbuf_reversed=no +ac_cv_sizeof___int64=${ac_cv_sizeof___int64=0} +ac_cv_sizeof_char=${ac_cv_sizeof_char=1} +ac_cv_sizeof_char_p=${ac_cv_sizeof_char_p=4} +ac_cv_sizeof_double=${ac_cv_sizeof_double=8} +ac_cv_sizeof_float=${ac_cv_sizeof_float=4} +ac_cv_sizeof_int=${ac_cv_sizeof_int=4} +ac_cv_sizeof_int_p=${ac_cv_sizeof_int_p=4} +ac_cv_sizeof_long=${ac_cv_sizeof_long=4} +ac_cv_sizeof_long_p=${ac_cv_sizeof_long_p=4} +ac_cv_sizeof_long_int=${ac_cv_sizeof_long_int=4} +ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long=8} +ac_cv_sizeof_long_long_int=${ac_cv_sizeof_long_long_int=8} +ac_cv_sizeof_short=${ac_cv_sizeof_short=2} +ac_cv_sizeof_short_int=${ac_cv_sizeof_short_int=2} +ac_cv_sizeof_signed_char=${ac_cv_sizeof_signed_char=1} +ac_cv_sizeof_size_t=${ac_cv_sizeof_size_t=4} +ac_cv_sizeof_unsigned_char=${ac_cv_sizeof_unsigned_char=1} +ac_cv_sizeof_unsigned_int=${ac_cv_sizeof_unsigned_int=4} +ac_cv_sizeof_unsigned_long=${ac_cv_sizeof_unsigned_long=4} +ac_cv_sizeof_unsigned_long_int=${ac_cv_sizeof_unsigned_long_int=4} +ac_cv_sizeof_unsigned_long_long_int=${ac_cv_sizeof_unsigned_long_long_int=8} +ac_cv_sizeof_unsigned_short=${ac_cv_sizeof_unsigned_short=2} +ac_cv_sizeof_unsigned_short_int=${ac_cv_sizeof_unsigned_short_int=2} +ac_cv_sizeof_void_p=${ac_cv_sizeof_void_p=4} +ac_cv_sizeof_wchar_t=${ac_cv_sizeof_wchar_t=4} +ac_cv_type___int64=${ac_cv_type___int64=no} +ac_cv_type_size_t=${ac_cv_type_size_t=yes} +ac_cv_type_void_p=${ac_cv_type_void_p=yes} +ac_cv_uchar=${ac_cv_uchar=no} +ac_cv_uint=${ac_cv_uint=yes} +ac_cv_ulong=${ac_cv_ulong=yes} +ac_cv_ushort=${ac_cv_ushort=yes} +ac_cv_time_r_type=${ac_cv_time_r_type=POSIX} +cookie_io_functions_use_off64_t=${cookie_io_functions_use_off64_t=yes} + +if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + ac_cv_sizeof_long_double=${ac_cv_sizeof_long_double=8} +else + ac_cv_sizeof_long_double=${ac_cv_sizeof_long_double=16} + + # libc + libc_cv_ppc_machine=${libc_cv_ppc_machine=yes} + libc_cv_mlong_double_128ibm=${libc_cv_mlong_double_128ibm=yes} + libc_cv_mabi_ibmlongdouble=${libc_cv_mabi_ibmlongdouble=yes} + libc_cv_mlong_double_128=${libc_cv_mlong_double_128=yes} +fi + +# apache +ac_cv_sizeof_ssize_t=${ac_cv_sizeof_ssize_t=4} + +# ssh +ac_cv_have_space_d_name_in_struct_dirent=${ac_cv_dirent_have_space_d_name=yes} +ac_cv_have_broken_snprintf=${ac_cv_have_broken_snprintf=no} +ac_cv_have_accrights_in_msghdr=${ac_cv_have_accrights_in_msghdr=no} +ac_cv_have_control_in_msghdr=${ac_cv_have_control_in_msghdr=yes} +ac_cv_type_struct_timespec=${ac_cv_type_struct_timespec=yes} +ac_cv_have_openpty_ctty_bug=${ac_cv_have_openpty_ctty_bug=yes} + +# coreutils +utils_cv_sys_open_max=${utils_cv_sys_open_max=1019} + +# libpcap +ac_cv_linux_vers=${ac_cv_linux_vers=2} + +# nano +ac_cv_regexec_segfault_emptystr=${ac_cv_regexec_segfault_emptystr=no} +nano_cv_func_regexec_segv_emptystr=${nano_cv_func_regexec_segv_emptystr=no} + + +# libnet +ac_libnet_have_packet_socket=${ac_libnet_have_packet_socket=yes} + +# screen +screen_cv_sys_bcopy_overlap=${screen_cv_sys_bcopy_overlap=no} +screen_cv_sys_memcpy_overlap=${screen_cv_sys_memcpy_overlap=no} +screen_cv_sys_memmove_overlap=${screen_cv_sys_memmove_overlap=no} +screen_cv_sys_fifo_broken_impl=${screen_cv_sys_fifo_broken_impl=yes} +screen_cv_sys_fifo_usable=${screen_cv_sys_fifo_usable=yes} +screen_cv_sys_select_broken_retval=${screen_cv_sys_select_broken_retval=no} +screen_cv_sys_sockets_nofs=${screen_cv_sys_sockets_nofs=no} +screen_cv_sys_sockets_usable=${screen_cv_sys_sockets_usable=yes} +screen_cv_sys_terminfo_used=${screen_cv_sys_terminfo_used=yes} + +ac_cv_func_lstat_dereferences_slashed_symlink=${ac_cv_func_lstat_dereferences_slashed_symlink=yes} +ac_cv_func_lstat_empty_string_bug=${ac_cv_func_lstat_empty_string_bug=no} +ac_cv_func_stat_empty_string_bug=${ac_cv_func_stat_empty_string_bug=no} +ac_cv_func_stat_ignores_trailing_slash=${ac_cv_func_stat_ignores_trailing_slash=no} + +# socat +ac_cv_ispeed_offset=${ac_cv_ispeed_offset=13} +sc_cv_termios_ispeed=${sc_cv_termios_ispeed=yes} + +# links +ac_cv_lib_png_png_create_info_struct=${ac_cv_lib_png_png_create_info_struct=yes} + +# db +db_cv_fcntl_f_setfd=${db_cv_fcntl_f_setfd=yes} +db_cv_sprintf_count=${db_cv_sprintf_count=yes} +db_cv_align_t=${db_cv_align_t='unsigned long long'} +db_cv_alignp_t=${db_cv_alignp_t='unsigned long'} + +# php +ac_cv_pread=${ac_cv_pread=no} +ac_cv_pwrite=${ac_cv_pwrite=no} +php_cv_lib_cookie_io_functions_use_off64_t=${php_cv_lib_cookie_io_functions_use_off64_t=yes} + +# gettext +am_cv_func_working_getline=${am_cv_func_working_getline=yes} + +# glib +glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24} +glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4} +glib_cv_use_pid_surrogate=${glib_cv_use_pid_surrogate=yes} +glib_cv_has__inline=${glib_cv_has__inline=yes} +glib_cv_has__inline__=${glib_cv_has__inline__=yes} +glib_cv_hasinline=${glib_cv_hasinline=yes} +glib_cv_sane_realloc=${glib_cv_sane_realloc=yes} +glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24} +glib_cv_va_val_copy=${glib_cv_va_val_copy=yes} +glib_cv_rtldglobal_broken=${glib_cv_rtldglobal_broken=no} +glib_cv_sys_pthread_mutex_trylock_posix=${glib_cv_sys_pthread_mutex_trylock_posix=yes} +glib_cv_sys_pthread_getspecific_posix=${glib_cv_sys_pthread_getspecific_posix=yes} +glib_cv_sys_pthread_cond_timedwait_posix=${glib_cv_sys_pthread_cond_timedwait_posix=yes} + +# ettercap +ettercap_cv_type_socklen_t=${ettercap_cv_type_socklen_t=yes} + +# libesmtp +acx_working_snprintf=${acx_working_snprintf=yes} + +# D-BUS +ac_cv_func_posix_getpwnam_r=${ac_cv_func_posix_getpwnam_r=yes} + +# glib 2.0 +glib_cv_long_long_format=${glib_cv_long_long_format=ll} +glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24} +glib_cv_sizeof_intmax_t=${glib_cv_sizeof_intmax_t=8} +glib_cv_sizeof_ptrdiff_t=${glib_cv_sizeof_ptrdiff_t=4} +glib_cv_sizeof_size_t=${glib_cv_sizeof_size_t=4} +glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4} +glib_cv_sys_use_pid_niceness_surrogate=${glib_cv_sys_use_pid_niceness_surrogate=yes} + +glib_cv_strlcpy=${glib_cv_strlcpy=no} + +# httppc +ac_cv_strerror_r_SUSv3=${ac_cv_strerror_r_SUSv3=no} + +# lftp +ac_cv_need_trio=${ac_cv_need_trio=no} +lftp_cv_va_val_copy=${lftp_cv_va_val_copy=yes} + +# edb +db_cv_spinlocks=${db_cv_spinlocks=no} + +# fget +compat_cv_func_snprintf_works=${compat_cv_func_snprintf_works=yes} +compat_cv_func_basename_works=${compat_cv_func_basename_works=no} +compat_cv_func_dirname_works=${compat_cv_func_dirname_works=no} + +# slrn +slrn_cv_va_val_copy=${slrn_cv_va_val_copy=yes} + +# libidl +libIDL_cv_long_long_format=${libIDL_cv_long_long_format=ll} + +# ORBit2 +ac_cv_alignof_CORBA_boolean=1 +ac_cv_alignof_CORBA_char=1 +ac_cv_alignof_CORBA_double=4 +ac_cv_alignof_CORBA_float=4 +ac_cv_alignof_CORBA_long=4 +ac_cv_alignof_CORBA_long_double=4 +ac_cv_alignof_CORBA_long_long=4 +ac_cv_alignof_CORBA_octet=1 +ac_cv_alignof_CORBA_pointer=4 +ac_cv_alignof_CORBA_short=2 +ac_cv_alignof_CORBA_struct=4 +ac_cv_alignof_CORBA_wchar=2 + +# cvs +cvs_cv_func_printf_ptr=${cvs_cv_func_printf_ptr=yes} + +# bash +ac_cv_c_long_double=${ac_cv_c_long_double=yes} +bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp=missing} + +# openssh +ac_cv_have_broken_dirname=${ac_cv_have_broken_dirname='yes'} +ac_cv_have_space_d_name_in_struct_dirent=${ac_cv_have_space_d_name_in_struct_dirent='no'} +ac_cv_have_broken_snprintf=${ac_cv_have_broken_snprintf='no'} +ac_cv_have_openpty_ctty_bug=${ac_cv_have_openpty_ctty_bug='yes'} +ac_cv_have_accrights_in_msghdr=${ac_cv_have_accrights_in_msghdr='no'} +ac_cv_have_control_in_msghdr=${ac_cv_have_control_in_msghdr='yes'} + +# vim +ac_cv_sizeof_int=${ac_cv_sizeof_int='4'} + +#modphp +if [ "$XBPS_TARGET_ENDIAN" != "le" ]; then + ac_cv_c_bigendian_php=${ac_cv_c_bigendian_php=yes} +fi +ac_cv_sizeof_ptrdiff_t=${ac_cv_sizeof_ptrdiff_t=4} + +# apache2 (note other apache stanza in this file) +ap_void_ptr_lt_long=${ap_void_ptr_lt_long=no} +apr_cv_use_lfs64=${apr_cv_use_lfs64=yes} +apr_cv_epoll=${apr_cv_epoll=yes} +apr_cv_pthreads_cflags=${apr_cv_pthreads_cflags=-pthread} +apr_cv_pthreads_lib=${apr_cv_pthreads_lib=-lpthread} +ac_cv_func_mmap=${ac_cv_func_mmap=yes} +ac_cv_file__dev_zero=${ac_cv_file__dev_zero=yes} +ac_cv_sizeof_pid_t=${ac_cv_sizeof_pid_t=4} +ac_cv_socklen_t=${ac_cv_socklen_t=yes} +ac_cv_struct_rlimit=${ac_cv_struct_rlimit=yes} +ac_cv_negative_eai=${ac_cv_negative_eai=yes} +apr_cv_gai_addrconfig=${apr_cv_gai_addrconfig=no} +apr_cv_tcp_nodelay_with_cork=${apr_cv_tcp_nodelay_with_cork=yes} + +# binutils (libiberty) +ac_cv_sizeof_int=${ac_cv_sizeof_int=4} +ac_cv_type_int=${ac_cv_type_int=yes} +ac_cv_type_uintptr_t=${ac_cv_type_uintptr_t=yes} +liberty_cv_uint64=${liberty_cv_uint64=uint64_t} + +#samba +ac_cv_func_memcmp_working=${ac_cv_func_memcmp_working=yes} +fu_cv_sys_stat_statvfs64=${fu_cv_sys_stat_statvfs64=yes} +samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=${samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no} +samba_cv_HAVE_BROKEN_GETGROUPS=${samba_cv_HAVE_BROKEN_GETGROUPS=no} +samba_cv_HAVE_BROKEN_READDIR=${samba_cv_HAVE_BROKEN_READDIR=yes} +samba_cv_HAVE_BROKEN_READDIR_NAME=${samba_cv_HAVE_BROKEN_READDIR_NAME=no} +samba_cv_HAVE_C99_VSNPRINTF=${samba_cv_HAVE_C99_VSNPRINTF=yes} +samba_cv_HAVE_DEV64_T=${samba_cv_HAVE_DEV64_T=no} +samba_cv_HAVE_DEVICE_MAJOR_FN=${samba_cv_HAVE_DEVICE_MAJOR_FN=yes} +samba_cv_HAVE_DEVICE_MINOR_FN=${samba_cv_HAVE_DEVICE_MINOR_FN=yes} +samba_cv_HAVE_FCNTL_LOCK=${samba_cv_HAVE_FCNTL_LOCK=yes} +samba_cv_HAVE_FTRUNCATE_EXTEND=${samba_cv_HAVE_FTRUNCATE_EXTEND=yes} +samba_cv_HAVE_GETTIMEOFDAY_TZ=${samba_cv_HAVE_GETTIMEOFDAY_TZ=yes} +samba_cv_HAVE_INO64_T=${samba_cv_HAVE_INO64_T=no} +samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=${samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes} +samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=${samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes} +samba_cv_HAVE_KERNEL_SHARE_MODES=${samba_cv_HAVE_KERNEL_SHARE_MODES=yes} +samba_cv_HAVE_MAKEDEV=${samba_cv_HAVE_MAKEDEV=yes} +samba_cv_HAVE_MMAP=${samba_cv_HAVE_MMAP=yes} +samba_cv_HAVE_OFF64_T=${samba_cv_HAVE_OFF64_T=no} +samba_cv_HAVE_SECURE_MKSTEMP=${samba_cv_HAVE_SECURE_MKSTEMP=yes} +samba_cv_HAVE_SENDFILE64=${samba_cv_HAVE_SENDFILE64=yes} +samba_cv_HAVE_SENDFILE=${samba_cv_HAVE_SENDFILE=yes} +samba_cv_HAVE_STRUCT_FLOCK64=${samba_cv_HAVE_STRUCT_FLOCK64=yes} +samba_cv_HAVE_TRUNCATED_SALT=${samba_cv_HAVE_TRUNCATED_SALT=no} +samba_cv_HAVE_UNSIGNED_CHAR=${samba_cv_HAVE_UNSIGNED_CHAR=yes} +samba_cv_HAVE_WORKING_AF_LOCAL=${samba_cv_HAVE_WORKING_AF_LOCAL=yes} +samba_cv_LINUX_LFS_SUPPORT=${samba_cv_LINUX_LFS_SUPPORT=yes} +samba_cv_REALPATH_TAKES_NULL=${samba_cv_REALPATH_TAKES_NULL=yes} +samba_cv_REPLACE_INET_NTOA=${samba_cv_REPLACE_INET_NTOA=no} +samba_cv_REPLACE_READDIR=${samba_cv_REPLACE_READDIR=no} +samba_cv_SIZEOF_DEV_T=${samba_cv_SIZEOF_DEV_T=yes} +samba_cv_SIZEOF_INO_T=${samba_cv_SIZEOF_INO_T=yes} +samba_cv_SIZEOF_OFF_T=${samba_cv_SIZEOF_OFF_T=yes} +samba_cv_STAT_STATVFS64=${samba_cv_STAT_STATVFS64=yes} +samba_cv_USE_SETEUID=${samba_cv_USE_SETEUID=yes} +samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=yes} +samba_cv_USE_SETREUID=${samba_cv_USE_SETREUID=yes} +samba_cv_USE_SETUIDX=${samba_cv_USE_SETUIDX=yes} +samba_cv_have_longlong=${samba_cv_have_longlong=yes} +samba_cv_have_setresgid=${samba_cv_have_setresgid=yes} +samba_cv_have_setresuid=${samba_cv_have_setresuid=yes} + +# mysql +mysql_cv_func_atomic_sub=${mysql_cv_func_atomic_sub=no} +mysql_cv_func_atomic_add=${mysql_cv_func_atomic_add=no} diff --git a/common/environment/configure/autoconf_cache/powerpc64-linux b/common/environment/configure/autoconf_cache/powerpc64-linux @@ -0,0 +1,46 @@ +ac_cv_sizeof_char=${ac_cv_sizeof_char=1} +ac_cv_sizeof_char_p=${ac_cv_sizeof_char_p=8} +ac_cv_sizeof_double=${ac_cv_sizeof_double=8} +ac_cv_sizeof_float=${ac_cv_sizeof_float=4} +ac_cv_sizeof_int=${ac_cv_sizeof_int=4} +ac_cv_sizeof_long=${ac_cv_sizeof_long=8} +ac_cv_sizeof_long_int=${ac_cv_sizeof_long_int=8} +ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long=8} +ac_cv_sizeof_long_long_int=${ac_cv_sizeof_long_long_int=8} +ac_cv_sizeof_short=${ac_cv_sizeof_short=2} +ac_cv_sizeof_short_int=${ac_cv_sizeof_short_int=2} +ac_cv_sizeof_signed_char=${ac_cv_sizeof_signed_char=1} +ac_cv_sizeof_unsigned_char=${ac_cv_sizeof_unsigned_char=1} +ac_cv_sizeof_unsigned_int=${ac_cv_sizeof_unsigned_int=4} +ac_cv_sizeof_unsigned_long=${ac_cv_sizeof_unsigned_long=8} +ac_cv_sizeof_unsigned_long_int=${ac_cv_sizeof_unsigned_long_int=8} +ac_cv_sizeof_unsigned_long_long_int=${ac_cv_sizeof_unsigned_long_long_int=8} +ac_cv_sizeof_unsigned_short=${ac_cv_sizeof_unsigned_short=2} +ac_cv_sizeof_unsigned_short_int=${ac_cv_sizeof_unsigned_short_int=2} +ac_cv_sizeof_void_p=${ac_cv_sizeof_void_p=8} + +if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + ac_cv_sizeof_long_double=${ac_cv_sizeof_long_double=8} +else + ac_cv_sizeof_long_double=${ac_cv_sizeof_long_double=16} +fi + +# screen +screen_cv_sys_bcopy_overlap=${screen_cv_sys_bcopy_overlap=no} +screen_cv_sys_memcpy_overlap=${screen_cv_sys_memcpy_overlap=no} +screen_cv_sys_memmove_overlap=${screen_cv_sys_memmove_overlap=no} +screen_cv_sys_fifo_broken_impl=${screen_cv_sys_fifo_broken_impl=yes} +screen_cv_sys_fifo_usable=${screen_cv_sys_fifo_usable=yes} +screen_cv_sys_select_broken_retval=${screen_cv_sys_select_broken_retval=no} +screen_cv_sys_sockets_nofs=${screen_cv_sys_sockets_nofs=no} +screen_cv_sys_sockets_usable=${screen_cv_sys_sockets_usable=yes} +screen_cv_sys_terminfo_used=${screen_cv_sys_terminfo_used=yes} + +# libpcap +ac_cv_linux_vers=${ac_cv_linux_vers=2} + +# apr +apr_cv_tcp_nodelay_with_cork=${apr_cv_tcp_nodelay_with_cork=yes} + +# cvs +cvs_cv_func_printf_ptr=${cvs_cv_func_printf_ptr=yes} diff --git a/common/environment/configure/autoconf_cache/x86_64-linux b/common/environment/configure/autoconf_cache/x86_64-linux @@ -0,0 +1,170 @@ +# general +ac_cv_va_val_copy=${ac_cv_va_val_copy=no} +ac_cv_func_lstat_dereferences_slashed_symlink=${ac_cv_func_lstat_dereferences_slashed_symlink=yes} +ac_cv_func_lstat_empty_string_bug=${ac_cv_func_lstat_empty_string_bug=no} +ac_cv_func_posix_getpwnam_r=${ac_cv_func_posix_getpwnam_r=yes} +ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed=no} +ac_cv_func_stat_empty_string_bug=${ac_cv_func_stat_empty_string_bug=no} +ac_cv_func_stat_ignores_trailing_slash=${ac_cv_func_stat_ignores_trailing_slash=no} +ac_libnet_have_packet_socket=${ac_libnet_have_packet_socket=yes} +ac_cv_linux_vers=${ac_cv_linux_vers=2} +ac_cv_need_trio=${ac_cv_need_trio=no} +ac_cv_sizeof_char=${ac_cv_sizeof_char=1} +ac_cv_sizeof_int=${ac_cv_sizeof_int=4} +ac_cv_sizeof_unsigned_int=${ac_cv_sizeof_unsigned_int=4} +ac_cv_sizeof___int64=${ac_cv_sizeof___int64=0} +ac_cv_sizeof_long=${ac_cv_sizeof_long=8} +ac_cv_sizeof_unsigned_long=${ac_cv_sizeof_unsigned_long=8} +ac_cv_sizeof_long_double=${ac_cv_sizeof_long_double=16} +ac_cv_sizeof_long_int=${ac_cv_sizeof_long_int=8} +ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long=8} +ac_cv_sizeof_off_t=${ac_cv_sizeof_off_t=8} +ac_cv_sizeof_short=${ac_cv_sizeof_short=2} +ac_cv_sizeof_unsigned_short=${ac_cv_sizeof_unsigned_short=2} +ac_cv_sizeof_short_int=${ac_cv_sizeof_short_int=2} +ac_cv_sizeof_size_t=${ac_cv_sizeof_size_t=8} +ac_cv_sizeof_uid_t=${ac_cv_sizeof_uid_t=4} +ac_cv_sizeof_gid_t=${ac_cv_sizeof_gid_t=4} +ac_cv_sizeof_ino_t=${ac_cv_sizeof_ino_t=8} +ac_cv_sizeof_dev_t=${ac_cv_sizeof_dev_t=8} +ac_cv_sizeof_void_p=${ac_cv_sizeof_void_p=8} +ac_cv_strerror_r_SUSv3=${ac_cv_strerror_r_SUSv3=no} +db_cv_alignp_t=${db_cv_alignp_t='unsigned long long'} +db_cv_align_t=${db_cv_align_t='unsigned long long'} +db_cv_fcntl_f_setfd=${db_cv_fcntl_f_setfd=yes} +db_cv_sprintf_count=${db_cv_sprintf_count=yes} +ac_cv_sizeof_struct_iovec=16 + +# glib +glib_cv_hasinline=${glib_cv_hasinline=yes} +glib_cv_has__inline=${glib_cv_has__inline=yes} +glib_cv_has__inline__=${glib_cv_has__inline__=yes} +glib_cv_long_long_format=${glib_cv_long_long_format=ll} +glib_cv_rtldglobal_broken=${glib_cv_rtldglobal_broken=yes} +glib_cv_sane_realloc=${glib_cv_sane_realloc=yes} +glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=40} +glib_cv_sizeof_intmax_t=${glib_cv_sizeof_intmax_t=8} +glib_cv_sizeof_ptrdiff_t=${glib_cv_sizeof_ptrdiff_t=8} +glib_cv_sizeof_size_t=${glib_cv_sizeof_size_t=8} +glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=8} +glib_cv_stack_grows=${glib_cv_stack_grows=no} +glib_cv_sys_pthread_cond_timedwait_posix=${glib_cv_sys_pthread_cond_timedwait_posix=yes} +glib_cv_sys_pthread_getspecific_posix=${glib_cv_sys_pthread_getspecific_posix=yes} +glib_cv_sys_pthread_mutex_trylock_posix=${glib_cv_sys_pthread_mutex_trylock_posix=yes} +glib_cv_uscore=${glib_cv_uscore=no} +glib_cv_va_val_copy=${glib_cv_va_val_copy=no} +ac_cv_alignof_guint32=4 +ac_cv_alignof_guint64=8 +ac_cv_alignof_unsigned_long=8 + +nano_cv_func_regexec_segv_emptystr=${nano_cv_func_regexec_segv_emptystr=no} +samba_cv_HAVE_VA_COPY=${samba_cv_HAVE_VA_COPY=yes} +screen_cv_sys_bcopy_overlap=${screen_cv_sys_bcopy_overlap=no} +screen_cv_sys_fifo_broken_impl=${screen_cv_sys_fifo_broken_impl=yes} +screen_cv_sys_fifo_usable=${screen_cv_sys_fifo_usable=yes} +screen_cv_sys_memcpy_overlap=${screen_cv_sys_memcpy_overlap=no} +screen_cv_sys_memmove_overlap=${screen_cv_sys_memmove_overlap=no} +screen_cv_sys_select_broken_retval=${screen_cv_sys_select_broken_retval=no} +screen_cv_sys_sockets_nofs=${screen_cv_sys_sockets_nofs=no} +screen_cv_sys_sockets_usable=${screen_cv_sys_sockets_usable=yes} +screen_cv_sys_terminfo_used=${screen_cv_sys_terminfo_used=yes} +utils_cv_sys_open_max=${utils_cv_sys_open_max=1015} + +# gettext +am_cv_func_working_getline=${am_cv_func_working_getline=yes} + +#gcc +ac_cv_lib_m_sin=${ac_cv_lib_m_sin=yes} + +#orbit +libIDL_cv_long_long_format=ll + +# ORBit2 +ac_cv_alignof_CORBA_boolean=1 +ac_cv_alignof_CORBA_char=1 +ac_cv_alignof_CORBA_double=8 +ac_cv_alignof_CORBA_float=4 +ac_cv_alignof_CORBA_long=4 +ac_cv_alignof_CORBA_long_double=8 +ac_cv_alignof_CORBA_long_long=8 +ac_cv_alignof_CORBA_octet=1 +ac_cv_alignof_CORBA_pointer=8 +ac_cv_alignof_CORBA_short=2 +ac_cv_alignof_CORBA_struct=1 +ac_cv_alignof_CORBA_wchar=2 + +lf_cv_sane_realloc=yes +as_cv_unaligned_access=${as_cv_unaligned_access=yes} + +#unfs3 +nfsd_cv_broken_setfsuid=${nfsd_cv_broken_setfsuid=0} +nfsd_cv_func_statfs=${nfsd_cv_func_statfs=statfs2_bsize} +nfsd_cv_bsd_signals=${nfsd_cv_bsd_signals=yes} + +#apr +apr_cv_tcp_nodelay_with_cork=${apr_cv_tcp_nodelay_with_cork=yes} + +# lftp +lftp_cv_va_val_copy=${lftp_cv_va_val_copy=no} + +# slrn +slrn_cv_va_val_copy=${slrn_cv_va_val_copy=no} + +# grub +ac_cv_func___ashldi3=no +ac_cv_func___ashrdi3=no +ac_cv_func___bswapdi2=no +ac_cv_func___bswapsi2=no +ac_cv_func___lshrdi3=no +ac_cv_func___trampoline_setup=no +ac_cv_func___ucmpdi2=no +ac_cv_func__restgpr_14_x=no + +# cvs +cvs_cv_func_printf_ptr=${cvs_cv_func_printf_ptr=yes} + +# at-spi2-core +ac_cv_alignof_char=1 +ac_cv_alignof_dbind_pointer=8 +ac_cv_alignof_dbind_struct=1 +ac_cv_alignof_dbus_bool_t=4 +ac_cv_alignof_dbus_int16_t=2 +ac_cv_alignof_dbus_int32_t=4 +ac_cv_alignof_dbus_int64_t=8 +ac_cv_alignof_double=8 + +# socat +sc_cv_type_dev_basic='6 /* unsigned long */' +sc_cv_type_gidt_basic='4 /* unsigned int */' +sc_cv_type_longlong=yes +sc_cv_type_modet_basic='4 /* unsigned int */' +sc_cv_type_off64=no +sc_cv_type_off64_basic='0 /* unknown */' +sc_cv_type_off_basic='5 /* long */' +sc_cv_type_pidt_basic='3 /* int */' +sc_cv_type_rlimit_rlimmax_basic='6 /* unsigned long */' +sc_cv_type_sa_family_t=yes +sc_cv_type_sighandler=no +sc_cv_type_sizet_basic='6 /* unsigned long */' +sc_cv_type_socklen=yes +sc_cv_type_socklent_basic='4 /* unsigned int */' +sc_cv_type_stat64=no +sc_cv_type_stat64_stblksize_basic='0 /* unknown */' +sc_cv_type_stat64_stblocks_basic='0 /* unknown */' +sc_cv_type_stat64_stdev_basic='0 /* unknown */' +sc_cv_type_stat64_stino_basic='0 /* unknown */' +sc_cv_type_stat64_stnlink_basic='0 /* unknown */' +sc_cv_type_stat64_stsize_basic='0 /* unknown */' +sc_cv_type_stat_stblksize_basic='5 /* long */' +sc_cv_type_stat_stblocks_basic='5 /* long */' +sc_cv_type_stat_stino_basic='6 /* unsigned long */' +sc_cv_type_stat_stnlink_basic='6 /* unsigned long */' +sc_cv_type_stat_stsize_basic='5 /* long */' +sc_cv_type_struct_timeval_tv_usec='5 /* long */' +sc_cv_type_timet_basic='5 /* long */' +sc_cv_type_uidt_basic='4 /* unsigned int */' +sc_cv_type_uint16=yes +sc_cv_type_uint32=yes +sc_cv_type_uint64=yes +sc_cv_type_uint8=yes +sc_cv_typeof_struct_cmsghdr_cmsg_len='6 /* unsigned long */' diff --git a/common/environment/configure/automake/config.guess b/common/environment/configure/automake/config.guess @@ -0,0 +1,1476 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2018 Free Software Foundation, Inc. + +timestamp='2018-03-08' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <https://www.gnu.org/licenses/>. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. +# +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# +# Please send patches to <config-patches@gnu.org>. + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to <config-patches@gnu.org>." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2018 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > "$dummy.c" ; + for c in cc gcc c89 c99 ; do + if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case "$UNAME_SYSTEM" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval "$set_cc_for_build" + cat <<-EOF > "$dummy.c" + #include <features.h> + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl + fi + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ + echo unknown)` + case "$UNAME_MACHINE_ARCH" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine="${arch}${endian}"-unknown + ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently (or will in the future) and ABI. + case "$UNAME_MACHINE_ARCH" in + earm*) + os=netbsdelf + ;; + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval "$set_cc_for_build" + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # Determine ABI tags. + case "$UNAME_MACHINE_ARCH" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "$UNAME_VERSION" in + Debian*) + release='-gnu' + ;; + *) + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "$machine-${os}${release}${abi}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" + exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" + exit ;; + *:MidnightBSD:*:*) + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" + exit ;; + *:ekkoBSD:*:*) + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" + exit ;; + *:SolidBSD:*:*) + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:MirBSD:*:*) + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:Sortix:*:*) + echo "$UNAME_MACHINE"-unknown-sortix + exit ;; + *:Redox:*:*) + echo "$UNAME_MACHINE"-unknown-redox + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE=alpha ;; + "EV4.5 (21064)") + UNAME_MACHINE=alpha ;; + "LCA4 (21066/21068)") + UNAME_MACHINE=alpha ;; + "EV5 (21164)") + UNAME_MACHINE=alphaev5 ;; + "EV5.6 (21164A)") + UNAME_MACHINE=alphaev56 ;; + "EV5.6 (21164PC)") + UNAME_MACHINE=alphapca56 ;; + "EV5.7 (21164PC)") + UNAME_MACHINE=alphapca57 ;; + "EV6 (21264)") + UNAME_MACHINE=alphaev6 ;; + "EV6.7 (21264A)") + UNAME_MACHINE=alphaev67 ;; + "EV6.8CB (21264C)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8AL (21264B)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8CX (21264D)") + UNAME_MACHINE=alphaev68 ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE=alphaev69 ;; + "EV7 (21364)") + UNAME_MACHINE=alphaev7 ;; + "EV7.9 (21364A)") + UNAME_MACHINE=alphaev79 ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo "$UNAME_MACHINE"-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo "$UNAME_MACHINE"-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix"$UNAME_RELEASE" + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux"$UNAME_RELEASE" + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval "$set_cc_for_build" + SUN_ARCH=i386 + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH=x86_64 + fi + fi + echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos"$UNAME_RELEASE" + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos"$UNAME_RELEASE" + ;; + sun4) + echo sparc-sun-sunos"$UNAME_RELEASE" + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos"$UNAME_RELEASE" + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint"$UNAME_RELEASE" + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint"$UNAME_RELEASE" + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint"$UNAME_RELEASE" + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten"$UNAME_RELEASE" + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten"$UNAME_RELEASE" + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix"$UNAME_RELEASE" + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix"$UNAME_RELEASE" + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix"$UNAME_RELEASE" + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" +#ifdef __cplusplus +#include <stdio.h> /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos"$UNAME_RELEASE" + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] + then + if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ + [ "$TARGET_BINARY_INTERFACE"x = x ] + then + echo m88k-dg-dgux"$UNAME_RELEASE" + else + echo m88k-dg-dguxbcs"$UNAME_RELEASE" + fi + else + echo i586-dg-dgux"$UNAME_RELEASE" + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + fi + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" + #include <sys/systemcfg.h> + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` + else + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + fi + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + case "$UNAME_MACHINE" in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "$sc_cpu_version" in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "$sc_kernel_bits" in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "$HP_ARCH" = "" ]; then + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" + + #define _HPUX_SOURCE + #include <stdlib.h> + #include <unistd.h> + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ "$HP_ARCH" = hppa2.0w ] + then + eval "$set_cc_for_build" + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH=hppa2.0w + else + HP_ARCH=hppa64 + fi + fi + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux"$HPUX_REV" + exit ;; + 3050*:HI-UX:*:*) + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" + #include <unistd.h> + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo "$UNAME_MACHINE"-unknown-osf1mk + else + echo "$UNAME_MACHINE"-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi"$UNAME_RELEASE" + exit ;; + *:BSD/OS:*:*) + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case "$UNAME_PROCESSOR" in + amd64) + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; + esac + echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; + i*:CYGWIN*:*) + echo "$UNAME_MACHINE"-pc-cygwin + exit ;; + *:MINGW64*:*) + echo "$UNAME_MACHINE"-pc-mingw64 + exit ;; + *:MINGW*:*) + echo "$UNAME_MACHINE"-pc-mingw32 + exit ;; + *:MSYS*:*) + echo "$UNAME_MACHINE"-pc-msys + exit ;; + i*:PW*:*) + echo "$UNAME_MACHINE"-pc-pw32 + exit ;; + *:Interix*:*) + case "$UNAME_MACHINE" in + x86) + echo i586-pc-interix"$UNAME_RELEASE" + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix"$UNAME_RELEASE" + exit ;; + IA64) + echo ia64-unknown-interix"$UNAME_RELEASE" + exit ;; + esac ;; + i*:UWIN*:*) + echo "$UNAME_MACHINE"-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + *:GNU:*:*) + # the GNU system + echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" + exit ;; + i*86:Minix:*:*) + echo "$UNAME_MACHINE"-pc-minix + exit ;; + aarch64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arm*:Linux:*:*) + eval "$set_cc_for_build" + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + else + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + cris:Linux:*:*) + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + crisv32:Linux:*:*) + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + e2k:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + frv:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + hexagon:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + i*86:Linux:*:*) + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + exit ;; + ia64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + k1om:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + m32r*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + m68*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" + test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } + ;; + mips64el:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-"$LIBC" + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-"$LIBC" + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-"$LIBC" + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-"$LIBC" + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-"$LIBC" + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-"$LIBC" + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-"$LIBC" + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" + exit ;; + sh64*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + sh*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + tile*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + vax:Linux:*:*) + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" + exit ;; + x86_64:Linux:*:*) + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + exit ;; + xtensa*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo "$UNAME_MACHINE"-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo "$UNAME_MACHINE"-unknown-stop + exit ;; + i*86:atheos:*:*) + echo "$UNAME_MACHINE"-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo "$UNAME_MACHINE"-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos"$UNAME_RELEASE" + exit ;; + i*86:*DOS:*:*) + echo "$UNAME_MACHINE"-pc-msdosdjgpp + exit ;; + i*86:*:4.*:*) + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + else + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` + echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL" + elif /bin/uname -X 2>/dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + else + echo "$UNAME_MACHINE"-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configure will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos"$UNAME_RELEASE" + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos"$UNAME_RELEASE" + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos"$UNAME_RELEASE" + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos"$UNAME_RELEASE" + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv"$UNAME_RELEASE" + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo "$UNAME_MACHINE"-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says <Richard.M.Bartel@ccMail.Census.GOV> + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes <hewes@openmarket.com>. + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo "$UNAME_MACHINE"-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux"$UNAME_RELEASE" + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv"$UNAME_RELEASE" + else + echo mips-unknown-sysv"$UNAME_RELEASE" + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux"$UNAME_RELEASE" + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux"$UNAME_RELEASE" + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux"$UNAME_RELEASE" + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux"$UNAME_RELEASE" + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux"$UNAME_RELEASE" + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux"$UNAME_RELEASE" + exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux"$UNAME_RELEASE" + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody"$UNAME_RELEASE" + exit ;; + *:Rhapsody:*:*) + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + eval "$set_cc_for_build" + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = x86; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-*:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSR-*:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSV-*:NONSTOP_KERNEL:*:*) + echo nsv-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk"$UNAME_RELEASE" + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = 386; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo "$UNAME_MACHINE"-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux"$UNAME_RELEASE" + exit ;; + *:DragonFly:*:*) + echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "$UNAME_MACHINE" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" + exit ;; + i*86:rdos:*:*) + echo "$UNAME_MACHINE"-pc-rdos + exit ;; + i*86:AROS:*:*) + echo "$UNAME_MACHINE"-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo "$UNAME_MACHINE"-unknown-esx + exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; +esac + +echo "$0: unable to guess system type" >&2 + +case "$UNAME_MACHINE:$UNAME_SYSTEM" in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 <<EOF + +NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize +the system type. Please install a C compiler and try again. +EOF + ;; +esac + +cat >&2 <<EOF + +This script (version $timestamp), has failed to recognize the +operating system you are using. If your script is old, overwrite *all* +copies of config.guess and config.sub with the latest versions from: + + https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +and + https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub + +If $0 has already been updated, send the following data and any +information you think might be pertinent to config-patches@gnu.org to +provide the necessary information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/common/environment/configure/automake/config.sub b/common/environment/configure/automake/config.sub @@ -0,0 +1,1801 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2018 Free Software Foundation, Inc. + +timestamp='2018-03-08' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <https://www.gnu.org/licenses/>. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches to <config-patches@gnu.org>. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS + +Canonicalize a configuration name. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to <config-patches@gnu.org>." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2018 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo "$1" + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ + kopensolaris*-gnu* | cloudabi*-eabi* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + android-linux) + os=-linux-android + basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; + *) + basic_machine=`echo "$1" | sed 's/-[^-]*$//'` + if [ "$basic_machine" != "$1" ] + then os=`echo "$1" | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze*) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | ba \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 | or1k | or1knd | or32 \ + | pdp10 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pru \ + | pyramid \ + | riscv32 | riscv64 \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ + | wasm32 \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) + ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | ba-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | e2k-* | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ + | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | or1k*-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ + | pyramid-* \ + | riscv32-* | riscv64-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | visium-* \ + | wasm32-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-pc + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + asmjs) + basic_machine=asmjs-unknown + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2*) + basic_machine=m68k-bull + os=-sysv3 + ;; + e500v[12]) + basic_machine=powerpc-unknown + os=$os"spe" + ;; + e500v[12]-*) + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=$os"spe" + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + i*86v32) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze*) + basic_machine=microblaze-xilinx + ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i686-pc + os=-msys + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + nsv-tandem) + basic_machine=nsv-tandem + ;; + nsx-tandem) + basic_machine=nsx-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + x64) + basic_machine=x86_64-pc + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases that might get confused + # with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # es1800 is here to avoid being matched by es* (a different OS) + -es1800*) + os=-ose + ;; + # Now accept the basic system types. + # The portable systems comes first. + # Each alternative MUST end in a * to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* | -hcos* \ + | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ + | -midnightbsd*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -xray | -os68k* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo "$os" | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo "$os" | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo "$os" | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4*) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -pikeos*) + # Until real need of OS specific support for + # particular features comes up, bare metal + # configurations are quite functional. + case $basic_machine in + arm*) + os=-eabi + ;; + *) + os=-elf + ;; + esac + ;; + -nacl*) + ;; + -ios) + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + pru-*) + os=-elf + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` + ;; +esac + +echo "$basic_machine$os" +exit + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/common/environment/configure/bootstrap.sh b/common/environment/configure/bootstrap.sh @@ -0,0 +1,4 @@ +if [ -z "$CHROOT_READY" ]; then + CFLAGS+=" -isystem ${XBPS_MASTERDIR}/usr/include" + LDFLAGS+=" -L${XBPS_MASTERDIR}/usr/lib -Wl,-rpath-link=${XBPS_MASTERDIR}/usr/lib" +fi diff --git a/common/environment/configure/ccache.sh b/common/environment/configure/ccache.sh @@ -0,0 +1 @@ +export CCACHE_BASEDIR="$wrksrc/$build_wrksrc" diff --git a/common/environment/configure/cross.sh b/common/environment/configure/cross.sh @@ -0,0 +1,5 @@ +if [ -n "$CROSS_BUILD" ]; then + CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include" + CXXFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include" + LDFLAGS+=" -L${XBPS_CROSS_BASE}/usr/lib" +fi diff --git a/common/environment/configure/gccspecs/hardened-cc1 b/common/environment/configure/gccspecs/hardened-cc1 @@ -0,0 +1,5 @@ +*cpp_options: ++ %{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}} + +*cc1_options: ++ %{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}} diff --git a/common/environment/configure/gccspecs/hardened-ld b/common/environment/configure/gccspecs/hardened-ld @@ -0,0 +1,5 @@ +*self_spec: ++ %{static|Bstatic|shared|Bshareable|i|r|pie|nopie:;:-pie} + +*link: ++ %{!static:-z relro -z now} diff --git a/common/environment/configure/gccspecs/hardened-mips-cc1 b/common/environment/configure/gccspecs/hardened-mips-cc1 @@ -0,0 +1,8 @@ +*cpp_options: ++ %{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE -mshared}}}}} + +*cc1_options: ++ %{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE -mshared}}}}} + +*asm_options: ++ %{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-mshared}}}}} diff --git a/common/environment/configure/gnu-configure-args.sh b/common/environment/configure/gnu-configure-args.sh @@ -0,0 +1,123 @@ +# This file sets up configure_args with common settings. + +if [ -n "$build_style" -a "$build_style" != "gnu-configure" ]; then + return 0 +fi + +export configure_args="--prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin --bindir=/usr/bin + --mandir=/usr/share/man --infodir=/usr/share/info --localstatedir=/var ${configure_args}" + +. ${XBPS_COMMONDIR}/build-profiles/${XBPS_MACHINE}.sh +export configure_args+=" --host=$XBPS_TRIPLET --build=$XBPS_TRIPLET" + +if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then + # on x86 use /usr/lib32 as libdir, but just as fake directory, + # because /usr/lib32 is a symlink to /usr/lib in void. + export configure_args+=" --libdir=/usr/lib32" +fi + +_AUTOCONFCACHEDIR=${XBPS_COMMONDIR}/environment/configure/autoconf_cache + +# From now on all vars are exported to the environment +set -a + +# Read autoconf cache variables for native target. +case "$XBPS_TARGET_MACHINE" in + # musl libc + *-musl) . ${_AUTOCONFCACHEDIR}/musl-linux + ;; +esac + +# Cross compilation vars +if [ -z "$CROSS_BUILD" ]; then + set +a + return 0 +fi + +export configure_args+=" --host=$XBPS_CROSS_TRIPLET --with-sysroot=$XBPS_CROSS_BASE --with-libtool-sysroot=$XBPS_CROSS_BASE " + +# Read autoconf cache variables for cross target (taken from OE). +case "$XBPS_TARGET_MACHINE" in + # musl libc + *-musl) . ${_AUTOCONFCACHEDIR}/common-linux + . ${_AUTOCONFCACHEDIR}/musl-linux + ;; + # gnu libc + *) . ${_AUTOCONFCACHEDIR}/common-linux + . ${_AUTOCONFCACHEDIR}/common-glibc + ;; +esac + +# Read apropiate autoconf cache files for target machine. +case "$XBPS_TARGET_MACHINE" in + armv5te*|armv?l*) + . ${_AUTOCONFCACHEDIR}/endian-little + . ${_AUTOCONFCACHEDIR}/arm-common + . ${_AUTOCONFCACHEDIR}/arm-linux + ;; + + aarch64*) + . ${_AUTOCONFCACHEDIR}/endian-little + . ${_AUTOCONFCACHEDIR}/aarch64-linux + ;; + + i686*) . ${_AUTOCONFCACHEDIR}/endian-little + . ${_AUTOCONFCACHEDIR}/ix86-common + ;; + + mips) . ${_AUTOCONFCACHEDIR}/endian-big + . ${_AUTOCONFCACHEDIR}/mips-common + . ${_AUTOCONFCACHEDIR}/mips-linux + ;; + + mipshf*) + . ${_AUTOCONFCACHEDIR}/endian-big + . ${_AUTOCONFCACHEDIR}/mips-common + . ${_AUTOCONFCACHEDIR}/mips-linux + ;; + + mipsel*) + . ${_AUTOCONFCACHEDIR}/endian-little + . ${_AUTOCONFCACHEDIR}/mips-common + . ${_AUTOCONFCACHEDIR}/mips-linux + ;; + + x86_64*) + . ${_AUTOCONFCACHEDIR}/endian-little + . ${_AUTOCONFCACHEDIR}/x86_64-linux + ;; + + ppc64le*) + . ${_AUTOCONFCACHEDIR}/endian-little + . ${_AUTOCONFCACHEDIR}/powerpc-common + . ${_AUTOCONFCACHEDIR}/powerpc-linux + . ${_AUTOCONFCACHEDIR}/powerpc64-linux + ;; + + ppc64*) + . ${_AUTOCONFCACHEDIR}/endian-big + . ${_AUTOCONFCACHEDIR}/powerpc-common + . ${_AUTOCONFCACHEDIR}/powerpc-linux + . ${_AUTOCONFCACHEDIR}/powerpc64-linux + ;; + + ppcle*) + . ${_AUTOCONFCACHEDIR}/endian-little + . ${_AUTOCONFCACHEDIR}/powerpc-common + . ${_AUTOCONFCACHEDIR}/powerpc-linux + . ${_AUTOCONFCACHEDIR}/powerpc32-linux + ;; + + ppc*)