Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add opencv3 check #114

Merged
merged 2 commits into from
Jan 8, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions superflore/generators/ebuild/ebuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,22 @@ def get_ebuild_text(self, distributor, license_text):
ret += " ros-cmake_src_prepare\n"
ret += "}\n"

special_pkgs = ['opencv3', 'stage']
# source configuration
if self.name in special_pkgs:
if self.name == 'opencv3':
ret += "\nsrc_configure() {\n"
if self.name == 'opencv3':
ret += " filter-flags '-march=*' '-mcpu=*' '-mtune=*'\n"
elif self.name == 'stage':
ret += " filter-flags '-std=*'\n"
ret += " filter-flags '-march=*' '-mcpu=*' '-mtune=*'\n"
ret += " if [[ $(gcc-major-version) -gt 4 ]]; then\n"
ret += " local mycmakeargs=(\n"
ret += " -DWITH_CUDA=OFF\n"
ret += " )\n"
ret += ' ewarn "Cuda does not support GCC > 4, so cuda'
ret += ' has been disabled."\n'
ret += " fi\n"
ret += " ros-cmake_src_configure\n"
ret += "}\n"
elif self.name == 'stage':
ret += "\nsrc_configure() {\n"
ret += " filter-flags '-std=*'\n"
ret += " ros-cmake_src_configure\n"
ret += "}\n"

Expand Down