Translators and media-plugins are the main source of dependencies in haiku.hpkg,
and thus the main source of packages being pulled into chroots, especially
HaikuPorter chroots. (FFmpeg pulls in a rather large array of sub-
dependencies, itself.) So, here we break all the translators into their
own sub-package.
For now, haiku.hpkg is declared to depend on haiku_datatranslators,
so that users will not suddenly update and have no translators.
In the future, this will be dropped.
Note that this is only done for the primary arch at present.
Secondary architecture translators remain in the main secondary package
for now.
Change-Id: Id0b352f34f7110b79ec7787792bf3ae0edab4054
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4477
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* Merge all except the x86_gcc2 one into a single "generic" one.
It is now exactly the same on all architectures, save a single
ifdef for x86_64, which needs a different compat version, as there
are still some packages built that far back and never rebuilt since!
* Group the requires according to category: first any arch packages,
then commands, then the GCC syslibs, then packages always depended
upon if they are available, and finally packages only depended upon
in "regular" builds.
* Put all packages inside HAIKU_BUILD_FEATURE_* ifdef tests,
and order them alphabetically within their category.
If I have done this all correctly, at least x86_64 should get an
identically generated haiku .PackageInfo as before this commit, save
the reordering changes. Others may differ based on package availability,
as they were missing the requisite #ifdef sections.
The "exec" tool can only handle one command with environs set at
the beginning of the line, so now we set the ADD_BUILD_COMPAT...
in this format. This also seems to be a general performance
improvement to builds using real shells, too.
Change-Id: If4b3117651b5475039d5e8116cd3de398582290a
Previously only the "effective revision", i.e. the hrev by itself,
was used. Now we include the "commits ahead" count and the "dirty" flag,
if they're there, using _ instead of - of course.
Change-Id: I5238d01926c2cca242bffbdef30bff606a173a06
Reviewed-on: https://review.haiku-os.org/596
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit e7c5d994267fb7d49e3dd50c2854e9b37c9ffca1)
Reviewed-on: https://review.haiku-os.org/597
* The content of the preprocessed package-info files and the package
contents depend on the build type, so we use a different folder for
each build type.
* Instead of separate variables, HAIKU_BUILD_TYPE is set to one of
'bootstrap', 'minimum' or 'regular'.
* Adjust uses of HAIKU_BOOTSTRAP_BUILD accordingly.
* PreprocessPackageInfo rule: Pull out new rule
PreprocessPackageOrRepositoryInfo which does the sed substituation and
optionally the filtering through the C preprocessor.
* HaikuRepository rule: Generate the repository info file (from the
given template). No longer do that in the build_haiku_repository
script.
Due to depending on dynamically built files, package files will always
be rebuilt when they are needed (e.g. when an image is built). The build
variable HAIKU_DONT_REBUILD_PACKAGES can be defined to prevent
rebuilding existing package files (even ones that are out-of-date).
Main target for this change is buildbot. We want to make sure that the
packages in the repository it builds are exactly identical to the ones
in the images, which may not be the case when the packages are rebuilt
(due to different timestamps of contained files). The respective build
order should be:
1. Build repository.
2. Without cleaning the generated directory, build different image types
with HAIKU_DONT_REBUILD_PACKAGES defined.
* Add build tool update_package_requires. Given a package info file and
a repository cache file, it updates the minimum versions of the
requires entries of the package info file according to what is
provided by the repository.
* PreprocessPackageInfo rule: Use update_package_requires (with the
HaikuPorts repository file).
* All packaging architecture dependent variables do now have a
respective suffix and are set up for each configured packaging
architecture, save for the kernel and boot loader variables, which
are still only set up for the primary architecture.
For convenience TARGET_PACKAGING_ARCH, TARGET_ARCH, TARGET_LIBSUPC++,
and TARGET_LIBSTDC++ are set to the respective values for the primary
packaging architecture by default.
* Introduce a set of MultiArch* rules to help with building targets for
multiple packaging architectures. Generally the respective targets are
(additionally) gristed with the packaging architecture. For libraries
the additional grist is usually omitted for the primary architecture
(e.g. libroot.so and <x86>libroot.so for x86_gcc2/x86 hybrid), so that
Jamfiles for targets built only for the primary architecture don't
need to be changed.
* Add multi-arch build support for all targets needed for the stage 1
cross devel package as well as for libbe (untested).
Also, pre-process all package infos (not only the generic ones) and
define the macro HAIKU_BOOTSTRAP_BUILD, if building a package for a
bootstrap image.
Missed that when adding the script. Therefore it would be created in the
current directory and when building multiple packages concurrently the
script would be overwritten.
* add HAIKU_PACKAGING_ARCH, which is set to the target packaging
architecture
* introduce support for generic package infos, which are package infos
that are the same for all architectures, except for the declaration
of the package architecture itself
* move package info files underneath architecture-specific or generic
folder
* BuildHaikuPackage rule: Create the script that contains the extraction
commands.
* build_haiku_package: Add extractFile() function (stripped down version
from build_haiku_image).
In build_haiku_image the functionality was mainly used to extract the
optional packages, which is no longer done. We still need it e.g. for
the Wifi firmware packages that want to be extracted.
It allows to control the compression level used for package creation
and update. The default (9) is *very* slow, so developers may want to
use a smaller level during the regular development process to keep
turn-around times low.
* Update MimeSet rule to use the MIME DB the build system creates.
* Add CreateAppMimeDBEntries rule and call it from Link for targets that
might be applications that need to be registered with the MIME DB. For
the target the rule is invoked with it creates a directory into which
the entries for the types to be registered are written. The directory
is associated with the target via the HAIKU_MIME_DB_ENTRIES variable.
* AddFilesToContainer: If a target is added that has MIME DB entries,
also add those to the container.
* build_haiku_package: Call mimeset for the package contents.
Instead of the boolean alwaysUpdate, isCDPackage, and stripDebugSymbols
parameters use a uniform flags parameter which can contain any of the
respectively supported flags (alwaysUpdate, cdPackage,
stripDebugSymbols, !stripDebugSymbols).
Equivalent to "jam <list of all hpkgs> && jam @... <list of all hpkgs>",
i.e. it makes sure all hpkgs that are supposed to be in the image are
rebuilt respectively downloaded and copied to the image. It doesn't
remove old packages nor the activation files -- that still has to be
done manually.
* Add global HAIKU_PACKAGES_UPDATE_ONLY build system variable, which is
set for the "update" and "update-all" build profile actions.
* Change the HAIKU_INCLUDE_IN_CONTAINER_VAR variable on packages to
HAIKU_INCLUDE_IN_PACKAGES for all packages. The variable is also
set for the "update" and "update-all" build profile actions.
* Introduce HAIKU_CONTAINER_INHERIT_UPDATE_VARIABLE on container
variable. If set, the contained variable will be set on the container
when one or more files in it are updated. It is set on packages so an
update of a file in a package causes the package to be updated in the
image.
* Introduce HAIKU_CONTAINER_ALWAYS_CREATE_DIRECTORIES on container
variable. If set, directories will be created also in update mode. It
is set on packages.
* Introduce on-container jam variable HAIKU_CONTAINER_SYSTEM_DIR_TOKENS
containing the directory tokens relative to the container root to
refer to system.
* Use the variable in *ToContainer rules that need to put something in
system.
* AddFilesToContainer: Fix overlooked reference to AddFilesToHaikuImage.
* AddBootModuleSymlinksToContainer: Use relative symlinks. This avoids
special-casing in the boot loader for packagefs.
The HaikuPackage rule now sets the variable
HAIKU_CURRENTLY_BUILT_HAIKU_PACKAGE to the given package and all
*ToPackage rules use that instead of a parameter. This saves passing the
package in each of those rule invocations.
Move common code from AddDirectoryToHaikuImage/AddDirectoryToPackage to
AddDirectoryToContainer. AddDirectoryToPackage was incorrect, using an
incorrect search directory for the attribute files.
* Create rules (build/jam/PackageRules) and a script,
build_haiku_package, to build hpkg files.
* Move all rule invocations that copy files and created symlinks and
directories in the "system" directory from HaikuImage to
HaikuPackages, which creates a package "haiku.hpkg".
* build_haiku_image: Comment out adding the copyrights info to
AboutSystem for the moment.