def unpack( self ):
        if self.buildTarget == "svnHEAD":
            if utils.verbose() >= 1:
                print "libassuan unpack called"
            # do the svn fetch/update
            repo = "svn://cvs.gnupg.org/libassuan/trunk"
            self.svnFetch( repo )

            utils.cleanDirectory( self.workdir )

            # now copy the tree below destdir/trunk to workdir
            srcdir = os.path.join( self.svndir, "trunk" )
            destdir = os.path.join( self.workdir, "libassuan" )
            utils.copySrcDirToDestDir( srcdir, destdir )

            os.chdir( self.workdir )
            self.system( "cd %s && patch -p0 < %s" % ( self.workdir, os.path.join( self.packagedir, "libassuan.diff" ) ) )
            self.system( "cd %s && patch -p0 < %s" % ( self.workdir, os.path.join( self.packagedir, "libassuan-cmake.diff" ) ) )

            return True
        else:
            base.baseclass.unpack( self ) or utils.die( "unpack failed" )
            os.chdir( self.workdir )
            shutil.move("libassuan-1.0.5", "libassuan")
            self.system( "cd %s && patch -p0 < %s" % ( self.workdir, os.path.join( self.packagedir, "libassuan.diff" ) ) )
            self.system( "cd %s && patch -p0 < %s" % ( self.workdir, os.path.join( self.packagedir, "libassuan-cmake.diff" ) ) )
            self.system( "cd %s && patch -p0 < %s" % ( self.workdir, os.path.join( self.packagedir, "libassuan-unistd.diff" ) ) )
            return True
Beispiel #2
0
    def install(self):
        src = self.sourceDir()
        dst = self.imageDir()

        if not os.path.isdir(dst):
            os.mkdir(dst)
        if not os.path.isdir(os.path.join(dst, "bin")):
            os.mkdir(os.path.join(dst, "bin"))
        if not os.path.isdir(os.path.join(dst, "lib")):
            os.mkdir(os.path.join(dst, "lib"))
        if not os.path.isdir(os.path.join(dst, "include")):
            os.mkdir(os.path.join(dst, "include"))

        if self.staticBuild:
            outdir = "out32"
        else:
            outdir = "out32dll"

        if not self.staticBuild:
            shutil.copy(os.path.join(src, outdir, "libeay32.dll"), os.path.join(dst, "bin"))
            shutil.copy(os.path.join(src, outdir, "ssleay32.dll"), os.path.join(dst, "bin"))
        shutil.copy(os.path.join(src, outdir, "libeay32.lib"), os.path.join(dst, "lib"))
        shutil.copy(os.path.join(src, outdir, "ssleay32.lib"), os.path.join(dst, "lib"))
        utils.copySrcDirToDestDir(os.path.join(src, "include"), os.path.join(dst, "include"))

        return True
Beispiel #3
0
    def install( self ):
        targets = 'install_qmake install_mkspecs'
        for target in ['winmain', 'uic', 'moc', 'rcc', 'corelib', 'gui', 'xml', 'network']:
            targets += ' sub-%s-install_subtargets' % target

        if not QMakePackageBase.install(self, targets):
            return False

        # create qt.conf
        utils.copyFile( os.path.join( self.packageDir(), "qt.conf" ), os.path.join( self.installDir(), "bin", "qt.conf" ) )

        # at least in qt 4.5.2 the default mkspecs is not installed which let qmake fail with "QMAKESPEC has not been set, so configuration cannot be deduced."
        default_mkspec = os.path.join(self.installDir(), "mkspecs", "default")
        if not os.path.exists(default_mkspec):
            utils.copySrcDirToDestDir( os.path.join(self.buildDir(), "mkspecs", "default"), default_mkspec )

        # install msvc debug files if available
        if self.buildType() == "Debug" and (self.compiler() == "msvc2005" or self.compiler() == "msvc2008"):
            srcdir = os.path.join( self.buildDir(), "lib" )
            destdir = os.path.join( self.installDir(), "lib" )

            filelist = os.listdir( srcdir )

            for file in filelist:
                if file.endswith( ".pdb" ):
                    utils.copyFile( os.path.join( srcdir, file ), os.path.join( destdir, file ) )

        return True
Beispiel #4
0
 def unpack( self ):
     if not QMakePackageBase.unpack(self):
         return False
     utils.applyPatch( self.sourceDir(), os.path.join(self.packageDir(),"qconf.patch"), 1)
     default_mkspec = os.path.join( self.installDir(), "mkspecs" )
     if not os.path.exists( default_mkspec ):
         utils.copySrcDirToDestDir( os.path.join( self.sourceDir(), "mkspecs" ), default_mkspec )
     return True
Beispiel #5
0
 def install( self ):
     """installing binary tarballs"""
     if utils.verbose() > 1:
         print "base install called"
     srcdir = os.path.join( self.workdir, self.instsrcdir )
     destdir = os.path.join( self.imagedir, self.instdestdir )
     utils.copySrcDirToDestDir( srcdir, destdir )
     return True
    def install( self ):
        if self.isTargetBuild():
            # Configuring Qt for WinCE ignores the -prefix option,
            # so we have to do the job manually...

            # delete this because it is not working for windows
            utils.deleteFile( os.path.join( self.buildDir(), "plugin", "bearer", "qnmbearerd4.dll" ))
            utils.deleteFile( os.path.join( self.buildDir(), "plugin", "bearer", "qnmbearer4.dll" ))
            # syncqt expects qconfig.h to be in the install dir and fails if not
            utils.createDir( os.path.join( self.installDir(), "src", "corelib", "global") )
            utils.copyFile( os.path.join( self.buildDir(), "src", "corelib", "global", "qconfig.h" ), os.path.join( self.installDir(), "src", "corelib" , "global", "qconfig.h" ) )
            # headers need to be copied using syncqt because of the relative paths
            utils.prependPath(self.sourceDir(), "bin")
            command = os.path.join(self.sourceDir(), "bin", "syncqt.bat")
            command += " -base-dir \"" + self.sourceDir() + "\""
            command += " -outdir \"" + self.installDir() + "\""
            command += " -copy"
            command += " -quiet"
            utils.system( command )
            utils.copySrcDirToDestDir( os.path.join( self.buildDir(), "bin" ) , os.path.join( self.installDir(), "bin" ) )
            utils.copySrcDirToDestDir( os.path.join( self.buildDir(), "lib" ) , os.path.join( self.installDir(), "lib" ) )
            # the dlls must be copied to the bin dir too
            for file in os.listdir( os.path.join( self.installDir(), "lib" ) ):
                if file.endswith( ".dll" ):
                    utils.copyFile( os.path.join( self.installDir(), "lib" , file ), os.path.join( self.installDir(), "bin" , file ) )
            utils.copySrcDirToDestDir( os.path.join( self.buildDir(), "mkspecs" ) , os.path.join( self.installDir(), "mkspecs" ) )
            utils.copySrcDirToDestDir( os.path.join( self.buildDir(), "plugins" ) , os.path.join( self.installDir(), "plugins" ) )
            # create qt.conf
            utils.copyFile( os.path.join( self.packageDir(), "qt.conf" ), os.path.join( self.installDir(), "bin", "qt.conf" ) )
            return True

        if not QMakeBuildSystem.install(self):
            return False

        # Workaround QTBUG-12034
        utils.copySrcDirToDestDir( os.path.join( self.buildDir(), "plugins", "imageformats" ) ,
                                    os.path.join( self.installDir(), "bin", "imageformats" ) )

        # create qt.conf
        utils.copyFile( os.path.join( self.packageDir(), "qt.conf" ), os.path.join( self.installDir(), "bin", "qt.conf" ) )

        # install msvc debug files if available
        if self.buildType() == "Debug" and (self.compiler() == "msvc2005" or self.compiler() == "msvc2008" or self.compiler() == "msvc2010"):
            srcdir = os.path.join( self.buildDir(), "lib" )
            destdir = os.path.join( self.installDir(), "lib" )

            filelist = os.listdir( srcdir )

            for file in filelist:
                if file.endswith( ".pdb" ):
                    utils.copyFile( os.path.join( srcdir, file ), os.path.join( destdir, file ) )

        return True
    def unpack( self ):
        utils.cleanDirectory( self.workdir )

        if not os.path.exists( os.path.join( self.workdir, "3rdparty", "include", "dbus" ) ):
            os.makedirs( os.path.join( self.workdir, "3rdparty", "include", "dbus" ) )
        utils.copySrcDirToDestDir( os.path.join( self.rootdir, "include", "dbus" ), os.path.join( self.workdir, "3rdparty", "include", "dbus" ) )
        if not os.path.exists( os.path.join( self.workdir, "3rdparty", "include", "openssl" ) ):
            os.makedirs( os.path.join( self.workdir, "3rdparty", "include", "openssl" ) )
        utils.copySrcDirToDestDir( os.path.join( self.rootdir, "include", "openssl" ), os.path.join( self.workdir, "3rdparty", "include", "openssl" ) )

        if not os.path.exists( os.path.join( self.workdir, "3rdparty", "lib" ) ):
            os.makedirs( os.path.join( self.workdir, "3rdparty", "lib" ) )
        re1 = re.compile(".*dbus-1.*")
        re2 = re.compile(".*eay.*")
        for filename in os.listdir( os.path.join( self.rootdir, "lib" ) ):
            if re1.match( filename ) or re2.match( filename ):
                src = os.path.join( self.rootdir, "lib", filename )
                dst = os.path.join( self.workdir, "3rdparty", "lib", filename )
                shutil.copyfile( src, dst )

        # unpack our two external dependencies
#        thirdparty_dir = os.path.join( self.workdir, "3rdparty" )
#        files = [ os.path.basename( self.openssl ) ]
#ENTERPRISE4: we don't use the binary dbus packages
#        files.append( os.path.basename( self.dbuslib ) )
#        if not utils.unpackFiles( self.downloaddir, files, thirdparty_dir ):
#            return False

        # and now qt
        if self.buildTarget == "4.4":
          self.kdeSvnUnpack() or utils.die( "kdeSvnUnpack failed" )
        else:
          self.kdeSvnUnpack() or utils.die( "kdeSvnUnpack failed" )
          # unpack all subdirs except 'include'
          svnpath = os.path.join( self.kdesvndir, self.kdeSvnPath() )
          for subdir in "bin config.tests demos doc examples lib mkspecs patches qmake src tools translations".split():
            self.kdeSvnUnpack( self.kdeSvnPath(), subdir ) or utils.die( "kdeSvnUnpack failed" )

        svnpath = os.path.join( self.kdesvndir, self.kdeSvnPath() )

        if self.buildTarget == '4.4.3-3':
          # use our configure.exe until tt has the patches upstream
          src = os.path.join( self.packagedir, "configure.exe" )
          dst = os.path.join( svnpath, "configure.exe" )
          shutil.copyfile( src, dst )

        # apply patches
        os.chdir(svnpath)
        cmd = "python apply_patches.py"
        self.system( cmd )

        return True
Beispiel #8
0
    def install(self):
        srcdir = os.path.join(self.workdir, os.getenv("KDECOMPILER") + "-" + self.buildType, "wincursors")
        destdir = os.path.join(self.cmakeInstallPrefix, "share", "icons")
        utils.copySrcDirToDestDir(srcdir, destdir)

        srcreg = os.path.join(self.packagedir, "cursor.reg")
        dstreg = os.path.join(self.workdir, "cursor.reg")
        shutil.copy(srcreg, dstreg)

        utils.sedFile(
            self.workdir, "cursor.reg", "s/CHANGEME/%s/g" % destdir.replace("\\", "\\\\\\\\").replace("/", "\\\\\\\\")
        )
        utils.system("regedit /S %s" % os.path.join(self.workdir, "cursor.reg"))
        return True
    def unpack( self ):
#        print "gpgme-qt unpack called"
        # do the svn fetch/update
        repo = "svn://cvs.gnupg.org/gpgme/trunk/gpgme"

        utils.cleanDirectory( self.workdir )

        self.svnFetch( repo )
        self.kdeSvnUnpack()

        srcdir = os.path.join( self.svndir )
        destdir = os.path.join( self.workdir, "kdepimlibs", "gpgme-qt" )
        utils.copySrcDirToDestDir( srcdir, destdir )

        os.chdir( self.workdir )
        utils.system( "cd %s && patch -p0 < %s" % ( self.workdir, os.path.join( self.packagedir, "gpgme-qt.patch" ) ) )
        return True
