diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2023-04-15 08:49:55 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2023-04-15 09:08:26 +0300 |
commit | 4c2c9c48f34c261d5d4a72ccfaba68753268e20b (patch) | |
tree | b25465fd6d32ae6b0a83c64585b41d6dae6737fb | |
parent | 693d3ea3583562974adabe9748fcbbe3b86dcf43 (diff) | |
download | meta-rhaberkorn-4c2c9c48f34c261d5d4a72ccfaba68753268e20b.tar.gz |
updated SciTECO recipe for current builds
* Renamed to sciteco-curses, analoguous to the Debian packages, since
there might be a Gtk port in the future.
* Lexilla support, malloc-replacement and LTO is now configurable via PACKAGECONFIG.
Especially disabling Lexilla and enabling LTO can have a huge impact on binary size.
* Woman pages are packaged into sciteco-curses-doc now, since they are not strictly
required and it's important to save space.
* Updated for Yocto kirkstone. Will probably work with other version as well,
but hasn't been tested.
* We can now do parallel builds.
* Removed the v0.6.4 recipe. It's too old.
-rw-r--r-- | conf/layer.conf | 2 | ||||
-rw-r--r-- | recipes-support/sciteco/sciteco-curses.inc | 55 | ||||
-rw-r--r-- | recipes-support/sciteco/sciteco-curses_git.bb (renamed from recipes-support/sciteco/sciteco_git.bb) | 11 | ||||
-rw-r--r-- | recipes-support/sciteco/sciteco.inc | 41 | ||||
-rw-r--r-- | recipes-support/sciteco/sciteco_0.6.4.bb | 3 |
5 files changed, 60 insertions, 52 deletions
diff --git a/conf/layer.conf b/conf/layer.conf index 45d596b..70a1197 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -8,3 +8,5 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ BBFILE_COLLECTIONS += "rhaberkorn" BBFILE_PATTERN_rhaberkorn = "^${LAYERDIR}/" BBFILE_PRIORITY_rhaberkorn = "6" + +LAYERSERIES_COMPAT_rhaberkorn = "kirkstone" diff --git a/recipes-support/sciteco/sciteco-curses.inc b/recipes-support/sciteco/sciteco-curses.inc new file mode 100644 index 0000000..5bcc3cc --- /dev/null +++ b/recipes-support/sciteco/sciteco-curses.inc @@ -0,0 +1,55 @@ +DESCRIPTION = "Advanced TECO dialect and interactive screen editor based on Scintilla" +HOMEPAGE = "http://sciteco.sf.net/" +SECTION = "console/utils" + +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +PR = "r0" + +SRC_URI = "gitsm://github.com/rhaberkorn/sciteco.git;protocol=https;branch=master" + +S = "${WORKDIR}/git" + +# SciTECO does not support out-of-tree builds out of the box since +# Scintilla doesn't. +inherit autotools-brokensep pkgconfig + +# Since we are cross-compiling, bootstrapping cannot work. +# Instead there must be a native sciteco available. +# The native SciTECO is always built with bootstrapping and +# the target SciTECO without. +BBCLASSEXTEND = "native" +EXTRA_OECONF:class-native = "--with-interface=ncurses --enable-bootstrap" +EXTRA_OECONF:class-target = "--with-interface=ncurses --disable-bootstrap" + +DEPENDS:class-native = "pkgconfig-native ncurses-native glib-2.0-native groff-native" +DEPENDS:class-target = "sciteco-curses-native ncurses glib-2.0 groff-native" +RDEPENDS:${PN}:class-target = "ncurses-terminfo" + +PACKAGECONFIG ??= "lexilla malloc-replacement" + +PACKAGECONFIG[lexilla] = ",--without-lexilla" +PACKAGECONFIG[malloc-replacement] = ",--disable-malloc-replacement" +PACKAGECONFIG[teco-integer-32] = "--with-teco-integer=32" + +# LTO will also decrease binary size. +# On the downside, LTO breaks debugging. +# Once there is a site-config option, it should go into PACKAGECONFIG. +PACKAGECONFIG[lto] = "" +CFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'lto', '-flto', '', d)}" +CXXFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'lto', '-flto', '', d)}" +LDFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'lto', '-flto', '', d)}" + +FILES:${PN} += "${datadir}/sciteco" + +# Woman pages also do not have to be installed by default +FILES:${PN}-doc += " \ + ${bindir}/tedoc.tes ${bindir}/grosciteco.tes \ + ${datadir}/sciteco/lib/lexers/woman.tes ${datadir}/sciteco/lib/women \ +" + +# Factor out the icons into a separate package. +# We usually don't need them. +PACKAGES =+ "${PN}-icons" +FILES:${PN}-icons = "${datadir}/sciteco/*.png" diff --git a/recipes-support/sciteco/sciteco_git.bb b/recipes-support/sciteco/sciteco-curses_git.bb index 6038eb0..8f37d5b 100644 --- a/recipes-support/sciteco/sciteco_git.bb +++ b/recipes-support/sciteco/sciteco-curses_git.bb @@ -1,20 +1,15 @@ DEFAULT_PREFERENCE = "-1" -require sciteco.inc +require sciteco-curses.inc # The configuration for development HEAD commit builds. # To use it add the following line to conf/local.conf: # -# PREFERRED_VERSION_sciteco-native = "git%" -# PREFERRED_VERSION_sciteco = "git%" +# PREFERRED_VERSION_sciteco-curses-native = "git%" +# PREFERRED_VERSION_sciteco-curses = "git%" # # Use latest revision from branch specified in SRC_URI (master) SRCREV = "${AUTOREV}" # Makes sure that new commits result in new package versions: PV = "git-${SRCPV}" - -# Factor out the icons into a separate package. -# We usually don't need them. -PACKAGES =+ "${PN}-icons" -FILES_${PN}-icons = "${datadir}/${PN}/*.png" diff --git a/recipes-support/sciteco/sciteco.inc b/recipes-support/sciteco/sciteco.inc deleted file mode 100644 index 345f6d4..0000000 --- a/recipes-support/sciteco/sciteco.inc +++ /dev/null @@ -1,41 +0,0 @@ -DESCRIPTION = "Advanced TECO dialect and interactive screen editor based on Scintilla" -HOMEPAGE = "http://sciteco.sf.net/" -SECTION = "console/utils" - -LICENSE = "GPLv3" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -PR = "r0" - -# NOTE: SciTECO's repository uses submodules, therefore the submodule -# fetcher must be used. -SRC_URI = "gitsm://github.com/rhaberkorn/sciteco.git;protocol=https" - -S = "${WORKDIR}/git" - -# SciTECO does not support out-of-tree builds out of the box since -# Scintilla doesn't. -inherit autotools-brokensep - -# Currently parallel builds are broken for SciTECO -PARALLEL_MAKE = "" - -# Since we are cross-compiling, bootstrapping cannot work. -# Instead there must be a native sciteco available. -# The native SciTECO is always built with bootstrapping and -# the target SciTECO without. -BBCLASSEXTEND = "native" -EXTRA_OECONF_class-native = "--with-interface=ncurses --enable-bootstrap" -EXTRA_OECONF_class-target = "--with-interface=ncurses --disable-bootstrap" - -DEPENDS_class-native = "pkgconfig-native ncurses-native glib-2.0-native" -DEPENDS_class-target = "sciteco-native pkgconfig ncurses glib-2.0" -RDEPENDS_${PN}_class-target = "ncurses-terminfo" - -# In some versions of yocto, the gitsm fetcher is "broken" and does -# not fetch submodules recursively. -# Here's a workaround: -do_update_submodules() { - git submodule update --init --recursive ${S} -} -addtask update_submodules after do_unpack before do_patch diff --git a/recipes-support/sciteco/sciteco_0.6.4.bb b/recipes-support/sciteco/sciteco_0.6.4.bb deleted file mode 100644 index a2af320..0000000 --- a/recipes-support/sciteco/sciteco_0.6.4.bb +++ /dev/null @@ -1,3 +0,0 @@ -require sciteco.inc - -SRCREV = "v0.6.4" |