Commit graph

35 commits

Author SHA1 Message Date
Simon Howard
724eedad45 Add extra package info commands.
The new commands are: info, packages and dependencies. The main one
is 'chocpkg info' which allows a description of a package (or of all
packages) to be shown, along with its status.
2016-02-25 20:15:13 -05:00
Simon Howard
128a9d35fd Add ability for packages to provide a description.
It's nice to be able to get some idea of what a package does.
2016-02-25 20:13:52 -05:00
Simon Howard
158133572f Replace case with if and [[ = syntax. 2016-02-24 21:46:43 -05:00
Simon Howard
0225fd6f7d Get rid of pattern_match function.
This functionality is built into bash through the [[..]] syntax.
2016-02-24 21:24:09 -05:00
Simon Howard
4ecf868faa Fix package groups. 2016-02-24 00:16:01 -05:00
Simon Howard
b6540c0182 Remove PACKAGE_VERSION.
The only place this is needed is when determining the directory name
that the tar file will be extracted to. This can be done by examining
the .tar file name without needing to know the version itself.
2016-02-23 23:58:08 -05:00
Simon Howard
23052af867 Add SDL2 as a dependency for SDL2_*. 2016-02-23 22:34:01 -05:00
Simon Howard
b0d8289d5e Add missing space when setting DEPENDENCIES var. 2016-02-23 22:33:16 -05:00
Simon Howard
33306ccdb4 Fold set_pkgconfig_paths into setup_build_environment.
Both of these set environment variables that allow libraries etc. to
be located. It's quite plausible that some implementations of the
check_installed function might depend on values of CFLAGS, LDFLAGS and
so on to check if a library is installed. Therefore, just set all these
variables in a single common function only invoked just before build, or
before performing an 'installed' check.
2016-02-23 22:30:34 -05:00
Simon Howard
280ef8dd89 Automatically install pkg-config when needed.
Every package checked with pkg-config implicitly requires it as a
dependency. Add it as a dependency when installing the pkg-config
module.
2016-02-23 22:18:32 -05:00
Simon Howard
658b94e635 Don't set environment variables until build.
The pkg-config variables can affect how a package is discovered, and if
set by a package that depends on another, could lead to the recursive
call to chocpkg producing the wrong result. Instead, set only when
specificly needed (by build or check_installed), and always invoke
commands by recursively invoking the script, never by function call.
2016-02-23 22:02:48 -05:00
Simon Howard
4876563b75 Don't use realpath, as it is non-standard.
This appears to be a GNU-specific utility and doesn't exist on OS X.
2016-02-23 22:00:20 -05:00
Simon Howard
ea6d80c4bf Remove setup.sh.
This has turned out to not do very much, and adds an annoying initial
stage before building. Just move this logic into the main script
instead, and get rid of it.
2016-02-22 05:06:22 +00:00
Simon Howard
3ad8b4a563 Do a git pull instead of git clone when appropriate.
When building a git package, invoke git pull if we already did a
previous build and have the checkout already.
2016-02-18 23:44:35 -05:00
Simon Howard
b3bce89f50 Run autoreconf from autotools module.
We can reasonably determine that autoreconf needs to be run if the
configure script does not exist.
2016-02-18 23:26:06 -05:00
Simon Howard
df955bf2b7 Split out chocpkg script into modules.
These modules encapsulate individual pieces of functionality and make
the code far more maintainable. This is a pretty big refactoring but
overall a big win.
2016-02-18 23:12:07 -05:00
Simon Howard
fdba92aae9 Fix cross-compile of zlib.
zlib's configure script is hand-rolled and works differently to the
usual autotools ones.
2016-02-18 02:03:44 -05:00
Simon Howard
025423c7a5 Add package for zlib.
This is a dependency of libpng.
2016-02-18 01:55:19 -05:00
Simon Howard
09a1ff9b8c Add support for package groups.
This conveniently allows a whole set of packages to be installed from
a single command, without needing an actual package to be built that
depends on them all.
2016-02-18 01:42:58 -05:00
Simon Howard
2deaf2af97 Remove PACKAGE_SOURCE_TYPE from pkgdefs.
This can be inferred from other variables.
2016-02-18 01:18:09 -05:00
Simon Howard
640ec85956 Add README describing the package file format. 2016-02-18 01:04:11 -05:00
Simon Howard
fda69b6ee1 Add variable for passing options to make.
Include a commented-out example of how to use -j to do multicore builds.
2016-02-18 00:37:46 -05:00
Simon Howard
fd7fec926b Invoke autoreconf instead of autogen.sh.
autogen.sh implicitly runs configure, which we want chocpkg to do
itself, with appropriate arguments for cross-complication etc.
2016-02-18 05:28:33 +00:00
Simon Howard
2aa6068540 Change mingw BUILD_HOST example to mingw64. 2016-02-18 05:03:40 +00:00
Simon Howard
a85f1d8370 Pass --disable-directx when building SDL2.
Not sure what the practical upshot of this is yet, but it at least
allows it to build successfully. I've been unable to get it to build
with DirectX support enabled yet because the compiler complains about
missing header definitions for LPDIRECTINPUTDEVICE8 and related
functions.
2016-02-18 05:01:49 +00:00
Simon Howard
5205c53036 Bump SDL2 version to 2.0.4. 2016-02-17 23:05:59 -05:00
Simon Howard
74a03eae81 Add directx-devel package.
This is a tricky package to support, since the tar file is improperly
structured and it is not an autotools package. Refactor slightly and
add IS_TAR_BOMB option for this kind of use case.
2016-02-17 23:03:42 -05:00
Simon Howard
6543f57fd4 Fix cross-compile.
Now that buildenv.sh is mostly just for setting BUILD_HOST, include
it early in the chocpkg initialization/startup. Set PKG_CONFIG_LIBDIR
as part of configure_for_package - this needs to be set before we
invoke pkg-config to check if the package is installed on the system
already, otherwise we can pick up a system package rather than the
one for the target architecture.
2016-02-17 22:20:28 -05:00
Simon Howard
771bc47e2c Refactor to support cross-compiling. 2016-02-17 21:55:55 -05:00
Simon Howard
c377bbdfaf Bump libflac version number and disable optimizations.
Assembly optimizations seem to cause build problems on i386 OS X at
least. We can make do without them.
2016-02-17 00:30:59 -05:00
Simon Howard
7db68eee5f Add 'reinstall' command.
The 'install' command does nothing if the package is detected to be
already installed, but there are circumstances where we will want to
trigger a rebuild and reinstall explicitly. Separate out into two
commands, one of which is a superset of the other.
2016-02-17 00:29:56 -05:00
Simon Howard
cb4b2cbdd6 Add separate install path for native tools.
We need to distinguish between tools we compile to use as part of the
build process, and things we build for the eventual target. Install
these into separate install directories; for now, pkg-config is the
only one of these.
2016-02-17 00:19:13 -05:00
Simon Howard
9162916169 Split out build environment setup to a separate file. 2016-02-16 23:34:05 -05:00
Simon Howard
10f650eb58 Add README. 2016-02-16 23:02:20 -05:00
Simon Howard
367c247f30 Add initial chocpkg scripts. 2016-02-16 23:00:20 -05:00