diff mbox series

[2/2] source-highlight: re-add recipe

Message ID 20250410192632.2818966-2-ecordonnier@snap.com
State New
Headers show
Series [1/2] gdb: add source-highlight PACKAGECONFIG option | expand

Commit Message

Etienne Cordonnier April 10, 2025, 7:26 p.m. UTC
From: Etienne Cordonnier <ecordonnier@snap.com>

source-highlight version 3.1.8 was removed in https://web.git.yoctoproject.org/poky/commit/?id=6560db9ddfd39a2715ede96430228306b00f53dd in June 2019 because the was no user left,
however there is now a gdb PACKAGECONFIG option which uses it. Since the last release was in 2019, let's rather use the latest git version.

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
---
 meta/conf/distro/include/maintainers.inc      |  1 +
 .../source-highlight/source-highlight_git.bb  | 36 +++++++++++++++++++
 2 files changed, 37 insertions(+)
 create mode 100644 meta/recipes-support/source-highlight/source-highlight_git.bb

Comments

Alexander Kanavin April 10, 2025, 7:28 p.m. UTC | #1
Unless you want to enable it by default in gdb (and the other patch
shows that is not the case), source-highlight does not have to be in
core. We have plenty of recipes in core with options that require
items from meta-oe or other layers.

Alex

On Thu, 10 Apr 2025 at 21:26, Etienne Cordonnier via
lists.openembedded.org <ecordonnier=snap.com@lists.openembedded.org>
wrote:
>
> From: Etienne Cordonnier <ecordonnier@snap.com>
>
> source-highlight version 3.1.8 was removed in https://web.git.yoctoproject.org/poky/commit/?id=6560db9ddfd39a2715ede96430228306b00f53dd in June 2019 because the was no user left,
> however there is now a gdb PACKAGECONFIG option which uses it. Since the last release was in 2019, let's rather use the latest git version.
>
> Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
> ---
>  meta/conf/distro/include/maintainers.inc      |  1 +
>  .../source-highlight/source-highlight_git.bb  | 36 +++++++++++++++++++
>  2 files changed, 37 insertions(+)
>  create mode 100644 meta/recipes-support/source-highlight/source-highlight_git.bb
>
> diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
> index 2b47d3103c0..831494312b6 100644
> --- a/meta/conf/distro/include/maintainers.inc
> +++ b/meta/conf/distro/include/maintainers.inc
> @@ -777,6 +777,7 @@ RECIPE_MAINTAINER:pn-shutdown-desktop = "Unassigned <unassigned@yoctoproject.org
>  RECIPE_MAINTAINER:pn-signing-keys = "Richard Purdie <richard.purdie@linuxfoundation.org>"
>  RECIPE_MAINTAINER:pn-slang = "Yi Zhao <yi.zhao@windriver.com>"
>  RECIPE_MAINTAINER:pn-socat = "Hongxu Jia <hongxu.jia@windriver.com>"
> +RECIPE_MAINTAINER:pn-source-highlight = "Etienne Cordonnier <ecordonnier@snap.com>"
>  RECIPE_MAINTAINER:pn-speex = "Michael Opdenacker <michael@opdenacker.org>"
>  RECIPE_MAINTAINER:pn-speexdsp = "Michael Opdenacker <michael@opdenacker.org>"
>  RECIPE_MAINTAINER:pn-spirv-headers = "Jose Quaresma <quaresma.jose@gmail.com>"
> diff --git a/meta/recipes-support/source-highlight/source-highlight_git.bb b/meta/recipes-support/source-highlight/source-highlight_git.bb
> new file mode 100644
> index 00000000000..ad5085250cb
> --- /dev/null
> +++ b/meta/recipes-support/source-highlight/source-highlight_git.bb
> @@ -0,0 +1,36 @@
> +SUMMARY = "Syntax highlight utility"
> +DESCRIPTION = "Source-highlight converts source code to formatted text with syntax highlighting."
> +HOMEPAGE = "https://www.gnu.org/software/src-highlite/"
> +LICENSE = "GPL-3.0-only"
> +SECTION = "libs"
> +LIC_FILES_CHKSUM = "file://COPYING;;md5=ff95bfe019feaf92f524b73dd79e76eb"
> +
> +SRCREV = "894cacd0799ca60afa359a63782729dec76cbb79"
> +PV = "3.1.9+git"
> +SRC_URI = "git://git.savannah.gnu.org/git/src-highlite.git;protocol=https;branch=master"
> +S = "${WORKDIR}/git"
> +
> +inherit autotools pkgconfig
> +
> +DEPENDS:append = " bison-native boost"
> +
> +DEPENDS:append:class-target = " ${PN}-native"
> +
> +EXTRA_OECONF="--with-boost-regex=boost_regex"
> +
> +BBCLASSEXTEND = "native nativesdk"
> +
> +PACKAGES += "${PN}-tools ${PN}-data"
> +
> +RDEPENDS:${PN} = "boost-regex ${PN}-data"
> +RDEPENDS:${PN}-tools = "${PN} ${PN}-data bash"
> +
> +FILES:${PN}       = "${libdir}/*${SOLIBS}"
> +FILES:${PN}-data  = "${datadir}/source-highlight"
> +FILES:${PN}-tools = "${bindir} ${sysconfdir}/bash_completion.d"
> +
> +# source-highlight is using its own binary from the build tree to make documentation
> +# let's substitute the native binary instead
> +do_configure:prepend:class-target () {
> +     sed -i -e 's,^SRCHILITEEXE = $(top_builddir).*,SRCHILITEEXE = source-highlight,' ${S}/doc/Makefile.am
> +}
> --
> 2.43.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#214702): https://lists.openembedded.org/g/openembedded-core/message/214702
> Mute This Topic: https://lists.openembedded.org/mt/112197845/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Etienne Cordonnier April 10, 2025, 7:31 p.m. UTC | #2
That's fair enough. My thinking was to try to upstream first to core, since
it used to be there before it was removed, and to also get feedback on
whether you would want to enable this per default gdb. I can also move it
to meta-oe if you think it is better.

