Skip to contentSkip to conversation

gtksourceview4: Adjust for setting S in gnomebase.bbclass

PATCH In review Khem Raj 2 participants 5 messages Nov 19, 2025

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/3 gtksourceview4: Adjust for setting S in gnomebase.bbclass

---
 .../recipes-gnome/gtksourceview/gtksourceview4_4.8.4.bb     | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
meta-gnome/recipes-gnome/gtksourceview/gtksourceview4_4.8.4.bb +2 -4
index b9ff4ef459..01d91d31bf 100644
@@ -6,15 +6,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
 
 DEPENDS = "gtk+3 libxml2 glib-2.0-native"
 
-PNAME = "gtksourceview"
-
-S = "${UNPACKDIR}/${PNAME}-${PV}"
+GNOMEBN = "gtksourceview"
 
 inherit gnomebase lib_package gettext features_check gtk-doc gobject-introspection vala
 
 ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
 
-SRC_URI = "${GNOME_MIRROR}/gtksourceview/4.8/${PNAME}-${PV}.tar.xz \
+SRC_URI = "${GNOME_MIRROR}/gtksourceview/${@oe.utils.trim_version("${PV}", 2)}/${GNOMEBN}-${PV}.tar.xz \
            file://0001-remove-pointless-check.patch"
 SRC_URI[sha256sum] = "7ec9d18fb283d1f84a3a3eff3b7a72b09a10c9c006597b3fbabbb5958420a87d"
 
author
#1 lore raw

PATCH 2/3 gtksourceview3: Adjust for setting S in gnomebase.bbclass

---
 .../recipes-gnome/gtksourceview/gtksourceview3_3.24.11.bb     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-gnome/recipes-gnome/gtksourceview/gtksourceview3_3.24.11.bb +2 -2
index baf4c33d38..83953316c6 100644
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
 
 DEPENDS = "gtk+3 libxml2 glib-2.0-native"
 
-PNAME = "gtksourceview"
+GNOMEBN = "gtksourceview"
 
 S = "${UNPACKDIR}/${PNAME}-${PV}"
 
@@ -18,7 +18,7 @@ REQUIRED_DISTRO_FEATURES = "x11"
 EXTRA_OECONF += "--disable-glade-catalog --disable-gtk-doc --disable-Werror"
 
 CFLAGS += "-Wno-error=incompatible-pointer-types"
-SRC_URI = "${GNOME_MIRROR}/gtksourceview/3.24/${PNAME}-${PV}.tar.xz"
+SRC_URI = "${GNOME_MIRROR}/gtksourceview/${@oe.utils.trim_version("${PV}", 2)}/${GNOMEBN}-${PV}.tar.xz"
 SRC_URI[sha256sum] = "691b074a37b2a307f7f48edc5b8c7afa7301709be56378ccf9cc9735909077fd"
 
 FILES:${PN} += " ${datadir}/gtksourceview-3.0"
author
#2 lore raw

PATCH 3/3 gtksourceview5: Upgrade to 5.18

In reply to Khem Raj

Adjust for setting S in gnomebase.bbclass

---
 ...gtksourceview5_5.16.0.bb => gtksourceview5_5.18.0.bb} | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
 rename meta-gnome/recipes-gnome/gtksourceview/{gtksourceview5_5.16.0.bb => gtksourceview5_5.18.0.bb} (77%)
meta-gnome/recipes-gnome/gtksourceview/gtksourceview5_5.18.0.bb renamed from meta-gnome/recipes-gnome/gtksourceview/gtksourceview5_5.16.0.bb +3 -6
similarity index 77%
rename from meta-gnome/recipes-gnome/gtksourceview/gtksourceview5_5.16.0.bb
rename to meta-gnome/recipes-gnome/gtksourceview/gtksourceview5_5.18.0.bb
index 7076214a4d..334435480e 100644
@@ -14,17 +14,14 @@ DEPENDS = " \
     pango \
 "
 
-PNAME = "gtksourceview"
-
-S = "${UNPACKDIR}/${PNAME}-${PV}"
-
+GNOMEBN = "gtksourceview"
 
 inherit gnomebase lib_package gettext features_check gi-docgen gtk-icon-cache gobject-introspection vala
 
 REQUIRED_DISTRO_FEATURES = "opengl"
 
-SRC_URI = "${GNOME_MIRROR}/gtksourceview/5.16/${PNAME}-${PV}.tar.xz"
-SRC_URI[sha256sum] = "ab35d420102f3e8b055dd3b8642d3a48209f888189e6254d0ffb4b6a7e8c3566"
+SRC_URI = "${GNOME_MIRROR}/gtksourceview/${@oe.utils.trim_version("${PV}", 2)}/${GNOMEBN}-${PV}.tar.xz"
+SRC_URI[sha256sum] = "051a78fe38f793328047e5bcd6d855c6425c0b480c20d9432179e356742c6ac0"
 
 GIR_MESON_ENABLE_FLAG = 'enabled'
 GIR_MESON_DISABLE_FLAG = 'disabled'
#3 lore raw
In reply to Khem Raj
Quoted 4 lines · Khem Raj
meta-gnome/recipes-gnome/gtksourceview/gtksourceview4_4.8.4.bb +1 -1
-SRC_URI = "${GNOME_MIRROR}/gtksourceview/4.8/${PNAME}-${PV}.tar.xz \
+SRC_URI = "${GNOME_MIRROR}/gtksourceview/${@oe.utils.trim_version("${PV}", 2)}/${GNOMEBN}-${PV}.tar.xz \
           file://0001-remove-pointless-check.patch"

SRC_URI[sha256sum] = "7ec9d18fb283d1f84a3a3eff3b7a72b09a10c9c006597b3fbabbb5958420a87d"

You can change the SRC_URI to be just += the patch, as gnomebase has a default SRC_URI too.

Ross

author
#4 lore raw
Quoted 5 lines · Ross Burton

Review

Quoted 2 lines · Khem Raj
(quoted diff) +1 -1
-SRC_URI = "${GNOME_MIRROR}/gtksourceview/4.8/${PNAME}-${PV}.tar.xz \
+SRC_URI =

"${GNOME_MIRROR}/gtksourceview/${@oe.utils.trim_version("${PV}", 2)}/${GNOMEBN}-${PV}.tar.xz \

Quoted 8 lines
Quoted 2 lines
           file://0001-remove-pointless-check.patch"

SRC_URI[sha256sum] =

"7ec9d18fb283d1f84a3a3eff3b7a72b09a10c9c006597b3fbabbb5958420a87d"

You can change the SRC_URI to be just += the patch, as gnomebase has a default SRC_URI too.

Thanks for the fix

Quoted 1 line

Ross