Skip to content

Commit

Permalink
On macOS, set DYLD_LIBRARY_PATH instead of LD_LIBRARY_PATH to fix build.
Browse files Browse the repository at this point in the history
  • Loading branch information
schmonz committed Nov 17, 2021
1 parent ebe5ed9 commit 97eb0d7
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 17 deletions.
15 changes: 14 additions & 1 deletion graphics/gdk-pixbuf2/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.50 2021/11/07 17:00:25 wiz Exp $
# $NetBSD: Makefile,v 1.51 2021/11/17 15:14:42 schmonz Exp $

DISTNAME= gdk-pixbuf-2.42.6
PKGNAME= ${DISTNAME:S/pixbuf/pixbuf2/}
Expand All @@ -21,6 +21,19 @@ MAKE_ENV+= LD_LIBRARY_PATH=${WRKSRC}/output/gdk-pixbuf
# For Darwin
MAKE_ENV+= DYLD_LIBRARY_PATH=${WRKSRC}/output/gdk-pixbuf

.include "../../mk/bsd.prefs.mk"

SUBST_CLASSES+= dyld
SUBST_STAGE.dyld= pre-configure
SUBST_FILES.dyld= gdk-pixbuf/meson.build \
tests/meson.build \
thumbnailer/meson.build
.if ${OPSYS} == "Darwin"
SUBST_SED.dyld= -e 's|@LD_LIBRARY_PATH@|DYLD_LIBRARY_PATH|g'
.else
SUBST_SED.dyld= -e 's|@LD_LIBRARY_PATH@|LD_LIBRARY_PATH|g'
.endif

MESON_ARGS+= -D installed_tests=false
PKGCONFIG_OVERRIDE_STAGE= pre-install
PKGCONFIG_OVERRIDE= output/meson-private/gdk-pixbuf-2.0.pc
Expand Down
8 changes: 4 additions & 4 deletions graphics/gdk-pixbuf2/distinfo
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
$NetBSD: distinfo,v 1.49 2021/10/26 10:46:09 nia Exp $
$NetBSD: distinfo,v 1.50 2021/11/17 15:14:42 schmonz Exp $

BLAKE2s (gdk-pixbuf-2.42.6.tar.xz) = 523935fc861a24252a741e5544afebb2d7dc5f6150632831099724d97728c293
SHA512 (gdk-pixbuf-2.42.6.tar.xz) = 02e6d89de6cb6c9768d5173dada88c038e2454b4345ebc6f7b012d484303c08e53b58f085e872290555e1ccb74a478fa6cef4623a75f2e1f05c27bfc4e986f4d
Size (gdk-pixbuf-2.42.6.tar.xz) = 7708484 bytes
SHA1 (patch-gdk-pixbuf_gdk-pixbuf-scaled-anim.c) = a9d2436711b1a1c3bb58beef0df5e485ad6cbe7d
SHA1 (patch-gdk-pixbuf_meson.build) = 58b53744e4cc846ddc9492b86d8964c6c19ed5e2
SHA1 (patch-tests_meson.build) = 942b0dcfbc87ee335fb871a3d8811b5bade0c436
SHA1 (patch-thumbnailer_meson.build) = fb9b7523663ac595ef66c8cf41837a733ac44216
SHA1 (patch-gdk-pixbuf_meson.build) = d54c4f1c5c045c3988fc2bbac19d2aac3e32de89
SHA1 (patch-tests_meson.build) = 6da53b4e168a20dcc546840e4fbd8fc7ac8f03aa
SHA1 (patch-thumbnailer_meson.build) = c4a5abaced448add0c28f3b391b9db86b4299c02
8 changes: 4 additions & 4 deletions graphics/gdk-pixbuf2/patches/patch-gdk-pixbuf_meson.build
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
$NetBSD: patch-gdk-pixbuf_meson.build,v 1.1 2020/02/20 03:35:35 brook Exp $
$NetBSD: patch-gdk-pixbuf_meson.build,v 1.2 2021/11/17 15:14:42 schmonz Exp $

