The package group version of this function is identical to the normal
command, so it isn't necessary. Plus it's not clear that there's a
need for a hook on the dependencies command.
It's not enough to pass $PACKAGE_NAME when recursing to invoke a
subcommand. Since PACKAGE_NAME now just includes the base package
name with no qualifiers, the type and variant will be lost. Instead,
be more explicit about always passing a fully-qualified name to the
sub-process.
We already target the OS X 10.7 API, and 10.7 won't run on machines
that don't have a 64-bit-capable processor. So there's no reason not
to do this now.
chocolate-doom sdl2-branch no longer depends on SDL2_image as of commit
chocolate-doom/chocolate-doom@7215d13b6c, so remove this dependency
and the SDL2_image package.
Normally we run ./configure from within the build tree, but autotools
now allows doing out-of-tree builds by running configure while cd'ed
to a different directory. Add a config variable `AUTOTOOLS_BUILD_PATH`
to allow this on a per-package basis, and set this for the SDL2
package; SDL2 hg complains when doing in-tree builds because certain
files get clobbered.
Since we're downloading arbitrary executable code from websites and
running it, we should at least have some confidence it's the right
thing we're running.
Download these from the maintainers' websites where possible, and
document in a couple of cases why we're still using the mirror. In the
future we can possibly make an automated/generic mechanism for providing
a mirror for files used by chocpkg.
If we check out from a VCS repo and configure is missing, we need to
run autoreconf to generate it. But check if autoreconf is actually
installed and exit with a useful error if it isn't.
Bash 3 accepts ${array[@]:0} but this is invalid in bash 4 for empty
arrays. Instead, use ${!array[@]} to get indexes into the array and
look up entries using them.
The chocolate-doom package currently only has a latest variant, so
this assumption is incorrect. Instead only make this assumption if
the package file declares no variants. Add variant list to the 'info'
command output.
By default we build the stable variant but provide a user-editable
list of packages which will be built at the latest variant instead.
Rename chocolate-doom-git package to chocolate-doom and have it use
the latest variant for the current Git build.
Any variant name can be specified on the command line, but only
certain variants will be supported by a given package. Detect which
are valid for a given package and exit with an error if a request is
made for an invalid variant.
It's nice to be able to build from source control HEAD, and
especially for packages under than Chocolate Doom itself. As a start,
define "latest" variants for all the SDL2 packages.
Slim down the library as much as possible, and link directly against
libpng rather than searching for it at runtime (so that the OS X
package building code will find libpng correctly).
This is important for pkgdef files like SDL2_mixer which recursively
invoke chocpkg to check if a soft dependent package is installed. In
this case it's important to explicitly prefix the package type to
pass it through to the recursed instance.
Since package groups can theoretically now be installed as
native:package-group as well, make PACKAGE_TYPE only ever have a value
of "target" or "native". For a native install it's important we
transform the names of all dependencies to have the native: prefix.
It doesn't matter if we uselessly set PACKAGE_INSTALL_DIR and
PACKAGE_BUILD_DIR for a package group anyway, since they're not used
anyway.
Previously a particular package could only ever be installed to target
or native. Instead, allow any package to be installed to either, with
target being the default. Native packages can only ever have native
dependencies, but target packages can depend on native ones in order to
install tools which they need for their build process.