1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
#!/bin/sh
# Build script for imlib2 (autotools, Template A).
# NOTE: imlib2's optional loaders (gif/tiff/webp/heif/jxl/...) are each
# auto-probed via AC_CHECK_LIB/pkg-config in configure.ac - there are no
# --without-<format> flags to pass. Since none of those libs are ported to
# Hammerhead yet, the loaders auto-disable and only png/jpeg (both present)
# get built.
#
# REVISED (Task 1b-3, 2026-07-22): originally built --without-x on the
# assumption that "X11 client apps link libX11 themselves" - WRONG. imlib2's
# X11 support (gated by AC_PATH_XTRA/BUILD_X11) is not just SHM plumbing; it
# ships the imlib_context_set_{display,visual,colormap,drawable}() /
# imlib_render_image_on_drawable*() / imlib_create_image_from_drawable() API
# that feh (wallpaper-setting) and other imlib2 consumers (tint2's
# IMLIB2>=1.4.2 dep) call directly. --without-x drops those symbols entirely,
# so feh failed to link ("undefined reference to imlib_context_set_drawable"
# etc). Enable X11 support instead (needs no explicit flag - AC_PATH_XTRA
# auto-detects libX11 under $PREFIX via the CFLAGS/LDFLAGS -I/-L already
# exported below).
set -e
cd "$SRCDIR"
# MANDATORY libtool fix - see Template A comment in DESKTOP_XLIBRE_PHASE1A_PLAN.md.
if [ -f configure ]; then
sed -i -E 's/(kopensolaris\*-gnu)([^)]*\))/\1 | hammerhead*\2/' configure
fi
export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH"
export CFLAGS="${CFLAGS} -I$PREFIX/include -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS"
export LDFLAGS="${LDFLAGS} -L$PREFIX/lib -R$PREFIX/lib"
./configure \
--prefix="$PREFIX" \
--build="$BUILD_TRIPLE" \
--host="$BUILD_TRIPLE" \
--sysconfdir="$SYSCONFDIR" \
--disable-static \
--with-x
gmake -j${JOBS:-1}
gmake install DESTDIR="$PKGDIR"
# imlib2 - image loading/rendering library (tint2, feh, conky)
# https://docs.enlightenment.org/api/imlib2/html/
[package]
name = "imlib2"
version = "1.12.6"
release = 1
description = "Image loading, saving, rendering and manipulation library"
url = "https://sourceforge.net/projects/enlightenment/files/imlib2-src/"
license = "MIT"
maintainer = "Chris Tusa <chris.tusa@leafscale.com>"
arch = "x86_64"
[dependencies]
runtime = ["libpng", "libjpeg-turbo", "freetype"]
build = ["libpng", "libjpeg-turbo", "freetype"]
[[source]]
file = "imlib2-1.12.6.tar.xz"
urls = ["https://downloads.sourceforge.net/enlightenment/imlib2-1.12.6.tar.xz"]
checksum = "250f9752f69dc522e529a81aaa9395705f7fc312ff2453e5de59ac2ba1f2858f"
[build]
parallel = true
|