Skip to content

Commit

Permalink
pep8 compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
rl-enjoyer committed Jun 29, 2021
1 parent 27a9e4e commit 234855f
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions recipes/gsl/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from conans import ConanFile, tools, AutoToolsBuildEnvironment


class GslConan(ConanFile):
name = "gsl"
version = "2.7"
Expand All @@ -21,21 +22,25 @@ def _source_subfolder(self):
return "source_subfolder"

def source(self):
tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder)
tools.replace_in_file(self._source_subfolder+"/configure", r"-install_name \$rpath/", "-install_name @rpath/")
tools.get(**self.conan_data["sources"][self.version], strip_root=True,
destination=self._source_subfolder)
tools.replace_in_file(self._source_subfolder + "/configure",
r"-install_name \$rpath/",
"-install_name @rpath/")

def build(self):
autotools = AutoToolsBuildEnvironment(self)

configure_args = []

if(self.options.shared):
if self.options.shared:
configure_args.append("--enable-shared")
if(not self.options.shared):
configure_args.append("--enable-static")

if not self.options.shared:
configure_args.append("--enable-static")

autotools.configure(args=configure_args, configure_dir=self._source_subfolder)
autotools.configure(args=configure_args,
configure_dir=self._source_subfolder)
autotools.make()
autotools.install()

Expand All @@ -49,4 +54,3 @@ def package(self):

def package_info(self):
self.cpp_info.libs = ["gsl", "gslcblas"]

0 comments on commit 234855f

Please sign in to comment.