Flat commit of all changes from package-management branch in svn
Added BuildPlatformStaticLibraryPIC rule.

It works like BuildPlatformStaticLibrary, but generates position
independent code.
Added very simple BLooper class to libbe_build.
Added missing <StorageDefs.h> include.
Removed obsolete TODO.
Fixed printf() format related warnings.
Use fs_close_attr()/write_pos() instead of close()/pwrite().

This makes it easier to reuse the code on non-Haiku platforms.
Fixed x86_64 handling by the build system.

* Map build variables HOST_CPU and HOST_ARCH to x86_64, if it they are
* x86 and
  64 bit and define the __x86_64__ C macro instead of __INTEL__ in that
case.
* <OS.h>: Also handle __x86_64__.
Made the check for B_BUFFER_OVERFLOW more flexible.
Added driver settings and find_directory() support.

find_directory() is a very simplified implementation, only supporting
what we currently need.
Open/close attribute support for xattrs backend

For the xattr/BSD (untyped) attribute backend implement fs_fopen_attr()
and fs_close_attr(). A new AttributeDescriptor is created. It is
currently used in write_pos() only.
Updated to current Haiku version
Fixed host build issues/warnings
Added several APIs to libbe_build/libshared_build
Build libpackage for the build platform
Build the package tool for the build platform
Added .gitignore
Fix x86_64 BuildConfig issues

* Resolve TODO: HOST_GCC_BASE_FLAGS should not be included in
  HOST_LDFLAGS. Enable adding "-fno-strict-aliasing -fno-tree-vrp"
  accordingly.
* Fix handling of HOST_PLATFORM_IS_64_BIT and HAIKU_HOST_USE_32BIT: The
  former does now state whether the platform is effectively treated as
  64 bit platform, i.e. it actually is 64 bit and the 32 bit mode is
  not enforced. HAIKU_HOST_USE_32BIT is now only set when the platform
  is actually 64 bit, but 32 bit mode is enforced.
libroot_build: fix error.ccp build

Since USES_BE_API is set by default on all libroot_build sources, the
error.cpp
was broken, since it wouldn't be exempt from the error mapping. Define
the
BUILDING_HAIKU_ERROR_MAPPER for it directly in the Jamfile, now.
<build>package: attribute iteration, license dir

PackageWriterImpl:
* Iterate through attributes using fs_read_attr_dir() instead of
  readdir(). Makes it work correctly on the build platform.
* On the build platform look up the system licenses in their source
  directory rather than based on find_directory().