Пример #1
0
 def build(self):
     #args = ["--default-library={}".format("shared" if self.options.shared else "static")]
     meson = Meson(self,
                   build_type=self.settings.build_type,
                   backend="ninja")
     meson.configure(source_folder=self.name, build_folder="build")
     meson.build()
Пример #2
0
    def build(self):
        pcPaths = [
            self.deps_cpp_info["gstreamer"].rootpath,
            self.deps_cpp_info["gst-plugins-base"].rootpath
        ]

        meson = Meson(self)
        meson.configure(source_folder=self.name, build_folder="build", pkg_config_paths=pcPaths)
        meson.build()

        # ----------------------------------
        # Create gstreamer-plugins-good-1.0.pc:  The GES build requires it even though it serves no actual purpose.
        # ----------------------------------
        pcFileContents="""prefix=
exec_prefix=${prefix}
libdir=${prefix}/lib/x86_64-linux-gnu
includedir=${prefix}/include/gstreamer-1.0
pluginsdir=${prefix}/lib/x86_64-linux-gnu/gstreamer-1.0


Name: GStreamer Good Plugin libraries
Description: Streaming media framework, good plugins libraries
Requires: gstreamer-1.0  gstreamer-plugins-base-1.0
Version: """ + str(self.version) + "\n" + \
"""Libs: 
Cflags: 
"""
        with open(os.path.join(self.build_folder, "build", "pkgconfig", "gstreamer-plugins-good-1.0.pc"), 'w') as pcFile:
            pcFile.write(pcFileContents)
Пример #3
0
 def build(self):
     with tools.chdir(self.source_subfolder):
         with tools.environment_append({
                 'LD_LIBRARY_PATH':
                 '%s/lib' % (self.deps_cpp_info["libffi"].rootpath),
                 'PATH':
                 '%s/bin:%s' %
             (self.deps_cpp_info["gobject-introspection"].rootpath,
              os.getenv("PATH"))
         }):
             meson = Meson(self)
             meson.configure(
                 defs={
                     'disable_introspection': 'false',
                     'prefix': '%s/builddir/install' % (os.getcwd()),
                     'libdir': 'lib',
                 },
                 source_dir='%s' % (os.getcwd()),
                 build_dir='%s/builddir' % (os.getcwd()),
                 pkg_config_paths=[
                     '%s/lib/pkgconfig' %
                     (self.deps_cpp_info["libffi"].rootpath),
                     '%s/lib/pkgconfig' %
                     (self.deps_cpp_info["glib"].rootpath),
                     '%s/lib/pkgconfig' %
                     (self.deps_cpp_info["gobject-introspection"].rootpath),
                 ])
             meson.build(args=['-j4'])
             self.run('ninja -C {0} install'.format(meson.build_dir))
Пример #4
0
    def build(self):
        # ---------------------------
        # Apply patches
        # * 0001-disable-webrtc-example.patch
        #   * fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/867
        # ---------------------------
        repoFolder = os.path.join(self.build_folder, self.name)
        gst_conan.base.execute("git config user.email [email protected]",
                               workingFolder=repoFolder)
        gst_conan.base.execute("git config user.name  gst_conan",
                               workingFolder=repoFolder)

        patchFolder = os.path.join(self.build_folder, "patches")
        if os.path.isdir(patchFolder):
            for file in os.listdir(patchFolder):
                patchPath = os.path.join(patchFolder, file)
                if file.endswith(".patch") and os.path.isfile(patchPath):
                    self.output.info(f"Applying patch {file}")
                    gst_conan.base.execute(f"git am {patchPath}",
                                           workingFolder=repoFolder)

        # ---------------------------
        # Build as usual
        # ---------------------------
        pcPaths = [
            self.deps_cpp_info["gstreamer"].rootpath,
            self.deps_cpp_info["gst-plugins-base"].rootpath
        ]

        meson = Meson(self)
        meson.configure(source_folder=self.name,
                        build_folder="build",
                        pkg_config_paths=pcPaths)
        meson.build()
Пример #5
0
    def build(self):
        self.create_meson_subprojects()

        defs = {"b_coverage": "true"}

        meson = Meson(self)
        meson.configure(build_dir='meson_build', defs=defs)
        meson.build()
Пример #6
0
    def build(self):
        pcPaths = [self.deps_cpp_info["gstreamer"].rootpath]

        meson = Meson(self)
        meson.configure(source_folder=self.name,
                        build_folder="build",
                        pkg_config_paths=pcPaths)
        meson.build()
Пример #7
0
 def _build_with_meson(self):
     if self.options["qtbase"].shared and not tools.cross_building(self.settings):
         self.output.info("Building with Meson")
         tools.mkdir("meson_folder")
         with tools.environment_append(RunEnvironment(self).vars):
             meson = Meson(self)
             meson.configure(build_folder="meson_folder", defs={"cpp_std": "c++11"})
             meson.build()
Пример #8
0
	def build(self):
		tools.mkdir('build')
		meson = Meson(self)
		meson.configure(
			args=['--prefix='+self.package_folder],
			build_folder='build'
			)
		meson.build(targets=['install'])
Пример #9
0
 def build(self):
     meson = Meson(self)
     defs = dict()
     defs["gir"] = False
     meson.configure(build_folder="build",
                     source_folder=self._source_subfolder,
                     defs=defs)
     meson.build()
Пример #10
0
 def build(self):
     with tools.chdir(self.source_subfolder):
         meson = Meson(self)
         meson.configure(
             defs={'prefix':'%s/builddir/install'%(os.getcwd()), 'libdir':'lib'},
             source_dir = '%s'%(os.getcwd()),
             build_dir= '%s/builddir'%(os.getcwd()),
             )
         meson.build(args=['-j2'])
         self.run('ninja -C {0} install'.format(meson.build_dir))
Пример #11
0
    def build(self):
        meson = Meson(self)

        # conan is shadowing these meson parameters...
        args = []
        #        args = ['-Db_coverage=true']
        #        args = ['-Db_coverage=true', '-Db_sanitize=address']
        options = {'warning_level': 3, 'cpp_std': 'c++1z'}
        meson.configure(args=args, defs=options)

        meson.build()
Пример #12
0
    def build(self):
        pcPaths = [
            os.path.join(self.deps_cpp_info["gstreamer"].rootpath),
            os.path.join(self.deps_cpp_info["gst-plugins-base"].rootpath)
        ]

        meson = Meson(self)
        meson.configure(source_folder=self.name,
                        build_folder="build",
                        pkg_config_paths=pcPaths)
        meson.build()
Пример #13
0
    def build(self):
        definitions  = {}
        definitions["gallium-drivers"]="swrast"
        definitions["llvm"]="enabled"
        definitions["shared-llvm"]="disabled"
        definitions["llvm-rtti"]="enabled" if self.options["llvm-core"].rtti else "disabled"

        meson = Meson(self)
        meson.configure(source_folder="mesa-{}".format(self.version), defs=definitions, args=["--debug"])
        meson.build()
        meson.install()
Пример #14
0
    def build(self):
        tools.os.environ.update({
            'BOOST_INCLUDEDIR':
            self.deps_cpp_info['boost'].include_paths[0],
            'BOOST_LIBRARYDIR':
            self.deps_cpp_info['boost'].lib_paths[0]
        })

        meson = Meson(self)
        meson.configure(build_folder='build')
        meson.build()
Пример #15
0
    def build(self):
        args = ["--auto-features=disabled"]
        args.append("-Dvideoparsers=" +
                    ("enabled" if self.options.videoparsers else "disabled"))
        args.append("-Dgl=" + ("enabled" if self.options.gl else "disabled"))
        args.append("-Dpnm=" + ("enabled" if self.options.pnm else "disabled"))
        args.append("-Dwebrtc=" +
                    ("enabled" if self.options.webrtc else "disabled"))
        args.append("-Dsrtp=" +
                    ("enabled" if self.options.srtp else "disabled"))
        args.append("-Drtmp2=" +
                    ("enabled" if self.options.rtmp2 else "disabled"))
        args.append("-Ddtls=" +
                    ("enabled" if self.options.srtp else "disabled"))
        args.append("-Dmpegtsmux=" +
                    ("enabled" if self.options.mpegtsmux else "disabled"))
        args.append("-Dmpegtsdemux=" +
                    ("enabled" if self.options.mpegtsdemux else "disabled"))
        args.append("-Ddebugutils=" +
                    ("enabled" if self.options.debugutils else "disabled"))
        args.append("-Dopencv=" +
                    ("enabled" if self.options.opencv else "disabled"))
        args.append("-Dclosedcaption=" +
                    ("enabled" if self.options.closedcaption else "disabled"))
        args.append("-Dinter=" +
                    ("enabled" if self.options.inter else "disabled"))
        use_cuda = self.options.nvdec or self.options.nvenc or self.options.nvcodec
        if self.settings.arch == "x86_64":
            args.append("-Dnvdec=" +
                        ("enabled" if self.options.nvdec else "disabled"))
            args.append("-Dnvenc=" +
                        ("enabled" if self.options.nvenc else "disabled"))
            if self.version == "master":
                args.append("-Dnvcodec=" + (
                    "enabled" if self.options.nvcodec else "disabled"))

        meson = Meson(self)
        if use_cuda:
            with tools.environment_append({
                    "CUDA_PATH":
                    self.deps_user_info["cuda_dev_config"].cuda_root
            }):
                meson.configure(
                    source_folder="gst-plugins-bad-%s" % self.version,
                    args=args,
                    pkg_config_paths=os.environ["PKG_CONFIG_PATH"].split(":"))
        else:
            meson.configure(
                source_folder="gst-plugins-bad-%s" % self.version,
                args=args,
                pkg_config_paths=os.environ["PKG_CONFIG_PATH"].split(":"))
        meson.build()
        meson.install()
Пример #16
0
 def _build_with_meson(self):
     if self._meson_supported():
         self.output.info("Building with Meson")
         tools.mkdir("meson_folder")
         with tools.environment_append(RunEnvironment(self).vars):
             meson = Meson(self)
             try:
                 meson.configure(build_folder="meson_folder", defs={"cpp_std": "c++11"})
             except ConanException:
                 self.output.info(open("meson_folder/meson-logs/meson-log.txt", 'r').read())
                 raise
             meson.build()
Пример #17
0
 def _build_with_meson(self):
     if self.options["qt"].shared and not tools.cross_building(self.settings) and not tools.os_info.is_macos:
         self.output.info("Building with Meson")
         tools.mkdir("meson_folder")
         with tools.environment_append(RunEnvironment(self).vars):
             meson = Meson(self)
             try:
                 meson.configure(build_folder="meson_folder", defs={"cpp_std": "c++11"})
             except ConanException:
                 self.output.info(open("meson_folder/meson-logs/meson-log.txt", 'r').read())
                 raise
             meson.build()
Пример #18
0
 def build(self):
     with tools.chdir(self.source_subfolder):
         meson = Meson(self)
         _defs = { 'prefix':'%s/builddir/install'%(os.getcwd()), 'libdir':'lib',
                   'libmount':'false', 'dtrace':'false', 'selinux': 'false',
                   'internal_pcre' : 'true' if self.options.with_pcre else 'false'
         }
         meson.configure(
             defs=_defs,
             source_dir = '%s'%(os.getcwd()),
             build_dir= '%s/builddir'%(os.getcwd()),
             pkg_config_paths=['%s/lib/pkgconfig'%(self.deps_cpp_info["libffi"].rootpath),
                               '%s/lib/pkgconfig'%(self.deps_cpp_info["zlib"].rootpath)]
             )
         meson.build(args=['-j2'])
         self.run('ninja -C {0} install'.format(meson.build_dir))
Пример #19
0
 def build(self):
     with tools.environment_append({"LD_LIBRARY_PATH":'%s/lib'%(self.deps_cpp_info["libffi"].rootpath)}):
         with tools.chdir(self.source_subfolder):
             meson = Meson(self)
             _defs = { 'prefix':'%s/builddir/install'%(os.getcwd()), 'libdir':'lib',
                       'cairo':'false', 'doctool':'true', 'gtk-doc': 'false',
             }
             meson.configure(
                 defs=_defs,
                 source_dir = '%s'%(os.getcwd()),
                 build_dir= '%s/builddir'%(os.getcwd()),
                 pkg_config_paths=['%s/lib/pkgconfig'%(self.deps_cpp_info["libffi"].rootpath),
                                   '%s/lib/pkgconfig'%(self.deps_cpp_info["glib"].rootpath)]
                 )
             meson.build(args=['-j2'])
             self.run('ninja -C {0} install'.format(meson.build_dir))
    def build(self):
        with tools.chdir(self.source_subfolder):
            with tools.environment_append({
                'C_INCLUDE_PATH':'%s/include:%s/include:%s/include/libsoup-2.4'%(self.deps_cpp_info["bzip2"].rootpath,
                self.deps_cpp_info["libjpeg-turbo"].rootpath,self.deps_cpp_info["libsoup"].rootpath),
                'LIBRARY_PATH':'%s/lib:%s/lib:%s/lib'%(self.deps_cpp_info["bzip2"].rootpath,
                self.deps_cpp_info["libjpeg-turbo"].rootpath,self.deps_cpp_info["lame"].rootpath),
                'PATH':'%s/bin:%s/bin:%s'%(self.deps_cpp_info["orc"].rootpath,self.deps_cpp_info["gobject-introspection"].rootpath,os.getenv("PATH")),
                'LD_LIBRARY_PATH':'%s/lib:%s/lib'%(self.deps_cpp_info["libffi"].rootpath,self.deps_cpp_info["sqlite3"].rootpath)
                }):

                meson = Meson(self)
                _defs = {'prefix':'%s/builddir/install'%(os.getcwd()), 'libdir':'lib','use_orc':'yes'}
                meson.configure(
                    defs=_defs,
                    source_dir = '%s'%(os.getcwd()),
                    build_dir= '%s/builddir'%(os.getcwd()),
                    pkg_config_paths=['%s/lib/pkgconfig'%(self.deps_cpp_info["gstreamer-1.0"].rootpath),
                                      '%s/lib/pkgconfig'%(self.deps_cpp_info["gst-plugins-base-1.0"].rootpath),
                                      '%s/lib/pkgconfig'%(self.deps_cpp_info["libjpeg-turbo"].rootpath),
                                      '%s/lib/pkgconfig'%(self.deps_cpp_info["libpng"].rootpath),
                                      '%s/lib/pkgconfig'%(self.deps_cpp_info["speex"].rootpath),
                                      '%s/lib/pkgconfig'%(self.deps_cpp_info["gdk-pixbuf"].rootpath),
                                      '%s/lib/pkgconfig'%(self.deps_cpp_info["libsoup"].rootpath),
                                      '%s/lib/pkgconfig'%(self.deps_cpp_info["mpg123"].rootpath),
                                      '%s/lib/pkgconfig'%(self.deps_cpp_info["lame"].rootpath),
                                      '%s/lib/pkgconfig'%(self.deps_cpp_info["orc"].rootpath),
                                      '%s/lib/pkgconfig'%(self.deps_cpp_info["wavpack"].rootpath),
                                      '%s/lib/pkgconfig'%(self.deps_cpp_info["flac"].rootpath),
                                      '%s/lib/pkgconfig'%(self.deps_cpp_info["taglib"].rootpath),
                                      '%s/lib/pkgconfig'%(self.deps_cpp_info["bzip2"].rootpath),
                                      '%s/lib/pkgconfig'%(self.deps_cpp_info["zlib"].rootpath),#required by gobject
                                      '%s/lib/pkgconfig'%(self.deps_cpp_info["libvpx"].rootpath),
                                      '%s/lib/pkgconfig'%(self.deps_cpp_info["libdv"].rootpath),
                                      '%s/lib/pkgconfig'%(self.deps_cpp_info["cairo"].rootpath),
                                      '%s/lib/pkgconfig'%(self.deps_cpp_info["libffi"].rootpath),
                                      '%s/lib/pkgconfig'%(self.deps_cpp_info["gobject-introspection"].rootpath),
                                      '%s/lib/pkgconfig'%(self.deps_cpp_info["glib"].rootpath),
                                      '%s/lib/pkgconfig'%(self.deps_cpp_info["libxml2"].rootpath),
                                      '%s/lib/pkgconfig'%(self.deps_cpp_info["glib-networking"].rootpath),
                                      '%s/lib/pkgconfig'%(self.deps_cpp_info["sqlite3"].rootpath),
                                      ]
                                )
                meson.build(args=['-j2'])
                self.run('ninja -C {0} install'.format(meson.build_dir))
Пример #21
0
    def build(self):
        with tools.chdir(self.source_subfolder):
            with tools.environment_append({
                    'LD_LIBRARY_PATH':
                    "%s/lib" % (self.deps_cpp_info["libffi"].rootpath)
            }):

                meson = Meson(self)
                _defs = {
                    'prefix':
                    '%s/builddir/install' % (os.getcwd()),
                    'libdir':
                    'lib',
                    'libproxy_support':
                    'false',
                    'gnome_proxy_support':
                    'false',
                    'pkcs11_support':
                    'false',
                    'installed_tests':
                    'false',
                    'static_modules':
                    'true' if not self.options.shared else 'false'
                }
                meson.configure(defs=_defs,
                                source_dir='%s' % (os.getcwd()),
                                build_dir='%s/builddir' % (os.getcwd()),
                                pkg_config_paths=[
                                    '%s/lib/pkgconfig' %
                                    (self.deps_cpp_info["glib"].rootpath),
                                    '%s/lib/pkgconfig' %
                                    (self.deps_cpp_info["gnutls"].rootpath),
                                    '%s/lib/pkgconfig' %
                                    (self.deps_cpp_info["libffi"].rootpath),
                                    '%s/lib/pkgconfig' %
                                    (self.deps_cpp_info["nettle"].rootpath),
                                    '%s/lib/pkgconfig' %
                                    (self.deps_cpp_info["libtasn1"].rootpath),
                                    '%s/lib/pkgconfig' %
                                    (self.deps_cpp_info["gmp"].rootpath),
                                ])
                meson.build(args=['-j2'])
                self.run('ninja -C {0} install'.format(meson.build_dir))
Пример #22
0
 def build(self):
     with tools.chdir(self.source_subfolder):
         meson = Meson(self)
         meson.configure(
             defs={
                 'prefix': '%s/builddir/install' % (os.getcwd()),
                 'libdir': 'lib',
             },
             source_dir='%s' % (os.getcwd()),
             build_dir='%s/builddir' % (os.getcwd()),
             pkg_config_paths=[
                 '%s/lib/pkgconfig' %
                 (self.deps_cpp_info["gstreamer-1.0"].rootpath),
                 '%s/lib/pkgconfig' %
                 (self.deps_cpp_info["gst-plugins-base-1.0"].rootpath),
                 '%s/lib/pkgconfig' %
                 (self.deps_cpp_info["bzip2"].rootpath),
                 '%s/lib/pkgconfig' % (self.deps_cpp_info["zlib"].rootpath),
                 '%s/lib/pkgconfig' % (self.deps_cpp_info["orc"].rootpath),
             ])
         meson.build(args=['-j4'])
         self.run('ninja -C {0} install'.format(meson.build_dir))
Пример #23
0
 def build(self):
     with tools.chdir(self.source_subfolder):
         with tools.environment_append({
                 'LIBRARY_PATH':
                 '%s/lib' % (self.deps_cpp_info["a52dec"].rootpath),
                 'C_INCLUDE_PATH':
                 '%s/include' % (self.deps_cpp_info["a52dec"].rootpath),
         }):
             meson = Meson(self)
             meson.configure(
                 defs={
                     'prefix': '%s/builddir/install' % (os.getcwd()),
                     'libdir': 'lib',
                 },
                 source_dir='%s' % (os.getcwd()),
                 build_dir='%s/builddir' % (os.getcwd()),
                 pkg_config_paths=[
                     '%s/lib/pkgconfig' %
                     (self.deps_cpp_info["gstreamer-1.0"].rootpath),
                     '%s/lib/pkgconfig' %
                     (self.deps_cpp_info["gst-plugins-base-1.0"].rootpath),
                     '%s/lib/pkgconfig' %
                     (self.deps_cpp_info["a52dec"].rootpath),
                     '%s/lib/pkgconfig' %
                     (self.deps_cpp_info["opencore-amr"].rootpath),
                     '%s/lib/pkgconfig' %
                     (self.deps_cpp_info["libdvdread"].rootpath),
                     '%s/lib/pkgconfig' %
                     (self.deps_cpp_info["libmpeg2"].rootpath),
                     '%s/lib/pkgconfig' %
                     (self.deps_cpp_info["x264"].rootpath),
                     '%s/lib/pkgconfig' %
                     (self.deps_cpp_info["orc"].rootpath),
                 ])
             meson.build(args=['-j4'])
             self.run('ninja -C {0} install'.format(meson.build_dir))
Пример #24
0
 def build(self):
     meson = Meson(self)
     meson.configure()
     meson.build()
Пример #25
0
 def build(self):
     meson = Meson(self)
     meson.configure(source_folder=self.name, build_folder="build")
     meson.build()
Пример #26
0
 def build(self):
     meson = Meson(self)
     meson.configure(source_folder=os.path.join(self.source_folder, self.name), build_folder=self.build_folder)
     meson.build()
Пример #27
0
 def build(self):
     # https://docs.conan.io/en/latest/reference/build_helpers/meson.html#meson-build-reference
     meson = Meson(self)
     meson.configure(build_folder='.')
     meson.build()
Пример #28
0
    def build(self):
        # https://docs.conan.io/en/latest/reference/build_helpers/meson.html
        addtional_paths = []
        if self.settings.os == "Windows":
            qt_path_bin = self._get_qt_bin_paths()
            self.output.info("qt_path_bin:%s" % (qt_path_bin))
            addtional_paths += qt_path_bin
        elif self.options.qt_install:
            qt_install = str(self.options.qt_install)
            self.output.info("qt_install:%s" % (qt_install))
            addtional_paths += [os.path.join(qt_install, 'bin')]

        boost_path = self.deps_cpp_info["boost"].rootpath
        self.output.info("boost_path:%s" % (boost_path))
        boost_include_path = self.deps_cpp_info["boost"].include_paths
        self.output.info("boost_include_path:%s" % (boost_include_path))
        boost_library_path = self.deps_cpp_info["boost"].lib_paths
        self.output.info("boost_library_path:%s" % (boost_library_path))

        with_servers = False
        with_tests = True
        if self.settings.os == "Windows":
            with_tests = False
        if self.settings.os == "Linux":
            with_servers = True
        with_ui = self.options.enable_ui == True
        if self._is_ios():
            with_servers = False
            with_tests = False
            with_ui = False

        # https://mesonbuild.com/Builtin-options.html#base-options
        meson_options = {
            'cpp_std': 'c++17',
            'b_ndebug': 'if-release',
            'with_servers': with_servers,
            'with_tests': with_tests,
            'with_ui': with_ui
        }
        if self.settings.os == "Linux":
            meson_options['warning_level'] = '3'
        if self.options.treat_warnings_as_errors:
            meson_options['werror'] = 'true'
        build_type = self._get_build_type()
        if build_type == 'Debug' and self.settings.os == 'Linux':
            meson_options['b_lto'] = 'false'
        if 'sanatize' in self.options and self.options.sanatize:
            meson_options['b_sanitize'] = 'address,undefined'
        if self._is_ios(
        ) and self.settings.arch != "x86_64":  # no bitcode for simulator
            meson_options['b_bitcode'] = 'true'
        meson_options['b_pch'] = 'false'
        # meson_options['b_vscrt'] = 'mtd'

        meson = Meson(self)
        with tools.environment_append({
                "PATH": addtional_paths,
                "BOOST_ROOT": boost_path,
                "BOOST_INCLUDEDIR": boost_include_path,
                "BOOST_LIBRARYDIR": boost_library_path
        }):
            pkg_config_paths = [self.install_folder]
            if self.options.qt_install:
                pkg_config_paths += [
                    os.path.join(str(self.options.qt_install), 'lib/pkgconfig')
                ]
            meson_args = ['--fatal-meson-warnings']
            if self.options.meson_cross_file:
                cross_file = str(self.options.meson_cross_file)
                if not os.path.isabs(cross_file):
                    cross_file = os.path.abspath(
                        os.path.join(self.source_folder, cross_file))
                cross_file_copy = os.path.join(self.install_folder,
                                               'meson_cross.ini')
                shutil.copyfile(cross_file, cross_file_copy)
                tools.replace_in_file(cross_file_copy,
                                      '__SYSROOT__',
                                      os.environ.get("SYSROOT", ""),
                                      strict=False)
                tools.replace_in_file(cross_file_copy,
                                      '__CC__',
                                      os.environ.get("CC", ""),
                                      strict=False)
                tools.replace_in_file(cross_file_copy,
                                      '__CXX__',
                                      os.environ.get("CXX", ""),
                                      strict=False)
                tools.replace_in_file(cross_file_copy,
                                      '__AR__',
                                      os.environ.get("AR", ""),
                                      strict=False)
                tools.replace_in_file(cross_file_copy,
                                      '__STRIP__',
                                      os.environ.get("STRIP", ""),
                                      strict=False)
                self.output.info("cross_file %s" % cross_file_copy)
                meson_args += ['--cross-file', cross_file_copy]

                # this is a very dirty hack. for pkgconf. https://github.com/mesonbuild/meson/issues/8448
                self.run('ln -fs /home $SYSROOT || true')
                self.run('ln -fs /root $SYSROOT || true')

            # meson_args += ['--cross-file', os.path.join(self.install_folder, 'conan_meson_cross.ini')]

            self.output.info("pkg_config_paths: %s" % pkg_config_paths)
            meson.configure(build_folder="meson",
                            defs=meson_options,
                            args=meson_args,
                            pkg_config_paths=pkg_config_paths)
            build_args = []
            ninja_jobs = os.getenv('FUBBLE_BUILD_NINJA_JOBS')
            if ninja_jobs:
                build_args += ['-j %s' % (ninja_jobs)]
            # build_args += ['-k0']
            # build_args += ['-v]
            meson.build(args=build_args)
