aboutsummaryrefslogtreecommitdiffhomepage
path: root/waftools/checks/custom.py
Commit message (Collapse)AuthorAge
* wayland: use xdg-decoration if availableGravatar emersion2018-11-19
|
* build: pass include paths as a list instead of a string in cocoa checkGravatar Akemi2018-10-28
| | | | | | 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.
* add swift as main dependency so all dependencies can be disabled easilyGravatar Akemi2018-09-30
|
* build: check for Swift version and disable dependencies if neededGravatar Akemi2018-09-30
|
* Revert "ao_openal: enable building on OSX"Gravatar Michael Hoang2018-08-26
| | | | | | 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: manually add standard library search paths for linkingGravatar Akemi2018-06-12
| | | | | | | | | | | 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.14Gravatar Rostislav Pehlivanov2018-05-20
| | | | Needed for the new xdg-wm tiling enums.
* build: bump wayland-protocols requirement to 1.12+Gravatar Jan Ekström2018-04-29
| | | | The stable xdg-shell protocol is only available from this version.
* build: fix dependency check on macOSGravatar Akemi2018-02-16
| | | | | | | 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
* cocoa-cb: initial implementation via opengl-cb APIGravatar Akemi2018-02-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 macOSGravatar Akemi2018-02-12
| | | | | | | | | 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.
* wayland_common: rewrite from scratchGravatar Rostislav Pehlivanov2017-10-03
| | | | | | | | | | | | 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.
* Revert "build: rpi: rely on pkgconfig for compiler flags"Gravatar wm42017-08-15
| | | | | | | | | 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: simplify OSS checks and remove changes by "bugmen0t"Gravatar wm42017-06-22
| | | | | | | | | | | | | | | | | | 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 libGLGravatar wm42017-04-26
| | | | | | 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.
* build: rely on internal GL headers for rpi checkGravatar Ilya Tumaykin2017-04-26
| | | | | Since mpv ships all the required OpenGL defines now, rpi check doesn't need to check system GL headers.
* wscript: add LIBRARY_PATH for library detectionGravatar kwkam2017-01-28
| | | | | | MinGW GCC seems to ignore LIBRARY_PATH which causes problem when some libraries not using pkg-config were installed to local directory
* build: rpi: rely on pkgconfig for compiler flagsGravatar Ilya Tumaykin2017-01-28
| | | | | | | | | | | | | | | | | Upstream provides pkgconfig files for quite some time now [1,2]. Use them to determine the required flags instead of hard coding. This makes cross-compilation easy, which I dare to say is important for many raspberry-pi users. This also prevents picking libEGL and libGLESv2 from mesa when they are present, which can happen with the current code. Good distros should put these pkgconfig files into default pkg-config search path or populate PKG_CONFIG_PATH for users. However, be nice to everybody and manually look into '/opt/vc/lib/pkgconfig' just in case. Hence the PKG_CONFIG_PATH mangling. [1]: https://github.com/raspberrypi/userland/issues/245 [2]: https://github.com/raspberrypi/userland/commit/05d60a01d53dca363bb4286594db1826ffff8762
* ao_openal: enable building on OSXGravatar Josh de Kock2016-09-21
| | | | Signed-off-by: Josh de Kock <josh@itanimul.li>
* build: also use the iconv check on freebsdGravatar q662016-05-10
| | | | This is necessary to make mpv build out of box on FreeBSD.
* build: add special openbsd case for iconv checkGravatar Stefano Pigozzi2016-02-01
| | | | Fixes #2710
* waf: add "lua51" ("51obsd") to list of possible lua namesGravatar Dmitrij D. Czarkoff2016-01-11
|
* build: remove useless classGravatar Stefano Pigozzi2015-07-26
|
* build: check for lua52Gravatar Christian Hesse2015-05-13
| | | | | | | Arch linux is about to update to lua 5.3.x, but lua 5.2.x will be provided by package lua52, which contains pkg-config file lua52.pc. Signed-off-by: wm4 <wm4@nowhere>
* lua: reject Lua 5.3Gravatar wm42015-04-01
| | | | | | | | | | | | | | It simply doesn't work, and is hard to make work. Lua 5.3 is a different language from 5.1 and 5.2, and is different enough to make adding support a major issue. Most importantly, 5.3 introduced integer types, which completely mess up any code which deals with numbers. I tried to make this a compile time check, but failed. Still at least try to avoid selecting the 5.3 pkg-config package when the generic "lua" name is used (why can't Lua upstream just provide an official .pc file...). Maybe this actually covers all cases. Fixes #1729 (kind of).
* build: move QuartzCore linking to the cocoa checkGravatar Stefano Pigozzi2015-02-25
| | | | | It's needed for the DisplayLink functions so it must be enabled for the basic cocoa code.
* win32: drop hacks for possibly broken static pthreads-win32 linkingGravatar wm42015-01-11
| | | | | | | | | | | | We now use threads and other pthread API a lot, and not always we use it from threads created with pthread_create() (or the main thread). As I understand, with static linking we would have to use pthread_win32_thread_attach/detach_np() every time we enter or leave a foreign thread. We don't do this, and it's not feasible either, so it's just broken. This still should work with dynamic pthreads-win32. The MinGW pthread implementation should be unaffected from all of this.
* win32: request UTF-16 API variants, Vista+ APIs, and COM C macrosGravatar wm42015-01-07
| | | | | Put the Vista+ (_WIN32_WINNT) and the COM C (COBJMACROS) defines into the build system, instead of defining them over and over in the code.
* win32: add native wrappers for pthread functionsGravatar wm42015-01-01
| | | | | | | Off by default, use --enable-win32-internal-pthreads . This probably still needs a lot more testing. It also won't work on Windows XP.
* build: give precedence to Lua52 over LuaJITGravatar Stefano Pigozzi2014-12-02
| | | | | LuaJIT ships with a broken .pc file on OS X (see #1110), and leaving Lua52 last was done only to improve libquvi interoperability.
* Drop libquvi supportGravatar wm42014-10-25
| | | | | | | | | | | No development activity (or even any sign of life) for almost a year. A replacement based on youtube-dl will probably be provided before the next mpv release. Ask on the IRC channel if you want to test. Simplify the Lua check too: libquvi linking against a different Lua version than mpv was a frequent issue, but with libquvi gone, no direct dependency uses Lua, and such a clash is rather unlikely.
* 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.
* 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.
* 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: 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: 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: 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: 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: also run the test binary during the lua checksGravatar Stefano Pigozzi2013-11-23
|
* build: fix lua check to actually test for libquviGravatar Stefano Pigozzi2013-11-23
|
* switch the build system to wafGravatar Stefano Pigozzi2013-11-21
This commit adds a new build system based on waf. configure and Makefile are deprecated effective immediately and someday in the future they will be removed (they are still available by running ./old-configure). You can find how the choice for waf came to be in `DOCS/waf-buildsystem.rst`. TL;DR: we couldn't get the same level of abstraction and customization with other build systems we tried (CMake and autotools). For guidance on how to build the software now, take a look at README.md and the cross compilation guide. CREDITS: This is a squash of ~250 commits. Some of them are not by me, so here is the deserved attribution: - @wm4 contributed some Windows fixes, renamed configure to old-configure and contributed to the bootstrap script. Also, GNU/Linux testing. - @lachs0r contributed some Windows fixes and the bootstrap script. - @Nikoli contributed a lot of testing and discovered many bugs. - @CrimsonVoid contributed changes to the bootstrap script.