Solved Minimal xorg-minimal

I am trying to build x11/xorg-minimal and it is taking up too much disk space. ~ 3.7GB

Part of the problem is LLVM. It is a dependency of graphics/mesa-dri and it brings in llbd and llvm and clang && python && perl and all kind of things a mesa library should not need.
I am sure there is some core component of llvm that mesa-dri requires.

How can I build a lighter weight llvm? I see a flavor llvm-lite and that sounds promising. Can anybody comment on best use case for it?

I really only want x-forwarding from the remote x-server running off MFS. Do I even need mesa-dri for that?? Headless xorg?

To hack in the "lite" LLVM version I would have to modify the port mesa-dri Makefile and USES ?? Anybody try this?
 
Can anybody help me understand how the flavors of xorg-server are used? xorg flavor being the default.
  • xorg: xorg-server
  • xnest: xorg-nestserver
  • xephyr: xephyr
  • xvfb: xorg-vfbserver
Anybody using Xephyr or xvfb setups?
 
mesa-dri depend on:
  • graphics/spirv-tools
  • devel/spirv-llvm-translator
The default xorg-server is xorg

To get all dependencies of a port run make all-depends-list. Or if the port is already installed pkg info -r package (if you add the option -o the output is more verbose).
To get all flavors of a port and the default flavor run make -V FLAVORS -V FLAVOR. This is true for all of ports with flavor except for drivers like graphics/gpu-firmware-*-kmod, they have a default flavor but all flavors will be built. Packages and components of some languages (Python and some others I do not remember now) the flavors depends on language version installed.

The description of all xorg-server flavor is:
Code:
x11-servers
    xorg-server 21.1.20,1 [xorg-server 21.1.20,1] installed automatic
        X.Org X server and related programs
        xorg 21.1.20,1 [xorg-server 21.1.20,1] installed automatic
            X.Org X server and related programs
            Description     : This package contains Xvfb, a virtual framebuffer X server.
                             
                              See also: https://www.x.org/
        xnest 21.1.20,2 [xorg-nestserver 21.1.20,2]
            X.Org X server and related programs
            Description     : This package contains Xnest, a nesting X Server that displays on an X Server.
        xephyr 21.1.20,1 [xephyr 21.1.20,1]
            X.Org X server and related programs
            Description     : Xephyr is a kdrive server that outputs to a window on a pre-existing
                              'host' X display. Think Xnest but with support for modern extensions
                              like composite, damage and randr.
        xvfb 21.1.20,1 [xorg-vfbserver 21.1.20,1]
            X.Org X server and related programs
            Description     : This package contains Xvfb, a virtual framebuffer X server.
                             
                              See also: https://www.x.org/
 
Thanks for your help.
I was trying to put together something like TinyCore where they have a FLTK desktop in 30MB. I would take 1.25GB xorg-minimal but thats not going to happen...

I am going to mark this solved. Any further comments are welcome.
 
Wayland Protocols. Yes in Xorg Minimal....

I was trying for a 2GB Poudriere Image with 600MB base and rest for my x11 packages..

I tried calming LLVM in base without using a /poudriere.d/src.conf and keep base pure and just strip files.
excluded.files
Code:
usr/src
usr/lib/debug
usr/lib32
usr/tests
nxb-bin
usr/bin/cc
usr/bin/lldb-server
usr/bin/ld.lld
usr/bin/c++
usr/bin/lldb
usr/bin/llvm-objdump
usr/bin/llvm-nm
usr/bin/llvm-ar
usr/lib/clang/*
usr/lib/dtrace/*
usr/share/*
#usr/local/share/* keep termcap in /misc
rescue/*
usr/local/lib/python3.11/*

I may have went to deep. This is for my GPSD build. nox11 Appliance Build. PYSERIAL=OFF
 
Sorry to have switched topics. I started with a small appliance concept and was working on something bigger. Too big it appears.

Even though I set GPSD port options to PYSERIAL=OFF the port still has a dependency with USES=PYTHON even though the port only needs PYTHON to build. Not runs.
I have yet to figure out how to solve that. Maybe add another FLAVOR. Just for that one port option. That seems excessive.
gpsd@lite
211MB for an un-needed python on a nicely written C codebase.
Maybe this should just be my personal patch. I dunno.
 
Its very ricy but since the FreeBSD port of Xorg has gained cruft over the years, untill it gets cleaned up I tend to use a script similar to the one I posted here. It at least localises the mess into /opt/X11R7

Its very ricy, but now I go a little further and use ldd (and objdump) to pull in just the needed libs, i.e llvm (rather than all the extra junk the libs recursively pull in).

Not ideal but Xorg isn't complex, its just badly packaged upstream these days. But I am optimistic that Xlibre and the porters might help shift some of the clutter in the near future.
 
Thank You kpedersen for replying. I did not want to bug you; but you do know the skinny.

Just an idea from a non programmable person. Static compile the whole mess.
Wouldn't that just pluck out the needed libraries and make one big ball of yarn?
Is that not valid approach? For embedded non-upgradable setup for running FLTK apps.

I have yet to try applying simple make.conf stripping on xorg-minimal & friends.
It seems pointless to delete examples and info when the 8K pound elephant in the room is.......5 compilers and wayland ect. ect..
 
Back
Top