1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-12 03:00:28 +00:00
freebsd-ports/x11-toolkits/p5-Alien-wxWidgets/Makefile
John Marino 1a7693cfbf x11-toolkits/p5-Alien-wxWidgets: Unbreak on some platforms
For me, the most cringeworthy makefile technique is the shell command
(!=) evaluating another port with "make -C".  This is very slow, fragile,
and can cause a huge mess if something is out of wack.

The technique was used in this port and it didn't even work on all
platforms.  For sure FreeBSD 8 (according to portsmon) and DragonFly
were broken.  Essentially the file "gtk2_3_0_0_uni_gcc_3.4.pm" was
installed, but the broken plist substitution was looking for
"gtk2__uni_gcc_3.4.pm".

To fix this robustly, get rid of the whole "make -C" mess and the plist
substituion and just use the find command to dynamically add this one
file to the plist.  Since it starts with a unique pattern, we really
don't need to know the Wx version in order to establish the plist with
this technique.

Approved by:	blanket
2014-04-27 18:55:29 +00:00

32 lines
829 B
Makefile

# Created by: Cezary Morga <cm@therek.net>
# $FreeBSD$
PORTNAME= Alien-wxWidgets
PORTVERSION= 0.65
PORTREVISION= 1
CATEGORIES= x11-toolkits perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
MAINTAINER= pclin@FreeBSD.org
COMMENT= Perl5 module for building, finding and using wxWidgets binaries
USES= perl5 compiler:env
USE_PERL5= modbuild
USE_WX= 3.0
WX_COMPS= wx
WX_UNICODE= yes
CONFIGURE_ARGS+= --wxWidgets-build=0 --wxWidgets-unicode=1
post-patch:
@${REINPLACE_CMD} -e 's/wx-config/${WX_CONFIG:T}/' ${WRKSRC}/Build.PL
@${REINPLACE_CMD} -e "s/\'wx-config/\'${WX_CONFIG:T}/" -e "s/lc_r/lpthread/" \
${WRKSRC}/inc/My/Build/Any_wx_config.pm
post-install:
# file name is function of wx version, add it dynamically
@(cd ${STAGEDIR}${PREFIX}; ${FIND} * -type f -name gtk2_\* -print \
>> ${TMPPLIST})
.include <bsd.port.mk>