-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
Hello once again,
and of course I get to apologize some more due to forgetting to attach the
new patch.
Henrik
On 2020-08-02 at 17:15, ahve...@gmail.com wrote:
> I'm sorry for my lack of testing but I didn't notice that it was doing
> everything except updating the fontconfig cache when dealing with the
fonts
> packages. So, here should be hopefully the complete version, as
originally
> intented.
>
> Henrik
>
> On 2020-08-02 at 13:54, ahve...@gmail.com wrote:
> > Hi,
> > According to the bug[1] it should be all right to restore the font
parts
> in
> > the xorg-3 eclass. Matt didn't object either. Currently upgrading the
> > font-* packages to EAPI 7 and seemed to work the same way as with 5.
> >
> > [1] https://bugs.gentoo.org/712064
> >
> > Henrik Pihl
-BEGIN PGP SIGNATURE-
Version: FlowCrypt Email Encryption 7.8.8
Comment: Seamlessly send and receive encrypted email
wsFzBAEBCgAGBQJfJvyxACEJELLeoy9dd+JHFiEEZ+1cZjaUPp4qaEdxst6j
L1134kfMZBAAuOppKJ+HT73gj/Fug7ZDlGY9+uH/RyokDU5jDD+A3eSqLtK0
462767d/Of9kjmkJxJv55OGB/XVkZGZTbWpsdwS6GnsG5cj9KsblbBQU5a0g
lRcxbzJuHoNRdhVwz48Z9vC0g41mm3Plj03TmkaM2ys1CVyDlZDylAQOTSPP
a3YSkIj4VfzoSClnwH8sXNAZyqobIU9Av+wIQt0dYkve7Z6LH1OcRJgk8jFQ
siOp6mnqJMb5rvioZyuBUZwOdNL5GD3qbFXJn10Ek+fYZzcE/1pqySbfoLtl
IhtqGp9v4lYz7Yv9MLwEl+XjabJOZbZBRceHIXRJbjLCZEUpDmwFO9NObc8e
KhsFlI3DjM8nz/EyEFIw3/51zENcJPpwlSbDPus6N5nIOjKzGCEOJNpigG5P
uD5Es1s5QCgHf77lB8eRDQoa+u+UwiTbLWUlDIVM3IyYc6crpIM4eAM9mKVA
Jge6EKiRG62IuIAMcPYWNzVxa+TfJWJgpy5Jdu5frxV1Vh8LplTQYIWh5U7G
Jtq1WiGC1u2Jwyk/M8LOqtaymekeG6BSTvYf4Me1FK4+vRL7G4YeYg6LZj36
RmJz0IeVXfRC+BAit7ctBD4AOfAlNQ9UJIpHnEKNXTGLqtDVuHeF+VEOuJWL
GHsyorcfdpJjtbIKmCvuraysWo/I34u3Qgg=
=XKvL
-END PGP SIGNATURE-
diff --git a/eclass/xorg-3.eclass b/eclass/xorg-3.eclass
index 168e58b42c8..a52c0146baa 100644
--- a/eclass/xorg-3.eclass
+++ b/eclass/xorg-3.eclass
@@ -27,6 +27,20 @@ if [[ ${PV} == ** ]]; then
XORG_EAUTORECONF="yes"
fi
+# If we're a font package, but not the font.alias one
+FONT_ECLASS=""
+if [[ ${CATEGORY} = media-fonts ]]; then
+ case ${PN} in
+ font-alias|font-util)
+ ;;
+ font*)
+ # Activate font code in the rest of the eclass
+ FONT="yes"
+ FONT_ECLASS="font"
+ ;;
+ esac
+fi
+
# @ECLASS-VARIABLE: XORG_MULTILIB
# @DESCRIPTION:
# If set to 'yes', the multilib support for package will be enabled. Set
@@ -34,13 +48,14 @@ fi
: ${XORG_MULTILIB:="no"}
# we need to inherit autotools first to get the deps
-inherit autotools libtool multilib toolchain-funcs flag-o-matic ${GIT_ECLASS}
+inherit autotools libtool multilib toolchain-funcs flag-o-matic ${GIT_ECLASS} \
+ flag-o-matic ${FONT_ECLASS} ${GIT_ECLASS}
if [[ ${XORG_MULTILIB} == yes ]]; then
inherit multilib-minimal
fi
-EXPORTED_FUNCTIONS="src_prepare src_configure src_unpack src_compile src_install"
+EXPORTED_FUNCTIONS="src_prepare src_configure src_unpack src_compile src_install pkg_postinst pkg_postrm"
case "${EAPI:-0}" in
7) ;;
*) die "EAPI=${EAPI} is not supported" ;;
@@ -66,7 +81,7 @@ IUSE=""
# @ECLASS-VARIABLE: XORG_MODULE
# @DESCRIPTION:
# The subdirectory to download source from. Possible settings are app,
-# doc, data, util, driver, lib, proto, xserver. Set above the
+# doc, data, util, driver, font, lib, proto, xserver. Set above the
# inherit to override the default autoconfigured module.
: ${XORG_MODULE:="auto"}
if [[ ${XORG_MODULE} == auto ]]; then
@@ -116,7 +131,9 @@ EAUTORECONF_DEPEND+="
>=sys-devel/libtool-2.2.6a
sys-devel/m4"
if [[ ${PN} != util-macros ]] ; then
- EAUTORECONF_DEPEND+=" >=x11-misc/util-macros-1.18 >=media-fonts/font-util-1.2.0"
+ EAUTORECONF_DEPEND+=" >=x11-misc/util-macros-1.18"
+ # Required even by xorg-server
+ [[ ${PN} == "font-util" ]] || EAUTORECONF_DEPEND+=" >=media-fonts/font-util-1.2.0"
fi
WANT_AUTOCONF="latest"
WANT_AUTOMAKE="latest"
@@ -129,6 +146,36 @@ BDEPEND+=" ${EAUTORECONF_DEPENDS}"
unset EAUTORECONF_DEPENDS
unset EAUTORECONF_DEPEND
+if [[ ${FONT} == yes ]]; then
+ RDEPEND+=" media-fonts/encodings
+ >=x11-apps/mkfontscale-1.2.0"
+ PDEPEND+=" media-fonts/font-alias"
+ DEPEND+=" >=media-fonts/font-util-1.2.0
+ >=x11-apps/mkfontscale-1.2.0"
+
+ # @ECLASS-VARIABLE: FONT_DIR
+ # @DESCRIPTION:
+ # If you're creating a font package and the suffix of PN is not equal to
+ # the subdirectory of /usr/share/fonts/ it should install into, set
+ # FONT_DIR to that directory or directories. Set before inheriting this
+ # eclass.
+ [[ -z ${FONT_DIR} ]] && FONT_DIR=${PN##*-}
+
+ # Fix case of font directories
+ FONT_DIR=${FONT_DIR/ttf/TTF}
+ FONT_DIR=${FONT_DIR/otf/OTF}
+ FONT_DIR=${FONT_DIR/type1/Type1}
+ FONT_DIR=${FONT_DIR/speedo/Speedo}
+
+ # Set up configure options, wrapped so ebuilds can override if need be
+ [[ -z ${FONT_OPTIONS} ]] && FONT_OPTIONS="--with-fontdir=\"${EPREFIX}/usr/share/fonts/${FONT_DIR}\""
+
+ [[ ${PN} = font-misc-misc || ${PN} = font-schumacher-misc || ${PN##*-} = 75dpi || ${PN##*-} = 100dpi || ${PN##*-} = cyrillic ]] && IUSE+=" nls"