tech-pkg archive

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

[PATCH] make libbfd (binutils) usage optional in graphics/cairo, un-breaking it for modern GNU/Linux



Hi,

I'm building a tree based on 2020Q3. It's intended for CentOS 7, but I
am testing on a more custom GNU/Linux box that has fresh binutils.
Binutils dropped things from libbfd API in this commit:

	https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=fd3619828e94a24a92cddec42cbc0ab33352eeb4

I presume the symbol-lookup internal feature in cairo is rather obscure
and people are not hurt if it is disabled by default. An unnecessary
dependency on a binutils lib is bigger pain, IMHO. The attached patch
adds an option 'bfd' which is disabled by default to achieve that.


Alrighty then,

Thomas

-- 
Dr. Thomas Orgis
HPC @ Universität Hamburg
diff -ruN -x CVS pkgsrc-2020Q3/graphics/cairo/options.mk pkgsrc/graphics/cairo/options.mk
--- pkgsrc-2020Q3/graphics/cairo/options.mk	2019-11-02 23:37:54.000000000 +0100
+++ pkgsrc/graphics/cairo/options.mk	2020-11-13 16:07:01.993400475 +0100
@@ -1,7 +1,7 @@
 # $NetBSD: options.mk,v 1.19 2019/11/02 22:37:54 rillig Exp $
 
 PKG_OPTIONS_VAR=	PKG_OPTIONS.cairo
-PKG_SUPPORTED_OPTIONS=	x11 xcb
+PKG_SUPPORTED_OPTIONS=	x11 xcb bfd
 .if exists(/System/Library/Frameworks/Quartz.framework)
 PKG_SUPPORTED_OPTIONS+=	quartz
 .endif
@@ -57,3 +57,12 @@
 CONFIGURE_ARGS+=	--disable-quartz-font
 CONFIGURE_ARGS+=	--disable-quartz-image
 .endif
+
+# The symbol lookup feature uses libbfd from binutils, which
+# is rather fragile when they decide to change the API again.
+.if !empty(PKG_OPTIONS:Mbfd)
+CONFIGURE_ARGS+=	--enable-symbol-lookup
+.else
+CONFIGURE_ARGS+=	--disable-symbol-lookup
+.endif
+


Home | Main Index | Thread Index | Old Index