print/lilypond: fix build with clang 21
With clang 21 print/lilypond fails to build, with errors similar to:
In file included from line-interface.cc:25:
In file included from /wrkdirs/usr/ports/print/lilypond/work/lilypond-2.24.4/lily/include/lazy-skyline-pair.hh:24:
/wrkdirs/usr/ports/print/lilypond/work/lilypond-2.24.4/lily/include/transform.hh:32:3: error: 'smob_trampoline' is a private member of 'Smob_base<Transform>'
32 | LY_DECLARE_SMOB_PROC (&Transform::call, 1, 0, 0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/print/lilypond/work/lilypond-2.24.4/lily/include/smobs.hh:245:32: note: expanded from macro 'LY_DECLARE_SMOB_PROC'
245 | LY_DECLARE_STATIC_SMOB_PROC (smob_trampoline<PMF>, REQ, OPT, VAR)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/print/lilypond/work/lilypond-2.24.4/lily/include/smobs.hh:240:65: note: expanded from macro 'LY_DECLARE_STATIC_SMOB_PROC'
240 | scm_set_smob_apply (smob_tag, reinterpret_cast<scm_t_subr> (FUN), REQ, \
| ^~~
/wrkdirs/usr/ports/print/lilypond/work/lilypond-2.24.4/lily/include/smobs.hh:260:14: note: declared private here
260 | static SCM smob_trampoline (SCM self, SCM arg1)
| ^Upstream fixed this as a side effect of
https://gitweb.git.savannah.gnu.org/gitweb/?p=lilypond.git;a=commit;h=f2192eb294e
by making the smob_trampoline methods protected, but it also includes
other changes. Apply a minimalist version, which only makes the needed
methods protected.
PR: 293185
Approved by: m.ne@gmx.net (maintainer)
MFH: 2026Q1
(cherry picked from commit 58bab68c706086774b17dcacc61c8fd37ecc8a15)