Skip to contentSkip to conversation

More than zenity prettification

PATCH In review Andreas Müller 2 participants 13 messages Oct 26, 2019 – Oct 27, 2019

lore
Share & tools
lore
#0 lore raw

cover More than zenity prettification

After zenity pret(t)ification was more a laughing matter I looked into the recipe some more (created V1 patch month ago) and decided: Now that we have all yelp-recipes required to build gnome help, go public with gnome-help.bbclass and let zenity be the first consumer.

Andreas Müller (2):
gnome-help.bbclass: Handle gnome-help files with new distro feature
'helpfiles'
zenity: rework recipe

 meta-gnome/classes/gnome-help.bbclass         | 69 +++++++++++++++++++
 meta-gnome/conf/layer.conf                    |  3 +
 .../0001-build-don-t-generate-manual.patch    | 50 --------------
 .../recipes-gnome/zenity/zenity_3.32.0.bb     | 14 ++--
 4 files changed, 79 insertions(+), 57 deletions(-)
 create mode 100644 meta-gnome/classes/gnome-help.bbclass
 delete mode 100644 meta-gnome/recipes-gnome/zenity/zenity/0001-build-don-t-generate-manual.patch
Signature · 1 line
2.21.0
#1 lore raw

PATCH v2 1/1 colord: initial add 1.4.4

* It is a dependency for upcoming gnome-settings-daemon
* It is used by GNOME and KDE [1] so move it to meta-oe
* Getting it to build was a bit tricky. Udev (systemd) is a mandatory dependency and for native we do not support build. To get around native build was stripped down to what's necessary only. Native build is done with the help of configuration in recipe and (old-school) Makefile. This solution was chosen to avoid massive patching of meson build which tends to be a maintenance burden (as experienced at KDE recipes in meta-qt5-extra).

[1] https://www.freedesktop.org/software/colord/intro.html

---
v1 -> v2: native replace pkg-config by pkg-config-native in Makefile to avoid building with build host libs

 .../recipes-support/colord/colord-native.bb   |  64 +++++++
 ...n-cd_icc_create_from_edid-to-avoid-u.patch | 166 ++++++++++++++++++
 .../colord/colord-native/Makefile             |  48 +++++
 meta-oe/recipes-support/colord/colord.bb      |  45 +++++
 meta-oe/recipes-support/colord/colord.inc     |  13 ++
 ...Run-native-cd_idt8-cd_create_profile.patch |  59 +++++++
 6 files changed, 395 insertions(+)
 create mode 100644 meta-oe/recipes-support/colord/colord-native.bb
 create mode 100644 meta-oe/recipes-support/colord/colord-native/0001-Move-the-function-cd_icc_create_from_edid-to-avoid-u.patch
 create mode 100644 meta-oe/recipes-support/colord/colord-native/Makefile
 create mode 100644 meta-oe/recipes-support/colord/colord.bb
 create mode 100644 meta-oe/recipes-support/colord/colord.inc
 create mode 100644 meta-oe/recipes-support/colord/colord/0001-Run-native-cd_idt8-cd_create_profile.patch
meta-oe/recipes-support/colord/colord-native.bb new file +64 -0
new file mode 100644
index 000000000..845041cc4
@@ -0,0 +1,64 @@
+require ${BPN}.inc
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}-native:"
+
+inherit meson native
+
+DEPENDS += " \
+    meson-native \
+    glib-2.0-native \
+    lcms-native \
+"
+
+SRC_URI += " \
+    file://0001-Move-the-function-cd_icc_create_from_edid-to-avoid-u.patch \
+    file://Makefile;subdir=${BPN}-${PV} \
+"
+
+do_configure() {
+    # we expect meson to fail - but before it extracts project's version in log file
+    meson ${MESONOPTS} "${MESON_SOURCEPATH}" "${B}" ${MESON_CROSS_FILE} ${EXTRA_OEMESON} > /dev/null 2>&1 || true
+
+    # extract and split version
+    version=`grep 'Project version:' ${B}/meson-logs/meson-log.txt | sed 's|Project version: ||'`
+    major=`echo $version | cut -d. -f1`
+    minor=`echo $version | cut -d. -f2`
+    micro=`echo $version | cut -d. -f3`
+    echo "Project version: $major.$minor.$micro"
+
+    # extract project name
+    proj_name=`grep 'Project name:' ${B}/meson-logs/meson-log.txt | sed 's|Project name: ||'`
+
+    # create cd-version.h
+    mkdir -p ${B}/colord
+	sed ${S}/lib/colord/cd-version.h.in \
+		-e 's:@CD_MAJOR_VERSION_PRIVATE@:1:g' \
+		-e 's:@CD_MINOR_VERSION_PRIVATE@:4:g' \
+		-e 's:@CD_MICRO_VERSION_PRIVATE@:4:g' \
+		> ${B}/colord/cd-version.h
+
+    # create config.h based on target build and add what's necessary only
+    localedir=`echo ${datadir}/locale | sed 's:${prefix}/::g'`
+    echo "#define LOCALEDIR \"$localedir\"" >> ${B}/config.h
+    echo "#define GETTEXT_PACKAGE \"colord\"" >> ${B}/config.h
+    echo "#define PACKAGE_NAME \"$proj_name\"" >> ${B}/config.h
+    echo "#define PACKAGE_VERSION \"$version\"" >> ${B}/config.h
+}
+
+do_compile() {
+    oe_runmake -C${S} DESTDIR=${B}
+}
+
+do_install() {
+    version=`grep 'Project version:' ${B}/meson-logs/meson-log.txt | sed 's|Project version: ||'`
+    major=`echo $version | cut -d. -f1`
+
+    install -d ${D}${libdir}
+    install -m 755 ${B}/libcolord.so ${D}${libdir}/libcolord.so.$version
+    ln -s libcolord.so.$version "${D}/${libdir}/libcolord.so"
+    ln -s libcolord.so.$version "${D}/${libdir}/libcolord.so.$major"
+
+    install -d ${D}${bindir}
+    install -m 755 ${B}/cd_create_profile ${D}${bindir}/
+    install -m 755 ${B}/cd_idt8 ${D}${bindir}/
+}
meta-oe/recipes-support/colord/colord-native/0001-Move-the-function-cd_icc_create_from_edid-to-avoid-u.patch new file +166 -0

166 lines not on this page · raw message

meta-oe/recipes-support/colord/colord-native/Makefile new file +48 -0

48 lines not on this page · raw message

meta-oe/recipes-support/colord/colord.bb new file +45 -0

45 lines not on this page · raw message

meta-oe/recipes-support/colord/colord.inc new file +13 -0
new file mode 100644
index 000000000..7497fed51
@@ -0,0 +1,13 @@
+SUMMARY = "Making color management just work"
+HOMEPAGE = "https://www.freedesktop.org/software/colord/"
+LICENSE = "GPLv2 & LGPLv2.1"
+LIC_FILES_CHKSUM = " \
+    file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+    file://meson.build;beginline=3;endline=3;md5=f42198707d793be58b274d34fd5238c3 \
+"
+
+PV = "1.4.4"
+SRC_URI = "https://www.freedesktop.org/software/colord/releases/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "32c2709a6002d9ee750483aaed6379c8"
+SRC_URI[sha256sum] = "9a0fe80160bf88efddb582a9fc0169f56065276dc3882c47dddb9eecd048c0a5"
+
meta-oe/recipes-support/colord/colord/0001-Run-native-cd_idt8-cd_create_profile.patch new file +59 -0

59 lines not on this page · raw message

Signature · 1 line
2.21.0
#2 lore raw

Re: [PATCH v2] colord: initial add 1.4.4

OK a bit better, native seems to build but target one fails when building for non-systemd distros
see https://errors.yoctoproject.org/Errors/Details/274721/

Quoted 469 lines · Andreas Müller

* It is a dependency for upcoming gnome-settings-daemon
* It is used by GNOME and KDE [1] so move it to meta-oe
* Getting it to build was a bit tricky. Udev (systemd) is a mandatory dependency and for native we do not support build. To get around native build was stripped down to what's necessary only. Native build is done with the help of configuration in recipe and (old-school) Makefile. This solution was chosen to avoid massive patching of meson build which tends to be a maintenance burden (as experienced at KDE recipes in meta-qt5-extra).

[1] https://www.freedesktop.org/software/colord/intro.html

---
v1 -> v2: native replace pkg-config by pkg-config-native in Makefile to avoid building with build host libs

 .../recipes-support/colord/colord-native.bb   |  64 +++++++
 ...n-cd_icc_create_from_edid-to-avoid-u.patch | 166 ++++++++++++++++++
 .../colord/colord-native/Makefile             |  48 +++++
 meta-oe/recipes-support/colord/colord.bb      |  45 +++++
 meta-oe/recipes-support/colord/colord.inc     |  13 ++
 ...Run-native-cd_idt8-cd_create_profile.patch |  59 +++++++
 6 files changed, 395 insertions(+)
 create mode 100644 meta-oe/recipes-support/colord/colord-native.bb
 create mode 100644 meta-oe/recipes-support/colord/colord-native/0001-Move-the-function-cd_icc_create_from_edid-to-avoid-u.patch
 create mode 100644 meta-oe/recipes-support/colord/colord-native/Makefile
 create mode 100644 meta-oe/recipes-support/colord/colord.bb
 create mode 100644 meta-oe/recipes-support/colord/colord.inc
 create mode 100644 meta-oe/recipes-support/colord/colord/0001-Run-native-cd_idt8-cd_create_profile.patch
meta-oe/recipes-support/colord/colord-native.bb new file +64 -0
new file mode 100644
index 000000000..845041cc4
@@ -0,0 +1,64 @@
+require ${BPN}.inc
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}-native:"
+
+inherit meson native
+
+DEPENDS += " \
+    meson-native \
+    glib-2.0-native \
+    lcms-native \
+"
+
+SRC_URI += " \
+    file://0001-Move-the-function-cd_icc_create_from_edid-to-avoid-u.patch \
+    file://Makefile;subdir=${BPN}-${PV} \
+"
+
+do_configure() {
+    # we expect meson to fail - but before it extracts project's version in log file
+    meson ${MESONOPTS} "${MESON_SOURCEPATH}" "${B}" ${MESON_CROSS_FILE} ${EXTRA_OEMESON} > /dev/null 2>&1 || true
+
+    # extract and split version
+    version=`grep 'Project version:' ${B}/meson-logs/meson-log.txt | sed 's|Project version: ||'`
+    major=`echo $version | cut -d. -f1`
+    minor=`echo $version | cut -d. -f2`
+    micro=`echo $version | cut -d. -f3`
+    echo "Project version: $major.$minor.$micro"
+
+    # extract project name
+    proj_name=`grep 'Project name:' ${B}/meson-logs/meson-log.txt | sed 's|Project name: ||'`
+
+    # create cd-version.h
+    mkdir -p ${B}/colord
+       sed ${S}/lib/colord/cd-version.h.in \
+               -e 's:@CD_MAJOR_VERSION_PRIVATE@:1:g' \
+               -e 's:@CD_MINOR_VERSION_PRIVATE@:4:g' \
+               -e 's:@CD_MICRO_VERSION_PRIVATE@:4:g' \
+               > ${B}/colord/cd-version.h
+
+    # create config.h based on target build and add what's necessary only
+    localedir=`echo ${datadir}/locale | sed 's:${prefix}/::g'`
+    echo "#define LOCALEDIR \"$localedir\"" >> ${B}/config.h
+    echo "#define GETTEXT_PACKAGE \"colord\"" >> ${B}/config.h
+    echo "#define PACKAGE_NAME \"$proj_name\"" >> ${B}/config.h
+    echo "#define PACKAGE_VERSION \"$version\"" >> ${B}/config.h
+}
+
+do_compile() {
+    oe_runmake -C${S} DESTDIR=${B}
+}
+
+do_install() {
+    version=`grep 'Project version:' ${B}/meson-logs/meson-log.txt | sed 's|Project version: ||'`
+    major=`echo $version | cut -d. -f1`
+
+    install -d ${D}${libdir}
+    install -m 755 ${B}/libcolord.so ${D}${libdir}/libcolord.so.$version
+    ln -s libcolord.so.$version "${D}/${libdir}/libcolord.so"
+    ln -s libcolord.so.$version "${D}/${libdir}/libcolord.so.$major"
+
+    install -d ${D}${bindir}
+    install -m 755 ${B}/cd_create_profile ${D}${bindir}/
+    install -m 755 ${B}/cd_idt8 ${D}${bindir}/
+}
meta-oe/recipes-support/colord/colord-native/0001-Move-the-function-cd_icc_create_from_edid-to-avoid-u.patch new file +166 -0
new file mode 100644
index 000000000..278b90e07
@@ -0,0 +1,166 @@
+From cbb8f5c05fce1d56ae2e5fa9f57fc49c47bed5ab Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <[email protected]>
+Date: Sun, 12 May 2019 21:58:02 +0200
+Subject: [PATCH] Move the function cd_icc_create_from_edid to avoid udev
+ dependeny
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+We do not have udev-native so it is a dependeny we cannot satisfy
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Andreas Müller <[email protected]>
+---
+ lib/colord/cd-edid.c | 63 ++++++++++++++++++++++++++++++++++++++++++++
+ lib/colord/cd-icc.c  | 62 -------------------------------------------
+ 2 files changed, 63 insertions(+), 62 deletions(-)
+
+diff --git a/lib/colord/cd-edid.c b/lib/colord/cd-edid.c
+index a5e2328..dec509a 100644
+--- a/lib/colord/cd-edid.c
++++ b/lib/colord/cd-edid.c
+@@ -687,3 +687,66 @@ cd_edid_new (void)
+       edid = g_object_new (CD_TYPE_EDID, NULL);
+       return CD_EDID (edid);
+ }
++
++/**
++ * cd_icc_create_from_edid_data:
++ * @icc: A valid #CdIcc
++ * @edid: EDID data
++ * @error: A #GError, or %NULL
++ *
++ * Creates an ICC profile from EDID data.
++ *
++ * Return value: %TRUE for success
++ *
++ * Since: 1.1.2
++ **/
++gboolean
++cd_icc_create_from_edid_data (CdIcc *icc, CdEdid *edid, GError **error)
++{
++      CdIccPrivate *priv = GET_PRIVATE (icc);
++      const gchar *data;
++
++      /* not loaded */
++      if (priv->lcms_profile != NULL) {
++              g_set_error_literal (error,
++                                   CD_ICC_ERROR,
++                                   CD_ICC_ERROR_FAILED_TO_CREATE,
++                                   "already loaded or generated");
++              return FALSE;
++      }
++
++      /* create from parsed object */
++      if (!cd_icc_create_from_edid (icc,
++                                    cd_edid_get_gamma (edid),
++                                    cd_edid_get_red (edid),
++                                    cd_edid_get_green (edid),
++                                    cd_edid_get_blue (edid),
++                                    cd_edid_get_white (edid),
++                                    error)) {
++              return FALSE;
++      }
++
++      /* set copyright */
++      cd_icc_set_copyright (icc, NULL,
++                            /* deliberately not translated */
++                            "This profile is free of known copyright restrictions.");
++
++      /* set 'ICC meta Tag for Monitor Profiles' data */
++      data = cd_edid_get_checksum (edid);
++      if (data != NULL)
++              cd_icc_add_metadata (icc, CD_PROFILE_METADATA_EDID_MD5, data);
++      data = cd_edid_get_monitor_name (edid);
++      if (data != NULL)
++              cd_icc_add_metadata (icc, CD_PROFILE_METADATA_EDID_MODEL, data);
++      data = cd_edid_get_serial_number (edid);
++      if (data != NULL)
++              cd_icc_add_metadata (icc, CD_PROFILE_METADATA_EDID_SERIAL, data);
++      data = cd_edid_get_pnp_id (edid);
++      if (data != NULL)
++              cd_icc_add_metadata (icc, CD_PROFILE_METADATA_EDID_MNFT, data);
++      data = cd_edid_get_vendor_name (edid);
++      if (data != NULL)
++              cd_icc_add_metadata (icc, CD_PROFILE_METADATA_EDID_VENDOR, data);
++      return TRUE;
++}
++
+diff --git a/lib/colord/cd-icc.c b/lib/colord/cd-icc.c
+index f231814..2c8fe77 100644
+--- a/lib/colord/cd-icc.c
++++ b/lib/colord/cd-icc.c
+@@ -3094,68 +3094,6 @@ out:
+       return ret;
+ }
+
+-/**
+- * cd_icc_create_from_edid_data:
+- * @icc: A valid #CdIcc
+- * @edid: EDID data
+- * @error: A #GError, or %NULL
+- *
+- * Creates an ICC profile from EDID data.
+- *
+- * Return value: %TRUE for success
+- *
+- * Since: 1.1.2
+- **/
+-gboolean
+-cd_icc_create_from_edid_data (CdIcc *icc, CdEdid *edid, GError **error)
+-{
+-      CdIccPrivate *priv = GET_PRIVATE (icc);
+-      const gchar *data;
+-
+-      /* not loaded */
+-      if (priv->lcms_profile != NULL) {
+-              g_set_error_literal (error,
+-                                   CD_ICC_ERROR,
+-                                   CD_ICC_ERROR_FAILED_TO_CREATE,
+-                                   "already loaded or generated");
+-              return FALSE;
+-      }
+-
+-      /* create from parsed object */
+-      if (!cd_icc_create_from_edid (icc,
+-                                    cd_edid_get_gamma (edid),
+-                                    cd_edid_get_red (edid),
+-                                    cd_edid_get_green (edid),
+-                                    cd_edid_get_blue (edid),
+-                                    cd_edid_get_white (edid),
+-                                    error)) {
+-              return FALSE;
+-      }
+-
+-      /* set copyright */
+-      cd_icc_set_copyright (icc, NULL,
+-                            /* deliberately not translated */
+-                            "This profile is free of known copyright restrictions.");
+-
+-      /* set 'ICC meta Tag for Monitor Profiles' data */
+-      data = cd_edid_get_checksum (edid);
+-      if (data != NULL)
+-              cd_icc_add_metadata (icc, CD_PROFILE_METADATA_EDID_MD5, data);
+-      data = cd_edid_get_monitor_name (edid);
+-      if (data != NULL)
+-              cd_icc_add_metadata (icc, CD_PROFILE_METADATA_EDID_MODEL, data);
+-      data = cd_edid_get_serial_number (edid);
+-      if (data != NULL)
+-              cd_icc_add_metadata (icc, CD_PROFILE_METADATA_EDID_SERIAL, data);
+-      data = cd_edid_get_pnp_id (edid);
+-      if (data != NULL)
+-              cd_icc_add_metadata (icc, CD_PROFILE_METADATA_EDID_MNFT, data);
+-      data = cd_edid_get_vendor_name (edid);
+-      if (data != NULL)
+-              cd_icc_add_metadata (icc, CD_PROFILE_METADATA_EDID_VENDOR, data);
+-      return TRUE;
+-}
+-
+ /**
+  * cd_icc_create_from_edid:
+  * @icc: A valid #CdIcc
+--
+2.20.1
+
meta-oe/recipes-support/colord/colord-native/Makefile new file +48 -0
new file mode 100644
index 000000000..94e929ef4
@@ -0,0 +1,48 @@
+# For native build cd_idt8, cd_create_profile and a tiny version of libcolord.so
+# only. By reducing the library to what's necessary, we avoid dependencies on
+# naitve udev and libgudev
+
+CFLAGS+=$(shell pkg-config-native --cflags gio-2.0)
+CFLAGS+=$(shell pkg-config-native --cflags lcms2)
+CFLAGS+=-I./lib -I./lib/colord -I$(DESTDIR) -DCD_COMPILATION
+
+LDFLAGS+=$(shell pkg-config-native --libs gio-2.0)
+LDFLAGS+=$(shell pkg-config-native --libs lcms2)
+LDFLAGS+=-lm
+
+all: cd_idt8 cd_create_profile
+
+LIBSOURCES = \
+       lib/colord/cd-it8.c \
+       lib/colord/cd-color.c \
+       lib/colord/cd-spectrum.c \
+       lib/colord/cd-math.c \
+       lib/colord/cd-interp-akima.c \
+       lib/colord/cd-context-lcms.c \
+       lib/colord/cd-interp.c \
+       lib/colord/cd-interp-linear.c \
+       lib/colord/cd-it8-utils.c \
+       lib/colord/cd-enum.c \
+    lib/colord/cd-icc.c \
+    lib/colord/cd-icc-utils.c \
+    lib/colord/cd-dom.c
+
+libcolord.so: $(LIBSOURCES)
+       $(CC) $(CFLAGS) -fPIC -shared -Wl,-soname,$@ $^ -o $(DESTDIR)/$@
+
+cd_idt8.o: client/cd-it8.c
+       $(CC) $(CFLAGS) -c $^ -o $(DESTDIR)/$@
+
+cd_idt8: libcolord.so cd_idt8.o
+       $(CC) $(LDFLAGS) -L$(DESTDIR) -lcolord $(DESTDIR)/cd_idt8.o -o $(DESTDIR)/$@
+
+cd_create_profile.o: client/cd-create-profile.c
+       $(CC) $(CFLAGS) -c $^ -o $(DESTDIR)/$@
+
+cd_create_profile: libcolord.so cd_create_profile.o
+       $(CC) $(LDFLAGS) -L$(DESTDIR) -lcolord $(DESTDIR)/cd_create_profile.o -o $(DESTDIR)/$@
+
+.PHONY: clean
+
+clean:
+       rm -f $(DESTDIR)/libcolord.so $(DESTDIR)/*.o $(DESTDIR)/cd_idt8 $(DESTDIR)/cd_create_profile
meta-oe/recipes-support/colord/colord.bb new file +45 -0
new file mode 100644
index 000000000..5c691e463
@@ -0,0 +1,45 @@
+require ${BPN}.inc
+
+inherit meson gobject-introspection gsettings gettext bash-completion systemd distro_features_check useradd
+
+# polkit and gobject-introspection are mandatory and cannot be configured
+REQUIRED_DISTRO_FEATURES = "polkit gobject-introspection-data"
+UNKNOWN_CONFIGURE_WHITELIST_append = " introspection"
+
+DEPENDS += " \
+    ${BPN}-native \
+    glib-2.0 \
+    lcms \
+    sqlite3 \
+    libgusb \
+    libgudev \
+    polkit \
+"
+
+SRC_URI += " \
+    file://0001-Run-native-cd_idt8-cd_create_profile.patch \
+"
+
+EXTRA_OEMESON = " \
+    -Dman=false \
+    -Ddocs=false \
+"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+PACKAGECONFIG[systemd] = "-Dsystemd=true, -Dsystemd=true, systemd"
+
+SYSTEMD_SERVICE_${PN} = "colord.service"
+
+FILES_${PN} += " \
+    ${datadir}/dbus-1 \
+    ${datadir}/polkit-1 \
+    ${datadir}/glib-2.0 \
+    ${datadir}/color \
+    ${systemd_user_unitdir} \
+    ${libdir}/tmpfiles.d \
+    ${libdir}/colord-plugins \
+    ${libdir}/colord-sensors \
+"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --user-group -d /var/lib/colord -s /bin/false colord"
meta-oe/recipes-support/colord/colord.inc new file +13 -0
new file mode 100644
index 000000000..7497fed51
@@ -0,0 +1,13 @@
+SUMMARY = "Making color management just work"
+HOMEPAGE = "https://www.freedesktop.org/software/colord/"
+LICENSE = "GPLv2 & LGPLv2.1"
+LIC_FILES_CHKSUM = " \
+    file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+    file://meson.build;beginline=3;endline=3;md5=f42198707d793be58b274d34fd5238c3 \
+"
+
+PV = "1.4.4"
+SRC_URI = "https://www.freedesktop.org/software/colord/releases/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "32c2709a6002d9ee750483aaed6379c8"
+SRC_URI[sha256sum] = "9a0fe80160bf88efddb582a9fc0169f56065276dc3882c47dddb9eecd048c0a5"
+
meta-oe/recipes-support/colord/colord/0001-Run-native-cd_idt8-cd_create_profile.patch new file +59 -1
new file mode 100644
index 000000000..4b52aa337
@@ -0,0 +1,59 @@
+From 5aad8831c0fb71940d6c4f982b0b30ffb6ae33b3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <[email protected]>
+Date: Sun, 12 May 2019 22:47:05 +0200
+Subject: [PATCH] Run native cd_idt8/cd_create_profile
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Andreas Müller <[email protected]>
+---
+ data/cmf/meson.build        | 2 +-
+ data/illuminant/meson.build | 2 +-
+ data/profiles/meson.build   | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/data/cmf/meson.build b/data/cmf/meson.build
+index a693cd7..1ae3613 100644
+--- a/data/cmf/meson.build
++++ b/data/cmf/meson.build
+@@ -2,7 +2,7 @@ foreach arg: [ 'CIE1964-10deg-XYZ', 'CIE1931-2deg-XYZ' ]
+   custom_target(arg,
+     input: arg + '.csv',
+     output: arg + '.cmf',
+-    command: [ cd_idt8, 'create-cmf', '@OUTPUT@', '@INPUT@', '1.0' ],
++    command: [ 'cd_idt8', 'create-cmf', '@OUTPUT@', '@INPUT@', '1.0' ],
+     install: true,
+     install_dir: join_paths(datadir, 'colord', 'cmf')
+   )
+diff --git a/data/illuminant/meson.build b/data/illuminant/meson.build
+index f8dfa07..ad7dced 100644
+--- a/data/illuminant/meson.build
++++ b/data/illuminant/meson.build
+@@ -24,7 +24,7 @@ foreach arg: generated_spectra
+   custom_target(arg,
+     input: arg + '.csv',
+     output: arg + '.sp',
+-    command: [ cd_idt8, 'create-sp', '@OUTPUT@', '@INPUT@', '100.0' ],
++    command: [ 'cd_idt8', 'create-sp', '@OUTPUT@', '@INPUT@', '100.0' ],
+     install: true,
+     install_dir: join_paths(datadir, 'colord', 'illuminant')
+   )
+diff --git a/data/profiles/meson.build b/data/profiles/meson.build
+index 591b97d..2cef011 100644
+--- a/data/profiles/meson.build
++++ b/data/profiles/meson.build
+@@ -59,7 +59,7 @@ foreach arg: icc_profiles
+   generated_icc = custom_target(arg + '.icc',
+     input: xml_i18n,
+     output: arg + '.icc',
+-    command: [ cd_create_profile, '--output=@OUTPUT@', '@INPUT@' ],
++    command: [ 'cd_create_profile', '--output=@OUTPUT@', '@INPUT@' ],
+     install: true,
+     install_dir: join_paths(datadir, 'color', 'icc', 'colord'),
+   )
+--
+2.20.1
+
--

2.21.0

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#3 lore raw

Re: [PATCH v2] colord: initial add 1.4.4

Quoted 6 lines · Khem Raj

OK a bit better, native seems to build but target one fails when building for non-systemd distros
see https://errors.yoctoproject.org/Errors/Details/274721/

Quoted 1 line

+PACKAGECONFIG[systemd] = "-Dsystemd=true, -Dsystemd=true, systemd"

^ Caused by typo here

sorry for wasting your time - V3 arrives soon

Andreas

#4 lore raw

PATCH 1/2 gnome-help.bbclass: Handle gnome-help files with new distro feature 'helpfiles'

In reply to Andreas Müller

Now that we can build gnome help files, let our users decide what to do with them:

if 'helpfiles' not in DISTRO_FEATURES
delete all help contents during install
else
if PACKAGE_NO_HELP_SPLIT == 1

      pack all help files to ${PN}-help
  else
      pack help files to ${PN}-help-<lingua>
---
 meta-gnome/classes/gnome-help.bbclass | 69 +++++++++++++++++++++++++++
 meta-gnome/conf/layer.conf            |  3 ++
 2 files changed, 72 insertions(+)
 create mode 100644 meta-gnome/classes/gnome-help.bbclass
meta-gnome/classes/gnome-help.bbclass new file +69 -0
new file mode 100644
index 000000000..967091ba4
@@ -0,0 +1,69 @@
+# Class to pack gnome help files or delete them during install
+# There are the following cases:
+#
+# if 'helpfiles' not in DISTRO_FEATURES
+#     delete all help contants during install
+# else
+#   if PACKAGE_NO_HELP_SPLIT == 1
+#       pack all help files to ${PN}-help
+#   else
+#       pack all help files to ${PN}-help-<lingua>
+
+FILES_${PN}-help = "${datadir}/*/translations"
+
+# Dummy to get yelp build & PACKAGE_NO_HELP_SPLIT set 1
+PACKAGES_append = " ${PN}-help"
+FILES_${PN}-help = "${datadir}/help"
+RRECOMMENDS_${PN}-help = "${@bb.utils.contains('DISTRO_FEATURES','helpfiles','yelp','',d)}"
+
+do_install_append() {
+    if ${@bb.utils.contains('DISTRO_FEATURES','helpfiles','false','true',d)}; then
+        rm -rf ${D}${datadir}/help/*
+    fi
+}
+
+python gnome_do_split_help() {
+    if bb.utils.contains('DISTRO_FEATURES', 'helpfiles', False, True, d):
+        return
+
+    if (d.getVar('PACKAGE_NO_HELP_SPLIT') == '1'):
+        # all help files go to ${
+        bb.debug(1, "package requested not splitting help-files")
+        return
+
+    packages = (d.getVar('PACKAGES') or "").split()
+    datadir = d.getVar('datadir')
+    dvar = d.getVar('PKGD')
+    pn = d.getVar('PN')
+
+    if pn + '-help' in packages:
+        packages.remove(pn + '-help')
+
+    helpdir = os.path.join(dvar + datadir, 'help')
+
+    if not cpath.isdir(helpdir):
+        bb.warn("No help files in this package - remove gnome-help from inherit?")
+        return
+
+    helps = os.listdir(helpdir)
+
+    summary = d.getVar('SUMMARY') or pn
+    description = d.getVar('DESCRIPTION') or ""
+    locale_section = d.getVar('LOCALE_SECTION')
+    mlprefix = d.getVar('MLPREFIX') or ""
+    for l in sorted(helps):
+        ln = legitimize_package_name(l)
+        pkg = pn + '-help-' + ln
+        packages.append(pkg)
+        d.setVar('FILES_' + pkg, os.path.join(datadir, 'help', l))
+        d.setVar('RRECOMMENDS_' + pkg, '%syelp' % mlprefix)
+        d.setVar('SUMMARY_' + pkg, '%s - %s help' % (summary, l))
+        d.setVar('DESCRIPTION_' + pkg, '%s  This package contains language help files for the %s locale.' % (description, l))
+        if locale_section:
+            d.setVar('SECTION_' + pkg, locale_section)
+
+    d.setVar('PACKAGES', ' '.join(packages))
+}
+
+PACKAGESPLITFUNCS_prepend = "gnome_do_split_help "
+
meta-gnome/conf/layer.conf +3 -0
index 862d622ee..c4d4574bc 100644
@@ -15,3 +15,6 @@ LAYERVERSION_gnome-layer = "1"
 LAYERDEPENDS_gnome-layer = "core openembedded-layer networking-layer"
 
 LAYERSERIES_COMPAT_gnome-layer = "thud warrior zeus"
+
+# GNOME Help files
+PACKAGES_DYNAMIC_append = " ^${PN}-help-.*"
Signature · 1 line
2.21.0
#5 lore raw

Re: [PATCH 1/2] gnome-help.bbclass: Handle gnome-help files with new distro feature 'helpfiles'

Quoted 99 lines · Andreas Müller

Now that we can build gnome help files, let our users decide what to do with them:

if 'helpfiles' not in DISTRO_FEATURES
delete all help contents during install
else
if PACKAGE_NO_HELP_SPLIT == 1

      pack all help files to ${PN}-help
  else
      pack help files to ${PN}-help-<lingua>
---
 meta-gnome/classes/gnome-help.bbclass | 69 +++++++++++++++++++++++++++
 meta-gnome/conf/layer.conf            |  3 ++
 2 files changed, 72 insertions(+)
 create mode 100644 meta-gnome/classes/gnome-help.bbclass
meta-gnome/classes/gnome-help.bbclass new file +69 -0
new file mode 100644
index 000000000..967091ba4
@@ -0,0 +1,69 @@
+# Class to pack gnome help files or delete them during install
+# There are the following cases:
+#
+# if 'helpfiles' not in DISTRO_FEATURES
+#     delete all help contants during install
+# else
+#   if PACKAGE_NO_HELP_SPLIT == 1
+#       pack all help files to ${PN}-help
+#   else
+#       pack all help files to ${PN}-help-<lingua>
+
+FILES_${PN}-help = "${datadir}/*/translations"
+
+# Dummy to get yelp build & PACKAGE_NO_HELP_SPLIT set 1
+PACKAGES_append = " ${PN}-help"
+FILES_${PN}-help = "${datadir}/help"
+RRECOMMENDS_${PN}-help = "${@bb.utils.contains('DISTRO_FEATURES','helpfiles','yelp','',d)}"
+
+do_install_append() {
+    if ${@bb.utils.contains('DISTRO_FEATURES','helpfiles','false','true',d)}; then
+        rm -rf ${D}${datadir}/help/*
+    fi
+}
+
+python gnome_do_split_help() {
+    if bb.utils.contains('DISTRO_FEATURES', 'helpfiles', False, True, d):
+        return
+
+    if (d.getVar('PACKAGE_NO_HELP_SPLIT') == '1'):
+        # all help files go to ${
+        bb.debug(1, "package requested not splitting help-files")
+        return
+
+    packages = (d.getVar('PACKAGES') or "").split()
+    datadir = d.getVar('datadir')
+    dvar = d.getVar('PKGD')
+    pn = d.getVar('PN')
+
+    if pn + '-help' in packages:
+        packages.remove(pn + '-help')
+
+    helpdir = os.path.join(dvar + datadir, 'help')
+
+    if not cpath.isdir(helpdir):
+        bb.warn("No help files in this package - remove gnome-help from inherit?")
+        return
+
+    helps = os.listdir(helpdir)
+
+    summary = d.getVar('SUMMARY') or pn
+    description = d.getVar('DESCRIPTION') or ""
+    locale_section = d.getVar('LOCALE_SECTION')
+    mlprefix = d.getVar('MLPREFIX') or ""
+    for l in sorted(helps):
+        ln = legitimize_package_name(l)
+        pkg = pn + '-help-' + ln
+        packages.append(pkg)
+        d.setVar('FILES_' + pkg, os.path.join(datadir, 'help', l))
+        d.setVar('RRECOMMENDS_' + pkg, '%syelp' % mlprefix)
+        d.setVar('SUMMARY_' + pkg, '%s - %s help' % (summary, l))
+        d.setVar('DESCRIPTION_' + pkg, '%s  This package contains language help files for the %s locale.' % (description, l))
+        if locale_section:
+            d.setVar('SECTION_' + pkg, locale_section)
+
+    d.setVar('PACKAGES', ' '.join(packages))
+}
+
+PACKAGESPLITFUNCS_prepend = "gnome_do_split_help "
+
meta-gnome/conf/layer.conf +0 -0
index 862d622ee..c4d4574bc 100644

meta-gnome/conf/layer.conf LAYERVERSION_gnome-layer = "1" · line 20

Quoted 6 lines
meta-gnome/conf/layer.conf +3 -0
@@ -15,3 +15,6 @@ LAYERVERSION_gnome-layer = "1"
 LAYERDEPENDS_gnome-layer = "core openembedded-layer networking-layer"
 
 LAYERSERIES_COMPAT_gnome-layer = "thud warrior zeus"
+
+# GNOME Help files
+PACKAGES_DYNAMIC_append = " ^${PN}-help-.*"

if we put this in layer.conf it will appear at global config meta data, since it remains pertinent to gnome
perhaps its best to add it in gnome related bbclass maybe

Quoted 8 lines

--
2.21.0

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#6 lore raw

Re: [PATCH 1/2] gnome-help.bbclass: Handle gnome-help files with new distro feature 'helpfiles'

Quoted 5 lines · Khem Raj
Quoted 1 line

+PACKAGES_DYNAMIC_append = " ^${PN}-help-.*"

if we put this in layer.conf it will appear at global config meta data, since it remains pertinent to gnome
perhaps its best to add it in gnome related bbclass maybe

You are right this looks odd. Try to remember what my thought were >6 month ago but I think this is another candidate for V2 (or with the others V3)

Andreas

#7 lore raw

PATCH 2/2 zenity: rework recipe

In reply to Andreas Müller

* "xz" is default for GNOME_COMPRESS_TYPE
* instead of patching away help-files, build them and let users decide if and how to pack them by inheriting gnome-help.bbclass

---
 .../0001-build-don-t-generate-manual.patch    | 50 -------------------
 .../recipes-gnome/zenity/zenity_3.32.0.bb     | 12 ++---
 2 files changed, 5 insertions(+), 57 deletions(-)
 delete mode 100644 meta-gnome/recipes-gnome/zenity/zenity/0001-build-don-t-generate-manual.patch
meta-gnome/recipes-gnome/zenity/zenity/0001-build-don-t-generate-manual.patch deleted +0 -50
deleted file mode 100644
index 488548667..000000000
@@ -1,50 +0,0 @@
-From 38eeb345fdfca0298b11427aa942b68e627ba10e Mon Sep 17 00:00:00 2001
-From: Bartosz Golaszewski <[email protected]>
-Date: Thu, 12 Sep 2019 13:14:55 +0200
-Subject: [PATCH] build: don't generate manual
-
-We don't have yelp in yocto and even if we did it would pull in
-webkitgtk just to generate help. Just remove the manual generation
-altogether.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Bartosz Golaszewski <[email protected]>
----
- Makefile.am  | 3 +--
- configure.ac | 5 -----
- 2 files changed, 1 insertion(+), 7 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 81ae6a7..bd073dd 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -4,8 +4,7 @@ AM_CPPFLAGS = src
- SUBDIRS = \
- 	src	\
- 	po	\
--	data	\
--	help
-+	data
- 
- EXTRA_DIST = \
- 	autogen.sh		\
-diff --git a/configure.ac b/configure.ac
-index 5dccdb0..f88b2c0 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -115,11 +115,6 @@ GETTEXT_PACKAGE=zenity
- AC_SUBST([GETTEXT_PACKAGE])
- AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext domain])
- 
--# *******************************
--# User manual
--# *******************************
--YELP_HELP_INIT
--
- # *******************************
- 
- AC_SUBST([AM_CPPFLAGS])
--- 
-2.21.0
-
meta-gnome/recipes-gnome/zenity/zenity_3.32.0.bb +5 -7
index 295288bfb..fb58d1712 100644
@@ -4,19 +4,17 @@ LICENSE = "GPLv2+"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
 
-inherit distro_features_check gnomebase gettext
+inherit gnomebase gnome-help distro_features_check gettext
 
-DEPENDS = "gtk+3"
+DEPENDS = " \
+    yelp-tools-native \
+    gtk+3 \
+"
 
 REQUIRED_DISTRO_FEATURES = "x11"
 
-SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \
-    file://0001-build-don-t-generate-manual.patch \
-"
-
 SRC_URI[archive.md5sum] = "ba2b2a13248773b4ec0fd323d95e6d5a"
 SRC_URI[archive.sha256sum] = "e786e733569c97372c3ef1776e71be7e7599ebe87e11e8ad67dcc2e63a82cd95"
-GNOME_COMPRESS_TYPE="xz"
 
 do_install_append() {
     # Remove gdialog compatibility helper - we don't want to pull in perl
Signature · 1 line
2.21.0
#8 lore raw

Re: [PATCH 2/2] zenity: rework recipe

I dropped https://patchwork.openembedded.org/patch/166178/ and took this one. It seems to include those changes as well.

Quoted 105 lines · Andreas Müller

* "xz" is default for GNOME_COMPRESS_TYPE
* instead of patching away help-files, build them and let users decide if and how to pack them by inheriting gnome-help.bbclass

---
 .../0001-build-don-t-generate-manual.patch    | 50 -------------------
 .../recipes-gnome/zenity/zenity_3.32.0.bb     | 12 ++---
 2 files changed, 5 insertions(+), 57 deletions(-)
 delete mode 100644 meta-gnome/recipes-gnome/zenity/zenity/0001-build-don-t-generate-manual.patch
meta-gnome/recipes-gnome/zenity/zenity/0001-build-don-t-generate-manual.patch deleted +0 -50
deleted file mode 100644
index 488548667..000000000
@@ -1,50 +0,0 @@
-From 38eeb345fdfca0298b11427aa942b68e627ba10e Mon Sep 17 00:00:00 2001
-From: Bartosz Golaszewski <[email protected]>
-Date: Thu, 12 Sep 2019 13:14:55 +0200
-Subject: [PATCH] build: don't generate manual
-
-We don't have yelp in yocto and even if we did it would pull in
-webkitgtk just to generate help. Just remove the manual generation
-altogether.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Bartosz Golaszewski <[email protected]>
----
- Makefile.am  | 3 +--
- configure.ac | 5 -----
- 2 files changed, 1 insertion(+), 7 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 81ae6a7..bd073dd 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -4,8 +4,7 @@ AM_CPPFLAGS = src
- SUBDIRS = \
-       src     \
-       po      \
--      data    \
--      help
-+      data
-
- EXTRA_DIST = \
-       autogen.sh              \
-diff --git a/configure.ac b/configure.ac
-index 5dccdb0..f88b2c0 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -115,11 +115,6 @@ GETTEXT_PACKAGE=zenity
- AC_SUBST([GETTEXT_PACKAGE])
- AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext domain])
-
--# *******************************
--# User manual
--# *******************************
--YELP_HELP_INIT
--
- # *******************************
-
- AC_SUBST([AM_CPPFLAGS])
---
-2.21.0
-
meta-gnome/recipes-gnome/zenity/zenity_3.32.0.bb +5 -8
index 295288bfb..fb58d1712 100644
@@ -4,19 +4,17 @@ LICENSE = "GPLv2+"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
 
-inherit distro_features_check gnomebase gettext
+inherit gnomebase gnome-help distro_features_check gettext
 
-DEPENDS = "gtk+3"
+DEPENDS = " \
+    yelp-tools-native \
+    gtk+3 \
+"
 
 REQUIRED_DISTRO_FEATURES = "x11"
 
-SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \
-    file://0001-build-don-t-generate-manual.patch \
-"
-
 SRC_URI[archive.md5sum] = "ba2b2a13248773b4ec0fd323d95e6d5a"
 SRC_URI[archive.sha256sum] = "e786e733569c97372c3ef1776e71be7e7599ebe87e11e8ad67dcc2e63a82cd95"
-GNOME_COMPRESS_TYPE="xz"
 
 do_install_append() {
     # Remove gdialog compatibility helper - we don't want to pull in perl
--

2.21.0

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#11 lore raw

Re: [PATCH 2/2] zenity: rework recipe

Quoted 8 lines · Khem Raj
Quoted 6 lines · Andreas Müller
Quoted 4 lines · Khem Raj

I dropped https://patchwork.openembedded.org/patch/166178/ and took this one. It seems to include those changes as well.

Quoted 7 lines
Quoted 2 lines

Was not precise enough but that was my intention -thanks

this fails to compile e.g.

https://errors.yoctoproject.org/Errors/Details/274743/

Interesting that this pops up now: It is caused by itstool patch [1] and your build host's env not supporting -S. Will send a fix for in the V3 series.

[1] http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-support/itstool/itstool/0001-Don-t-use-build-time-hardcoded-python-binary-path.patch

Andreas

#12 lore raw

Re: [PATCH 2/2] zenity: rework recipe

Quoted 15 lines · Andreas Müller
Quoted 13 lines · Khem Raj
Quoted 8 lines · Andreas Müller
Quoted 4 lines · Khem Raj

I dropped https://patchwork.openembedded.org/patch/166178/ and took this one. It seems to include those changes as well.

Was not precise enough but that was my intention -thanks

this fails to compile e.g.

Quoted 8 lines
Quoted 2 lines

https://errors.yoctoproject.org/Errors/Details/274743/

Interesting that this pops up now: It is caused by itstool patch [1] and your build host's env not supporting -S. Will send a fix for in the V3 series.

[1] http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-support/itstool/itstool/0001-Don-t-use-build-time-hardcoded-python-binary-path.patch

That was too early.. whatever I'll send out once fixed

Andreas