| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This wraps waf's find_program in our own check boilerplate code so that it
can be used in the declarative dependencies section of the wscript.
Can be used like this:
}, {
'name': 'sed',
'desc': 'sed program',
'func': check_program('sed', 'SED'),
}, {
First argument is the program name, and the second is the waf variable name
where the program path will be stored. In this example we will be able to
refer to sed with ${{SED}} when creating waf Tasks in wscript_build.
/cc @giselher: I think you need this for wayland-scanner.
|
|
|
|
|
|
| |
This is always included in the Xorg development headers. Strictly
speaking it's not necessarily available with other X implementations,
but these are hopefully all dead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drop use of the ancient XF86VM, and use the slightly less ancient Xrandr
extension to retrieve the refresh rate. Xrandr has the advantage that it
supports multiple monitors (at least the modern version of it).
For now, we don't attempt any dynamic reconfiguration. We don't request
and listen to Xrandr events, and we don't notify the VO code of changes
in the refresh rate. (The later works by assuming that X coordinates map
directly to Xrandr coordinates, which probably is wrong with compositing
window manager, at least if these use complicated transformations. But I
know of no API to handle this.)
It would be nice to drop use of the Xinerama extension too, but
unfortunately, at least one EWMH feature uses Xinerama screen numbers,
and I don't know how that maps to Xrandr outputs.
|
|
|
|
|
| |
This allows the user to execute multiple configuration and build steps. It
can be used for several scenarios where you need different compiler flags.
|
|
|
|
|
|
|
| |
We avoided reindenting this in the past to allow merging upstream changes.
In hindsight these are very unlikely and we are actually doing changes on
the code, so it's better to have the correct indentation and formatting in
our source file.
|
|
|
|
|
| |
There was a missing trailing newline which caused some warnings when calling
`ld`.
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of using a regex to match names to be exported from the libmpv
dynamic shared library, use a libmpv.def file, which lists all exported
functions explicitly.
This reduces the platform specifics in syms.py. I'm not sure if the
separate compile_sym task is still needed (it could probably be
collapsed, which would concentrate the platform specifics into one
place).
|
|
|
|
| |
The _ usually prefixed to functions on Windows was unexpectedly missing.
|
| |
|
|
|
|
|
|
| |
This reverts commit 2e6a8f260ca169e2e1a5646eecfc322de6f77307.
Too many problems for now, such as with OSX and asprintf().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
_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.
|
| |
|
|
|
|
|
|
|
| |
Should resolve the "mpv b'...'" issue on Python 3 without breaking
things on Python 2.
Also, remove redundant wait for process.
|
|
|
|
|
| |
The Perl script must be run *after* the mpv executable is generated. Also use
an absolute path to it.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Closes #781.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
-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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
Warns against "if(0);" but not "if(0){}" - perfect for our purposes.
|
|
|
|
|
| |
This is all not needed anymore. In particular, remove all configure
switches except --enable-libavfilter.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Fixup 8009646583d523fc0.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
The alternatives to copying this small bit of code are even worse.
This is unmodified, except for the added line 3.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
It failed because the 10.7 SDK doesn't natively support array and dictionary
subscripting.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This is used to disable inline assembly (useful for old version of binutils
like the one in OpenBSD).
|
|
|
|
| |
This feature will be used in the next commit.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Fixup commit for 5cb8439015f5. getattr only works on dot notation.
|
|
|
|
| |
Regression was introduced in bf90317ad in an attempt to fix the Lua check.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Previous code only worked id len(deps_neg) was 1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Fixes #369
|
| |
|
|
|
|
| |
Fixes #370
|
| |
|
| |
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
|
|
| |
This makes it work with pkgconf (https://github.com/pkgconf/pkgconf)
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
|
|
|
|
| |
fixup commit... removes a redundant `return`
|
|
|
|
|
|
|
| |
waf apparently only appends a pkgconfig flag if it doesn't already exist in
the lib storage. Since our configure often checks for multiple libraries in
one call we want to keep the flags as is. This is especially important to
always keep stuff like -lm in the right place.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Python sets are unordered, so iterating them after converting to a list
always leads to different results. The code iterated on them to collect all
the flags to pass to the compiler, and since the order of the flags changed,
waf would rebuild all of the C files. Seems like in Python 2 this worked as
expected by pure chance.
This commit stores the sets as lists, and converts them to sets when the set
operations are needed.
Fixes #363
|
| |
|
| |
|
| |
|
| |
|