Skip to content

Commit

Permalink
tinyx: add xbill port
Browse files Browse the repository at this point in the history
JIRA: RTOS-889
  • Loading branch information
adamgreloch committed Oct 7, 2024
1 parent 408b20c commit 28e8e6b
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
44 changes: 44 additions & 0 deletions tinyx/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,46 @@ build_suckless() {
}


build_xbill() {
appname="xbill"
version="2.1"

b_log "tinyx: building ${appname}"

archive_filename="${appname}-${version}.tar.gz"
PREFIX_PORT_SRC="${PREFIX_PORT_BUILD}/${appname}/${version}"

b_port_download "http://www.xbill.org/download/" "${archive_filename}"

if should_reconfigure "${appname}/${version}"; then
extract_sources

b_port_apply_patches "${PREFIX_PORT_SRC}" "${appname}/${version}"

if [ ! -f "${PREFIX_PORT_SRC}/config.status" ]; then
exec_configure --datadir="/usr/share/"
fi

# FIXME: this is brutal, see build_tinyx note
sedexpr='s/ -lXaw/ -l:libXaw.a/g;s/ -lXt/ -l:libXt.a/g;'
sedexpr+='s/ -lX11/ -l:libXmu.a -l:libXext.a -l:libSM.a -l:libICE.a -l:libXdmcp.a -l:libXpm.a -l:libX11.a/g;'
sedexpr+='s/ -lXmuu/ -l:libXmuu.a -l:libXcursor.a -l:libXrender.a/g;s/ -lXcursor//g'

find . -name 'Makefile' -print0 | xargs -0 sed -i "${sedexpr}"

mark_as_configured "${appname}/${version}"
fi

make -C "${PREFIX_PORT_SRC}" PREFIX="${PREFIX_PORT_BUILD}"

$STRIP -o "${PREFIX_PROG_STRIPPED}/${appname}" "${PREFIX_PORT_SRC}/${appname}"

b_install "${PREFIX_PORT_SRC}/pixmaps"/* /usr/share/xbill/pixmaps/
b_install "${PREFIX_PORT_SRC}/bitmaps"/* /usr/share/xbill/bitmaps/
b_install "${PREFIX_PORTS_INSTALL}/${appname}" /usr/bin
}


# Build xlib and xserver (call ordering is important here)

build_tinyxlib
Expand All @@ -320,4 +360,8 @@ build_x11_app xinit 1.3.3
build_x11_app xrdb 1.2.2
build_x11_app xgc 1.0.6

# Fun stuff

build_xbill

rm -rf "$TMP_DIR"
20 changes: 20 additions & 0 deletions tinyx/patches/xbill/2.1/01-configure.in.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff -ruN a/configure.in b/configure.in
--- a/configure.in 2024-10-07 11:50:36.720475289 +0200
+++ b/configure.in 2024-10-07 12:46:54.984035534 +0200
@@ -84,6 +84,16 @@
AC_SUBST(WIDGET_OBJS)
fi

+dnl force athena
+AC_DEFINE(USE_ATHENA)
+WIDGET_LIBS="$WIDGET_LIBS -lXaw -lXmu"
+WIDGET_OBJS="$WIDGET_OBJS x11-athena.o"
+
+WIDGET_LIBS="$WIDGET_LIBS -lXt -lXpm -lX11"
+WIDGET_OBJS="$WIDGET_OBJS x11.o"
+AC_SUBST(WIDGET_LIBS)
+AC_SUBST(WIDGET_OBJS)
+
AC_ARG_ENABLE(gtk,
[ --enable-gtk build with the GTK widget set])

0 comments on commit 28e8e6b

Please sign in to comment.