Fix module architecture string to match Enlightenment expectations

The module architecture was incorrectly constructed as:
  linux-x86_64-0.27

But Enlightenment expects:
  linux-gnu-x86_64-0.27.1

Changes:
- Detect system ABI (gnu/musl) via features.h header check
- Use full Enlightenment version instead of just major.minor
- Correct architecture format: <system>-<abi>-<cpu>-<version>

This ensures the module installs to the correct directory that
Enlightenment will find when loading modules.

Also updated Gentoo ebuild to set S variable for correct source
directory extraction (git archives extract to 'eiwd' not 'eiwd-0.1.0').
This commit is contained in:
nemunaire 2025-12-28 20:39:27 +07:00
commit 3a2a583409
4 changed files with 25 additions and 10 deletions

View file

@ -13,18 +13,28 @@ evas = dependency('evas')
edje = dependency('edje')
eina = dependency('eina')
# Get Enlightenment module API version
e_version = enlightenment.version().split('.')
e_major = e_version[0]
e_minor = e_version[1]
# Get Enlightenment version and module architecture
e_version = enlightenment.version()
# Detect system ABI (gnu, musl, etc.)
cc = meson.get_compiler('c')
if cc.has_header('features.h')
# GNU libc systems
system_abi = 'gnu'
else
# Try to detect from system - fallback to 'unknown'
system_abi = 'unknown'
endif
# Installation paths
module_name = 'iwd'
module_arch = '@0@-@1@-@2@.@3@'.format(
# Format: <system>-<abi>-<cpu>-<version>
# Example: linux-gnu-x86_64-0.27.1
module_arch = '@0@-@1@-@2@-@3@'.format(
host_machine.system(),
system_abi,
host_machine.cpu_family(),
e_major,
e_minor
e_version
)
dir_module = join_paths(get_option('libdir'), 'enlightenment', 'modules', module_name)

2
metadata/layout.conf Normal file
View file

@ -0,0 +1,2 @@
masters = gentoo
repo-name = x-eiwd

View file

@ -6,14 +6,16 @@ EAPI=8
inherit meson
DESCRIPTION="Enlightenment Wi-Fi module using iwd backend"
HOMEPAGE="https://github.com/yourusername/eiwd"
SRC_URI="https://github.com/yourusername/eiwd/archive/v${PV}.tar.gz -> ${P}.tar.gz"
HOMEPAGE="https://git.nemunai.re/nemunaire/eiwd"
SRC_URI="https://git.nemunai.re/nemunaire/eiwd/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD" # Adjust based on chosen license
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~arm64"
IUSE="nls"
S="${WORKDIR}/${PN}"
RDEPEND="
>=x11-wm/enlightenment-0.25.0
>=dev-libs/efl-1.26.0

View file

@ -0,0 +1 @@
x-eiwd