tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Making builtin fontconfig usable again on NetBSD (or, why libuuid bl3 is included in fontconfig bl3?)

Hello folks,
as analyzed by Thomas (<wiz>) last year in `Using fontconfig-2.13 from
xsrc on NetBSD [was Re: libuuid_ul and fontconfig]' thread on tech-pkg@:


builtin fontconfig could not be used in NetBSD because libuuid bl3 is
included unconditionally.

In NetBSD builtin fontconfig has an internal libuuid that has symbols
renamed (libuuid_ul) and so, at least on NetBSD, libuuid bl3 should not
be included (the attached patch basically just do that).  I have tested
this patch on NetBSD-current and pkgsrc-current and I have not noticed
any regression.  (Actually I think that also without this patch,
most/all(?) packages depending on fontconfig in pkgsrc are actually
linked against builtin fontconfig!)

Thomas, do you recall why libuuid bl3 was added to fontconfig
buildlink3? (cvs log does not seem to help)

If that libuuid bl3 inclusion is really needed on other platforms is it
okay to commit the proposed patch in this email?

If there won't be any negative feedbacks I would like to commit this
patch in 2 weeks.

Thank you!
fontconfig: Adjust to possibly use builtin one in NetBSD

In NetBSD, builtin fontconfig has an internal and with symbols
renamed libuuid (libuuid_ul). Avoid including it in that case.

Problem originally analyzed by <wiz> in:


XXX: As <mrg> pointed out in that thread probably uuid bl3 should not
XXX: be included there at all. `cvs annotate' and `cvs log' does not
XXX: contain any rationale in adding it.

RCS file: /cvsroot/pkgsrc/fonts/fontconfig/,v
retrieving revision 1.37
diff -u -p -r1.37
---	9 Sep 2019 12:22:03 -0000	1.37
+++	10 Jul 2020 10:27:42 -0000
@@ -5,14 +5,24 @@ BUILDLINK_TREE+=	fontconfig
+.if !defined(USE_BUILTIN.fontconfig)
+CHECK_BUILTIN.fontconfig:=	yes
+.  include "../../fonts/fontconfig/"
+CHECK_BUILTIN.fontconfig:=	no
 BUILDLINK_API_DEPENDS.fontconfig+=	fontconfig>=2.11.91
 BUILDLINK_ABI_DEPENDS.fontconfig+=	fontconfig>=2.13.0
 BUILDLINK_PKGSRCDIR.fontconfig?=	../../fonts/fontconfig
+.  include "../../mk/"
 .include "../../archivers/bzip2/"
 .include "../../devel/gettext-lib/"
 .include "../../devel/zlib/"
+.  if !empty(USE_BUILTIN.fontconfig:M[Yy][Ee]) && ${OPSYS} == "NetBSD"
 .include "../../devel/libuuid/"
+.  endif
 .include "../../graphics/freetype2/"
 .include "../../textproc/expat/"
RCS file: /cvsroot/pkgsrc/fonts/fontconfig/,v
retrieving revision 1.13
diff -u -p -r1.13
---	2 Nov 2019 22:24:40 -0000	1.13
+++	10 Jul 2020 10:27:42 -0000
@@ -43,6 +43,7 @@ MAKEVARS+=		BUILTIN_PKG.fontconfig
 ### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
+USE_BUILTIN.fontconfig= yes
 .if !defined(USE_BUILTIN.fontconfig)
 .  if ${PREFER.fontconfig} == "pkgsrc"
 USE_BUILTIN.fontconfig=	no
@@ -54,7 +55,7 @@ USE_BUILTIN.fontconfig=	yes
 .      for _dep_ in ${BUILDLINK_API_DEPENDS.fontconfig}
 .        if !empty(USE_BUILTIN.fontconfig:M[yY][eE][sS])
 USE_BUILTIN.fontconfig!=						\
-	if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.fontconfig:Q}; then \
+	if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.fontconfig}; then \
 		${ECHO} yes;						\
 	else								\
 		${ECHO} no;						\

Home | Main Index | Thread Index | Old Index