From 5c038e69997affd46430970f943a604b92ee96df Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 22 Jun 2017 10:30:11 +0200 Subject: build: simplify OSS checks and remove changes by "bugmen0t" 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. --- waftools/checks/custom.py | 28 +--------------------------- waftools/fragments/oss_audio.c | 5 ----- waftools/fragments/oss_audio_sunaudio.c | 6 ------ 3 files changed, 1 insertion(+), 38 deletions(-) delete mode 100644 waftools/fragments/oss_audio.c delete mode 100644 waftools/fragments/oss_audio_sunaudio.c (limited to 'waftools') diff --git a/waftools/checks/custom.py b/waftools/checks/custom.py index a2b4971cd2..c7dbdf4e94 100644 --- a/waftools/checks/custom.py +++ b/waftools/checks/custom.py @@ -3,7 +3,7 @@ from waftools.checks.generic import * from waflib import Utils import os -__all__ = ["check_pthreads", "check_iconv", "check_lua", "check_oss_4front", +__all__ = ["check_pthreads", "check_iconv", "check_lua", "check_cocoa", "check_openal", "check_rpi"] pthreads_program = load_fragment('pthreads.c') @@ -83,32 +83,6 @@ def check_lua(ctx, dependency_identifier): return True return False -def __get_osslibdir(): - cmd = ['sh', '-c', '. /etc/oss.conf && echo $OSSLIBDIR'] - p = Utils.subprocess.Popen(cmd, stdin=Utils.subprocess.PIPE, - stdout=Utils.subprocess.PIPE, - stderr=Utils.subprocess.PIPE) - return p.communicate()[0].decode().rstrip() - -def check_oss_4front(ctx, dependency_identifier): - oss_libdir = __get_osslibdir() - - # avoid false positive from native sys/soundcard.h - if not oss_libdir: - ctx.undefine(inflector.define_key(dependency_identifier)) - return False - - soundcard_h = os.path.join(oss_libdir, "include/sys/soundcard.h") - include_dir = os.path.join(oss_libdir, "include") - - fn = check_cc(header_name=soundcard_h, - defines=['PATH_DEV_DSP="/dev/dsp"', - 'PATH_DEV_MIXER="/dev/mixer"'], - cflags='-I{0}'.format(include_dir), - fragment=load_fragment('oss_audio.c')) - - return fn(ctx, dependency_identifier) - def check_cocoa(ctx, dependency_identifier): fn = check_cc( fragment = load_fragment('cocoa.m'), diff --git a/waftools/fragments/oss_audio.c b/waftools/fragments/oss_audio.c deleted file mode 100644 index c1a5488f97..0000000000 --- a/waftools/fragments/oss_audio.c +++ /dev/null @@ -1,5 +0,0 @@ -#include - -int main(int argc, char **argv) { - return SNDCTL_DSP_SETFRAGMENT; -} diff --git a/waftools/fragments/oss_audio_sunaudio.c b/waftools/fragments/oss_audio_sunaudio.c deleted file mode 100644 index d5208f558c..0000000000 --- a/waftools/fragments/oss_audio_sunaudio.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(int argc, char **argv) { - return SNDCTL_DSP_SETFRAGMENT; -} - -- cgit v1.2.3