blob: 59426c3d59abdcfab3b82cd2d726e67ae3309356 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
import os
import shutil
class Recipe(recipe.Recipe):
"""
Contains headers that add workarounds/replacements for GNU libc extensions.
These have been taken from platform/external/elfutils/bionic-fixup in AOSP
Currently, it only ships error.h from that set of fixups
See:
https://android.googlesource.com/platform/external/elfutils/+/android-4.4.1_r1/bionic-fixup/error.h
"""
name = 'bionic-fixup'
version = '4.4.1'
licenses = [License.Apachev2]
btype = BuildType.CUSTOM
stype = SourceType.CUSTOM
files_devel = ['include/error.h']
def prepare(self):
if self.config.target_platform == Platform.LINUX:
raise InvalidRecipeError(self, "Invalid platform")
def install(self):
include_path = os.path.join(self.config.prefix, 'include')
bionicfixup_path = os.path.join(self.config.recipes_dir, 'bionic-fixup')
if not os.path.exists(include_path):
os.makedirs(include_path)
for f in os.listdir(bionicfixup_path):
shutil.copy(os.path.join(bionicfixup_path, f), include_path)
|