Skip to content

Commit

Permalink
wxGTK3*: output rpath from wx-config
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nros committed Jul 7, 2024
1 parent 955fdab commit 5e8c80b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
11 changes: 10 additions & 1 deletion x11/wxGTK30/Makefile
Original file line number Diff line number Diff line change
@@ -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/}
Expand Down Expand Up @@ -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

Expand Down
11 changes: 10 additions & 1 deletion x11/wxGTK32/Makefile
Original file line number Diff line number Diff line change
@@ -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/}
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 5e8c80b

Please sign in to comment.