Merge branch 'master' of github.com:safaariman/pisi
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free
|
||||
# Software Foundation; either version 2 of the License, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# Please read the COPYING file.
|
||||
|
||||
# ActionsAPI Modules
|
||||
from pisi.actionsapi import get
|
||||
from pisi.actionsapi import cmaketools
|
||||
from pisi.actionsapi import shelltools
|
||||
|
||||
basename = "kde5"
|
||||
|
||||
prefix = "/%s" % get.defaultprefixDIR()
|
||||
libdir = "%s/lib" % prefix
|
||||
bindir = "%s/bin" % prefix
|
||||
libexecdir = "%s/lib" % prefix
|
||||
iconsdir = "%s/share/icons" % prefix
|
||||
applicationsdir = "%s/share/applications/%s" % (prefix, basename)
|
||||
mandir = "/%s" % get.manDIR()
|
||||
sharedir = "%s/share" % prefix
|
||||
localedir = "%s/share/locale" % prefix
|
||||
qmldir = "%s/lib/qt5/qml" % prefix
|
||||
plugindir = "%s/lib/qt5/plugins" % prefix
|
||||
moduledir = "%s/lib/qt5/mkspecs/modules" % prefix
|
||||
pythondir = "%s/bin/python" % prefix
|
||||
appsdir = "%s" % sharedir
|
||||
sysconfdir= "/etc"
|
||||
configdir = "%s/xdg" % sysconfdir
|
||||
servicesdir = "%s/services" % sharedir
|
||||
servicetypesdir = "%s/servicetypes" % sharedir
|
||||
includedir = "%s/include" % prefix
|
||||
docdir = "/%s/%s" % (get.docDIR(), basename)
|
||||
htmldir = "%s/html" % docdir
|
||||
wallpapersdir = "%s/share/wallpapers" % prefix
|
||||
|
||||
def configure(parameters = '', installPrefix = prefix, sourceDir = '..'):
|
||||
''' parameters -DLIB_INSTALL_DIR="hede" -DSOMETHING_USEFUL=1'''
|
||||
|
||||
shelltools.makedirs("build")
|
||||
shelltools.cd("build")
|
||||
|
||||
cmaketools.configure("-DCMAKE_BUILD_TYPE=Release \
|
||||
-DKDE_INSTALL_LIBEXECDIR=%s \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
|
||||
-DKDE_INSTALL_QMLDIR=%s \
|
||||
-DKDE_INSTALL_SYSCONFDIR=%s \
|
||||
-DKDE_INSTALL_PLUGINDIR=%s \
|
||||
-DECM_MKSPECS_INSTALL_DIR=%s \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DKDE_INSTALL_LIBDIR=lib \
|
||||
-Wno-dev \
|
||||
-DCMAKE_INSTALL_PREFIX=%s %s" % (libexecdir, qmldir, sysconfdir, plugindir, moduledir, prefix, parameters), installPrefix, sourceDir)
|
||||
|
||||
shelltools.cd("..")
|
||||
|
||||
def make(parameters = ''):
|
||||
cmaketools.make('-C build %s' % parameters)
|
||||
|
||||
def install(parameters = '', argument = 'install'):
|
||||
cmaketools.install('-C build %s' % parameters, argument)
|
||||
|
||||
@@ -187,12 +187,12 @@ def install():
|
||||
def installHeaders(extraHeaders=None):
|
||||
""" Install the files needed to build out-of-tree kernel modules. """
|
||||
|
||||
extras = ["drivers/media/dvb/dvb-core",
|
||||
"drivers/media/dvb/frontends",
|
||||
"drivers/media/video"]
|
||||
#extras = ["drivers/media/dvb/dvb-core",
|
||||
# "drivers/media/dvb/frontends",
|
||||
# "drivers/media/video"]
|
||||
|
||||
if extraHeaders:
|
||||
extras.extend(extraHeaders)
|
||||
#if extraHeaders:
|
||||
# extras.extend(extraHeaders)
|
||||
|
||||
pruned = ["include", "scripts", "Documentation"]
|
||||
wanted = ["Makefile*", "Kconfig*", "Kbuild*", "*.sh", "*.pl", "*.lds"]
|
||||
@@ -214,8 +214,8 @@ def installHeaders(extraHeaders=None):
|
||||
shelltools.system(find_cmd)
|
||||
|
||||
# Install additional headers
|
||||
for headers in extras:
|
||||
shelltools.system("cp -a %s/*.h %s/%s" % (headers, destination, headers))
|
||||
#for headers in extras:
|
||||
# shelltools.system("cp -a %s/*.h %s/%s" % (headers, destination, headers))
|
||||
|
||||
# Install remaining headers
|
||||
shelltools.system("cp -a %s %s" % (" ".join(pruned), destination))
|
||||
@@ -255,6 +255,17 @@ def installLibcHeaders(excludes=None):
|
||||
shelltools.makedirs(headers_tmp)
|
||||
shelltools.makedirs(headers_dir)
|
||||
|
||||
###################Workaround begins here ...
|
||||
#Workaround information -- http://patches.openembedded.org/patch/33433/
|
||||
cpy_src="%s/linux-*/arch/x86/include/generated" % (get.workDIR())
|
||||
cpy_tgt="%s/arch/x86/include" % (headers_tmp)
|
||||
shelltools.makedirs(cpy_tgt)
|
||||
|
||||
copy_cmd ="cp -Rv %s %s " % (cpy_src, cpy_tgt)
|
||||
|
||||
shelltools.system(copy_cmd)
|
||||
#######################Workaround ends here ...
|
||||
|
||||
# make defconfig and install the headers
|
||||
autotools.make("%s defconfig" % make_cmd)
|
||||
autotools.rawInstall(make_cmd, "headers_install")
|
||||
|
||||
@@ -14,7 +14,7 @@ import subprocess
|
||||
|
||||
import gettext
|
||||
__trans = gettext.translation('pisi', fallback=True)
|
||||
_ = __trans.gettext
|
||||
_ = __trans.ugettext
|
||||
|
||||
# PiSi Modules
|
||||
import pisi.context as ctx
|
||||
@@ -136,3 +136,4 @@ def libraryExists(library):
|
||||
raise PkgconfigError(_("pkg-config is not installed on your system."))
|
||||
else:
|
||||
return result == 0
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright (C) 2010 TUBITAK/UEKAE
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free
|
||||
# Software Foundation; either version 2 of the License, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# Please read the COPYING file.
|
||||
|
||||
import glob
|
||||
import gettext
|
||||
__trans = gettext.translation('pisi', fallback=True)
|
||||
_ = __trans.ugettext
|
||||
|
||||
# Pisi Modules
|
||||
import pisi.context as ctx
|
||||
|
||||
# ActionsAPI Modules
|
||||
import pisi.actionsapi
|
||||
|
||||
# ActionsAPI Modules
|
||||
from pisi.actionsapi import get
|
||||
from pisi.actionsapi import cmaketools
|
||||
from pisi.actionsapi import shelltools
|
||||
|
||||
basename = "qt5"
|
||||
|
||||
prefix = "/%s" % get.defaultprefixDIR()
|
||||
libdir = "%s/lib" % prefix
|
||||
libexecdir = "%s/libexec" % prefix
|
||||
sysconfdir= "/etc"
|
||||
bindir = "%s/bin" % prefix
|
||||
includedir = "%s/include" % prefix
|
||||
|
||||
# qt5 spesific variables
|
||||
|
||||
headerdir = "%s/include/%s" % (prefix, basename)
|
||||
datadir = "%s/share/%s" % (prefix, basename)
|
||||
docdir = "/%s/%s" % (get.docDIR(), basename)
|
||||
archdatadir = "%s/%s" % (libdir, basename)
|
||||
examplesdir = "%s/%s/examples" % (libdir, basename)
|
||||
importdir = "%s/%s/imports" % (libdir, basename)
|
||||
plugindir = "%s/%s/plugins" % (libdir, basename)
|
||||
qmldir = "%s/%s/qml" % (libdir, basename)
|
||||
testdir = "%s/share/%s" % (prefix, basename)
|
||||
translationdir = "%s/translations" % datadir
|
||||
|
||||
#Temporary bindir to avoid qt4 conflicts
|
||||
#qmake = "%s/qmake-qt5" % bindir
|
||||
qmake = "%s/qmake" % bindir
|
||||
|
||||
class ConfigureError(pisi.actionsapi.Error):
|
||||
def __init__(self, value=''):
|
||||
pisi.actionsapi.Error.__init__(self, value)
|
||||
self.value = value
|
||||
ctx.ui.error(value)
|
||||
|
||||
def configure(projectfile='', parameters='', installPrefix=prefix):
|
||||
if projectfile != '' and not shelltools.can_access_file(projectfile):
|
||||
raise ConfigureError(_("Project file '%s' not found.") % projectfile)
|
||||
|
||||
profiles = glob.glob("*.pro")
|
||||
if len(profiles) > 1 and projectfile == '':
|
||||
raise ConfigureError(_("It seems there are more than one .pro file, you must specify one. (Possible .pro files: %s)") % ", ".join(profiles))
|
||||
|
||||
shelltools.system("%s -makefile %s PREFIX='%s' QMAKE_CFLAGS+='%s' QMAKE_CXXFLAGS+='%s' %s" % (qmake, projectfile, installPrefix, get.CFLAGS(), get.CXXFLAGS(), parameters))
|
||||
|
||||
def make(parameters=''):
|
||||
cmaketools.make(parameters)
|
||||
|
||||
def install(parameters='', argument='install'):
|
||||
cmaketools.install('INSTALL_ROOT="%s" %s' % (get.installDIR(), parameters), argument)
|
||||
|
||||
Reference in New Issue
Block a user