diff --git a/tinyx/build.sh b/tinyx/build.sh index 75a048c..4821278 100755 --- a/tinyx/build.sh +++ b/tinyx/build.sh @@ -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 @@ -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" diff --git a/tinyx/patches/xbill/2.1/01-configure.in.patch b/tinyx/patches/xbill/2.1/01-configure.in.patch new file mode 100644 index 0000000..734b0f6 --- /dev/null +++ b/tinyx/patches/xbill/2.1/01-configure.in.patch @@ -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]) +