Kaydet (Commit) 59f72b23 authored tarafından root's avatar root

actionsapi - inary izolation cflags fix

üst 899bbc2c
#!/bin/bash
find inary/actionsapi -type f -name "*.py" | while read line
do
echo "$line:"
cat $line | grep -v "__" | grep "^def " | sed "s/^def / - /g"
done
......@@ -69,18 +69,19 @@ def configure(parameters='',
if can_access_file(join_path(sourceDir, 'CMakeLists.txt')):
args = 'cmake -DCMAKE_INSTALL_PREFIX={0} \
-DCMAKE_INSTALL_LIBDIR={1} \
-DCMAKE_C_FLAGS="{7} {2}" \
-DCMAKE_CXX_FLAGS="{7} {3}" \
-DCMAKE_LD_FLAGS="{4}" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo {5} {6}'.format(installPrefix,
-DCMAKE_BUILD_TYPE=RelWithDebInfo {2} {3}'.format(installPrefix,
"/usr/lib32 " if get.buildTYPE() == "emul32" else "/usr/lib",
get.CFLAGS(),
get.CXXFLAGS(),
get.LDFLAGS(),
parameters,
sourceDir,
"-m32" if get.buildTYPE() == "emul32" else "-m64")
sourceDir)
if get.CFLAGS():
args+=' -DCMAKE_C_FLAGS="{0} {1}"'.format(get.CFLAGS(),
"-m32" if get.buildTYPE() == "emul32" else "-m64")
if get.CXXFLAGS():
args+=' -DCMAKE_CXX_FLAGS="{0} {1}"'.format(get.CXXFLAGS(),
"-m32" if get.buildTYPE() == "emul32" else "-m64")
if get.LDFLAGS():
args+=' -DCMAKE_LD_FLAGS="{0}"'.format(get.LDFLAGS())
if system(args):
raise ConfigureError(_('Configure failed.'))
else:
......
......@@ -30,16 +30,20 @@ def exportFlags():
# Build systems depend on these environment variables. That is why
# we export them instead of using as (instance) variables.
values = ctx.config.values
os.environ['HOST'] = values.build.host
if os.environ['INARY_BUILD_TYPE'] == "emul32" or os.environ['INARY_BUILD_TYPE'] == "clang32":
os.environ['CFLAGS'] = values.build.cflags.replace("-fPIC", "")
os.environ['CXXFLAGS'] = values.build.cxxflags.replace("-fPIC", "")
os.environ['PKG_CONFIG_PATH'] = "/usr/lib32/pkgconfig"
else:
os.environ['CFLAGS'] = values.build.cflags
os.environ['CXXFLAGS'] = values.build.cxxflags
os.environ['LDFLAGS'] = values.build.ldflags
if "INARY_USE_FLAGS" in os.environ and os.environ['INARY_USE_FLAGS']:
os.environ['LDFLAGS'] = values.build.ldflags
if os.environ['INARY_BUILD_TYPE'] == "emul32" or os.environ['INARY_BUILD_TYPE'] == "clang32":
os.environ['CFLAGS'] = values.build.cflags.replace("-fPIC", "")
os.environ['CXXFLAGS'] = values.build.cxxflags.replace("-fPIC", "")
else:
os.environ['CFLAGS'] = values.build.cflags
os.environ['CXXFLAGS'] = values.build.cxxflags
os.environ['HOST'] = values.build.host
os.environ['USER_LDFLAGS'] = values.build.ldflags
os.environ['JOBS'] = values.build.jobs
os.environ['MAKEFLAGS'] = values.build.makeflags
......
......@@ -189,6 +189,7 @@ class Source(metaclass=autoxml.autoxml):
t_Version = [autoxml.String, autoxml.optional]
t_Release = [autoxml.String, autoxml.optional]
t_SourceURI = [autoxml.String, autoxml.optional] # used in index
t_UseFlag = [autoxml.String, autoxml.optional]
def buildtimeDependencies(self):
return self.buildDependencies
......
......@@ -34,7 +34,6 @@ import inary.util as util
import inary.context as ctx
import inary.process as process
import inary.data.files as Files
import inary.actionsapi.variables
import inary.data.metadata as Metadata
import inary.data.specfile as Specfile
import inary.data.component as Component
......@@ -464,7 +463,9 @@ class Builder:
"SRC_VERSION": self.spec.getSourceVersion(),
"SRC_RELEASE": self.spec.getSourceRelease(),
"PATH": "/bin:/usr/bin:/sbin:/usr/sbin",
"PYTHONDONTWRITEBYTECODE": '1'}
"PYTHONDONTWRITEBYTECODE": '1',
"INARY_USE_FLAGS": "True"}
# FIXME: Get useflag status from pspec file (Source section)
os.environ.update(env)
# First check icecream, if not found use ccache
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment