Skip to content

Commit f48d93e

Browse files
committed
Add X11 and all of its friends
1 parent 4b9fdab commit f48d93e

File tree

11 files changed

+357
-2
lines changed

11 files changed

+357
-2
lines changed

scripts.d/50-vaapi/00-xorg-macros.sh renamed to scripts.d/10-xorg-macros.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,17 @@ ffbuild_enabled() {
88
return 0
99
}
1010

11+
ffbuild_dockerlayer() {
12+
to_df "COPY --from=${SELFLAYER} \$FFBUILD_PREFIX/. \$FFBUILD_PREFIX"
13+
to_df "COPY --from=${SELFLAYER} \$FFBUILD_PREFIX/share/aclocal/. /usr/share/aclocal"
14+
}
15+
1116
ffbuild_dockerbuild() {
1217
git-mini-clone "$XORGMACROS_REPO" "$XORGMACROS_COMMIT" xorg-macros
1318
cd xorg-macros
1419

1520
autoreconf -i
16-
./configure --prefix="/usr"
21+
./configure --prefix="$FFBUILD_PREFIX"
1722
make -j"$(nproc)"
1823
make install
1924
}

scripts.d/45-x11/10-xcbproto.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
3+
XCBPROTO_REPO="https://gitlab.freedesktop.org/xorg/proto/xcbproto.git"
4+
XCBPROTO_COMMIT="496e3ce329c3cc9b32af4054c30fa0f306deb007"
5+
6+
ffbuild_enabled() {
7+
[[ $TARGET != linux* ]] && return -1
8+
return 0
9+
}
10+
11+
ffbuild_dockerbuild() {
12+
git-mini-clone "$XCBPROTO_REPO" "$XCBPROTO_COMMIT" xcbproto
13+
cd xcbproto
14+
15+
autoreconf -i
16+
17+
local myconf=(
18+
--prefix="$FFBUILD_PREFIX"
19+
)
20+
21+
if [[ $TARGET == linux* ]]; then
22+
myconf+=(
23+
--host="$FFBUILD_TOOLCHAIN"
24+
)
25+
else
26+
echo "Unknown target"
27+
return -1
28+
fi
29+
30+
./configure "${myconf[@]}"
31+
make -j$(nproc)
32+
make install
33+
}

scripts.d/45-x11/10-xproto.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
3+
XPROTO_REPO="https://gitlab.freedesktop.org/xorg/proto/xorgproto.git"
4+
XPROTO_COMMIT="a0ed054ee2c334941dfe9eaa7bcfdbbe6907e1b5"
5+
6+
ffbuild_enabled() {
7+
[[ $TARGET != linux* ]] && return -1
8+
return 0
9+
}
10+
11+
ffbuild_dockerbuild() {
12+
git-mini-clone "$XPROTO_REPO" "$XPROTO_COMMIT" xproto
13+
cd xproto
14+
15+
autoreconf -i
16+
17+
local myconf=(
18+
--prefix="$FFBUILD_PREFIX"
19+
)
20+
21+
if [[ $TARGET == linux* ]]; then
22+
myconf+=(
23+
--host="$FFBUILD_TOOLCHAIN"
24+
)
25+
else
26+
echo "Unknown target"
27+
return -1
28+
fi
29+
30+
./configure "${myconf[@]}"
31+
make -j$(nproc)
32+
make install
33+
}

scripts.d/45-x11/10-xtrans.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
3+
LIBXTRANS_REPO="https://gitlab.freedesktop.org/xorg/lib/libxtrans.git"
4+
LIBXTRANS_COMMIT="3b5df889f58a99980a35a7b4a18eb4e7d2abeac4"
5+
6+
ffbuild_enabled() {
7+
[[ $TARGET != linux* ]] && return -1
8+
return 0
9+
}
10+
11+
ffbuild_dockerbuild() {
12+
git-mini-clone "$LIBXTRANS_REPO" "$LIBXTRANS_COMMIT" libxtrans
13+
cd libxtrans
14+
15+
autoreconf -i
16+
17+
local myconf=(
18+
--prefix="$FFBUILD_PREFIX"
19+
--without-xmlto
20+
--without-fop
21+
--without-xsltproc
22+
)
23+
24+
if [[ $TARGET == linux* ]]; then
25+
myconf+=(
26+
--host="$FFBUILD_TOOLCHAIN"
27+
)
28+
else
29+
echo "Unknown target"
30+
return -1
31+
fi
32+
33+
./configure "${myconf[@]}"
34+
make -j$(nproc)
35+
make install
36+
37+
cp -r "$FFBUILD_PREFIX"/share/aclocal/. /usr/share/aclocal
38+
}

scripts.d/45-x11/20-libxau.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
3+
LIBXAU_REPO="https://gitlab.freedesktop.org/xorg/lib/libxau.git"
4+
LIBXAU_COMMIT="d9443b2c57b512cfb250b35707378654d86c7dea"
5+
6+
ffbuild_enabled() {
7+
[[ $TARGET != linux* ]] && return -1
8+
return 0
9+
}
10+
11+
ffbuild_dockerbuild() {
12+
git-mini-clone "$LIBXAU_REPO" "$LIBXAU_COMMIT" libxau
13+
cd libxau
14+
15+
autoreconf -i
16+
17+
local myconf=(
18+
--prefix="$FFBUILD_PREFIX"
19+
--disable-shared
20+
--enable-static
21+
--with-pic
22+
)
23+
24+
if [[ $TARGET == linux* ]]; then
25+
myconf+=(
26+
--host="$FFBUILD_TOOLCHAIN"
27+
)
28+
else
29+
echo "Unknown target"
30+
return -1
31+
fi
32+
33+
./configure "${myconf[@]}"
34+
make -j$(nproc)
35+
make install
36+
}

scripts.d/45-x11/30-libxcb.sh

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/bin/bash
2+
3+
LIBXCB_REPO="https://gitlab.freedesktop.org/xorg/lib/libxcb.git"
4+
LIBXCB_COMMIT="21414e7c447f18224c577ed5e32bd5d6e45c44f9"
5+
6+
ffbuild_enabled() {
7+
[[ $TARGET != linux* ]] && return -1
8+
return 0
9+
}
10+
11+
ffbuild_dockerbuild() {
12+
git-mini-clone "$LIBXCB_REPO" "$LIBXCB_COMMIT" libxcb
13+
cd libxcb
14+
15+
autoreconf -i
16+
17+
local myconf=(
18+
--prefix="$FFBUILD_PREFIX"
19+
--disable-shared
20+
--enable-static
21+
--with-pic
22+
--disable-devel-docs
23+
)
24+
25+
if [[ $TARGET == linux* ]]; then
26+
myconf+=(
27+
--host="$FFBUILD_TOOLCHAIN"
28+
)
29+
else
30+
echo "Unknown target"
31+
return -1
32+
fi
33+
34+
./configure "${myconf[@]}"
35+
make -j$(nproc)
36+
make install
37+
}
38+
39+
ffbuild_configure() {
40+
echo --enable-libxcb
41+
}
42+
43+
ffbuild_unconfigure() {
44+
echo --disable-libxcb
45+
}

scripts.d/45-x11/40-libx11.sh

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/bash
2+
3+
LIBX11_REPO="https://gitlab.freedesktop.org/xorg/lib/libx11.git"
4+
LIBX11_COMMIT="d01d23374107f6fc55511f02559cf75be7bdf448"
5+
6+
ffbuild_enabled() {
7+
[[ $TARGET != linux* ]] && return -1
8+
return 0
9+
}
10+
11+
ffbuild_dockerbuild() {
12+
git-mini-clone "$LIBX11_REPO" "$LIBX11_COMMIT" libx11
13+
cd libx11
14+
15+
autoreconf -i
16+
17+
local myconf=(
18+
--prefix="$FFBUILD_PREFIX"
19+
--disable-shared
20+
--enable-static
21+
--with-pic
22+
--without-xmlto
23+
--without-fop
24+
--without-xsltproc
25+
--without-lint
26+
--disable-specs
27+
--enable-ipv6
28+
)
29+
30+
if [[ $TARGET == linux* ]]; then
31+
myconf+=(
32+
--host="$FFBUILD_TOOLCHAIN"
33+
)
34+
else
35+
echo "Unknown target"
36+
return -1
37+
fi
38+
39+
./configure "${myconf[@]}"
40+
make -j$(nproc)
41+
make install
42+
}

scripts.d/45-x11/50-libxext.sh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/bash
2+
3+
LIBXEXT_REPO="https://gitlab.freedesktop.org/xorg/lib/libxext.git"
4+
LIBXEXT_COMMIT="47904063048fa6ef6e8e16219ddef4d14d5d9a4b"
5+
6+
ffbuild_enabled() {
7+
[[ $TARGET != linux* ]] && return -1
8+
return 0
9+
}
10+
11+
ffbuild_dockerbuild() {
12+
git-mini-clone "$LIBXEXT_REPO" "$LIBXEXT_COMMIT" libxext
13+
cd libxext
14+
15+
autoreconf -i
16+
17+
local myconf=(
18+
--prefix="$FFBUILD_PREFIX"
19+
--disable-shared
20+
--enable-static
21+
--with-pic
22+
--without-xmlto
23+
--without-fop
24+
--without-xsltproc
25+
--without-lint
26+
)
27+
28+
if [[ $TARGET == linux* ]]; then
29+
myconf+=(
30+
--host="$FFBUILD_TOOLCHAIN"
31+
)
32+
else
33+
echo "Unknown target"
34+
return -1
35+
fi
36+
37+
./configure "${myconf[@]}"
38+
make -j$(nproc)
39+
make install
40+
}

scripts.d/45-x11/50-libxfixes.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
3+
LIBXFIXES_REPO="https://gitlab.freedesktop.org/xorg/lib/libxfixes.git"
4+
LIBXFIXES_COMMIT="6fe3bd64dd82f704ed91478acb4c99ab5c00be16"
5+
6+
ffbuild_enabled() {
7+
[[ $TARGET != linux* ]] && return -1
8+
return 0
9+
}
10+
11+
ffbuild_dockerbuild() {
12+
git-mini-clone "$LIBXFIXES_REPO" "$LIBXFIXES_COMMIT" libxfixes
13+
cd libxfixes
14+
15+
autoreconf -i
16+
17+
local myconf=(
18+
--prefix="$FFBUILD_PREFIX"
19+
--disable-shared
20+
--enable-static
21+
--with-pic
22+
)
23+
24+
if [[ $TARGET == linux* ]]; then
25+
myconf+=(
26+
--host="$FFBUILD_TOOLCHAIN"
27+
)
28+
else
29+
echo "Unknown target"
30+
return -1
31+
fi
32+
33+
./configure "${myconf[@]}"
34+
make -j$(nproc)
35+
make install
36+
}

scripts.d/45-x11/60-libxv.sh

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/bin/bash
2+
3+
LIBXV_REPO="https://gitlab.freedesktop.org/xorg/lib/libxv.git"
4+
LIBXV_COMMIT="03a6f599d060591a9a7cd8558bd2143a1c7c70d7"
5+
6+
ffbuild_enabled() {
7+
[[ $TARGET != linux* ]] && return -1
8+
[[ $ADDINS_STR == *4.4* ]] && return -1
9+
return 0
10+
}
11+
12+
ffbuild_dockerbuild() {
13+
git-mini-clone "$LIBXV_REPO" "$LIBXV_COMMIT" libxv
14+
cd libxv
15+
16+
autoreconf -i
17+
18+
local myconf=(
19+
--prefix="$FFBUILD_PREFIX"
20+
--disable-shared
21+
--enable-static
22+
--with-pic
23+
--without-lint
24+
)
25+
26+
if [[ $TARGET == linux* ]]; then
27+
myconf+=(
28+
--host="$FFBUILD_TOOLCHAIN"
29+
)
30+
else
31+
echo "Unknown target"
32+
return -1
33+
fi
34+
35+
./configure "${myconf[@]}"
36+
make -j$(nproc)
37+
make install
38+
}
39+
40+
ffbuild_configure() {
41+
# Needs a patch to FFmpeg to fix static linking first
42+
echo #--enable-xlib
43+
}
44+
45+
ffbuild_unconfigure() {
46+
echo --disable-xlib
47+
}

0 commit comments

Comments
 (0)