Beispiel #10
0
    def install( self ):
        print "entering %s" % os.path.join(self.sourceDir(), "build", "lib")
        os.chdir( os.path.join(self.sourceDir(), "build", "lib") )

        self.setupEnviroment()

        self.system( "nmake install" )

        if not self.isTargetBuild():
            utils.copySrcDirToDestDir( os.path.join( self.sourceDir(), "bin" ) , os.path.join( self.installDir(), "bin" ) )
            utils.copySrcDirToDestDir( os.path.join( self.sourceDir(), "lib" ) , os.path.join( self.installDir(), "lib" ) )
        else:
            utils.copySrcDirToDestDir( os.path.join( self.sourceDir(), "bin", "evc9-arm" ) , os.path.join( self.installDir(), "bin" ) )
            utils.copySrcDirToDestDir( os.path.join( self.sourceDir(), "lib", "evc9-arm" ) , os.path.join( self.installDir(), "lib" ) )
        utils.copySrcDirToDestDir( os.path.join( self.sourceDir(), "stlport" ) , os.path.join( self.installDir(), "include", "stlport" ) )

        return True
Beispiel #11
0
    def kdeSvnUnpack( self, svnpath=None, packagedir=None ):
        """fetching and copying the sources from svn"""
        if not svnpath and not packagedir:
            if self.kdeSvnPath():
                svnpath = self.kdeSvnPath()[ :self.kdeSvnPath().rfind('/') ]
                packagedir = self.kdeSvnPath()[ self.kdeSvnPath().rfind('/') + 1:]
            else:
                utils.die( "no svn repository information are available" )
        self.kdeSvnFetch( svnpath, packagedir )

        if( not os.path.exists( self.workdir ) ):
            os.makedirs( self.workdir )

        if not ( self.noCopy and self.kdeSvnPath() ):
            # now copy the tree to workdir
            srcdir  = os.path.join( self.kdesvndir, svnpath, packagedir )
            destdir = os.path.join( self.workdir, packagedir )
            utils.copySrcDirToDestDir( srcdir, destdir )
        return True
Beispiel #12
0
    def unpack( self ):
        print "gpgme-qt unpack called"
        # do the svn fetch/update
        if self.buildTarget == 'svnHEAD':
            repo = "svn://cvs.gnupg.org/gpgme/trunk/gpgme"
            self.svnFetch( repo )

            utils.cleanDirectory( self.workdir )

            # now copy the tree below destdir/trunk to workdir
            utils.debug( "%s %s" % ( self.svndir, self.workdir ) )
            srcdir = os.path.join( self.svndir )
            destdir = os.path.join( self.workdir, "gpgme-qt" )
            utils.copySrcDirToDestDir( srcdir, destdir )
        else:
            if( not base.baseclass.unpack( self ) ):
                return True

        os.chdir( self.workdir )
        self.system( "cd %s && patch -p0 < %s" % ( self.workdir, os.path.join( self.packagedir, "gpgme-qt.patch" ) ) )
        return True
  def install( self ):
    self.instsrcdir = PACKAGE_INSTSRCDIR
    # cleanup
    dst = os.path.join( self.imagedir )
    utils.cleanDirectory( dst )
    dst = os.path.join( self.imagedir, self.instdestdir )
    utils.cleanDirectory( dst )

    # /bin can be used from zip package
    src = os.path.join( self.workdir, self.instsrcdir, "bin" )
    dst = os.path.join( self.imagedir, self.instdestdir, "bin" )
    utils.copySrcDirToDestDir( src, dst )

    # /include can be used from zip package
    src = os.path.join( self.workdir, self.instsrcdir, "include" )
    dst = os.path.join( self.imagedir, self.instdestdir, "include" )
    utils.copySrcDirToDestDir( src, dst )

    # /contrib contains readme.txt
    dst = os.path.join( self.imagedir, self.instdestdir, "contrib" )
    utils.cleanDirectory( dst )
    dst = os.path.join( dst, PACKAGE_NAME )
    utils.cleanDirectory( dst )
    dst = os.path.join( dst, PACKAGE_FULL_VER )
    utils.cleanDirectory( dst )

    src = os.path.join( self.workdir, self.instsrcdir )
    shutil.copy( os.path.join( src, "readme.txt" ), os.path.join( dst, "readme.txt" ) )

    # /lib needs a complete rebuild - done in make_package
    src = os.path.join( self.workdir, self.instsrcdir, "lib" )
    dst = os.path.join( self.imagedir, self.instdestdir, "lib" )
    utils.cleanDirectory( dst )
    # no need to recreate msvc import lib
    shutil.copy( os.path.join( src, PACKAGE_DLL_NAME + ".lib" ), os.path.join( dst, PACKAGE_DLL_NAME + ".lib" ) )

    return True