Пример #29
0
 def build(self):
     meson = Meson(self)
     meson.configure(cache_build_folder="build")
     meson.build()
Пример #30
0
 def build(self):
     meson = Meson(self)
     meson.configure()
     meson.build()
Пример #31
0
class SshfsConan(ConanFile):
    name = 'sshfs'
    version = '3.7.0'
    license = 'GPLv2'
    author = '*****@*****.**'
    url = 'https://github.com/bobrofon/sshfs-conan'
    description = 'A network filesystem client to connect to SSH servers'
    requires = ('glib/2.64.0@bobrofon/stable', 'fuse3/3.9.1@bobrofon/stable')
    topics = ('ssh', 'fuse', 'fs')
    settings = ('os', 'compiler', 'build_type', 'arch')
    options = {'shared': [True, False]}
    default_options = {'shared': False, 'glib:with_elf': False}
    generators = 'pkg_config'
    build_requires = ('meson/0.54.0',
                      'pkg-config_installer/0.29.2@bincrafters/stable')

    patches = 'patches/*.patch'
    exports = 'tools/*.py', patches
    src_repo_folder = 'sshfs'

    cross_file_name = 'cross_file.txt'

    meson = None

    def configure(self):
        if self.options.shared == False:
            self.options['glib'].shared = False
            self.options['fuse3'].shared = False

    def source(self):
        git_tag = '{}-{}'.format(self.name, self.version)

        git = tools.Git(folder=self.src_repo_folder)
        git.clone('https://github.com/libfuse/sshfs.git', git_tag)

    @classmethod
    def apply_patches(cls):
        for patch in sorted(glob.glob(cls.patches)):
            print('Apply patch {}'.format(patch))
            tools.patch(base_path=cls.src_repo_folder, patch_file=patch)

    def build(self):
        self.apply_patches()
        tools.replace_in_file('glib.pc', ' -lresolv ', ' ')
        tools.replace_in_file('glib.pc', ' -lgio-2.0 ', ' ')
        tools.replace_in_file('glib.pc', ' -lgmodule-2.0 ', ' ')
        tools.replace_in_file('glib.pc', ' -lgobject-2.0 ', ' ')

        defs = meson_tools.common_flags(self.settings)

        if not self.options.shared:
            append_value(defs, 'c_link_args', '-static')

        args = []

        if tools.cross_building(self.settings):
            meson_tools.write_cross_file(self.cross_file_name, self)
            args += ['--cross-file', self.cross_file_name]

        # there is no usage of native compiler but we had to trick
        # meson's sanity check somehow
        meson_env = (meson_tools.with_fake_compiler()
                     if tools.cross_building(self.settings) else tools.no_op())
        self.meson = Meson(self)
        with meson_env:
            self.meson.configure(source_folder=self.src_repo_folder,
                                 build_folder='build',
                                 defs=defs,
                                 args=args)
        self.meson.build()

    def package(self):
        self.meson.install()
Пример #32
0
 def build(self):
     meson = Meson(self)
     meson.configure(cache_build_folder="build")
     meson.build()