aboutsummaryrefslogtreecommitdiffstats
path: root/packages/libxsettings-client
diff options
context:
space:
mode:
authorRolf Leggewie <oe-devel@rolf.leggewie.biz>2008-05-02 18:20:31 +0000
committerRolf Leggewie <oe-devel@rolf.leggewie.biz>2008-05-02 18:20:31 +0000
commit31d9daecb87278b825f29ca475df8b622cf3c812 (patch)
tree20282c24a8184c0f9fab9f911ab40f226f70f4b1 /packages/libxsettings-client
parent4b97055203367b551a5091f699bc02c36d883af0 (diff)
downloadopenembedded-31d9daecb87278b825f29ca475df8b622cf3c812.tar.gz
libxsettings-client: unify. partly closes 1688.
Diffstat (limited to 'packages/libxsettings-client')
-rw-r--r--packages/libxsettings-client/libxsettings-client_0.14.bb20
-rw-r--r--packages/libxsettings-client/libxsettings-client_0.16.bb24
-rw-r--r--packages/libxsettings-client/libxsettings-client_0.17.bb22
-rw-r--r--packages/libxsettings-client/libxsettings-client_svn.bb24
4 files changed, 11 insertions, 79 deletions
diff --git a/packages/libxsettings-client/libxsettings-client_0.14.bb b/packages/libxsettings-client/libxsettings-client_0.14.bb
index 6504405d49..35a2e5ec33 100644
--- a/packages/libxsettings-client/libxsettings-client_0.14.bb
+++ b/packages/libxsettings-client/libxsettings-client_0.14.bb
@@ -1,21 +1,5 @@
-SECTION = "gpe/libs"
-LICENSE = "BSD-X"
-PRIORITY = "optional"
-DEPENDS = "libxsettings virtual/libx11 libxt"
-# libxt is required to stop configure breaking builds by
-# including system paths to find it if it isn't present.
+require libxsettings-client.inc
-inherit autotools pkgconfig gpe
+PR = "r1"
SRC_URI = "${GPE_MIRROR}/xsettings-client-${PV}.tar.bz2"
-S = "${WORKDIR}/xsettings-client-${PV}"
-
-
-headers = "xsettings-client.h xsettings-common.h"
-do_stage () {
- oe_libinstall -so libXsettings-client ${STAGING_LIBDIR}
- mkdir -p ${STAGING_INCDIR}
- for h in ${headers}; do
- install -m 0644 ${S}/$h ${STAGING_INCDIR}/$h
- done
-}
diff --git a/packages/libxsettings-client/libxsettings-client_0.16.bb b/packages/libxsettings-client/libxsettings-client_0.16.bb
index cfec0904e9..725172b944 100644
--- a/packages/libxsettings-client/libxsettings-client_0.16.bb
+++ b/packages/libxsettings-client/libxsettings-client_0.16.bb
@@ -1,23 +1,3 @@
-SECTION = "gpe/libs"
-LICENSE = "BSD-X"
-PRIORITY = "optional"
-DEPENDS = "libxsettings virtual/libx11 libxt"
-# libxt is required to stop configure breaking builds by
-# including system paths to find it if it isn't present.
-PR="r1"
-
-inherit autotools pkgconfig gpe
-
-SRC_URI = "${GPE_MIRROR}/libxsettings-client-${PV}.tar.bz2 \
- file://Makefile-am.patch;patch=1"
-
-
-headers = "xsettings-client.h xsettings-common.h"
-do_stage () {
- oe_libinstall -so libXsettings-client ${STAGING_LIBDIR}
- mkdir -p ${STAGING_INCDIR}
- for h in ${headers}; do
- install -m 0644 ${S}/$h ${STAGING_INCDIR}/$h
- done
-}
+require libxsettings-client.inc
+PR="r2"
diff --git a/packages/libxsettings-client/libxsettings-client_0.17.bb b/packages/libxsettings-client/libxsettings-client_0.17.bb
index 41f3e8f6e4..2178b749fb 100644
--- a/packages/libxsettings-client/libxsettings-client_0.17.bb
+++ b/packages/libxsettings-client/libxsettings-client_0.17.bb
@@ -1,22 +1,6 @@
-SECTION = "gpe/libs"
-LICENSE = "BSD-X"
-PRIORITY = "optional"
-DEPENDS = "libxsettings virtual/libx11 libxt gtk-doc"
-# libxt is required to stop configure breaking builds by
-# including system paths to find it if it isn't present.
-PR="r1"
+require libxsettings-client.inc
-GPE_TARBALL_SUFFIX = "bz2"
-inherit autotools pkgconfig gpe
+DEPENDS += "gtk-doc"
+PR="r2"
SRC_URI += "file://no-host-includes.patch;patch=1 "
-
-headers = "xsettings-client.h xsettings-common.h"
-do_stage () {
- oe_libinstall -so libXsettings-client ${STAGING_LIBDIR}
- mkdir -p ${STAGING_INCDIR}
- for h in ${headers}; do
- install -m 0644 ${S}/$h ${STAGING_INCDIR}/$h
- done
-}
-
diff --git a/packages/libxsettings-client/libxsettings-client_svn.bb b/packages/libxsettings-client/libxsettings-client_svn.bb
index 111c692603..c9705b5673 100644
--- a/packages/libxsettings-client/libxsettings-client_svn.bb
+++ b/packages/libxsettings-client/libxsettings-client_svn.bb
@@ -1,26 +1,10 @@
-SECTION = "gpe/libs"
-PRIORITY = "optional"
-LICENSE = "BSD-X"
-DEPENDS = "libxsettings virtual/libx11 libxt gtk-doc"
-PV = "0.17+svn${SRCDATE}"
-# libxt is required to stop configure breaking builds by
-# including system paths to find it if it isn't present.
-PR = "r0"
+require libxsettings-client.inc
-inherit autotools pkgconfig gpe
+DEPENDS += "gtk-doc"
+PV = "0.17+svn${SRCDATE}"
+PR = "r1"
SRC_URI = "${GPE_SVN}"
-
S = "${WORKDIR}/${PN}"
-do_stage () {
- oe_libinstall -so libXsettings-client ${STAGING_LIBDIR}
- mkdir -p ${STAGING_INCDIR}
- for h in ${headers}; do
- install -m 0644 ${S}/$h ${STAGING_INCDIR}/$h
- done
-}
-
-headers = "xsettings-client.h xsettings-common.h"
-
DEFAULT_PREFERENCE = "-1"
: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
#
# Sanity check the users setup for common misconfigurations
#

def raise_sanity_error(msg):
	import bb
	bb.fatal(""" Openembedded's config sanity checker detected a potential misconfiguration.
	Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
	Following is the list of potential problems / advisories:
	
	%s""" % msg)

def check_conf_exists(fn, data):
	import bb, os

	bbpath = []
	fn = bb.data.expand(fn, data)
	vbbpath = bb.data.getVar("BBPATH", data)
	if vbbpath:
		bbpath += vbbpath.split(":")
	for p in bbpath:
		currname = os.path.join(bb.data.expand(p, data), fn)
		if os.access(currname, os.R_OK):
			return True
	return False

def check_sanity(e):
	from bb import note, error, data, __version__
	from bb.event import Handled, NotHandled, getName
	try:
		from distutils.version import LooseVersion
	except ImportError:
		def LooseVersion(v): print "WARNING: sanity.bbclass can't compare versions without python-distutils"; return 1
	import os, commands

	# Check the bitbake version meets minimum requirements
	minversion = data.getVar('BB_MIN_VERSION', e.data , True)
	if not minversion:
		# Hack: BB_MIN_VERSION hasn't been parsed yet so return 
		# and wait for the next call
		print "Foo %s" % minversion
		return

	if 0 == os.getuid():
		raise_sanity_error("Do not use Bitbake as root.")

	messages = ""

	if (LooseVersion(__version__) < LooseVersion(minversion)):
		messages = messages + 'Bitbake version %s is required and version %s was found\n' % (minversion, __version__)

	# Check TARGET_ARCH is set
	if data.getVar('TARGET_ARCH', e.data, True) == 'INVALID':
		messages = messages + 'Please set TARGET_ARCH directly, or choose a MACHINE or DISTRO that does so.\n'
	
	# Check TARGET_OS is set
	if data.getVar('TARGET_OS', e.data, True) == 'INVALID':
		messages = messages + 'Please set TARGET_OS directly, or choose a MACHINE or DISTRO that does so.\n'

	assume_provided = data.getVar('ASSUME_PROVIDED', e.data , True).split()
	# Check user doesn't have ASSUME_PROVIDED = instead of += in local.conf
	if "diffstat-native" not in assume_provided:
		messages = messages + 'Please use ASSUME_PROVIDED +=, not ASSUME_PROVIDED = in your local.conf\n'
	
	# Check that the MACHINE is valid, if it is set
	if data.getVar('MACHINE', e.data, True):
		if not check_conf_exists("conf/machine/${MACHINE}.conf", e.data):
			messages = messages + 'Please set a valid MACHINE in your local.conf\n'
	
	# Check that the DISTRO is valid
	# need to take into account DISTRO renaming DISTRO
	if not ( check_conf_exists("conf/distro/${DISTRO}.conf", e.data) or check_conf_exists("conf/distro/include/${DISTRO}.inc", e.data) ):
		messages = messages + "DISTRO '%s' not found. Please set a valid DISTRO in your local.conf\n" % data.getVar("DISTRO", e.data, True )

	missing = ""

	if not check_app_exists("${MAKE}", e.data):
		missing = missing + "GNU make,"

	if not check_app_exists('${BUILD_PREFIX}gcc', e.data):
		missing = missing + "C Compiler (${BUILD_PREFIX}gcc),"

	if not check_app_exists('${BUILD_PREFIX}g++', e.data):
		missing = missing + "C++ Compiler (${BUILD_PREFIX}g++),"

	required_utilities = "patch help2man diffstat texi2html makeinfo cvs svn bzip2 tar gzip gawk md5sum"

	if data.getVar('TARGET_ARCH', e.data, True) == "arm":
		# qemu-native needs gcc 3.x
		if "qemu-native" not in assume_provided and "gcc3-native" in assume_provided:
			gcc_version = commands.getoutput("${BUILD_PREFIX}gcc --version | head -n 1 | cut -f 3 -d ' '")

			if not check_gcc3(e.data) and gcc_version[0] != '3':
				messages = messages + "gcc3-native was in ASSUME_PROVIDED but the gcc-3.x binary can't be found in PATH"
				missing = missing + "gcc-3.x (needed for qemu-native),"

		if "qemu-native" in assume_provided:
			if not check_app_exists("qemu-arm", e.data):
				messages = messages + "qemu-native was in ASSUME_PROVIDED but the QEMU binaries (qemu-arm) can't be found in PATH"

		if os.path.exists("/proc/sys/vm/mmap_min_addr"):
			f = file("/proc/sys/vm/mmap_min_addr", "r")
			if (f.read().strip() != "0"):
				messages = messages + "/proc/sys/vm/mmap_min_addr is not 0. This will cause problems with qemu so please fix the value (as root).\n\nTo fix this in later reboots, set vm.mmap_min_addr = 0 in /etc/sysctl.conf.\n"
			f.close()

	for util in required_utilities.split():
		if not check_app_exists( util, e.data ):
			missing = missing + "%s," % util

	if missing != "":
		missing = missing.rstrip(',')
		messages = messages + "Please install following missing utilities: %s\n" % missing

	try:
	    if os.path.basename(os.readlink('/bin/sh')) == 'dash':
		    messages = messages + "Using dash as /bin/sh causes various subtle build problems, please use bash instead.\n"
	except:
		pass

	omask = os.umask(022)
	if omask & 0755:
		messages = messages + "Please use a umask which allows a+rx and u+rwx\n"
	os.umask(omask)

	oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', e.data, True )
	if not oes_bb_conf:
		messages = messages + 'You do not include OpenEmbeddeds version of conf/bitbake.conf. This means your environment is misconfigured, in particular check BBPATH.\n'

	#
	# Check that TMPDIR hasn't changed location since the last time we were run
	#
	tmpdir = data.getVar('TMPDIR', e.data, True)
	checkfile = os.path.join(tmpdir, "saved_tmpdir")
	if os.path.exists(checkfile):
		f = file(checkfile, "r")
		if (f.read().strip() != tmpdir):
			messages = messages + "Error, TMPDIR has changed location. You need to either move it back to %s or rebuild\n" % tmpdir
	else:
		import bb
		bb.mkdirhier(tmpdir)
		f = file(checkfile, "w")
		f.write(tmpdir)
	f.close()

	#
	# Check the 'ABI' of TMPDIR
	#
	current_abi = data.getVar('OELAYOUT_ABI', e.data, True)
	abifile = data.getVar('SANITY_ABIFILE', e.data, True)
	if os.path.exists(abifile):
		f = file(abifile, "r")
		abi = f.read().strip()
		if not abi.isdigit():
			f = file(abifile, "w")
			f.write(current_abi)
		elif (abi != current_abi):
			# Code to convert from one ABI to another could go here if possible.
			messages = messages + "Error, TMPDIR has changed ABI (%s to %s) and you need to either rebuild, revert or adjust it at your own risk.\n" % (abi, current_abi)
	else:
		f = file(abifile, "w")
		f.write(current_abi)
	f.close()

	#
	# Check the Distro PR value didn't change
	#
	distro_pr = data.getVar('DISTRO_PR', e.data, True)
	prfile = data.getVar('SANITY_PRFILE', e.data, True)
	if os.path.exists(prfile):
		f = file(prfile, "r")
		pr = f.read().strip()
		if (pr != distro_pr):
			# Code to convert from one ABI to another could go here if possible.
			messages = messages + "Error, DISTRO_PR has changed (%s to %s) which means all packages need to rebuild. Please remove your TMPDIR so this can happen. For autobuilder setups you can avoid this by using a TMPDIR that include DISTRO_PR in the path.\n" % (pr, distro_pr)
	else:
		f = file(prfile, "w")
		f.write(distro_pr)
	f.close()


	#
	# Check there aren't duplicates in PACKAGE_ARCHS
	#
	archs = data.getVar('PACKAGE_ARCHS', e.data, True).split()
	for arch in archs:
		if archs.count(arch) != 1:
			messages = messages + "Error, Your PACKAGE_ARCHS field contains duplicates. Perhaps you set EXTRA_PACKAGE_ARCHS twice accidently through some tune file?\n"
			break

	if messages != "":
		raise_sanity_error(messages)

addhandler check_sanity_eventhandler
python check_sanity_eventhandler() {
    from bb import note, error, data, __version__
    from bb.event import getName

    if getName(e) == "ConfigParsed":
        check_sanity(e)

    return NotHandled
}