summaryrefslogtreecommitdiffstats
path: root/waftools
Commit message (Collapse)AuthorAgeFilesLines
* win32: remove -municode from mpv binarywm42019-09-191-2/+2
| | | | | | | | | | | | | If this is used, the runtime expects that wmain() instead of main() is defined. This caused me severe problems in a certain now irrelevant case. I think it's a good idea to avoid this special case. We can just use main() and call GetCommandLineW() instead. This function returns a single string, so use CommandLineToArgvW() to split it, and hope it has the same semantics. Should this ever return NULL, hope that it leaves argc at 0. Untested, I think.
* build: stop defining _LARGEFILE[64]_SOURCEwm42019-09-191-3/+1
| | | | | | | | | | _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE are not required for 64 bit off_t, only _FILE_OFFSET_BITS. See somewhere on: https://wiki.musl-libc.org/faq.html I didn't test this anywhere except 64 bit Linux. It's probably a good idea to test on Windows and all Android versions.
* build: silence idiotic -Wformat-truncationwm42019-09-191-1/+2
| | | | | | | This warns about player/audio.c:253 with gcc 8.2.0. Although this warning could be useful to check the worst case estimation, the compiler doesn't explain how it gets its dumb, bogus result, so this is useless. You'd just end up trying to make the compiler happy for no reason.
* cocoa-cb: migrate to swift 5 with swift 4 fallbackder richter2019-07-211-5/+6
| | | | | | | | | | | | | this migrates our current swift code to version 5 and 4. building is support from 10.12.6 and xcode 9.1 onwards. dynamic linking is the new default, since Apple removed static libs from their new toolchains and it's the recommended way. additionally the found macOS SDK version is printed since it's an important information for finding possible errors now. Fixes #6470
* build: fix build with older command line toolsder richter2019-07-211-8/+28
|
* build: make macOS SDK path and version configurable via env varsder richter2019-07-211-3/+15
|
* build: add check for macOS SDK versionder richter2019-07-212-1/+22
| | | | | this provides an easy way to check for a specific macOS SDK version and with that the availability of features.
* build: add Swift dynamic linking supportder richter2019-07-211-2/+21
| | | | | | | | | | | | | | | this is in preparation for the upcoming swift 5 transition, where static linking was replaced by dynamic linking the swift libraries as the preferred way, by Apple. furthermore Apple removed the static swift libs from their dev Tools starting with xcode 10.2/swift 5. because of ABI incompatibility dynamic linking for swift versions prior to 5 doesn't use the system lib path for the dynamic swift libs. for now static linking is still the default, but that will be changed when swift 5 support is added and swift 3 support is dropped. Fixes #6232
* build: make Swift lib and compiler paths configurable via env varsder richter2019-07-211-6/+22
|
* build: add support for Swift toolchains not provided by Appleder richter2019-07-211-12/+48
| | | | | | | | | | | | | | | | | | the xcode-select tool only properly works with Apple provided toolchains but not with third party ones from swift.org. in the latter case the swift compiler executable is found in the proper path but the swift libs from the xcode or command line tools will be picked. this leads to a not wanted discrepancy of the swift compiler and libs and possible errors. instead of relying on the xcode-select tool search for the libs relative to the swift executable. that relative path seems to be the same for all toolchains. if for any reasons a swift executable is not found in the relative path, fall back to the old xcode-select method. furthermore, both static and dynamic libs will be searched for but only the former will be used for now. this is a preparation for the upcoming swift 5 migration.
* build: add all configure flags as conditional flags to Swift compilerder richter2019-07-211-0/+10
|
* build: don't check for Swift when disabledder richter2019-07-211-1/+2
|
* build: bump minimum swift version to 3.0.2Akemi2019-04-021-1/+1
| | | | | | | | | | #6299 reported problems with earlier 3.0.x swift versions. i tested with 3.0.2/SDK 10.12.2 and just assumed it also works with the older 3.0.x swift and 10.12.x SDK versions. due to the unstable nature of swift there were slight API differences that caused build problems. since swift is bundled with the SDK we just bump the minimum swift version.
* build: slightly adjust swift check output messages on failder richter2019-04-021-3/+7
| | | | to make it consistent with the other checks and their output messages.
* build: use StrictVersion for swift version comparisonAkemi2019-04-022-7/+7
|
* build: fix adding of object files to linking with cplugins disabledAkemi2019-03-131-1/+1
| | | | | | | | | | | | this was meant to be fixed by 546f038, but with --disable-cplugins the do_the_symbol_stuff function was never called and the handle_add_object function was again always called before the actual linking task was created. to fix this we explicitly call handle_add_object only after all the tasks the do_the_symbol_stuff function is called after too. Fixes #6028
* build: enable swift debug information when requestedRodger Combs2019-03-131-0/+3
|
* Merge commit '559a400ac36e75a8d73ba263fd7fa6736df1c2da' into ↵Anton Kindestam2018-12-051-1/+6
|\ | | | | | | | | | | wm4-commits--merge-edition This bumps libmpv version to 1.103
| * build: prefer C11 modewm42018-05-241-1/+6
| | | | | | | | | | | | C99 still works, but in theory we're using C11 features already, such as stdatomic.h. gcc/clang let us use it in C99 mode too, but using C11 is at least more proper.
* | wayland: use xdg-decoration if availableemersion2018-11-191-1/+1
| |
* | build: pass include paths as a list instead of a string in cocoa checkAkemi2018-10-281-1/+1
| | | | | | | | | | | | when passed as a string check_cc tries to split that string, since it assumes that several include paths can be passed to it. instead we just use a list to make it unambiguous.
* | build: use an argument list for the Swift build argsAkemi2018-10-281-5/+7
| | | | | | | | | | | | that way we don't need to quote or escape anything. Fixes #6220
* | build: more reliable way of getting the Swift version from a stringAkemi2018-10-221-1/+4
| | | | | | | | Fixes #6212
* | add swift as main dependency so all dependencies can be disabled easilyAkemi2018-09-301-0/+2
| |
* | build: check for Swift version and disable dependencies if neededAkemi2018-09-302-3/+10
| |
* | Revert "ao_openal: enable building on OSX"Michael Hoang2018-08-261-12/+1
| | | | | | | | | | | | This reverts commit af6126adbe61fb2b6cc780025246d33df93072e6. Apple's OpenAL support is ridiculously out of date, revert back to just using OpenAL Soft on macOS (fixes #4645).
* | build: explicitly delay adding of object files to linkingAkemi2018-07-121-0/+1
| | | | | | | | | | | | | | | | | | | | Before, `do_the_symbol_stuff` would implicitly come before `handle_add_object`, which adds object files to the linking task. With newer (2.0.x) versions of waf, the ordering seems to get more optimized, and thus we have to declare that the function that creates the linking task should come before the task that adds object files to the task.
* | build: fix linking libmpv when swift features are buildAkemi2018-07-081-7/+14
| | | | | | | | | | | | | | | | this was caused by commit 2e7a4f7. the LAST_LINKFLAGS were not added to the linking of libmpv and that caused a linking error. manually add the link flags the same way it's done when linking mpv. Fixes #5968
* | build: manually add standard library search paths for linkingAkemi2018-06-121-1/+11
|/ | | | | | | | | | | this reverts commit a174566 since the actually reason for failing has been found. the isysroot flag overwrites the framework and library search paths. though we only need to overwrite the former and there is no way to just overwrite that one. we manually add the standard library search paths to the very end of the linking command, so it won't interfere with the search paths extracted by waf. Fixes #5791
* waf: require wayland-protocols >= 1.14Rostislav Pehlivanov2018-05-201-1/+1
| | | | Needed for the new xdg-wm tiling enums.
* waftools: update clang_compilation_databaseBin Jin2018-05-171-13/+33
| | | | | The old copy is broken with waf-1.9.8, update to the latest commit (waf-project/waf@5e4b86b81df3b9819738d757eb8d2c8646ef0ede) instead.
* wscript: Remove code check for cuda hwaccelPhilip Langdale2018-05-101-15/+0
| | | | | | This was there originally to detect too-old versions of ffmpeg. We now only support >= 4.0, so it's not relevant. We just need the dependencies to be present.
* build: bump wayland-protocols requirement to 1.12+Jan Ekström2018-04-291-1/+1
| | | | The stable xdg-shell protocol is only available from this version.
* build: fixup vendored wayland protocols with variantsJan Ekström2018-04-151-4/+23
| | | | | | Utilize the SRC variable for this to get a built-in relative path. Can be tested by adding `--variant="random_string"` to configure and build.
* build: fix swift build with waf 1.8.4Akemi2018-03-111-2/+2
| | | | | | | with older waf versions a node doesn't return an absolute path but just a relative one. fix this by explicitly requesting an absolute one. Fixes #5604
* cocoa-cb: change border and borderless window stylingAkemi2018-02-281-3/+3
| | | | | | | | | | | the title bar is now within the window bounds instead of outside. same as QuickTime Player. it supports several standard styles, two dark and two light ones. additionally we have properly rounded corners now and the borderless window also has the proper window shadow. Also make the earliest supported macOS version 10.10. Fixes #4789, #3944
* build: fix dependency check on macOSAkemi2018-02-161-9/+1
| | | | | | | 235eb60 added a needed linking flag, but too soon. this lead to some of the configure checks to fail. add the flag in our build phase. Fixes #5528
* build: fix linking libmpv when swift features are builtAkemi2018-02-131-0/+2
| | | | | | | | the swift object file wasn't linked when libmpv was linked, which resulted in a missing symbol error. add the swift object to the linking list for libmpv too. Fixes #5522
* build: remove shell usage from swift build scriptsAkemi2018-02-131-4/+5
| | | | | | | for convenience reasons i used strings for subprocess commands instead of command lists, which made it mandatory to use a shell. for security reasons, among others, we removed the shell usage and converted the commands to actual command lists.
* build: fix swift detection with python2Akemi2018-02-131-6/+2
| | | | | | | | | c82fed8 fixed the detection with python3 but broke it on python2. the decode function on python2 converts the str to unicode which causes problems when concatenating to str when building. instead of decoding the output we change the subprocess to operate in text mode. also use check_output instead of Popen for simplicity.
* build: fix swift detection on major swift versionsAkemi2018-02-121-2/+2
| | | | | the swift version string on major versions only has two components, major and minor, the third one is missing.
* build: fix swift detection with python3Akemi2018-02-121-1/+1
| | | | | python3 returns bytes instead of str, unlike python2. explicitly decode the output.
* build: fix configure on windowsAkemi2018-02-121-7/+8
| | | | | configure failed because of a wrong check. fix the check and also only check for swift on macOS.
* cocoa-cb: initial implementation via opengl-cb APIAkemi2018-02-123-14/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this is meant to replace the old and not properly working vo_gpu/opengl cocoa backend in the future. the problems are various shortcomings of Apple's opengl implementation and buggy behaviour in certain circumstances that couldn't be properly worked around. there are also certain regressions on newer macOS versions from 10.11 onwards. - awful opengl performance with a none layer backed context - huge amount of dropped frames with an early context flush - flickering of system elements like the dock or volume indicator - double buffering not properly working with a none layer backed context - bad performance in fullscreen because of system optimisations all the problems were caused by using a normal opengl context, that seems somewhat abandoned by apple, and are fixed by using a layer backed opengl context instead. problems that couldn't be fixed could be properly worked around. this has all features our old backend has sans the wid embedding, the possibility to disable the automatic GPU switching and taking screenshots of the window content. the first was deemed unnecessary by me for now, since i just use the libmpv API that others can use anyway. second is technically not possible atm because we have to pre-allocate our opengl context at a time the config isn't read yet, so we can't get the needed property. third one is a bit tricky because of deadlocking and it needed to be in sync, hopefully i can work around that in the future. this also has at least one additional feature or eye-candy. a properly working fullscreen animation with the native fs. also since this is a direct port of the old backend of the parts that could be used, though with adaptions and improvements, this looks a lot cleaner and easier to understand. some credit goes to @pigoz for the initial swift build support which i could improve upon. Fixes: #5478, #5393, #5152, #5151, #4615, #4476, #3978, #3746, #3739, #2392, #2217
* build: fix linking to dev SDK on macOSAkemi2018-02-121-1/+21
| | | | | | | | | on macOS mpv was linked to the system SDK which didn't cause any problems as long as the system SDK was the same as the dev SDK. though it started to cause linking warnings when a new xcode version with the SDK for the next macOS was installed. in the worst case it could also cause linking errors. to fix this we explicitly set the SDK path to the SDK that is used for building instead.
* win32: add more-POSIXy versions of open() and fstat()James Ross-Gowan2017-10-251-1/+1
| | | | | | | | | | | | | | Directory-opening never worked on Windows because MSVCRT's open() doesn't open directories and its fstat() doesn't recognise directory handles. These are just MSVCRT restrictions, and the Windows API itself has no problem with opening directories as file objects, so reimplement mpv's mp_open and mp_stat to use the Windows API directly. This should fix directory playback. This also populates the st_dev and st_ino fields of struct stat, so filesystem loop checking in demux_playlist.c should now work on Windows. Fixes #4711
* wayland_common: rewrite from scratchRostislav Pehlivanov2017-10-033-5/+40
| | | | | | | | | | | | The wayland code was written more than 4 years ago when wayland wasn't even at version 1.0. This commit rewrites everything in a more modern way, switches to using the new xdg v6 shell interface which solves a lot of bugs and makes mpv tiling-friedly, adds support for drag and drop, adds support for touchscreens, adds support for KDE's server decorations protocol, and finally adds support for the new idle-inhibitor protocol. It does not yet use the frame callback as a main rendering loop driver, this will happen with a later commit.
* vd_lavc: cuda requires setting hw_device_ctxwm42017-09-261-0/+3
| | | | | | This restores cuda/cuvid under Windows. Cuvid is relatively useless under Windows, but this was requested.
* build: fix build for waf 2.0orbea2017-09-221-1/+1
| | | | | | | | Thanks to ita1024 for the patch. Fixes https://github.com/mpv-player/mpv/issues/4894 Signed-off-by: wm4 <wm4@nowhere>
* build: add preliminary LGPL modewm42017-09-211-1/+0
| | | | | | | See "Copyright" file for caveats. This changes the remaining "almost LGPL" files to LGPL, because we think that the conditions the author set for these was finally fulfilled.
* build: remove some dead codewm42017-09-191-7/+0
|
* build: use unified dependency expressions instead of weird fieldswm42017-09-182-40/+242
| | | | | | | | | | | | | | | | Instead of "deps", "deps_neg", and "deps_any" fields, just have a single "deps" field, which changes from an array to a string. The string is now an expression, which can contain the operators &&, ||, !, and allows grouping with ( ). It's probably overkill. If it gets a maintenance burden, we can switch to specifiying the dep expressions as ASTs (or maybe eval()-able Python expressions), and we could simplify the code that determines the reason why a dependency is not fulfilled. The latter involves a complicated conversion of the expression AST to DNF. The parser is actually pretty simple, and pretty much follows: https://en.wikipedia.org/wiki/Shunting_yard_algorithm
* Revert "build: rpi: rely on pkgconfig for compiler flags"wm42017-08-151-22/+1
| | | | | | | | | This reverts commit ea40fa36eef15384b4c0218fb102f92f5cd1cdff. This caused strange runtime failure on Raspbian (when running mpv, vc_dispmanx_display_open() returned 0, while other dispmanx using programs were fine). The problem must have been something about the compiler flags, maybe linking order or set of include paths.
* build: warn against VLAwm42017-07-241-1/+2
| | | | | Although C99 supports them, they are optional in C11, and we don't like/use them anyway.
* build: change how some OS specific source files are selectedwm42017-06-291-0/+12
| | | | | | | | | | | | | | | | | | In a bunch of cases, we emulate highly platform specific APIs on a higher level across all OSes, such as IPC, terminal, subprocess handling, and more. We have source files for each OS, and they implement all the same mpv internal API. Selecting which source file to use on an OS can be tricky, because there is partially overlapping and emulated APIs (consider Cygwin on Windows). Add a pick_first_matching_dep() function to make this slightly easier and more structured. Also add dummy backends in some cases, to deal with APIs not being available. Clarify the Windows dependency identifiers, as these are the most confusing.
* build: reduce GLX test fragmentwm42017-06-221-4/+0
| | | | | While it doesn't matter for anything, we don't really need to check for GL symbols (neither headers nor for linking).
* build: remove Linux DVB test fragmentwm42017-06-221-12/+0
| | | | | | | | | | | | Most of the DVB test fragment was added in 2e399f39 by someone who wasn't asked for LGPL relicensing permission. Thus remove it. (For some weird reason, the configure check wasn't even for the later added actual DVB code.) Since DVB is disabled by default, this isn't too bad. But if someone enables it, and the system doesn't support it, he will receive a weird compilation error. That has to be good enough, until maybe someone adds a new check.
* build: remove unused pvr.c test fragmentwm42017-06-221-7/+0
|
* build: simplify OSS checks and remove changes by "bugmen0t"wm42017-06-223-38/+1
| | | | | | | | | | | | | | | | | | The user bugmen0t was apparently a shared github account with publicly available login. Thus, we can't get LGPL relicensing permission from the people who used this account. To relicense successfully, we have to remove all their changes. This commit should remove 20d1fc13, f26fb009, defbe48d. It also should remove whatever test fragments were copied from the ancient configure, as well as some configure logic (potentially that device path stuff). I think this change still preserves the most important use-cases of OSS: BSDs, and the Linux OSS emulation (the latter for testing only). According to an OSS user, the 4front checks were probably broken anyway. The SunAudio stuff was probably for (Open)Solaris, which is dead. ao_oss.c itself will remain GPL, and still contains bugmen0t changes.
* build: remove checks for libGLwm42017-04-261-1/+0
| | | | | | We don't need to link against libGL directly, nor do we need OpenGL headers. The only thing we need is the windowing interop stuff, such as libEGL.
*