Add LD_LIBRARY_PATH so uninstalled programs find newly built shared libraries.

--- gdk-pixbuf/meson.build.orig 2019-10-08 10:44:10.000000000 +0000
--- gdk-pixbuf/meson.build.orig 2021-04-09 14:44:51.000000000 +0000
+++ gdk-pixbuf/meson.build
@@ -316,6 +316,7 @@ if not meson.is_cross_build()
@@ -355,6 +355,7 @@ if not meson.is_cross_build()
output: 'loaders.cache',
capture: true,
command: [
+ 'env', 'LD_LIBRARY_PATH=' + meson.current_build_dir() + '/../gdk-pixbuf',
+ 'env', '@LD_LIBRARY_PATH@=' + meson.current_build_dir() + '/../gdk-pixbuf',
gdk_pixbuf_query_loaders,
dynamic_loaders,
],
8 changes: 4 additions & 4 deletions graphics/gdk-pixbuf2/patches/patch-tests_meson.build
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
$NetBSD: patch-tests_meson.build,v 1.2 2021/09/19 08:06:20 nia Exp $
$NetBSD: patch-tests_meson.build,v 1.3 2021/11/17 15:14:42 schmonz Exp $

Add LD_LIBRARY_PATH so uninstalled programs find newly built shared libraries.

--- tests/meson.build.orig 2021-04-09 14:44:51.540196000 +0000
--- tests/meson.build.orig 2021-04-09 14:44:51.000000000 +0000
+++ tests/meson.build
@@ -12,6 +12,7 @@ if enabled_loaders.contains('png') and h
input: 'resources.gresource.xml',
output: 'resources.c',
command: [
+ 'env', 'LD_LIBRARY_PATH=' + meson.current_build_dir() + '/../gdk-pixbuf',
+ 'env', '@LD_LIBRARY_PATH@=' + meson.current_build_dir() + '/../gdk-pixbuf',
gen_resources,
'--glib-compile-resources=@0@'.format(glib_compile_resources.full_path()),
'--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()),
@@ -31,6 +32,7 @@ if enabled_loaders.contains('png') and h
input: 'resources.gresource.xml',
output: 'resources.h',
command: [
+ 'env', 'LD_LIBRARY_PATH=' + meson.current_build_dir() + '/../gdk-pixbuf',
+ 'env', '@LD_LIBRARY_PATH@=' + meson.current_build_dir() + '/../gdk-pixbuf',
gen_resources,
'--glib-compile-resources=@0@'.format(glib_compile_resources.full_path()),
'--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()),
8 changes: 4 additions & 4 deletions graphics/gdk-pixbuf2/patches/patch-thumbnailer_meson.build
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
$NetBSD: patch-thumbnailer_meson.build,v 1.1 2020/02/20 03:35:35 brook Exp $
$NetBSD: patch-thumbnailer_meson.build,v 1.2 2021/11/17 15:14:42 schmonz Exp $

Add LD_LIBRARY_PATH so uninstalled programs find newly built shared libraries.

--- thumbnailer/meson.build.orig 2019-10-08 10:44:10.000000000 +0000
--- thumbnailer/meson.build.orig 2021-04-09 14:44:51.000000000 +0000
+++ thumbnailer/meson.build
@@ -16,6 +16,7 @@ custom_target('thumbnailer',
@@ -17,6 +17,7 @@ custom_target('thumbnailer',
input: 'gdk-pixbuf-thumbnailer.thumbnailer.in',
output: 'gdk-pixbuf-thumbnailer.thumbnailer',
command: [
+ 'env', 'LD_LIBRARY_PATH=' + meson.current_build_dir() + '/../gdk-pixbuf',
+ 'env', '@LD_LIBRARY_PATH@=' + meson.current_build_dir() + '/../gdk-pixbuf',
gen_thumbnailer,
'--printer=@0@'.format(gdk_pixbuf_print_mime_types.full_path()),
'--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()),

0 comments on commit 97eb0d7

Please sign in to comment.