Étienne

On Thu, Apr 10, 2025 at 9:28 PM Alexander Kanavin <alex.kanavin@gmail.com>
wrote:

> Unless you want to enable it by default in gdb (and the other patch
> shows that is not the case), source-highlight does not have to be in
> core. We have plenty of recipes in core with options that require
> items from meta-oe or other layers.
>
> Alex
>
> On Thu, 10 Apr 2025 at 21:26, Etienne Cordonnier via
> lists.openembedded.org <ecordonnier=snap.com@lists.openembedded.org>
> wrote:
> >
> > From: Etienne Cordonnier <ecordonnier@snap.com>
> >
> > source-highlight version 3.1.8 was removed in
> https://urldefense.proofpoint.com/v2/url?u=https-3A__web.git.yoctoproject.org_poky_commit_-3Fid-3D6560db9ddfd39a2715ede96430228306b00f53dd&d=DwIBaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=jBI-VlyTB1xFAWS9hMggBpmdK5DJQqcmgvLfhQ68ddzZf4_yp3Vldzt83qQW4zvi&s=GDekE4em2Y0dcrW5i9p81jWBM-rLGDqNCZJM66b8ZzI&e=
> in June 2019 because the was no user left,
> > however there is now a gdb PACKAGECONFIG option which uses it. Since the
> last release was in 2019, let's rather use the latest git version.
> >
> > Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
> > ---
> >  meta/conf/distro/include/maintainers.inc      |  1 +
> >  .../source-highlight/source-highlight_git.bb  | 36 +++++++++++++++++++
> >  2 files changed, 37 insertions(+)
> >  create mode 100644 meta/recipes-support/source-highlight/
> source-highlight_git.bb
> >
> > diff --git a/meta/conf/distro/include/maintainers.inc
> b/meta/conf/distro/include/maintainers.inc
> > index 2b47d3103c0..831494312b6 100644
> > --- a/meta/conf/distro/include/maintainers.inc
> > +++ b/meta/conf/distro/include/maintainers.inc
> > @@ -777,6 +777,7 @@ RECIPE_MAINTAINER:pn-shutdown-desktop = "Unassigned <
> unassigned@yoctoproject.org
> >  RECIPE_MAINTAINER:pn-signing-keys = "Richard Purdie <
> richard.purdie@linuxfoundation.org>"
> >  RECIPE_MAINTAINER:pn-slang = "Yi Zhao <yi.zhao@windriver.com>"
> >  RECIPE_MAINTAINER:pn-socat = "Hongxu Jia <hongxu.jia@windriver.com>"
> > +RECIPE_MAINTAINER:pn-source-highlight = "Etienne Cordonnier <
> ecordonnier@snap.com>"
> >  RECIPE_MAINTAINER:pn-speex = "Michael Opdenacker <
> michael@opdenacker.org>"
> >  RECIPE_MAINTAINER:pn-speexdsp = "Michael Opdenacker <
> michael@opdenacker.org>"
> >  RECIPE_MAINTAINER:pn-spirv-headers = "Jose Quaresma <
> quaresma.jose@gmail.com>"
> > diff --git a/meta/recipes-support/source-highlight/
> source-highlight_git.bb b/meta/recipes-support/source-highlight/
> source-highlight_git.bb
> > new file mode 100644
> > index 00000000000..ad5085250cb
> > --- /dev/null
> > +++ b/meta/recipes-support/source-highlight/source-highlight_git.bb
> > @@ -0,0 +1,36 @@
> > +SUMMARY = "Syntax highlight utility"
> > +DESCRIPTION = "Source-highlight converts source code to formatted text
> with syntax highlighting."
> > +HOMEPAGE = "
> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.gnu.org_software_src-2Dhighlite_&d=DwIBaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=jBI-VlyTB1xFAWS9hMggBpmdK5DJQqcmgvLfhQ68ddzZf4_yp3Vldzt83qQW4zvi&s=lwbvDkI4fDkloLf3cs3QeCgqOBF_LRpfobo2v-EYtEc&e=
> "
> > +LICENSE = "GPL-3.0-only"
> > +SECTION = "libs"
> > +LIC_FILES_CHKSUM =
> "file://COPYING;;md5=ff95bfe019feaf92f524b73dd79e76eb"
> > +
> > +SRCREV = "894cacd0799ca60afa359a63782729dec76cbb79"
> > +PV = "3.1.9+git"
> > +SRC_URI = "git://
> git.savannah.gnu.org/git/src-highlite.git;protocol=https;branch=master"
> > +S = "${WORKDIR}/git"
> > +
> > +inherit autotools pkgconfig
> > +
> > +DEPENDS:append = " bison-native boost"
> > +
> > +DEPENDS:append:class-target = " ${PN}-native"
> > +
> > +EXTRA_OECONF="--with-boost-regex=boost_regex"
> > +
> > +BBCLASSEXTEND = "native nativesdk"
> > +
> > +PACKAGES += "${PN}-tools ${PN}-data"
> > +
> > +RDEPENDS:${PN} = "boost-regex ${PN}-data"
> > +RDEPENDS:${PN}-tools = "${PN} ${PN}-data bash"
> > +
> > +FILES:${PN}       = "${libdir}/*${SOLIBS}"
> > +FILES:${PN}-data  = "${datadir}/source-highlight"
> > +FILES:${PN}-tools = "${bindir} ${sysconfdir}/bash_completion.d"
> > +
> > +# source-highlight is using its own binary from the build tree to make
> documentation
> > +# let's substitute the native binary instead
> > +do_configure:prepend:class-target () {
> > +     sed -i -e 's,^SRCHILITEEXE = $(top_builddir).*,SRCHILITEEXE =
> source-highlight,' ${S}/doc/Makefile.am
> > +}
> > --
> > 2.43.0
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#214702):
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_g_openembedded-2Dcore_message_214702&d=DwIBaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=jBI-VlyTB1xFAWS9hMggBpmdK5DJQqcmgvLfhQ68ddzZf4_yp3Vldzt83qQW4zvi&s=59gbMbCXZ3BY1pfUB3UCI5Czkn6drHSb9wkgR4-e3Ls&e=
> > Mute This Topic:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_mt_112197845_1686489&d=DwIBaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=jBI-VlyTB1xFAWS9hMggBpmdK5DJQqcmgvLfhQ68ddzZf4_yp3Vldzt83qQW4zvi&s=Ll_TLcnLKTlhI4Rm2kaZpieo_LWka4TfPLOsJ6o8ER4&e=
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_g_openembedded-2Dcore_unsub&d=DwIBaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=jBI-VlyTB1xFAWS9hMggBpmdK5DJQqcmgvLfhQ68ddzZf4_yp3Vldzt83qQW4zvi&s=JcEYIhnX11pblaVhmSRW-5aSQ5QHO6L9M7ugjPg0uWU&e=
> [alex.kanavin@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>
Alexander Kanavin April 10, 2025, 7:35 p.m. UTC | #3
I don;t think source highlighting in gdb quite qualifies as a core
embedded functionality? I'd say meta-oe is better.

Alex

On Thu, 10 Apr 2025 at 21:32, Etienne Cordonnier <ecordonnier@snap.com> wrote:
>
> That's fair enough. My thinking was to try to upstream first to core, since it used to be there before it was removed, and to also get feedback on whether you would want to enable this per default gdb. I can also move it to meta-oe if you think it is better.
>
> Étienne
>
> On Thu, Apr 10, 2025 at 9:28 PM Alexander Kanavin <alex.kanavin@gmail.com> wrote:
>>
>> Unless you want to enable it by default in gdb (and the other patch
>> shows that is not the case), source-highlight does not have to be in
>> core. We have plenty of recipes in core with options that require
>> items from meta-oe or other layers.
>>
>> Alex
>>
>> On Thu, 10 Apr 2025 at 21:26, Etienne Cordonnier via
>> lists.openembedded.org <ecordonnier=snap.com@lists.openembedded.org>
>> wrote:
>> >
>> > From: Etienne Cordonnier <ecordonnier@snap.com>
>> >
>> > source-highlight version 3.1.8 was removed in https://urldefense.proofpoint.com/v2/url?u=https-3A__web.git.yoctoproject.org_poky_commit_-3Fid-3D6560db9ddfd39a2715ede96430228306b00f53dd&d=DwIBaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=jBI-VlyTB1xFAWS9hMggBpmdK5DJQqcmgvLfhQ68ddzZf4_yp3Vldzt83qQW4zvi&s=GDekE4em2Y0dcrW5i9p81jWBM-rLGDqNCZJM66b8ZzI&e=  in June 2019 because the was no user left,
>> > however there is now a gdb PACKAGECONFIG option which uses it. Since the last release was in 2019, let's rather use the latest git version.
>> >
>> > Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
>> > ---
>> >  meta/conf/distro/include/maintainers.inc      |  1 +
>> >  .../source-highlight/source-highlight_git.bb  | 36 +++++++++++++++++++
>> >  2 files changed, 37 insertions(+)
>> >  create mode 100644 meta/recipes-support/source-highlight/source-highlight_git.bb
>> >
>> > diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
>> > index 2b47d3103c0..831494312b6 100644
>> > --- a/meta/conf/distro/include/maintainers.inc
>> > +++ b/meta/conf/distro/include/maintainers.inc
>> > @@ -777,6 +777,7 @@ RECIPE_MAINTAINER:pn-shutdown-desktop = "Unassigned <unassigned@yoctoproject.org
>> >  RECIPE_MAINTAINER:pn-signing-keys = "Richard Purdie <richard.purdie@linuxfoundation.org>"
>> >  RECIPE_MAINTAINER:pn-slang = "Yi Zhao <yi.zhao@windriver.com>"
>> >  RECIPE_MAINTAINER:pn-socat = "Hongxu Jia <hongxu.jia@windriver.com>"
>> > +RECIPE_MAINTAINER:pn-source-highlight = "Etienne Cordonnier <ecordonnier@snap.com>"
>> >  RECIPE_MAINTAINER:pn-speex = "Michael Opdenacker <michael@opdenacker.org>"
>> >  RECIPE_MAINTAINER:pn-speexdsp = "Michael Opdenacker <michael@opdenacker.org>"
>> >  RECIPE_MAINTAINER:pn-spirv-headers = "Jose Quaresma <quaresma.jose@gmail.com>"
>> > diff --git a/meta/recipes-support/source-highlight/source-highlight_git.bb b/meta/recipes-support/source-highlight/source-highlight_git.bb
>> > new file mode 100644
>> > index 00000000000..ad5085250cb
>> > --- /dev/null
>> > +++ b/meta/recipes-support/source-highlight/source-highlight_git.bb
>> > @@ -0,0 +1,36 @@
>> > +SUMMARY = "Syntax highlight utility"
>> > +DESCRIPTION = "Source-highlight converts source code to formatted text with syntax highlighting."
>> > +HOMEPAGE = "https://urldefense.proofpoint.com/v2/url?u=https-3A__www.gnu.org_software_src-2Dhighlite_&d=DwIBaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=jBI-VlyTB1xFAWS9hMggBpmdK5DJQqcmgvLfhQ68ddzZf4_yp3Vldzt83qQW4zvi&s=lwbvDkI4fDkloLf3cs3QeCgqOBF_LRpfobo2v-EYtEc&e= "
>> > +LICENSE = "GPL-3.0-only"
>> > +SECTION = "libs"
>> > +LIC_FILES_CHKSUM = "file://COPYING;;md5=ff95bfe019feaf92f524b73dd79e76eb"
>> > +
>> > +SRCREV = "894cacd0799ca60afa359a63782729dec76cbb79"
>> > +PV = "3.1.9+git"
>> > +SRC_URI = "git://git.savannah.gnu.org/git/src-highlite.git;protocol=https;branch=master"
>> > +S = "${WORKDIR}/git"
>> > +
>> > +inherit autotools pkgconfig
>> > +
>> > +DEPENDS:append = " bison-native boost"
>> > +
>> > +DEPENDS:append:class-target = " ${PN}-native"
>> > +
>> > +EXTRA_OECONF="--with-boost-regex=boost_regex"
>> > +
>> > +BBCLASSEXTEND = "native nativesdk"
>> > +
>> > +PACKAGES += "${PN}-tools ${PN}-data"
>> > +
>> > +RDEPENDS:${PN} = "boost-regex ${PN}-data"
>> > +RDEPENDS:${PN}-tools = "${PN} ${PN}-data bash"
>> > +
>> > +FILES:${PN}       = "${libdir}/*${SOLIBS}"
>> > +FILES:${PN}-data  = "${datadir}/source-highlight"
>> > +FILES:${PN}-tools = "${bindir} ${sysconfdir}/bash_completion.d"
>> > +
>> > +# source-highlight is using its own binary from the build tree to make documentation
>> > +# let's substitute the native binary instead
>> > +do_configure:prepend:class-target () {
>> > +     sed -i -e 's,^SRCHILITEEXE = $(top_builddir).*,SRCHILITEEXE = source-highlight,' ${S}/doc/Makefile.am
>> > +}
>> > --
>> > 2.43.0
>> >
>> >
>> > -=-=-=-=-=-=-=-=-=-=-=-
>> > Links: You receive all messages sent to this group.
>> > View/Reply Online (#214702): https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_g_openembedded-2Dcore_message_214702&d=DwIBaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=jBI-VlyTB1xFAWS9hMggBpmdK5DJQqcmgvLfhQ68ddzZf4_yp3Vldzt83qQW4zvi&s=59gbMbCXZ3BY1pfUB3UCI5Czkn6drHSb9wkgR4-e3Ls&e=
>> > Mute This Topic: https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_mt_112197845_1686489&d=DwIBaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=jBI-VlyTB1xFAWS9hMggBpmdK5DJQqcmgvLfhQ68ddzZf4_yp3Vldzt83qQW4zvi&s=Ll_TLcnLKTlhI4Rm2kaZpieo_LWka4TfPLOsJ6o8ER4&e=
>> > Group Owner: openembedded-core+owner@lists.openembedded.org
>> > Unsubscribe: https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_g_openembedded-2Dcore_unsub&d=DwIBaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=jBI-VlyTB1xFAWS9hMggBpmdK5DJQqcmgvLfhQ68ddzZf4_yp3Vldzt83qQW4zvi&s=JcEYIhnX11pblaVhmSRW-5aSQ5QHO6L9M7ugjPg0uWU&e=  [alex.kanavin@gmail.com]
>> > -=-=-=-=-=-=-=-=-=-=-=-
>> >
Etienne Cordonnier April 11, 2025, 8:16 a.m. UTC | #4
OK, in that case except if I receive other opinions, I would propose to
merge the patch adding the PACKAGECONFIG option to gdb, and I'll send
another PR adding source-highlight to meta-oe.

Étienne

On Thu, Apr 10, 2025 at 9:35 PM Alexander Kanavin <alex.kanavin@gmail.com>
wrote:

> I don;t think source highlighting in gdb quite qualifies as a core
> embedded functionality? I'd say meta-oe is better.
>
> Alex
>
> On Thu, 10 Apr 2025 at 21:32, Etienne Cordonnier <ecordonnier@snap.com>
> wrote:
> >
> > That's fair enough. My thinking was to try to upstream first to core,
> since it used to be there before it was removed, and to also get feedback
> on whether you would want to enable this per default gdb. I can also move
> it to meta-oe if you think it is better.
> >
> > Étienne
> >
> > On Thu, Apr 10, 2025 at 9:28 PM Alexander Kanavin <
> alex.kanavin@gmail.com> wrote:
> >>
> >> Unless you want to enable it by default in gdb (and the other patch
> >> shows that is not the case), source-highlight does not have to be in
> >> core. We have plenty of recipes in core with options that require
> >> items from meta-oe or other layers.
> >>
> >> Alex
> >>
> >> On Thu, 10 Apr 2025 at 21:26, Etienne Cordonnier via
> >> lists.openembedded.org <ecordonnier=snap.com@lists.openembedded.org>
> >> wrote:
> >> >
> >> > From: Etienne Cordonnier <ecordonnier@snap.com>
> >> >
> >> > source-highlight version 3.1.8 was removed in
> https://urldefense.proofpoint.com/v2/url?u=https-3A__web.git.yoctoproject.org_poky_commit_-3Fid-3D6560db9ddfd39a2715ede96430228306b00f53dd&d=DwIBaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=jBI-VlyTB1xFAWS9hMggBpmdK5DJQqcmgvLfhQ68ddzZf4_yp3Vldzt83qQW4zvi&s=GDekE4em2Y0dcrW5i9p81jWBM-rLGDqNCZJM66b8ZzI&e=
> in June 2019 because the was no user left,
> >> > however there is now a gdb PACKAGECONFIG option which uses it. Since
> the last release was in 2019, let's rather use the latest git version.
> >> >
> >> > Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
> >> > ---
> >> >  meta/conf/distro/include/maintainers.inc      |  1 +
> >> >  .../source-highlight/source-highlight_git.bb  | 36
> +++++++++++++++++++
> >> >  2 files changed, 37 insertions(+)
> >> >  create mode 100644 meta/recipes-support/source-highlight/
> source-highlight_git.bb
> >> >
> >> > diff --git a/meta/conf/distro/include/maintainers.inc
> b/meta/conf/distro/include/maintainers.inc
> >> > index 2b47d3103c0..831494312b6 100644
> >> > --- a/meta/conf/distro/include/maintainers.inc
> >> > +++ b/meta/conf/distro/include/maintainers.inc
> >> > @@ -777,6 +777,7 @@ RECIPE_MAINTAINER:pn-shutdown-desktop =
> "Unassigned <unassigned@yoctoproject.org
> >> >  RECIPE_MAINTAINER:pn-signing-keys = "Richard Purdie <
> richard.purdie@linuxfoundation.org>"
> >> >  RECIPE_MAINTAINER:pn-slang = "Yi Zhao <yi.zhao@windriver.com>"
> >> >  RECIPE_MAINTAINER:pn-socat = "Hongxu Jia <hongxu.jia@windriver.com>"
> >> > +RECIPE_MAINTAINER:pn-source-highlight = "Etienne Cordonnier <
> ecordonnier@snap.com>"
> >> >  RECIPE_MAINTAINER:pn-speex = "Michael Opdenacker <
> michael@opdenacker.org>"
> >> >  RECIPE_MAINTAINER:pn-speexdsp = "Michael Opdenacker <
> michael@opdenacker.org>"
> >> >  RECIPE_MAINTAINER:pn-spirv-headers = "Jose Quaresma <
> quaresma.jose@gmail.com>"
> >> > diff --git a/meta/recipes-support/source-highlight/
> source-highlight_git.bb b/meta/recipes-support/source-highlight/
> source-highlight_git.bb
> >> > new file mode 100644
> >> > index 00000000000..ad5085250cb
> >> > --- /dev/null
> >> > +++ b/meta/recipes-support/source-highlight/source-highlight_git.bb
> >> > @@ -0,0 +1,36 @@
> >> > +SUMMARY = "Syntax highlight utility"
> >> > +DESCRIPTION = "Source-highlight converts source code to formatted
> text with syntax highlighting."
> >> > +HOMEPAGE = "
> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.gnu.org_software_src-2Dhighlite_&d=DwIBaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=jBI-VlyTB1xFAWS9hMggBpmdK5DJQqcmgvLfhQ68ddzZf4_yp3Vldzt83qQW4zvi&s=lwbvDkI4fDkloLf3cs3QeCgqOBF_LRpfobo2v-EYtEc&e=
> "
> >> > +LICENSE = "GPL-3.0-only"
> >> > +SECTION = "libs"
> >> > +LIC_FILES_CHKSUM =
> "file://COPYING;;md5=ff95bfe019feaf92f524b73dd79e76eb"
> >> > +
> >> > +SRCREV = "894cacd0799ca60afa359a63782729dec76cbb79"
> >> > +PV = "3.1.9+git"
> >> > +SRC_URI = "git://
> git.savannah.gnu.org/git/src-highlite.git;protocol=https;branch=master"
> >> > +S = "${WORKDIR}/git"
> >> > +
> >> > +inherit autotools pkgconfig
> >> > +
> >> > +DEPENDS:append = " bison-native boost"
> >> > +
> >> > +DEPENDS:append:class-target = " ${PN}-native"
> >> > +
> >> > +EXTRA_OECONF="--with-boost-regex=boost_regex"
> >> > +
> >> > +BBCLASSEXTEND = "native nativesdk"
> >> > +
> >> > +PACKAGES += "${PN}-tools ${PN}-data"
> >> > +
> >> > +RDEPENDS:${PN} = "boost-regex ${PN}-data"
> >> > +RDEPENDS:${PN}-tools = "${PN} ${PN}-data bash"
> >> > +
> >> > +FILES:${PN}       = "${libdir}/*${SOLIBS}"
> >> > +FILES:${PN}-data  = "${datadir}/source-highlight"
> >> > +FILES:${PN}-tools = "${bindir} ${sysconfdir}/bash_completion.d"
> >> > +
> >> > +# source-highlight is using its own binary from the build tree to
> make documentation
> >> > +# let's substitute the native binary instead
> >> > +do_configure:prepend:class-target () {
> >> > +     sed -i -e 's,^SRCHILITEEXE = $(top_builddir).*,SRCHILITEEXE =
> source-highlight,' ${S}/doc/Makefile.am
> >> > +}
> >> > --
> >> > 2.43.0
> >> >
> >> >
> >> > -=-=-=-=-=-=-=-=-=-=-=-
> >> > Links: You receive all messages sent to this group.
> >> > View/Reply Online (#214702):
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_g_openembedded-2Dcore_message_214702&d=DwIBaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=jBI-VlyTB1xFAWS9hMggBpmdK5DJQqcmgvLfhQ68ddzZf4_yp3Vldzt83qQW4zvi&s=59gbMbCXZ3BY1pfUB3UCI5Czkn6drHSb9wkgR4-e3Ls&e=
> >> > Mute This Topic:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_mt_112197845_1686489&d=DwIBaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=jBI-VlyTB1xFAWS9hMggBpmdK5DJQqcmgvLfhQ68ddzZf4_yp3Vldzt83qQW4zvi&s=Ll_TLcnLKTlhI4Rm2kaZpieo_LWka4TfPLOsJ6o8ER4&e=
> >> > Group Owner: openembedded-core+owner@lists.openembedded.org
> >> > Unsubscribe:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_g_openembedded-2Dcore_unsub&d=DwIBaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=jBI-VlyTB1xFAWS9hMggBpmdK5DJQqcmgvLfhQ68ddzZf4_yp3Vldzt83qQW4zvi&s=JcEYIhnX11pblaVhmSRW-5aSQ5QHO6L9M7ugjPg0uWU&e=
> [alex.kanavin@gmail.com]
> >> > -=-=-=-=-=-=-=-=-=-=-=-
> >> >
>
diff mbox series

Patch

diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index 2b47d3103c0..831494312b6 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -777,6 +777,7 @@  RECIPE_MAINTAINER:pn-shutdown-desktop = "Unassigned <unassigned@yoctoproject.org
 RECIPE_MAINTAINER:pn-signing-keys = "Richard Purdie <richard.purdie@linuxfoundation.org>"
 RECIPE_MAINTAINER:pn-slang = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER:pn-socat = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER:pn-source-highlight = "Etienne Cordonnier <ecordonnier@snap.com>"
 RECIPE_MAINTAINER:pn-speex = "Michael Opdenacker <michael@opdenacker.org>"
 RECIPE_MAINTAINER:pn-speexdsp = "Michael Opdenacker <michael@opdenacker.org>"
 RECIPE_MAINTAINER:pn-spirv-headers = "Jose Quaresma <quaresma.jose@gmail.com>"
diff --git a/meta/recipes-support/source-highlight/source-highlight_git.bb b/meta/recipes-support/source-highlight/source-highlight_git.bb
new file mode 100644
index 00000000000..ad5085250cb
--- /dev/null
+++ b/meta/recipes-support/source-highlight/source-highlight_git.bb
@@ -0,0 +1,36 @@ 
+SUMMARY = "Syntax highlight utility"
+DESCRIPTION = "Source-highlight converts source code to formatted text with syntax highlighting."
+HOMEPAGE = "https://www.gnu.org/software/src-highlite/"
+LICENSE = "GPL-3.0-only"
+SECTION = "libs"
+LIC_FILES_CHKSUM = "file://COPYING;;md5=ff95bfe019feaf92f524b73dd79e76eb"
+
+SRCREV = "894cacd0799ca60afa359a63782729dec76cbb79"
+PV = "3.1.9+git"
+SRC_URI = "git://git.savannah.gnu.org/git/src-highlite.git;protocol=https;branch=master"
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+DEPENDS:append = " bison-native boost"
+
+DEPENDS:append:class-target = " ${PN}-native"
+
+EXTRA_OECONF="--with-boost-regex=boost_regex"
+
+BBCLASSEXTEND = "native nativesdk"
+
+PACKAGES += "${PN}-tools ${PN}-data"
+
+RDEPENDS:${PN} = "boost-regex ${PN}-data"
+RDEPENDS:${PN}-tools = "${PN} ${PN}-data bash"
+
+FILES:${PN}       = "${libdir}/*${SOLIBS}"
+FILES:${PN}-data  = "${datadir}/source-highlight"
+FILES:${PN}-tools = "${bindir} ${sysconfdir}/bash_completion.d"
+
+# source-highlight is using its own binary from the build tree to make documentation
+# let's substitute the native binary instead
+do_configure:prepend:class-target () {
+     sed -i -e 's,^SRCHILITEEXE = $(top_builddir).*,SRCHILITEEXE = source-highlight,' ${S}/doc/Makefile.am
+}