pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/pango Fix build on Darwin.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3880fa4437b0
branches:  trunk
changeset: 411974:3880fa4437b0
user:      brook <brook%pkgsrc.org@localhost>
date:      Mon Feb 24 17:08:31 2020 +0000

description:
Fix build on Darwin.

During the build, help2man runs pango-view but does not include
LD_LIBRARY_PATH in the environment.  That is needed on Darwin to run
uninstalled programs.  This adds a wrapper so that LD_LIBRARY_PATH
can be defined appropriately.

diffstat:

 devel/pango/Makefile                        |  11 ++++++++++-
 devel/pango/distinfo                        |   3 ++-
 devel/pango/files/pango-view.sh             |  16 ++++++++++++++++
 devel/pango/patches/patch-utils_meson.build |  17 +++++++++++++++++
 4 files changed, 45 insertions(+), 2 deletions(-)

diffs (87 lines):

diff -r 1be2861999ce -r 3880fa4437b0 devel/pango/Makefile
--- a/devel/pango/Makefile      Mon Feb 24 16:20:39 2020 +0000
+++ b/devel/pango/Makefile      Mon Feb 24 17:08:31 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.230 2020/01/02 15:54:53 gutteridge Exp $
+# $NetBSD: Makefile,v 1.231 2020/02/24 17:08:31 brook Exp $
 
 DISTNAME=      pango-1.44.7
 CATEGORIES=    devel fonts
@@ -16,6 +16,11 @@
 USE_TOOLS+=            gmake pkg-config
 INSTALLATION_DIRS=     ${PKGMANDIR}/man1
 
+SUBST_CLASSES+=                wrksrc
+SUBST_STAGE.wrksrc=    pre-configure
+SUBST_FILES.wrksrc=    output/utils/pango-view.sh
+SUBST_VARS.wrksrc=     WRKSRC
+
 PKGCONFIG_OVERRIDE+=           output/meson-private/pango.pc
 PKGCONFIG_OVERRIDE+=           output/meson-private/pangocairo.pc
 PKGCONFIG_OVERRIDE+=           output/meson-private/pangoft2.pc
@@ -28,6 +33,10 @@
 
 BUILDLINK_TRANSFORM+=  rm:-Werror=implicit-fallthrough # clang10svn
 
+post-extract:
+       ${MKDIR} -p ${WRKSRC}/output/utils
+       ${CP} ${FILESDIR}/pango-view.sh ${WRKSRC}/output/utils
+
 post-install:
        ${MV} ${DESTDIR}${PREFIX}/share/man/man1/pango-view.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/pango-view.1 || ${TRUE}
 
diff -r 1be2861999ce -r 3880fa4437b0 devel/pango/distinfo
--- a/devel/pango/distinfo      Mon Feb 24 16:20:39 2020 +0000
+++ b/devel/pango/distinfo      Mon Feb 24 17:08:31 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.123 2019/11/06 13:26:21 wiz Exp $
+$NetBSD: distinfo,v 1.124 2020/02/24 17:08:31 brook Exp $
 
 SHA1 (pango-1.44.7.tar.xz) = 2ca86089b657a2ccfede7d1b7598fdaa34c24859
 RMD160 (pango-1.44.7.tar.xz) = 8311253bf24ba3cb250938cd80f74b00d0ef8fdf
@@ -11,3 +11,4 @@
 SHA1 (patch-pango_pangocoretext.c) = 44b65b64da1d2ae819a5e984b5c672ad9d333622
 SHA1 (patch-pango_pangocoretext.h) = d6817eb02f0020c102ab95d63202f9508a70e647
 SHA1 (patch-pangocairo-coretext.h) = 2f7c8efad48b58398070f48e71c16d99d3d59f57
+SHA1 (patch-utils_meson.build) = 4c2564d54209b4bed286db3d85963c78897ceb49
diff -r 1be2861999ce -r 3880fa4437b0 devel/pango/files/pango-view.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/pango/files/pango-view.sh   Mon Feb 24 17:08:31 2020 +0000
@@ -0,0 +1,16 @@
+#!/bin/sh
+# $NetBSD: pango-view.sh,v 1.1 2020/02/24 17:08:31 brook Exp $
+#
+# Run pango-view with LD_LIBRARY_PATH
+#
+# During the build process, help2man is used to create a man page for
+# pango-view, which it does by running pango-view.  On some platforms
+# (notably Darwin) this fails because pango-view requires access to a
+# shared library just built and rpath is not set appropriately.
+# Therefore, LD_LIBRARY_PATH must be set, which cannot be done in
+# meson.build, because help2man does not propagate the environment to
+# programs it runs.  The solution is to wrap pango-view in this script
+# and provide LD_LIBRARY_PATH here.
+#
+
+env LD_LIBRARY_PATH=@WRKSRC@/output/pango @WRKSRC@/output/utils/pango-view ${*}
diff -r 1be2861999ce -r 3880fa4437b0 devel/pango/patches/patch-utils_meson.build
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/pango/patches/patch-utils_meson.build       Mon Feb 24 17:08:31 2020 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-utils_meson.build,v 1.1 2020/02/24 17:08:31 brook Exp $
+
+Make help2man execute a wrapper script so that LD_LIBRARY_PATH can be defined.
+
+--- utils/meson.build.orig     2019-10-25 03:45:11.000000000 +0000
++++ utils/meson.build
+@@ -52,8 +52,9 @@ if help2man.found() and not meson.is_cro
+ 
+   custom_target('pango-view.1',
+                 output: 'pango-view.1',
++              depends: pango_view,
+                 command: [
+-                  help2man, help2man_opts, '--output=@OUTPUT@', pango_view
++                  help2man, help2man_opts, '--output=@OUTPUT@', '--no-discard-stderr', meson.current_build_dir() + '/pango-view.sh'
+                 ],
+                 install: true,
+                 install_dir: join_paths(pango_datadir, 'man/man1'))



Home | Main Index | Thread Index | Old Index