예제 #1
0
 def system_requirements(self):
     if tools.os_info.is_linux:
         if tools.os_info.with_apt:
             installer = tools.SystemPackageTool()
             if self.settings.arch == "x86" and tools.detected_architecture() == "x86_64":
                 arch_suffix = ':i386'
                 installer.install("g++-multilib")
             else:
                 arch_suffix = ''
             installer.install("{}{}".format("libgtk2.0-dev", arch_suffix))
         elif tools.os_info.with_yum:
             installer = tools.SystemPackageTool()
             if self.settings.arch == "x86" and tools.detected_architecture() == "x86_64":
                 arch_suffix = '.i686'
             else:
                 arch_suffix = ''
             installer.install("{}{}".format("gtk2-devel", arch_suffix))
         elif tools.os_info.with_pacman:
             if self.settings.arch == "x86" and tools.detected_architecture() == "x86_64":
                 # Note: The packages with the "lib32-" prefix will only be
                 # available if the user has activate Arch's multilib
                 # repository, See
                 # https://wiki.archlinux.org/index.php/official_repositories#multilib
                 arch_suffix = 'lib32-'
             else:
                 arch_suffix = ''
             installer = tools.SystemPackageTool()
             installer.install("{}{}".format(arch_suffix, "gtk2"))
         else:
             self.output.warn("Could not determine package manager, skipping Linux system requirements installation.")
