mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-04-07 03:10:15 -04:00
www-apps/pleroma: restore vips fix as separated revision
That way if eapply outside of src_prepare breaks, the one without vips-fix can also be used. This restores commit01a7f90a35. This partially reverts commitce89d7e466. Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
This commit is contained in:
52
www-apps/pleroma/files/pleroma-2.10.0-vix_bump.patch
Normal file
52
www-apps/pleroma/files/pleroma-2.10.0-vix_bump.patch
Normal file
@@ -0,0 +1,52 @@
|
||||
From 05704ec86e605ca681c5e95eac57b53851721548 Mon Sep 17 00:00:00 2001
|
||||
From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
|
||||
Date: Wed, 14 Jan 2026 02:37:55 +0100
|
||||
Subject: [PATCH] mix: upgrade vix from "~> 0.26.0" to "~> 0.36"
|
||||
|
||||
Dropping the last zero should allow to get 0.x updates rather
|
||||
than only 0.36.x updates.
|
||||
|
||||
Fixes: https://git.pleroma.social/pleroma/pleroma/-/issues/3393
|
||||
---
|
||||
changelog.d/vix-0.36.0.fix | 1 +
|
||||
mix.exs | 2 +-
|
||||
mix.lock | 2 +-
|
||||
3 files changed, 3 insertions(+), 2 deletions(-)
|
||||
create mode 100644 changelog.d/vix-0.36.0.fix
|
||||
|
||||
diff --git a/changelog.d/vix-0.36.0.fix b/changelog.d/vix-0.36.0.fix
|
||||
new file mode 100644
|
||||
index 0000000000..43a8dd8f83
|
||||
--- /dev/null
|
||||
+++ b/changelog.d/vix-0.36.0.fix
|
||||
@@ -0,0 +1 @@
|
||||
+Fix compilation with vips-8.18.0 with bumping to vix 0.36.0
|
||||
diff --git a/mix.exs b/mix.exs
|
||||
index 48ec9b68fb..5b0c62a49e 100644
|
||||
--- a/mix.exs
|
||||
+++ b/mix.exs
|
||||
@@ -193,7 +193,7 @@ defp deps do
|
||||
{:majic, "~> 1.0"},
|
||||
{:open_api_spex, "~> 3.16"},
|
||||
{:ecto_psql_extras, "~> 0.8"},
|
||||
- {:vix, "~> 0.26.0"},
|
||||
+ {:vix, "~> 0.36"},
|
||||
{:elixir_make, "~> 0.7.7", override: true},
|
||||
{:blurhash, "~> 0.1.0", hex: :rinpatch_blurhash},
|
||||
{:exile, "~> 0.10.0"},
|
||||
diff --git a/mix.lock b/mix.lock
|
||||
index c469f4f015..a0ef38fc0a 100644
|
||||
--- a/mix.lock
|
||||
+++ b/mix.lock
|
||||
@@ -152,7 +152,7 @@
|
||||
"ueberauth": {:hex, :ueberauth, "0.10.8", "ba78fbcbb27d811a6cd06ad851793aaf7d27c3b30c9e95349c2c362b344cd8f0", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "f2d3172e52821375bccb8460e5fa5cb91cfd60b19b636b6e57e9759b6f8c10c1"},
|
||||
"unicode_util_compat": {:hex, :unicode_util_compat, "0.7.1", "a48703a25c170eedadca83b11e88985af08d35f37c6f664d6dcfb106a97782fc", [:rebar3], [], "hexpm", "b3a917854ce3ae233619744ad1e0102e05673136776fb2fa76234f3e03b23642"},
|
||||
"unsafe": {:hex, :unsafe, "1.0.2", "23c6be12f6c1605364801f4b47007c0c159497d0446ad378b5cf05f1855c0581", [:mix], [], "hexpm", "b485231683c3ab01a9cd44cb4a79f152c6f3bb87358439c6f68791b85c2df675"},
|
||||
- "vix": {:hex, :vix, "0.26.0", "027f10b6969b759318be84bd0bd8c88af877445e4e41cf96a0460392cea5399c", [:make, :mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:cc_precompiler, "~> 0.1.4 or ~> 0.2", [hex: :cc_precompiler, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.7.3 or ~> 0.8", [hex: :elixir_make, repo: "hexpm", optional: false]}, {:kino, "~> 0.7", [hex: :kino, repo: "hexpm", optional: true]}], "hexpm", "71b0a79ae7f199cacfc8e679b0e4ba25ee47dc02e182c5b9097efb29fbe14efd"},
|
||||
+ "vix": {:hex, :vix, "0.36.0", "3132dc065beda06dab1895a53d8c852d8e6a5bbca375c609435e968b1290e113", [:make, :mix], [{:cc_precompiler, "~> 0.1.4 or ~> 0.2", [hex: :cc_precompiler, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.7.3 or ~> 0.8", [hex: :elixir_make, repo: "hexpm", optional: false]}, {:kino, "~> 0.7", [hex: :kino, repo: "hexpm", optional: true]}], "hexpm", "92f912b4e90c453f92942742105bcdb367ad53406759da251bd2e587e33f4134"},
|
||||
"web_push_encryption": {:hex, :web_push_encryption, "0.3.1", "76d0e7375142dfee67391e7690e89f92578889cbcf2879377900b5620ee4708d", [:mix], [{:httpoison, "~> 1.0", [hex: :httpoison, repo: "hexpm", optional: false]}, {:jose, "~> 1.11.1", [hex: :jose, repo: "hexpm", optional: false]}], "hexpm", "4f82b2e57622fb9337559058e8797cb0df7e7c9790793bdc4e40bc895f70e2a2"},
|
||||
"websock": {:hex, :websock, "0.5.3", "2f69a6ebe810328555b6fe5c831a851f485e303a7c8ce6c5f675abeb20ebdadc", [:mix], [], "hexpm", "6105453d7fac22c712ad66fab1d45abdf049868f253cf719b625151460b8b453"},
|
||||
"websock_adapter": {:hex, :websock_adapter, "0.5.8", "3b97dc94e407e2d1fc666b2fb9acf6be81a1798a2602294aac000260a7c4a47d", [:mix], [{:bandit, ">= 0.6.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "315b9a1865552212b5f35140ad194e67ce31af45bcee443d4ecb96b5fd3f3782"},
|
||||
--
|
||||
GitLab
|
||||
|
||||
136
www-apps/pleroma/pleroma-2.10.0-r1.ebuild
Normal file
136
www-apps/pleroma/pleroma-2.10.0-r1.ebuild
Normal file
@@ -0,0 +1,136 @@
|
||||
# Copyright 2022-2026 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit mix optfeature flag-o-matic
|
||||
|
||||
DESCRIPTION="ActivityPub social networking software compatible with other Fediverse software"
|
||||
HOMEPAGE="https://pleroma.social/"
|
||||
if [[ "${PV}" == *9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://git.pleroma.social/pleroma/pleroma"
|
||||
else
|
||||
SRC_URI="https://git.pleroma.social/pleroma/pleroma/-/archive/v${PV}/${PN}-v${PV}.tar.gz"
|
||||
S="${WORKDIR}/${PN}-v${PV}"
|
||||
KEYWORDS="~amd64"
|
||||
fi
|
||||
LICENSE="AGPL-3 CC-BY-SA-4.0 CC-BY-4.0"
|
||||
SLOT="otp"
|
||||
|
||||
IUSE="+system-lexbor"
|
||||
|
||||
# Requires network access (https) as long as elixir dependencies aren't packaged
|
||||
# said dependencies have their checksum verified via `mix.lock`
|
||||
RESTRICT="network-sandbox"
|
||||
|
||||
BDEPEND="
|
||||
<dev-lang/erlang-27:=
|
||||
>=dev-lang/elixir-1.14:=
|
||||
<dev-lang/elixir-1.18
|
||||
dev-build/cmake
|
||||
>=dev-util/rebar-3.20.0-r1
|
||||
dev-elixir/hex
|
||||
dev-vcs/git
|
||||
"
|
||||
DEPEND="
|
||||
dev-libs/glib
|
||||
media-libs/vips:=
|
||||
sys-apps/file
|
||||
sys-libs/ncurses:=
|
||||
system-lexbor? ( dev-libs/lexbor )
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
acct-user/pleroma
|
||||
acct-group/pleroma
|
||||
dev-db/postgresql[uuid]
|
||||
"
|
||||
|
||||
src_unpack() {
|
||||
default
|
||||
|
||||
[[ "${PV}" == *9999 ]] && git-r3_src_unpack
|
||||
|
||||
cd "${S}" || die
|
||||
eapply "${FILESDIR}/pleroma-2.10.0-vix_bump.patch"
|
||||
emix deps.get --only prod
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Point to the correct source repo, needed for AGPL compliance
|
||||
if [[ "${PV}" == *9999 ]] && [[ -n "${EGIT_OVERRIDE_REPO}" ]]; then
|
||||
sed -i "s!source_url: .*!source_url: \"${EGIT_OVERRIDE_REPO}\",!" mix.exs || die
|
||||
fi
|
||||
|
||||
# strip_beams: Keep debug information in Erlang BEAM bytecode
|
||||
# include_erts: Depend on system erlang for the runtime
|
||||
sed -i '/include_executables_for:/a\ strip_beams: false,\n\ include_erts: false,' mix.exs || die
|
||||
|
||||
sed -i \
|
||||
-e '/update \[OPTIONS\]/,/--tmp-dir/d' \
|
||||
-e 's;update "$@";echo "Unsupported, check the '"${CATEGORY}/${PN}"' package instead.";' \
|
||||
rel/files/bin/pleroma_ctl || die
|
||||
|
||||
# Default ends up being inside /opt/pleroma which should be kept read-only to pleroma
|
||||
echo 'config :tzdata, :data_dir, "/var/lib/pleroma/tzdata"' >> config/prod.exs || die
|
||||
|
||||
echo "import Config" > config/prod.secret.exs || die
|
||||
|
||||
# Needs -fPIC under glibc for exile library
|
||||
# https://bugs.gentoo.org/937130
|
||||
append-flags -fPIC
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
mkdir -p pleroma || die
|
||||
|
||||
export VIX_COMPILATION_MODE="PLATFORM_PROVIDED_LIBVIPS"
|
||||
|
||||
use system-lexbor && export WITH_SYSTEM_LEXBOR=1
|
||||
|
||||
emix release --overwrite --path pleroma
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# doins doesn't seems to preserve permissions
|
||||
mkdir -p "${ED}/opt" || die
|
||||
cp -pr ./pleroma "${ED}/opt/pleroma" || die
|
||||
fperms 0750 /opt/pleroma
|
||||
fperms -R g-w,o= /opt/pleroma
|
||||
fowners -R 0:pleroma /opt/pleroma
|
||||
|
||||
doinitd ./pleroma/installation/init.d/pleroma
|
||||
|
||||
# Generated by Elixir, see lib/mix/lib/mix/tasks/release.init.ex
|
||||
# Real executable needs to be in /opt/pleroma/bin due to usage of readlink to guess install path
|
||||
dosym /opt/pleroma/bin/pleroma /usr/bin/pleroma
|
||||
|
||||
# Technically could be with regular binaries via dobin,
|
||||
# but useless without the pleroma command, which has restricted access
|
||||
dosym /opt/pleroma/bin/pleroma_ctl /usr/bin/pleroma_ctl
|
||||
|
||||
# This file controls console access
|
||||
fperms 0750 /opt/pleroma/releases/COOKIE
|
||||
fowners 0:pleroma /opt/pleroma/releases/COOKIE
|
||||
|
||||
keepdir /etc/pleroma
|
||||
fperms 0750 /etc/pleroma
|
||||
fowners 0:pleroma /etc/pleroma
|
||||
|
||||
keepdir /var/lib/pleroma
|
||||
fperms 0750 /var/lib/pleroma
|
||||
fowners pleroma:pleroma /var/lib/pleroma
|
||||
|
||||
# So that www-apps/pleroma-fe (optional) doesn't ends up creating namespace conflicts
|
||||
dosym /opt/pleroma-fe/dist /var/lib/pleroma/static/frontends/pleroma-fe/gentoo
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
optfeature "For Pleroma.Upload.Filters.{Mogrify,Mogrifun} & images in previews" media-gfx/imagemagick
|
||||
optfeature "For video support in Media Preview Proxy" media-video/ffmpeg
|
||||
optfeature "For Pleroma.Upload.Filters.Exiftool.* filters" media-libs/exiftool
|
||||
optfeature "Allows to pick system-managed frontend instead of bundled" www-apps/pleroma-fe
|
||||
}
|
||||
@@ -1,6 +1,10 @@
|
||||
# Copyright 2022-2024 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# Note: pleroma-2.10.0 should be kept as long as ~pleroma-2.10.0-r1
|
||||
# is as while eapply in src_unpack technically still works it is
|
||||
# outside policy and so not guaranteed to work.
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit mix optfeature flag-o-matic
|
||||
|
||||
Reference in New Issue
Block a user