From 484aec6e78dd9624f20779130565d1774d5b9e9f Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Mon, 7 Jan 2008 18:25:55 +0000 Subject: Bashism fix: echo -e is a bashism and doesn't work when /bin/sh points to dash Instead of using "echo -e" we simply use printf. printf doesn't add a newline by default. So some places needed an extra \n in their string. Most of the change was done by hand, so please carefully review. This bug was spotted when trying to compile python-pyqt on my ubuntu hardy system. --- classes/opie_i18n.bbclass | 20 ++++++++++---------- classes/rootfs_deb.bbclass | 2 +- classes/rootfs_ipk.bbclass | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'classes') diff --git a/classes/opie_i18n.bbclass b/classes/opie_i18n.bbclass index cb3d07de75..107d090451 100644 --- a/classes/opie_i18n.bbclass +++ b/classes/opie_i18n.bbclass @@ -13,7 +13,7 @@ SRC_URI += "${HANDHELDS_CVS};module=opie/i18n" DEPENDS += "opie-i18n" die () { - echo -e "opie_18n: ERROR: $1" + printf "opie_18n: ERROR: $1\n" exit 1 } @@ -60,21 +60,21 @@ do_build_opie_i18n () { package_name2="`echo "${PN}"| sed "s/^opie\-//;s/\-//"`" test "$package_name" != "$package_name2" && I18N_FILES="${package_name}.ts lib${package_name}.ts opie-${package_name}.ts ${package_name2}.ts lib${package_name2}.ts opie-${package_name2}.ts" test "$package_name" = "$package_name2" && I18N_FILES="${package_name}.ts lib${package_name}.ts opie-${package_name}.ts" - echo -e "I18N Datafiles: ${I18N_FILES} (auto-detected)\nYou can overide the auto-detection by setting I18N_FILES in your .oe file" + printf "I18N Datafiles: ${I18N_FILES} (auto-detected)\nYou can overide the auto-detection by setting I18N_FILES in your .oe file\n" else echo "I18N Datafiles: ${I18N_FILES} (provided by .bb)" fi rm -f "${WORKDIR}/FILES.tmp" "${WORKDIR}/PACKAGES.tmp" - echo -e "\nFILES is set to [${FILES}]\n" + printf "\nFILES is set to [${FILES}]\n\n" for file in ${I18N_FILES} do echo "Working on [$file]" for ts_file in `ls -1 */*.ts | egrep "/$file"` do - echo -e "\tCompiling [$ts_file]" + printf "\tCompiling [$ts_file]\n" cd "${WORKDIR}/i18n/`dirname $ts_file`" || die "[${WORKDIR}/i18n/`dirname $ts_file`] not found" opie-lrelease "`basename $ts_file`" || die "lrelease failed! Make sure that or is *below* !" @@ -82,7 +82,7 @@ do_build_opie_i18n () { # to allow packaging as "_" is not allowed in a package name lang="`echo "$ts_file" | sed -n "s#\(.*\)/\(.*\)#\1#p"`" lang_sane="`echo "$ts_file" | sed -n "s#\(.*\)/\(.*\)#\1#p"|sed s/\_/\-/`" - echo -e "\tPackaging [`basename $ts_file`] for language [$lang]" + printf "\tPackaging [`basename $ts_file`] for language [$lang]\n" install -d ${D}${palmtopdir}/i18n/$lang install -m 0644 ${WORKDIR}/i18n/$lang/.directory ${D}${palmtopdir}/i18n/$lang/ @@ -93,14 +93,14 @@ do_build_opie_i18n () { # function do_build_opie_i18n_data() which sets the variables FILES_* and # PACKAGES as needed. echo -n "${PN}-${lang_sane} " >> "${WORKDIR}/PACKAGES.tmp" - echo -e "${PN}-${lang_sane}#${palmtopdir}/i18n/$lang" >> "${WORKDIR}/FILES.tmp" + printf "${PN}-${lang_sane}#${palmtopdir}/i18n/$lang" >> "${WORKDIR}/FILES.tmp\n" ts_found_something=1 done if test "$ts_found_something" != 1 then - echo -e "\tNo translations found" + printf "\tNo translations found\n" else ts_found_something="" ts_found="$ts_found $file" @@ -109,7 +109,7 @@ do_build_opie_i18n () { # Only used for debugging purposes test "${I18N_STATS}" = 1 && cd "${WORKDIR}/i18n" - echo -e "Completed [$file]\n\n" + printf "Completed [$file]\n\n\n" done qt_dirs="apps bin etc lib pics plugins share sounds" @@ -125,7 +125,7 @@ do_build_opie_i18n () { if (echo "${FILES}" | egrep "${palmtopdir}/? |${palmtopdir}/?$") &>/dev/null then echo "NOTE: FILES was set to ${palmtopdir} which would include the i18n directory" - echo -e "\n\nI'll remove ${palmtopdir} from FILES and replace it with all directories" + printf "\n\nI'll remove ${palmtopdir} from FILES and replace it with all directories\n" echo "below QtPalmtop, except i18n ($qt_dirs). See classes/opie_i18n.oeclass for details" # Removes /opt/QtPalmtop from FILES but keeps /opt/QtPalmtop/$some_dir @@ -138,7 +138,7 @@ do_build_opie_i18n () { if test -z "${FILES}" then echo "NOTE:" - echo -e "Since FILES is empty, i'll add all directories below ${palmtopdir} to it,\nexcluding i18n: ( $qt_dirs )" + printf "Since FILES is empty, i'll add all directories below ${palmtopdir} to it,\nexcluding i18n: ( $qt_dirs )\n" echo "${PN}#$FILES $dir_" >> "${WORKDIR}/FILES.tmp" fi diff --git a/classes/rootfs_deb.bbclass b/classes/rootfs_deb.bbclass index 853ea225fc..c2c4a764e4 100644 --- a/classes/rootfs_deb.bbclass +++ b/classes/rootfs_deb.bbclass @@ -145,7 +145,7 @@ rootfs_deb_log_check() { if (echo "$lf_txt" | grep -v log_check | grep "$keyword_die") >/dev/null 2>&1 then echo "log_check: There were error messages in the logfile" - echo -e "log_check: Matched keyword: [$keyword_die]\n" + printf "log_check: Matched keyword: [$keyword_die]\n" echo "$lf_txt" | grep -v log_check | grep -C 5 -i "$keyword_die" echo "" do_exit=1 diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass index c6e2099e7c..28ba03d675 100644 --- a/classes/rootfs_ipk.bbclass +++ b/classes/rootfs_ipk.bbclass @@ -71,7 +71,7 @@ rootfs_ipk_log_check() { if (echo "$lf_txt" | grep -v log_check | grep "$keyword_die") >/dev/null 2>&1 then echo "log_check: There were error messages in the logfile" - echo -e "log_check: Matched keyword: [$keyword_die]\n" + printf "log_check: Matched keyword: [$keyword_die]\n" echo "$lf_txt" | grep -v log_check | grep -i "$keyword_die" -C1 echo "" do_exit=1 -- cgit v1.2.3 From ad3a31a6fb078325742181daf20e4d3a25890c87 Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Fri, 11 Jan 2008 19:38:19 +0000 Subject: sanity.bbclass: remove dependency on host fortran. NOTE to involved people: this does not revert the related changes, please do this! --- classes/sanity.bbclass | 3 --- 1 file changed, 3 deletions(-) (limited to 'classes') diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass index bbc06d9697..9994febf0d 100644 --- a/classes/sanity.bbclass +++ b/classes/sanity.bbclass @@ -83,9 +83,6 @@ def check_sanity(e): if not check_app_exists('${BUILD_PREFIX}g++', e.data): missing = missing + "C++ Compiler (${BUILD_PREFIX}g++)," - if not check_app_exists('${BUILD_PREFIX}gfortran', e.data): - missing = missing + "GNU Fortran Compiler" - required_utilities = "patch help2man diffstat texi2html makeinfo cvs svn bzip2 tar gzip gawk md5sum" for util in required_utilities.split(): -- cgit v1.2.3 From 79edbe3bd5de89f02f00c5541515dcaf73d54abc Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Fri, 11 Jan 2008 23:30:44 +0000 Subject: sdl.bbclass: Add sane default path for APPIMAGE. --- classes/sdl.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/sdl.bbclass b/classes/sdl.bbclass index d478d97f18..e819eb1c52 100644 --- a/classes/sdl.bbclass +++ b/classes/sdl.bbclass @@ -6,7 +6,7 @@ DEPENDS += "virtual/libsdl libsdl-mixer libsdl-image" APPDESKTOP ?= "${PN}.desktop" APPNAME ?= "${PN}" -APPIMAGE ?= "${PN}.png" +APPIMAGE ?= "${WORKDIR}/${PN}.png" sdl_do_sdl_install() { install -d ${D}${palmtopdir}/bin -- cgit v1.2.3 From abb9afcff654c89fd5c594c09973b05b360c2450 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Fri, 11 Jan 2008 23:57:55 +0000 Subject: sdl.bbclass: Revamp to adhere to freedesktop standards. * OPIE in OE now adheres to FHS, so ${palmtopdir} is no more. * OPIE in OE doesn't haev SDL support, so: make this bbclass produce correct pixmap/.desktop per freedesktop standards, then TODO: make OPIE use the same. * Also, run after main install and before packaging, more natural (and will allow to check if standard install dropped icon/.desktop already). --- classes/sdl.bbclass | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'classes') diff --git a/classes/sdl.bbclass b/classes/sdl.bbclass index e819eb1c52..161b53c713 100644 --- a/classes/sdl.bbclass +++ b/classes/sdl.bbclass @@ -4,37 +4,37 @@ DEPENDS += "virtual/libsdl libsdl-mixer libsdl-image" -APPDESKTOP ?= "${PN}.desktop" +APPDESKTOP ?= "${WORKDIR}/${PN}.desktop" APPNAME ?= "${PN}" APPIMAGE ?= "${WORKDIR}/${PN}.png" sdl_do_sdl_install() { - install -d ${D}${palmtopdir}/bin - install -d ${D}${palmtopdir}/pics - install -d ${D}${palmtopdir}/apps/Games - ln -sf ${bindir}/${APPNAME} ${D}${palmtopdir}/bin/${APPNAME} - install -m 0644 ${APPIMAGE} ${D}${palmtopdir}/pics/${PN}.png + install -d ${D}${datadir}/applications + install -d ${D}${datadir}/pixmaps + + install -m 0644 ${APPIMAGE} ${D}${datadir}/pixmaps/${PN}.png if [ -e "${APPDESKTOP}" ] then - echo ${APPDESKTOP} present, installing to palmtopdir... - install -m 0644 ${APPDESKTOP} ${D}${palmtopdir}/apps/Games/${PN}.desktop + echo ${APPDESKTOP} present, using it... + install -m 0644 ${APPDESKTOP} ${D}${datadir}/applications/ else echo ${APPDESKTOP} not present, creating one on-the-fly... - cat >${D}${palmtopdir}/apps/Games/${PN}.desktop <${D}${datadir}/applications/${PN}.desktop < Date: Sat, 12 Jan 2008 00:01:18 +0000 Subject: sdl.bbclass: Also, let's just have SECTION="games" for xplatform games. --- classes/sdl.bbclass | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'classes') diff --git a/classes/sdl.bbclass b/classes/sdl.bbclass index 161b53c713..23cbf10919 100644 --- a/classes/sdl.bbclass +++ b/classes/sdl.bbclass @@ -36,9 +36,9 @@ EOF EXPORT_FUNCTIONS do_sdl_install addtask sdl_install after do_install before do_package -SECTION = "x11/games" -SECTION_${PN}-opie = "opie/games" +#SECTION = "x11/games" +#SECTION_${PN}-opie = "opie/games" -PACKAGES += "${PN}-opie" -RDEPENDS_${PN}-opie += "${PN}" -FILES_${PN}-opie = "${palmtopdir}" +#PACKAGES += "${PN}-opie" +#RDEPENDS_${PN}-opie += "${PN}" +#FILES_${PN}-opie = "${palmtopdir}" -- cgit v1.2.3 From 96320328ecb8f2bdaaf1949a78aa462239192ea2 Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Sat, 12 Jan 2008 14:18:26 +0000 Subject: insane.bbclass: fix formatting of fatal include error --- classes/insane.bbclass | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 840ebf6eff..97cf036dd9 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -464,7 +464,6 @@ python do_qa_configure() { os.path.join(root,"config.log") if "config.log" in files: if os.system(statement) == 0: - bb.fatal("This autoconf log indicates errors, it looked at \ - host includes. Rerun configure task after fixing this. \ - Path was '%s'" % root) + bb.fatal("""This autoconf log indicates errors, it looked at host includes. +Rerun configure task after fixing this. The path was '%s'""" % root) } -- cgit v1.2.3 From c431bbbb35871017d6fafd79cddd036a52b2352e Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Tue, 15 Jan 2008 00:31:03 +0000 Subject: add rudimentary cmake support class --- classes/cmake.bbclass | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 classes/cmake.bbclass (limited to 'classes') diff --git a/classes/cmake.bbclass b/classes/cmake.bbclass new file mode 100644 index 0000000000..cec74349dc --- /dev/null +++ b/classes/cmake.bbclass @@ -0,0 +1,7 @@ +inherit autotools + +cmake_do_configure() { + cmake . -DCMAKE_INSTALL_PREFIX:PATH=${prefix} +} + +EXPORT_FUNCTIONS do_configure -- cgit v1.2.3