public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Joonas Niilola <juippis@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Current unavoidable use of xz utils in Gentoo
Date: Thu, 11 Apr 2024 08:21:39 +0300	[thread overview]
Message-ID: <c5a2b579-8c3e-45c7-b859-b41a675d15d5@gentoo.org> (raw)
In-Reply-To: <92ef54a0-7a49-49f3-b3cc-d38a2b9adebd@ehuk.net>


[-- Attachment #1.1: Type: text/plain, Size: 5325 bytes --]

On 6.4.2024 14.57, Eddie Chapman wrote:
> 
> --- /usr/portage/net-mail/dovecot/dovecot-2.3.21-r1.ebuild
> +++ /usr/local/portage/net-mail/dovecot/dovecot-2.3.21-r1.ebuild
> @@ -43,7 +43,6 @@
> 
>  DEPEND="
>         app-arch/bzip2
> -       app-arch/xz-utils
>         dev-libs/icu:=
>         dev-libs/openssl:0=
>         sys-libs/zlib:=
> @@ -126,7 +125,7 @@
>                 --disable-rpath \
>                 --with-bzlib \
>                 --without-libbsd \
> -               --with-lzma \
> +               --without-lzma \
>                 --with-icu \
>                 --with-ssl \
>                 --with-zlib \
> 
> --- /usr/portage/dev-lang/python/python-3.11.8_p1.ebuild
> +++ /usr/local/portage/dev-lang/python/python-3.11.8_p1.ebuild
> @@ -179,6 +179,7 @@
>         # Avoid as many dependencies as possible for the cross build.
>         cat >> Makefile <<-EOF || die
>                 MODULE_NIS_STATE=disabled
> +               MODULE__LZMA_STATE=disabled
>                 MODULE__DBM_STATE=disabled
>                 MODULE__GDBM_STATE=disabled
>                 MODULE__DBM_STATE=disabled
> @@ -328,7 +329,7 @@
>         fi
> 
>         # force-disable modules we don't want built
> -       local disable_modules=( NIS )
> +       local disable_modules=( NIS _LZMA )
>         use gdbm || disable_modules+=( _GDBM _DBM )
>         use sqlite || disable_modules+=( _SQLITE3 )
>         use ssl || disable_modules+=( _HASHLIB _SSL )
> 
> 
> --- /usr/portage/dev-lang/python/python-3.12.2_p1.ebuild
> +++ /usr/local/portage/dev-lang/python/python-3.12.2_p1.ebuild
> @@ -177,6 +177,7 @@
>         cat > Modules/Setup.local <<-EOF || die
>                 *disabled*
>                 nis
> +               _lzma
>                 _dbm _gdbm
>                 _sqlite3
>                 _hashlib _ssl
> @@ -299,6 +300,7 @@
>         cat > Modules/Setup.local <<-EOF || die
>                 *disabled*
>                 nis
> +               _lzma
>                 $(usev !gdbm '_gdbm _dbm')
>                 $(usev !sqlite '_sqlite3')
>                 $(usev !ssl '_hashlib _ssl')
> 
> 
> Lastly, I needed to create a custom dev-libs/libxmlb ebuild in order to
> upgrade it from 0.3.14 (latest in Gentoo at time of writing) to 0.3.15.
> 
> I also needed to apply a very recent patch from upstream, from this
> commit, which makes LZMA support optional:
> https://github.com/hughsie/libxmlb/commit/bdf845510fbed40b88465b2272ccad9e93656639
> 
> and I needed to make some small changes to the ebuild.
> 
> So this is what you need to do at the time of writing (6th April 2024):
> 
> 1. Copy the in-tree /usr/portage/dev-libs/libxmlb ebuild directory into
> your local ebuilds directory.
> 
> 2. Rename the ebuild file from libxmlb-0.3.14.ebuild to
> libxmlb-0.3.15.ebuild
> 
> 3. Download the raw patch, you can use this link:
> 
> https://github.com/hughsie/libxmlb/commit/bdf845510fbed40b88465b2272ccad9e93656639.patch
>    rename it to:
>    libxmlb-0.3.15-make_lzma_optional.patch
>    and place it in the local "files" directory.
> 
> 4. Modify the new ebuild according to the diff below. Then just rebuild it.
> 
> --- /usr/portage/dev-libs/libxmlb/libxmlb-0.3.14.ebuild
> +++ /usr/local/portage/dev-libs/libxmlb/libxmlb-0.3.15.ebuild
> @@ -14,15 +14,15 @@
>  SLOT="0/2" # libxmlb.so version
> 
>  KEYWORDS="amd64 ~arm arm64 ~loong ppc ppc64 ~riscv x86"
> -IUSE="doc introspection stemmer test +zstd"
> +IUSE="doc introspection -lzma stemmer test +zstd"
> 
>  RESTRICT="!test? ( test )"
> 
>  RDEPEND="
> -       app-arch/xz-utils
>         dev-libs/glib:2
>         sys-apps/util-linux
>         stemmer? ( dev-libs/snowball-stemmer:= )
> +       lzma? ( app-arch/xz-utils:= )
>         zstd? ( app-arch/zstd:= )
>  "
> 
> @@ -43,6 +43,7 @@
> 
>  PATCHES=(
>         "${FILESDIR}"/${PN}-0.3.12-no_installed_tests.patch
> +       "${FILESDIR}"/${PN}-0.3.15-make_lzma_optional.patch
>  )
> 
>  python_check_deps() {
> @@ -60,6 +61,7 @@
>                 $(meson_use stemmer)
>                 $(meson_use test tests)
>                 $(meson_use zstd)
> +               $(meson_feature lzma)
>         )
>         meson_src_configure
>  }

Hey,

I'll admit I didn't read everything, but I just want to point out you
may not have to edit ebuilds at all. If xz-utils is package.provided
portage should ignore the dependency without you removing the dep from
an ebuild. Then you can utilize /etc/portage/patches to apply any
patches and finally try using EXTRA_ECONF and MYMESONARGS to override
configure options via package.env.

-- juippis

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 618 bytes --]

  parent reply	other threads:[~2024-04-11  5:21 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-30  3:07 [gentoo-dev] Current unavoidable use of xz utils in Gentoo Eddie Chapman
2024-03-30  3:43 ` orbea
2024-03-30  7:06   ` Dale
2024-03-30 10:47     ` [gentoo-dev] " Duncan
2024-03-30 11:32     ` [gentoo-dev] " Rich Freeman
2024-03-30 14:57       ` Eddie Chapman
2024-03-30 15:02         ` Michał Górny
2024-03-30 15:17           ` Eddie Chapman
2024-03-30 15:29             ` Michał Górny
2024-03-30 15:59               ` Eddie Chapman
2024-03-30 16:07             ` Dale
2024-03-30 17:13             ` Re[2]: " Stefan Schmiedl
2024-03-30 17:36               ` Eddie Chapman
2024-03-31  1:41                 ` Thomas Gall
2024-03-30 23:49             ` Eddie Chapman
2024-03-31  1:36             ` Eli Schwartz
2024-03-30 15:23           ` orbea
2024-03-30 15:14         ` Rich Freeman
2024-03-30 17:19           ` Eddie Chapman
2024-03-31  1:25 ` Sam James
2024-03-31  1:33 ` Eli Schwartz
2024-03-31 11:13   ` Eddie Chapman
2024-03-31 11:59     ` Matt Jolly
2024-04-01  7:57       ` Eddie Chapman
2024-04-01 14:50         ` Eli Schwartz
2024-04-02  8:43           ` Eddie Chapman
2024-04-02 19:46             ` Eli Schwartz
2024-04-02 20:19               ` Eddie Chapman
2024-04-01 14:55         ` Michał Górny
2024-04-02  9:02           ` Eddie Chapman
2024-04-01 15:14     ` Kenton Groombridge
2024-04-01 15:40       ` orbea
2024-04-01 16:01         ` Kenton Groombridge
2024-04-01 16:21           ` orbea
2024-04-01 18:51             ` Kévin GASPARD DE RENEFORT
2024-04-01 20:07               ` James Le Cuirot
2024-04-02  6:32                 ` Joonas Niilola
2024-03-31 11:32   ` stefan11111
2024-04-01 14:56 ` Azamat Hackimov
2024-04-02 19:32   ` Eddie Chapman
2024-04-03 11:47     ` [gentoo-dev] " Duncan
2024-04-03 12:14       ` Sam James
2024-04-03 15:30         ` [gentoo-dev] " Eddie Chapman
2024-04-03 16:40           ` Michael Orlitzky
2024-04-04  3:20             ` [gentoo-dev] " Duncan
2024-04-04  3:49           ` [gentoo-dev] " Eli Schwartz
2024-04-04  8:32             ` Sam James
2024-04-04  8:34               ` Kévin GASPARD DE RENEFORT
2024-04-04 14:38               ` Eddie Chapman
2024-04-04 14:24             ` Eddie Chapman
2024-04-06 11:57               ` Eddie Chapman
2024-04-06 12:15                 ` Ulrich Mueller
2024-04-06 12:34                 ` Roy Bamford
2024-04-06 14:04                 ` Fabian Groffen
2024-04-07  6:44                   ` Eddie Chapman
2024-04-06 16:15                 ` Sam James
2024-04-07 11:24                   ` Eddie Chapman
2024-04-11  5:21                 ` Joonas Niilola [this message]
2024-04-12  7:18                   ` [gentoo-dev] " Duncan
2024-04-13  7:10                   ` [gentoo-dev] " Eddie Chapman
2024-04-03 12:22       ` [gentoo-dev] " Kévin GASPARD DE RENEFORT
2024-04-03 12:26         ` Kévin GASPARD DE RENEFORT
2024-04-04  1:41         ` Duncan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c5a2b579-8c3e-45c7-b859-b41a675d15d5@gentoo.org \
    --to=juippis@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox