From 5e8c80ba927f22b5013dea6f3ff1c4e4f983b862 Mon Sep 17 00:00:00 2001 From: nros Date: Sun, 7 Jul 2024 11:37:24 +0000 Subject: [PATCH] wxGTK3*: output rpath from wx-config Pkgsrc uses rpath on many systems but wx-config only outputs the rpath if it is run uninstalled, so make it output the rpath if pkgsrc uses rpath. Makes wxgtk programs execute correctly when run compiled and run from codelite. --- x11/wxGTK30/Makefile | 11 ++++++++++- x11/wxGTK32/Makefile | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/x11/wxGTK30/Makefile b/x11/wxGTK30/Makefile index 6137d241dc9d..96191ee99946 100644 --- a/x11/wxGTK30/Makefile +++ b/x11/wxGTK30/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.58 2024/04/07 07:35:29 wiz Exp $ +# $NetBSD: Makefile,v 1.59 2024/07/07 11:37:24 nros Exp $ DISTNAME= wxWidgets-3.0.5.1 PKGNAME= ${DISTNAME:S/wxWidgets/wxGTK30/} @@ -66,6 +66,15 @@ PLIST_SRC+= ${PLIST_SRC_DFLT} CONFIGURE_ARGS.SunOS+= --disable-xlocale +.if defined(_USE_RPATH) && !empty(_USE_RPATH:M[yY][eE][sS]) +SUBST_CLASSES+= wx-rpath +SUBST_STAGE.wx-rpath= pre-configure +SUBST_MESSAGE.wx-rpath= Setting rpath in wx-config +SUBST_FILES.wx-rpath= wx-config.in +SUBST_SED.wx-rpath+= -e 's|@WXCONFIG_RPATH@|${COMPILER_RPATH_FLAG}${PREFIX}/lib|g' +SUBST_SED.wx-rpath+= -e 's,is_installed || \[ -n ,\[ -n ,g' +.endif + post-configure: ${ECHO} 'install_qadll: install_xmldll' >> ${WRKSRC}/Makefile diff --git a/x11/wxGTK32/Makefile b/x11/wxGTK32/Makefile index 97f99550b7a0..6b6ccb3d74c0 100644 --- a/x11/wxGTK32/Makefile +++ b/x11/wxGTK32/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.41 2024/05/29 16:35:16 adam Exp $ +# $NetBSD: Makefile,v 1.42 2024/07/07 11:37:24 nros Exp $ DISTNAME= wxWidgets-3.2.5 PKGNAME= ${DISTNAME:S/wxWidgets/wxGTK32/} @@ -105,6 +105,15 @@ SUBST_SED.fix-paths= -e 's,/usr/pkg/include,${PREFIX}/include,g' SUBST_VARS.fix-paths= PREFIX .endif +.if defined(_USE_RPATH) && !empty(_USE_RPATH:M[yY][eE][sS]) +SUBST_CLASSES+= wx-rpath +SUBST_STAGE.wx-rpath= pre-configure +SUBST_MESSAGE.wx-rpath= Setting rpath in wx-config +SUBST_FILES.wx-rpath= wx-config.in +SUBST_SED.wx-rpath+= -e 's|@WXCONFIG_RPATH@|${COMPILER_RPATH_FLAG}${PREFIX}/lib|g' +SUBST_SED.wx-rpath+= -e 's,is_installed || \[ -n ,\[ -n ,g' +.endif + post-build: ${RM} ${WRKSRC}/locale/*.mo # We could do this: