aboutsummaryrefslogtreecommitdiffhomepage
path: root/waftools
Commit message (Collapse)AuthorAge
* Revert "build: avoid defining _GNU_SOURCE"Gravatar wm42014-07-10
| | | | | | This reverts commit 2e6a8f260ca169e2e1a5646eecfc322de6f77307. Too many problems for now, such as with OSX and asprintf().
* build: deal with endian messGravatar wm42014-07-10
| | | | | | | | | | | | | | | | | | | | There is no standard mechanism for detecting endianess. Doing it at compile time in a portable way is probably hard. Doing it properly with a configure check is probably hard too. Using the endian definitions in <sys/types.h> (usually includes <endian.h>, which is not available everywhere) works under circumstances, but the previous commit broke it on OSX. Ideally all code should be endian dependent, but that is not possible due to the dependencies (such as FFmpeg, some video output APIs, some audio output APIs). Create a header osdep/endian.h, which contains various fallbacks. Note that the last fallback uses libavutil; however, it's not clear whether AV_HAVE_BIGENDIAN is a public symbol, or whether including <libavutil/bswap.h> really makes it visible. And in fact we don't want to pollute the namespace with libavutil definitions either. Thus it's only the last fallback.
* build: avoid defining _GNU_SOURCEGravatar wm42014-07-09
| | | | | | | | | _GNU_SOURCE defines the kitchen sink, and also prefers glibc definitions where glibc and POSIX conflict. Even though POSIX is worth less than toilet paper, we still prefer the POSIX definitions. rar.c needs asprintf(), which is _GNU_SOURCE-only. So we define _GNU_SOURCE too specifically for this file.
* build: set default cdrom and dvd devices on linuxGravatar Alessandro Ghedini2014-06-30
|
* build: version string as native str type for each Python versionGravatar Philip Sequeira2014-06-14
| | | | | | | Should resolve the "mpv b'...'" issue on Python 3 without breaking things on Python 2. Also, remove redundant wait for process.
* build: fix generation of zsh completionGravatar Alessandro Ghedini2014-06-13
| | | | | The Perl script must be run *after* the mpv executable is generated. Also use an absolute path to it.
* build: generate and install zsh completion scriptGravatar Alessandro Ghedini2014-06-08
|
* stream: remove VCD supportGravatar wm42014-06-01
| | | | | | | | | If a single person complains, I will readd it. But I don't expect that this will happen. The main reason for removing this is that it's some of the most unclean code remaining, it's unmaintained, and I've never ever heard of someone using it.
* gl_x11: always require some GLX API functions, avoid dlsym()Gravatar wm42014-05-31
| | | | | | | | | | | | | | The functions glXGetProcAddressARB() and glXQueryExtensionsString() were loaded using dlsym(). This could fail when compiling to libmpv, because then dlopen(NULL, ...) will look in the main program's list of libraries, and the libGL linked to libmpv is never considered. (Don't know if this somehow could be worked around.) The result is that using vo_opengl with libmpv can fail. Avoid this by not using dlsym(). glXGetProcAddressARB() was already used directly in the same file, and that never caused any problems. (Still add it to the configure test.) glXQueryExtensionsString() is documented as added in GLX 1.1 - that's ancient.
* build: add some warning cflagsGravatar wm42014-05-14
| | | | | | | | | These were in the old configure script too. Two flags are explicitly tested, because I have no idea how widespread support for them is, and testing them is just easier than trying to look them up in various gcc/clang manuals. There are people using gcc 4.2 out there, so some caution is warranted.
* build: fix OpenBSD DVD/CDROM device namesGravatar wm42014-05-12
| | | | Closes #781.
* build: removed undefined behavior from PVR checkGravatar wm42014-05-11
| | | | | | | | This shouldn't matter, but it's probably better if the code to check is valid - otherwise an extremely clever compiler might fail to compile it, and the feature would be misdetected. (Probably.) Found by cppcheck.
* waf: make shlib tasks less noisyGravatar Martin Herkt2014-05-07
|
* build: use -pthread when availableGravatar Stefano Pigozzi2014-04-27
| | | | | | | | | | | | Our code currently tries to link -lpthread and adds stuff like -D_REENTRANT based on the target platform. GCC actually supports to just pass a -pthread compiler and linker flag that will automatically enable threading and define the correct symbols for the platform, so let's try to just use that as our first choice. clang also supports -pthread but it must be used only as a compiler flag, so we also take care of that scenario with this commit.
* build: conditionally use -Wempty-bodyGravatar Stefano Pigozzi2014-04-26
| | | | | | | | | -Wempty-body is not available on all gcc versions but we were using it unconditionally. Also remove the usage from the clang case. clang still defines `__GNUC__` so it still gets all the gcc specific flags. This should fix the build on systems with older gcc versions like OpenBSD which still comes bundled with gcc 4.2 for license issues.
* Remove CPU detection and inline asm handlingGravatar wm42014-04-19
| | | | | | | | | | | | | | Not needed anymore. I'm not opposed to having asm, but inline asm is too much of a pain, and it was planned long ago to eventually get rid fo all inline asm uses. For the note, the inline asm use that was removed with the previous commits was almost worthless. It was confined to video filters, and most video filtering is now done with libavfilter. Some mpv filters (like vf_pullup) actually redirect to libavfilter if possible. If asm is added in the future, it should happen in the form of external files.
* Kill all tabsGravatar wm42014-04-13
| | | | | | | | | | | I hate tabs. This replaces all tabs in all source files with spaces. The only exception is old-makefile. The replacement was made by running the GNU coreutils "expand" command on every file. Since the replacement was automatic, it's possible that some formatting was destroyed (but perhaps only if it was assuming that the end of a tab does not correspond to aligning the end to multiples of 8 spaces).
* build: add -Wempty-body to compiler flagsGravatar wm42014-04-04
| | | | Warns against "if(0);" but not "if(0){}" - perfect for our purposes.
* build: simplify libavfilter configure checksGravatar wm42014-03-16
| | | | | This is all not needed anymore. In particular, remove all configure switches except --enable-libavfilter.
* build: fix unicode handling of the version stringGravatar Ryan Goulden2014-03-14
| | | | | | Don't pass unicode types to waf ENV. As per https://code.google.com/p/waf/issues/detail?id=1420 This directly fixes the "CFVersion" key in the .app bundle plist.
* build: syms: add support for Mach-O binariesGravatar Stefano Pigozzi2014-02-19
| | | | | | | | Current code stolen from waf's extras, only supported 'pe' and 'elf'. OS X uses the 'Mach-O' binary format (which waf calls 'mac-o'... go figure). Add support for generating the global symbols file with nm and using it from clang.
* build: Add -U__STRICT_ANSI__ to CFLAGS on CygwinGravatar Diogo Franco (Kovensky)2014-02-13
| | | | | | | | | | | | Cygwin's libc (newlib) doesn't obey a lot of unix feature test macros, including _GNU_SOURCE; as a result, a lot of functions and defines get masked out -- important defines such as M_PI and strcasecmp. Work around it by undefining __STRICT_ANSI__ on cygwin systems. This will still cause compilation issues on any non-cygwin system that uses newlib, but hopefully nobody does that, or if they do, they will find this commit message and know to add -U__STRICT_ANSI__ to their CFLAGS. Hopefully.
* build: disable clang's tautological compare warnings [2]Gravatar Stefano Pigozzi2014-02-13
| | | | Fixup 8009646583d523fc0.
* build: disable clang's tautological compare warningsGravatar Stefano Pigozzi2014-02-13
| | | | | This silences two non issues in the client.c file. Fixing them as clang would want us to, would introduce security bugs and potential crashes.
* build: include a copy of syms.py from upstream wafGravatar wm42014-02-10
| | | | | | The alternatives to copying this small bit of code are even worse. This is unmodified, except for the added line 3.
* build: switch to -std=c99 for saner float semanticsGravatar wm42014-02-02
| | | | | | | | | | | | | | | | | | | | | | This fixes a weird bug with aspect ratio handling. It has to do with float handling: with -std=gnu99, gcc implicitly enables broken non- standard semantics giving float variables excess precision. This can for example make this fail in theory: "float a = 0.1; assert(a == a);" While standard C allows excess precision _within_ expressions, it requires truncation when storing float values in variables of types "float" or "double". The "gnu99" mode breaks this. It can be unbroken by using "c99", or by specifying -fexcess-precision=standard. The former seems less likely to break compilers other than modern gcc. Note that -ffloat-store would also fix this, but also makes float expressions less efficient and less precise for no reason. The code that mistakenly fails because of this is dec_video.c line 393. It caused the container aspect to be ignored in some or all situations, depending how the compiler optimizes. For example, on gcc-4.6 with -Os, the aspect is always ignored. In future, we should probably just get rid of storing aspects as floats.
* waf: try to fix unicode/byte string messupGravatar wm42014-01-21
| | | | | | | Some mpv builds identify with e.g. "mpv b'0.3.3' ". The version looks like str() was called on a Python byte string. I couldn't reproduce it on my machine (I tried with both Python 2 and 3), so I'm not exactly sure what's going on here, but I'm hoping this commit does fix it.
* Detect Lua on FreeBSDGravatar Grzegorz Blach2014-01-15
|
* build: fix cocoa configure check on OS X 10.7Gravatar Stefano Pigozzi2014-01-02
| | | | | It failed because the 10.7 SDK doesn't natively support array and dictionary subscripting.
* Windows: use the GUI subsystem, attach to consoleGravatar Martin Herkt2014-01-02
| | | | | | | | This is necessary to start mpv without forcing a console window, but also breaks console usability. A workaround is to call mpv from a wrapper process that uses the console subsystem and helps redirecting the standard streams and WriteConsole output to where they belong.
* build: add flag for inline assemblyGravatar Stefano Pigozzi2013-12-29
| | | | | This is used to disable inline assembly (useful for old version of binutils like the one in OpenBSD).
* build: support multiple headers in check_statementGravatar Stefano Pigozzi2013-12-26
| | | | This feature will be used in the next commit.
* build: hide duplicate options from `--help`Gravatar Stefano Pigozzi2013-12-26
| | | | | | Hide --enable variants from [autodetect]'ed options and --enable/--disable variants for [enable]'d/[disable]'d options. The hidden options are still usable, just hidden for more readability.
* build: prefer 4Front OSS to native implementationsGravatar bugmen0t2013-12-07
| | | | | | | | | | | | | | | | If sys/soundcard.h is actually linux/soundcard.h then it supports only OSSv3 API. This may happen when OSSLIBDIR == /usr while forgetting to replace sys/soundcard.h from glibc. However, after fa620ff waf prefers native implementation which is inferior on Linux. To fix try making waf prefer oss-audio-4front. It's quite unusual to have 4Front OSS installed where native implementation is superior, anyway. Signed-off-by: bugmen0t <@> Make the false positives path also undef the 4Front define. Signed-off-by: Stefano Pigozzi <stefano.pigozzi@gmail.com> Fixes #396
* build: fix regression in cross-compilation [2]Gravatar Stefano Pigozzi2013-12-06
| | | | Fixup commit for 5cb8439015f5. getattr only works on dot notation.
* build: fix regression in cross-compilationGravatar Stefano Pigozzi2013-12-05
| | | | Regression was introduced in bf90317ad in an attempt to fix the Lua check.
* build: remove execute kwarg to check_cc when cross-compilingGravatar Stefano Pigozzi2013-12-04
| | | | | | This prevents waf from running test programs after compilation. A better approach would be to only remove this option if the check actually errors, but we are using this only for Lua anyway.
* build: make deps_neg work with multiple dependenciesGravatar Stefano Pigozzi2013-11-29
| | | | Previous code only worked id len(deps_neg) was 1.
* build: reimplement the OSS checks using a more declarative approachGravatar Stefano Pigozzi2013-11-29
| | | | | | | | | | | | | | | | | | The OSS checks were a big mess and quite buggy. This reimplementes them using a declarative approach and clearly distinguishing between the various OSS implementations. The code should now almost be auto-documenting. We currently support the following implementations of OSS: * platform-specific (with `sys/soundcard.h`) * SunAudio (default on NetBSD and useable on OpenBSD even if we have sndio support there). * 4Front (default on FreeBSD) Since now each OSS check also checks for the appropriate soundcard header, remove the old soundcard check. Many thanks to @bugmen0t for in depth info about all the BSDs. Check #380 and #359 for more info on this commit.
* build: make --disable-gl disable all the gl backendsGravatar Stefano Pigozzi2013-11-28
| | | | Fixes #369
* build: remove pointless exception handling in oss checkGravatar Stefano Pigozzi2013-11-26
|
* build: unbreak __get_osslibdir__ on python3Gravatar Stefano Pigozzi2013-11-26
| | | | Fixes #370
* build: check for pthreads with and without additional cflagsGravatar Stefano Pigozzi2013-11-26
|
* build: add -mwin32 on cygwinGravatar Stefano Pigozzi2013-11-26
|
* build: don't abort if our OSS implementation isn't from 4FrontGravatar Stefano Pigozzi2013-11-25
| | | | | | Original commit was implemented differently by @bugmen0t. The problem here was that the waf API was called directly, instead of using our own check_cc (which defaults, among other things, to non mandatory checks).
* build: run oss_audio.c check with oss cflags as wellGravatar Stefano Pigozzi2013-11-25
|
* build: unbreak __get_osslibdir__()Gravatar bugmen0t2013-11-25
| | | | | | | - without Utils.* always returns empty string - subprocess doesn't need extra quoting for sh -c - "source" is a bash'ism, not in POSIX sh - most shell commands embed newline at the end
* build: only check 4Front OSS after passing its CFLAGSGravatar bugmen0t2013-11-25
|
* build: fix construction of args to pkg-configGravatar Natanael Copa2013-11-25
| | | | | | This makes it work with pkgconf (https://github.com/pkgconf/pkgconf) Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
* build: make waf append pkgconfig flags as-is [2]Gravatar Stefano Pigozzi2013-11-24
| | | | fixup commit... removes a redundant `return`