예제 #2
0
 def system_requirements(self):
     if tools.os_info.is_linux:
         if tools.os_info.with_apt:
             installer = tools.SystemPackageTool()
             installer.install('mesa-common-dev')
             installer.install('libgl1-mesa-dev')
             installer.install('libxcomposite-dev')
             installer.install('libxcursor-dev')
             installer.install('libxi-dev')
             installer.install('libnss3-dev')
             installer.install('libnspr4-dev')
             installer.install('libfreetype6-dev')
             installer.install('libfontconfig1-dev')
             installer.install('libxtst-dev')
             installer.install('libasound2-dev')
             installer.install('libdbus-1-dev')
             min_cmake_version = os.environ.get('CONAN_MINIMUM_CMAKE_VERSION')
             if min_cmake_version is not None:
                 subprocess.run(f"pip3 install cmake>={min_cmake_version}".split())
                 print('Path is: ', os.environ['PATH'])
                 result = subprocess.run("which cmake".split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
                 os.environ['CONAN_CMAKE_PROGRAM'] = result.stdout.decode('utf-8').rstrip()
                 print(f'Cmake at {os.environ["CONAN_CMAKE_PROGRAM"]}')
     if tools.os_info.is_macos: 
         installer = tools.SystemPackageTool()    
         installer.install('libomp')              
예제 #3
0
 def system_requirements(self):
     if self.settings.os == 'Linux' and tools.os_info.is_linux:
         if tools.os_info.with_apt:
             installer = tools.SystemPackageTool()
             arch_suffix = ''
             if self.settings.arch == 'x86':
                 arch_suffix = ':i386'
             elif self.settings.arch == 'x86_64':
                 arch_suffix = ':amd64'
             packages = []
             if self.options.gtk == 2:
                 packages.append('libgtk2.0-dev%s' % arch_suffix)
             elif self.options.gtk == 3:
                 packages.append('libgtk-3-dev%s' % arch_suffix)
             for package in packages:
                 installer.install(package)
         elif tools.os_info.with_yum:
             installer = tools.SystemPackageTool()
             arch_suffix = ''
             if self.settings.arch == 'x86':
                 arch_suffix = '.i686'
             elif self.settings.arch == 'x86_64':
                 arch_suffix = '.x86_64'
             packages = []
             if self.options.gtk == 2:
                 packages.append('gtk2-devel%s' % arch_suffix)
             elif self.options.gtk == 3:
                 packages.append('gtk3-devel%s' % arch_suffix)
             for package in packages:
                 installer.install(package)
예제 #4
0
    def system_requirements(self):
        # Install required OpenGL stuff on linux
        if tools.os_info.is_linux:
            if tools.os_info.with_apt:
                installer = tools.SystemPackageTool()

                packages = []
                if self.options.target_gl:
                    packages.append("libgl1-mesa-dev")
                if self.options.target_gles:
                    packages.append("libgles1-mesa-dev")

                arch_suffix = self.system_package_architecture()
                for package in packages:
                    installer.install("%s%s" % (package, arch_suffix))

            elif tools.os_info.with_yum:
                installer = tools.SystemPackageTool()

                arch_suffix = self.system_package_architecture()
                packages = []
                if self.options.target_gl:
                    packages.append("mesa-libGL-devel")
                if self.options.target_gles:
                    packages.append("mesa-libGLES-devel")

                for package in packages:
                    installer.install("%s%s" % (package, arch_suffix))
            else:
                self.output.warn("Could not determine package manager, skipping Linux system requirements installation.")
예제 #5
0
 def system_requirements(self):
     if self.settings.os == "Linux" and tools.os_info.is_linux:
         if tools.os_info.with_apt:
             installer = tools.SystemPackageTool()
             arch_suffix = ""
             if self.settings.arch == "x86":
                 arch_suffix = ":i386"
             elif self.settings.arch == "x86_64":
                 arch_suffix = ":amd64"
             packages = []
             if self.options.gtk == 2:
                 packages.append("libgtk2.0-dev%s" % arch_suffix)
             elif self.options.gtk == 3:
                 packages.append("libgtk-3-dev%s" % arch_suffix)
             for package in packages:
                 installer.install(package)
         elif tools.os_info.with_yum:
             installer = tools.SystemPackageTool()
             arch_suffix = ""
             if self.settings.arch == "x86":
                 arch_suffix = ".i686"
             elif self.settings.arch == "x86_64":
                 arch_suffix = ".x86_64"
             packages = []
             if self.options.gtk == 2:
                 packages.append("gtk2-devel%s" % arch_suffix)
             elif self.options.gtk == 3:
                 packages.append("gtk3-devel%s" % arch_suffix)
             for package in packages:
                 installer.install(package)
예제 #6
0
 def system_requirements(self):
     if tools.os_info.is_linux:
         if tools.os_info.with_apt:
             installer = tools.SystemPackageTool()
             installer.install('liblz4-dev')
     if tools.os_info.is_macos:
         installer = tools.SystemPackageTool()
         installer.install('lz4')
예제 #7
0
 def install_xvfb(self):
     if not shutil.which("Xvfb"):
         if tools.os_info.with_apt:
             installer = tools.SystemPackageTool()
             installer.install("xvfb")
         if tools.os_info.with_yum:
             installer = tools.SystemPackageTool()
             installer.install("xorg-x11-server-Xvfb")
예제 #8
0
 def system_requirements(self):
     if tools.os_info.is_linux:
         if tools.os_info.with_apt:
             installer = tools.SystemPackageTool()
             installer.install('liblz4-dev')
         # Centos like: -See prepare_build_linux.sh 
     if tools.os_info.is_macos:
         installer = tools.SystemPackageTool() 
         installer.install('libomp')
         installer.install('lz4')
예제 #9
0
 def system_requirements(self):
     if tools.os_info.is_linux:
         installer = tools.SystemPackageTool()
         if tools.os_info.linux_distro == "arch":
             installer.install("gcc-fortran")
         else:
             installer.install("gfortran")
     if tools.os_info.is_macos:
         installer = tools.SystemPackageTool()
         installer.install("gcc", update=True, force=True)
 def system_requirements(self):
     if tools.os_info.is_windows:
         if not tools.which("gnuplot"):
             if tools.which("choco"):
                 installer = tools.SystemPackageTool(
                     tool=tools.ChocolateyTool())
                 installer.install("gnuplot")
             else:
                 self.output.warn(
                     "Make sure to install gnuplot and that it is on PATH")
     else:
         installer = tools.SystemPackageTool()
         installer.install("gnuplot")
예제 #11
0
 def system_requirements(self):
     import pip
     if hasattr(pip, "main"):
         pip.main(["install", "mercurial"])
     else:
         from pip._internal import main as sipmain
         sipmain(['install', "mercurial"])
     if tools.os_info.is_windows:
         installer = tools.SystemPackageTool(tool=tools.ChocolateyTool())
         installer.install("winflexbison3")
     if tools.os_info.is_macos:
         installer = tools.SystemPackageTool(tool=tools.BrewTool())
         installer.install("bison")
         installer.install("flex")
예제 #12
0
 def system_requirements(self):
     if self.settings.os == 'Linux':
         if tools.os_info.with_apt:
             installer = tools.SystemPackageTool()
             if self.options.with_jack:
                 installer.install("libjack-dev")
         elif tools.os_info.with_yum:
             installer = tools.SystemPackageTool()
             if self.settings.arch == "x86" and tools.detected_architecture(
             ) == "x86_64":
                 installer.install("glibmm24.i686")
                 installer.install("glibc-devel.i686")
             if self.options.with_jack:
                 installer.install("jack-audio-connection-kit-devel")
예제 #13
0
    def system_requirements(self):
        if self.settings.os == "Linux" and tools.os_info.is_linux:
            if tools.os_info.with_apt:
                installer = tools.SystemPackageTool()
                arch_suffix = ''
                if self.settings.arch == "x86":
                    arch_suffix = ':i386'
                elif self.settings.arch == "x86_64":
                    arch_suffix = ':amd64'

                packages = ['pkg-config']
                if self.options.alsa:
                    packages.append('libasound2-dev%s' % arch_suffix)
                if self.options.pulse:
                    packages.append('libpulse-dev%s' % arch_suffix)
                if self.options.vaapi:
                    packages.append('libva-dev%s' % arch_suffix)
                if self.options.vdpau:
                    packages.append('libvdpau-dev%s' % arch_suffix)
                if self.options.xcb:
                    packages.extend([
                        'libxcb1-dev%s' % arch_suffix,
                        'libxcb-shm0-dev%s' % arch_suffix,
                        'libxcb-shape0-dev%s' % arch_suffix,
                        'libxcb-xfixes0-dev%s' % arch_suffix
                    ])
                for package in packages:
                    installer.install(package)
            elif tools.os_info.with_yum:
                installer = tools.SystemPackageTool()
                arch_suffix = ''
                if self.settings.arch == "x86":
                    arch_suffix = '.i686'
                elif self.settings.arch == "x86_64":
                    arch_suffix = '.x86_64'
                packages = ['pkgconfig']
                if self.options.alsa:
                    packages.append('alsa-lib-devel%s' % arch_suffix)
                if self.options.pulse:
                    packages.append('pulseaudio-libs-devel%s' % arch_suffix)
                if self.options.vaapi:
                    packages.append('libva-devel%s' % arch_suffix)
                if self.options.vdpau:
                    packages.append('libvdpau-devel%s' % arch_suffix)
                if self.options.xcb:
                    packages.append('libxcb-devel%s' % arch_suffix)
                for package in packages:
                    installer.install(package)
예제 #14
0
파일: conanfile.py 프로젝트: SSE4/trash
 def system_requirements(self):
     if self.settings.os == "Linux":
         if tools.os_info.linux_distro == "ubuntu" or tools.os_info.linux_distro == "debian":
             arch = ''
             if self.settings.arch == "x86" and tools.detected_architecture() == "x86_64":
                 arch = ':i386'
             packages = ['libx11-dev',
                         'libglib2.0-dev',
                         'libgdk-pixbuf2.0-dev',
                         'libpango1.0-dev',
                         'libatk1.0-dev',
                         'libcairo2-dev',
                         'libgtk2.0-dev libglib2.0-dev',
                         'libgtk2.0-dev',
                         'libtiff-dev']
             if self.options.secretstore:
                 packages.append('libsecret-1-dev')
             if self.options.gl:
                 packages.append('libgl1-mesa-dev')
             if self.options.webview:
                 packages.extend(['libsoup2.4-dev', 'libwebkitgtk-3.0-dev', 'libwebkitgtk-dev'])
             if self.options.media:
                 packages.extend(['libgstreamer0.10-dev', 'libgstreamer-plugins-base0.10-dev'])
             installer = tools.SystemPackageTool()
             for package in packages:
                 installer.install(' '.join(('%s%s' % (i, arch) for i in package.split())))
예제 #15
0
 def system_requirements(self):
     if self.settings.os == 'Linux' and tools.os_info.is_linux:
         if tools.os_info.with_apt:
             installer = tools.SystemPackageTool()
             if self.settings.arch == 'x86':
                 arch_suffix = ':i386'
             elif self.settings.arch == 'x86_64':
                 arch_suffix = ':amd64'
             packages = ['libx11-dev%s' % arch_suffix,
                         'libgtk2.0-dev%s' % arch_suffix]
             # TODO : GTK3
             # packages.append('libgtk-3-dev%s' % arch_suffix)
             if self.options.secretstore:
                 packages.append('libsecret-1-dev%s' % arch_suffix)
             if self.options.opengl:
                 packages.extend(['mesa-common-dev%s' % arch_suffix,
                                  'libgl1-mesa-dev%s' % arch_suffix])
             if self.options.webview:
                 packages.extend(['libsoup2.4-dev%s' % arch_suffix,
                                  'libwebkitgtk-dev%s' % arch_suffix])
             # TODO : GTK3
             #                    'libwebkitgtk-3.0-dev%s' % arch_suffix])
             #if self.options.mediactrl:
             #    packages.extend(['libgstreamer0.10-dev%s' % arch_suffix,
             #                     'libgstreamer-plugins-base0.10-dev%s' % arch_suffix])
             if self.options.cairo:
                 packages.append('libcairo2-dev%s' % arch_suffix)
             for package in packages:
                 installer.install(package)
예제 #16
0
    def build_requirements(self):
        if tools.os_info.is_windows and self.settings.compiler == "Visual Studio":
            self.build_requires("jom/1.1.3")
        if self.settings.os == 'Linux':
            if not tools.which('pkg-config'):
                self.build_requires('pkg-config_installer/0.29.2@bincrafters/stable')
        if self.options.qtwebengine:
            if not tools.which("ninja"):
                self.build_requires("ninja/1.10.0")
            # gperf, bison, flex, python >= 2.7.5 & < 3
            if self.settings.os != "Windows":
                if not tools.which("bison"):
                    self.build_requires("bison/3.5.3")
                if not tools.which("gperf"):
                    self.build_requires("gperf/3.1")
                if not tools.which("flex"):
                    self.build_requires("flex/2.6.4")

            def _check_python_version():
                # Check if a valid python2 is available in PATH or it will failflex
                # Start by checking if python2 can be found
                python_exe = tools.which("python2")
                if not python_exe:
                    # Fall back on regular python
                    python_exe = tools.which("python")

                if not python_exe:
                    msg = ("Python2 must be available in PATH "
                           "in order to build Qt WebEngine")
                    raise ConanInvalidConfiguration(msg)
                # In any case, check its actual version for compatibility
                from six import StringIO  # Python 2 and 3 compatible
                mybuf = StringIO()
                cmd_v = "{} --version".format(python_exe)
                self.run(cmd_v, output=mybuf)
                verstr = mybuf.getvalue().strip().split('Python ')[1]
                if verstr.endswith('+'):
                    verstr = verstr[:-1]
                version = tools.Version(verstr)
                # >= 2.7.5 & < 3
                v_min = "2.7.5"
                v_max = "3.0.0"
                if (version >= v_min) and (version < v_max):
                    msg = ("Found valid Python 2 required for QtWebengine:"
                           " version={}, path={}".format(mybuf.getvalue(), python_exe))
                    self.output.success(msg)
                else:
                    msg = ("Found Python 2 in path, but with invalid version {}"
                           " (QtWebEngine requires >= {} & < "
                           "{})".format(verstr, v_min, v_max))
                    raise ConanInvalidConfiguration(msg)

            try:
                _check_python_version()
            except ConanInvalidConfiguration as e:
                if tools.os_info.is_windows:
                    raise e
                self.output.info("Python 2 not detected in path. Trying to install it")
                tools.SystemPackageTool().install(["python2", "python"])
                _check_python_version()
예제 #17
0
 def system_requirements(self):
     if tools.os_info.is_linux and not tools.cross_building(self.settings):
         if tools.os_info.with_apt:
             installer = tools.SystemPackageTool()
             packages = ['autoconf', 'automake', 'libtool']
             for package in packages:
                 installer.install(package)
예제 #18
0
    def system_requirements(self):
        required_package = []
        if  self.settings.os == "Linux": 
        
            if tools.os_info.linux_distro in ["ubuntu", "debian"]:
                required_package.append( "libdw-dev" )
            elif tools.os_info.linux_distro in ["fedora", "centos"]:
                required_package.append(  "elfutils-libs")
            elif tools.os_info.linux_distro == "opensuse":
                required_package.append( "libdw-devel")
            elif tools.os_info.linux_distro == "arch":
                required_package.append(  "libelf" )

            
            if tools.os_info.linux_distro in ["ubuntu", "debian"]:
                required_package.append(  "binutils-dev")
            elif tools.os_info.linux_distro in ["fedora", "centos", "opensuse"]:
                required_package.append(  "binutils-devel")
            elif tools.os_info.linux_distro == "arch":
                required_package.append(  "binutils")
            elif tools.os_info.is_freebsd:
                required_package.append(  "libbfd")
        
        
        installer = tools.SystemPackageTool()
        installer.install(required_package)
예제 #19
0
    def system_requirements(self):
        if self.options.GUI:
            pack_names = []
            if tools.os_info.is_linux:
                if tools.os_info.linux_distro == "ubuntu" or tools.os_info.linux_distro == "debian":
                    pack_names = ["libxcb1", "libx11-6"]
                    if self.options.opengl == "desktop":
                        pack_names.append("libgl1-mesa-dev")
                else:
                    if not tools.os_info.linux_distro.startswith("opensuse"):
                        pack_names = ["libxcb"]
                    if tools.os_info.linux_distro not in ["arch", "manjaro"]:
                        if self.options.opengl == "desktop":
                            if tools.os_info.linux_distro.startswith(
                                    "opensuse"):
                                pack_names.append("Mesa-libGL-devel")
                            else:
                                pack_names.append("mesa-libGL-devel")

            if self.settings.arch == "x86":
                pack_names = [item + ":i386" for item in pack_names]
            elif self.settings.arch == "x86_64":
                pack_names = [item + ":amd64" for item in pack_names]

            if pack_names:
                installer = tools.SystemPackageTool()
                installer.install(" ".join(pack_names))  # Install the package
예제 #20
0
 def system_requirements(self):
     packages = []
     if tools.os_info.is_linux and self.settings.os == "Linux":
         if tools.os_info.with_yum:
             if tools.os_info.linux_distro == "fedora" and tools.os_info.os_version >= "32":
                 packages = ["libglvnd-devel"]
             else:
                 packages = ["mesa-libGL-devel"]
         elif tools.os_info.with_apt:
             ubuntu_20_or_later = tools.os_info.linux_distro == "ubuntu" and tools.os_info.os_version >= "20"
             debian_11_or_later = tools.os_info.linux_distro == "debian" and tools.os_info.os_version >= "11"
             pop_os_20_or_later = tools.os_info.linux_distro == "pop" and tools.os_info.os_version >= "20"
             if ubuntu_20_or_later or debian_11_or_later or pop_os_20_or_later:
                 packages = ["libgl-dev"]
             else:
                 packages = ["libgl1-mesa-dev"]
         elif tools.os_info.with_pacman:
             packages = ["libglvnd"]
         elif tools.os_info.with_zypper:
             packages = ["Mesa-libGL-devel"]
         else:
             self.output.warn("Don't know how to install OpenGL for your distro.")
     elif tools.os_info.is_freebsd and self.settings.os == "FreeBSD":
         packages = ["libglvnd"]
     if packages:
         package_tool = tools.SystemPackageTool(conanfile=self)
         for p in packages:
             package_tool.install(update=True, packages=p)
예제 #21
0
    def system_requirements(self):
        if self.options.GUI:
            pack_names = []
            if tools.os_info.is_linux:
                if tools.os_info.with_apt:
                    pack_names = ["libxcb1", "libx11-6"]
                    if self.options.opengl == "desktop":
                        pack_names.append("libgl1-mesa-dev")
                else:
                    if not tools.os_info.linux_distro.startswith("opensuse"):
                        pack_names = ["libxcb"]
                    if not tools.os_info.with_pacman:
                        if self.options.opengl == "desktop":
                            if tools.os_info.linux_distro.startswith(
                                    "opensuse"):
                                pack_names.append("Mesa-libGL-devel")
                            else:
                                pack_names.append("mesa-libGL-devel")

            if pack_names:
                installer = tools.SystemPackageTool()
                installer.install(" ".join([
                    item + self.system_package_architecture()
                    for item in pack_names
                ]))
예제 #22
0
    def requirements(self):
        if self.options.openssl == "yes":
            self.requires("OpenSSL/1.1.0g@conan/stable")
            self.options["OpenSSL"].no_zlib = True
            self.options["OpenSSL"].shared = True
        if self.options.openssl == "linked":
            self.requires("OpenSSL/1.1.0g@conan/stable")
            self.options["OpenSSL"].no_zlib = True
            self.options["OpenSSL"].shared = False

        if tools.os_info.is_linux:
            pack_names = [
                "libfontconfig1", "libxrender1", "libxext6", "libxfixes3",
                "libxi6", "libgl1-mesa-dri", "libxcb1", "libx11-xcb1",
                "libxcb-keysyms1", "libxcb-image0", "libxcb-shm0", "libx11-6",
                "libxcb-icccm4", "libxcb-sync1", "libxcb-xfixes0",
                "libxcb-shape0", "libxcb-render-util0", "libxcb-randr0",
                "libxcb-glx0"
            ]

            if self.settings.arch == "x86":
                pack_names = [item + ":i386" for item in pack_names]

            installer = tools.SystemPackageTool()
            installer.update()
            installer.install(" ".join(pack_names))
예제 #23
0
    def system_requirements(self):
        required_package = None
        if self.settings.os == "Linux":
            if self._has_stack_details("dw"):
                if tools.os_info.linux_distro in ["ubuntu", "debian"]:
                    required_package = "libdw-dev"
                elif tools.os_info.linux_distro in ["fedora", "centos"]:
                    required_package = "elfutils-libs"
                elif tools.os_info.linux_distro == "opensuse":
                    required_package = "libdw-devel"
                elif tools.os_info.linux_distro == "arch":
                    required_package = "libelf"

            if self._has_stack_details("bfd"):
                if tools.os_info.linux_distro in ["ubuntu", "debian"]:
                    required_package = "binutils-dev"
                elif tools.os_info.linux_distro in ["fedora", "centos", "opensuse"]:
                    required_package = "binutils-devel"
                elif tools.os_info.linux_distro == "arch":
                    required_package = "binutils"
                elif tools.os_info.is_freebsd:
                    required_package = "libbfd"
        
        if required_package != None:
            installer = tools.SystemPackageTool()
            if not installer.installed(required_package):
                raise ConanInvalidConfiguration("backward-cpp requires {}.".format(required_package))
예제 #24
0
    def build_requirements(self):
        if self.options.GUI:
            pack_names = []
            if tools.os_info.linux_distro == "ubuntu" or tools.os_info.linux_distro == "debian":
                pack_names = ["libxcb1-dev", "libx11-dev", "libc6-dev"]
                if self.options.opengl == "desktop":
                    pack_names.append("libgl1-mesa-dev")
            elif tools.os_info.is_linux and tools.os_info.linux_distro not in [
                    "arch", "manjaro"
            ]:
                pack_names = ["libxcb-devel", "libX11-devel", "glibc-devel"]
                if self.options.opengl == "desktop":
                    if (tools.os_info.linux_distro == "opensuse-leap"):
                        pack_names.append("Mesa-libGL-devel")
                    else:
                        pack_names.append("mesa-libGL-devel")

            if self.settings.arch == "x86":
                pack_names = [item + ":i386" for item in pack_names]

            if pack_names:
                installer = tools.SystemPackageTool()
                installer.install(" ".join(pack_names))  # Install the package

        if tools.os_info.is_windows and self.settings.compiler == "Visual Studio":
            self.build_requires("jom_installer/1.1.2@bincrafters/stable")
예제 #25
0
    def build_configure(self):

        installer = tools.SystemPackageTool()
        installer.install('libsystemd-dev')

        with tools.chdir(os.path.join(self.source_folder, self.source_dir)):
            self.run('./autogen.sh')
            env_build = AutoToolsBuildEnvironment(self)
            env_build.fpic = self.options.fPIC
            with tools.environment_append(env_build.vars):
                # fix rpath
                if self.settings.os == "Macos":
                    tools.replace_in_file("configure",
                                          r"-install_name \$rpath/",
                                          "-install_name ")
                configure_args = ['--disable-tests']
                if self.options.fPIC:
                    configure_args.extend(['--with-pic'])
                if self.options.shared:
                    configure_args.extend(
                        ['--enable-shared', '--disable-static'])
                else:
                    configure_args.extend(
                        ['--enable-static', '--disable-shared'])
                env_build.configure(args=configure_args)
                env_build.make()
                env_build.make(args=['install'])
예제 #26
0
 def build_requirements_from_conan_data(self, exclude=()):
     required_cmds, fallbacks = get_required_os_field(self.conan_data, 'required-commands')
     required_cmd_vers = self.conan_data['required-command-versions']
     for _i in exclude:
         if _i in required_cmds:
             required_cmds.pop(_i)
         if _i in fallbacks:
             required_cmds.pop(_i)
     if required_cmds:
         installer = tools.SystemPackageTool(
             conanfile=self,
             default_mode='disabled'  # export CONAN_SYSREQUIRES_SUDO='enabled' to allow actual installation
         )
         for cmd in required_cmds:
             if tools.which(cmd):
                 if cmd in required_cmd_vers:
                     self.output.info(required_cmd_vers[cmd])
                     if check_cmd_version(cmd, log_output=self.output, **required_cmd_vers[cmd]):
                         self.output.info('{} version matched'.format(cmd))
                         continue
                 else:
                     self.output.info('has {} (any version is ok).'.format(cmd))
                     continue
             sys_pkg = required_cmds[cmd]
             if sys_pkg:
                 self.output.warn('install {} for cmd ``{}'.format(sys_pkg, cmd))
                 installer.install(sys_pkg)
             if not sys_pkg or not installer.installed(sys_pkg):
                 if cmd in fallbacks:
                     self.output.warn('requires {} for cmd `{}`.'.format(fallbacks[cmd], cmd))
                     self.build_requires(fallbacks[cmd])
                 else:
                     self.output.error('cannot install/find {}'.format(cmd))
예제 #27
0
    def system_requirements(self):
        if self.options.GUI:
            pack_names = []
            if tools.os_info.is_linux:
                if tools.os_info.with_apt:
                    pack_names = ["libxcb1-dev", "libx11-dev", "libc6-dev"]
                    if self.options.opengl == "desktop":
                        pack_names.append("libgl1-mesa-dev")
                    elif self.options.opengl == "es2":
                        pack_names.append("libgles2-mesa-dev")
                else:
                    if not tools.os_info.linux_distro.startswith(
                        ("opensuse", "sles")):
                        pack_names = ["libxcb"]
                    if not tools.os_info.with_pacman:
                        pack_names += [
                            "libxcb-devel", "libX11-devel", "glibc-devel"
                        ]
                        if self.options.opengl == "desktop":
                            if tools.os_info.linux_distro.startswith(
                                ("opensuse", "sles")):
                                pack_names.append("Mesa-libGL-devel")
                            else:
                                pack_names.append("mesa-libGL-devel")

            if pack_names:
                installer = tools.SystemPackageTool()
                for item in pack_names:
                    installer.install(item +
                                      self._system_package_architecture())
예제 #28
0
    def system_requirements(self):
        if self.settings.os == "Linux" and tools.os_info.is_linux:
            if tools.os_info.with_apt:
                installer = tools.SystemPackageTool()
                if self.settings.arch == "x86":
                    arch_suffix = ':i386'
                elif self.settings.arch == "x86_64":
                    arch_suffix = ':amd64'

                packages = ['libpangocairo-1.0-0{}'.format(arch_suffix)]
                packages.append('libxcomposite1{}'.format(arch_suffix))
                packages.append('libxrandr2{}'.format(arch_suffix))
                packages.append('libxcursor1{}'.format(arch_suffix))
                packages.append('libatk1.0-0{}'.format(arch_suffix))
                packages.append('libcups2{}'.format(arch_suffix))
                packages.append('libnss3{}'.format(arch_suffix))
                packages.append('libgconf-2-4{}'.format(arch_suffix))
                packages.append('libxss1{}'.format(arch_suffix))
                packages.append('libasound2{}'.format(arch_suffix))
                packages.append('libxtst6{}'.format(arch_suffix))
                packages.append('libgtk2.0-dev{}'.format(arch_suffix))
                packages.append('libgdk-pixbuf2.0-dev{}'.format(arch_suffix))
                packages.append('freeglut3-dev{}'.format(arch_suffix))

                for package in packages:
                    installer.install(package)
예제 #29
0
 def system_requirements(self):
     if tools.os_info.is_linux and self.settings.os == "Linux":
         package_tool = tools.SystemPackageTool(conanfile=self, default_mode="verify")
         if tools.os_info.with_apt:
             packages = ["xorg-dev", "libx11-xcb-dev", "libxcb-render0-dev", "libxcb-render-util0-dev", "libxcb-xkb-dev",
                         "libxcb-icccm4-dev", "libxcb-image0-dev", "libxcb-keysyms1-dev", "libxcb-randr0-dev", "libxcb-shape0-dev",
                         "libxcb-sync-dev", "libxcb-xfixes0-dev", "libxcb-xinerama0-dev", "xkb-data"]
         elif tools.os_info.with_yum or tools.os_info.with_dnf:
             packages = ["libxcb-devel", "libfontenc-devel", "libXaw-devel", "libXcomposite-devel",
                         "libXcursor-devel", "libXdmcp-devel", "libXft-devel", "libXtst-devel", "libXinerama-devel",
                         "xorg-x11-xkb-utils-devel", "libXrandr-devel", "libXres-devel", "libXScrnSaver-devel", "libXvMC-devel",
                         "xorg-x11-xtrans-devel", "xcb-util-wm-devel", "xcb-util-image-devel", "xcb-util-keysyms-devel",
                         "xcb-util-renderutil-devel", "libXdamage-devel", "libXxf86vm-devel", "libXv-devel",
                         "xkeyboard-config-devel"]
         elif tools.os_info.with_pacman:
             packages = ["libxcb", "libfontenc", "libice", "libsm", "libxaw", "libxcomposite", "libxcursor",
                         "libxdamage", "libxdmcp", "libxft", "libxtst", "libxinerama", "libxkbfile", "libxrandr", "libxres",
                         "libxss", "libxvmc", "xtrans", "xcb-util-wm", "xcb-util-image","xcb-util-keysyms", "xcb-util-renderutil",
                         "libxxf86vm", "libxv", "xkeyboard-config"]
         elif tools.os_info.with_zypper:
             packages = ["xorg-x11-devel", "xcb-util-wm-devel", "xcb-util-image-devel", "xcb-util-keysyms-devel",
                         "xcb-util-renderutil-devel", "xkeyboard-config"]
         else:
             self.output.warn("Do not know how to install 'xorg' for {}.".format(tools.os_info.linux_distro))
             packages = []
         for p in packages:
             package_tool.install(update=True, packages=p)
예제 #30
0
    def system_requirements(self):
        if self.settings.os == "Macos":
            self.run("brew cask install xquartz")

        if self.settings.os == "Linux" and tools.os_info.is_linux:
            installer = tools.SystemPackageTool()
            if tools.os_info.with_apt:
                if self.settings.arch == "x86":
                    arch_suffix = ':i386'
                elif self.settings.arch == "x86_64":
                    arch_suffix = ':amd64'
                packages = ['libgl1-mesa-dev%s' % arch_suffix]
                packages.append('libglu1-mesa-dev%s' % arch_suffix)
                packages.append('libgl1-mesa-glx%s' % arch_suffix)
                packages.append('libx11-dev%s' % arch_suffix)
                packages.append('libxext-dev%s' % arch_suffix)
                packages.append('libxi-dev%s' % arch_suffix)

            if tools.os_info.with_yum:
                if self.settings.arch == "x86":
                    arch_suffix = '.i686'
                elif self.settings.arch == 'x86_64':
                    arch_suffix = '.x86_64'
                packages = ['mesa-libGL-devel%s' % arch_suffix]
                packages.append('mesa-libGLU-devel%s' % arch_suffix)
                packages.append('glx-utils%s' % arch_suffix)
                packages.append('libX11-devel%s' % arch_suffix)
                packages.append('libXext-devel%s' % arch_suffix)
                packages.append('libXi-devel%s' % arch_suffix)

            for package in packages:
                installer.install(package)