Commit Graph

97 Commits

Author SHA1 Message Date
Mike Swanson 612db67c95 Update SDL to 2.0.5. 2017-01-26 10:47:01 -08:00
Simon Howard a34f86ffb4 Use /fossils/ directory from zlib.net for download.
The current download URL linked from the front page is unstable, since
it breaks every time a new release is put out. Instead, link to the
/fossils/ directory, which contains all old releases as well as the
current release.
2017-01-22 22:58:29 +00:00
Simon Howard 4cb0fd1cd7 Update zlib to 1.2.11. 2017-01-22 22:33:01 +00:00
Simon Howard 09d1177b01 Pass -static-libgcc via CC instead of LDFLAGS.
Using LDFLAGS ought to work, but libtool strips it out when compiling,
so it doesn't. Instead, set the CC variable so that it is always used.
This fixes the dependency on the libgcc DLL on Windows.
2017-01-16 00:55:51 +00:00
Simon Howard a5173416e2 Build zlib dynamic, not static.
This should fix MingW compiles. Disable '-lc' on the linker command
line since this breaks compilation on Windows and shouldn't be
necessary anyway.
2017-01-15 00:46:45 +00:00
Simon Howard 9a1086d773 Add libogg as flac package dependency.
It does appear to need this to compile.
2017-01-15 00:40:49 +00:00
Simon Howard 1e478f8cb3 Add -static-libgcc to LDFLAGS on Windows builds.
This is needed to avoid adding a dependency on libgcc_s_sjlj-1.dll.
2017-01-08 21:36:25 +01:00
Simon Howard 40f576b7b9 Remove dependencies hook.
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.
2017-01-08 01:41:38 +01:00
Simon Howard 3353c13d83 Fix package groups. 2017-01-08 01:35:50 +01:00
Simon Howard fa1e1d06ce Be more careful when recursing.
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.
2017-01-08 01:06:52 +01:00
Simon Howard 53adbfe9ec Namespace module functions. 2017-01-08 00:56:32 +01:00
Simon Howard cf43367402 Namespace functions.sh.
Rename some of these functions in the process.
2017-01-08 00:53:52 +01:00
Simon Howard 3b51b90ffd Fix help when no command provided. 2017-01-08 00:45:54 +01:00
Simon Howard c513f4246c Rename check_installed -> do_check for consistency.
All other module functions are named do_* so it seems odd to have the
check modules be different.
2017-01-08 00:41:12 +01:00
Simon Howard d77144fe44 Factor out command-related code.
This leaves the main script as a small stub that just invokes the
chocpkg::commands::command function.
2017-01-08 00:38:03 +01:00
Simon Howard 6827998f01 Update zlib to 1.2.10. 2017-01-08 00:37:35 +01:00
Simon Howard c3cf517add Move recursion function to functions.sh.
This is used by enough stuff that it needs to be a common function.
2017-01-08 00:30:20 +01:00
Simon Howard e727d2fcc7 Namespace functions from environment.sh. 2017-01-08 00:07:25 +01:00
Simon Howard fad168c090 Move prebuild_setup to environment.sh.
This can be overridden by package files so should be defined here.
2017-01-08 00:02:45 +01:00
Simon Howard d4c4acbde0 Factor out package file evaluation.
The main script has grown quite large, so move this into a separate
file from the command evaluation.
2017-01-08 00:00:48 +01:00
Simon Howard b6d507fb8a Factor out configure_for_package into 3 functions.
This function had grown very big and was actually doing several
separate things.
2017-01-07 23:26:14 +01:00
Simon Howard 009cf10543 Remove chocpkg_ prefix from files. 2017-01-07 22:38:27 +01:00
Simon Howard aa787ca24d Don't set PATH to include chocpkg directory.
Now that the chocurl command has been removed this is no longer
necessary.
2017-01-07 22:28:37 +01:00
Simon Howard 5f8a01fc14 Move 'chocurl' command into chocpkg_functions.sh.
There's no reason for this to be a separate command.
2017-01-07 22:19:01 +01:00
Simon Howard 3582c01cb4 Reformat into sections for clarity. 2017-01-07 22:03:17 +01:00
Simon Howard 55b05163a9 Add comment to explain -rpath linker option.
This resolves a TODO.
2017-01-07 21:17:18 +01:00
Simon Howard 5663a8147b Switch Mac builds to 64-bit binaries.
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.
2017-01-07 21:13:50 +01:00
Simon Howard 309f4e1592 Add package for Markdown converter.
As part of this, add a build module for installing Python packages.
2017-01-07 21:01:44 +01:00
Simon Howard ca06a99365 Remove SDL2_image dependency.
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.
2016-07-17 22:56:24 -04:00
Simon Howard e68dca04e0 Add variable for doing out-of-tree builds.
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.
2016-07-17 22:50:53 -04:00
Simon Howard 24650af7d9 Add SHA256 checking for downloads.
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.
2016-07-08 20:41:02 -04:00
Simon Howard b712c2d18a Stop using chocolate-doom.org download mirrors.
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.
2016-07-08 19:45:30 -04:00
Simon Howard a61d6da035 Upgrade download URLs to https:.
Most packages are available via https download now.
2016-07-08 19:28:35 -04:00
Simon Howard 8f4d801452 Exit with an error when autotools is missing.
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.
2016-07-08 18:57:27 -04:00
Simon Howard 85d3254b64 Add package definitions for autotools utils. 2016-07-08 18:43:28 -04:00
Simon Howard f9231dc434 Oops. 2016-06-19 20:48:57 -04:00
Simon Howard abb68241a3 Use ${!array[@]} syntax to iterate over arrays.
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.
2016-06-19 20:46:45 -04:00
Simon Howard a5917ce635 Exit with error if package not specified.
Commands which act on a package must have a package name specified. If
no package is specified, we should exit with a helpful error.
2016-06-19 20:21:08 -04:00
Simon Howard 2820b9a1d9 Use bash array syntax for DEPENDENCIES.
Using an array is better than an expanded string.
2016-06-18 16:31:18 -04:00
Simon Howard 7c11c2a33b Don't assume every package has stable variant.
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.
2016-06-15 19:39:35 -04:00
Simon Howard dcb99e1b11 Allow package overrides for default variant.
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.
2016-06-15 19:26:20 -04:00
Simon Howard f0bd215fb5 Add sanity checking for variants.
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.
2016-06-15 19:13:57 -04:00
Simon Howard ca536950f8 Add variants support.
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.
2016-06-15 19:01:48 -04:00
Simon Howard 72f8e10c44 Add module for fetching via hg.
Some of the SDL2 libraries are stored in Mercurial rather than Git.
2016-06-14 23:49:45 -04:00
Simon Howard afc08e84ff Fix git URL for chocolate-doom-git. 2016-06-05 15:36:46 -04:00
Simon Howard a3a88dfc9d Add extra configure flags for building SDL2_image.
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).
2016-05-08 19:40:42 -04:00
Simon Howard db2f7268bd Add SDL2_image package.
Since chocolate-doom/chocolate-doom@07afb7749f, sdl2-branch now
depends on SDL2_image, so we need this as a dependency package.
2016-05-08 19:20:28 -04:00
Simon Howard 131faedfa6 Extend type: syntax to allow target: prefix too.
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.
2016-03-05 21:59:19 -05:00
Simon Howard b1ac826648 Remove debug message left in by mistake. 2016-03-05 15:41:58 -05:00
Simon Howard fb728473c9 Don't set package-group as a PACKAGE_TYPE.
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.
2016-03-05 15:32:07 -05:00