mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
x11-toolkits/gtkada: Improve multijob support
The first attempt at supporting multiple jobs resulting in reimplementing the MAKE_JOBS_NUMBER determining with "!=" operator. Portlint doesn't like that and it's not even necessary. By overriding the do-build target, the "-j" parameter is shielding from the makefile and the number of jobs is passed to gprbuild via the PROCESSORS environment variable. USE_GMAKE was also converted to USES+= gmake. Approved by: bapt (mentor)
This commit is contained in:
parent
e753d5da3f
commit
7e7f71ea27
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=323381
@ -14,38 +14,19 @@ COMMENT= Ada graphical toolkit based on Gtk2+
|
||||
LICENSE= GPLv2
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
USE_GMAKE= yes
|
||||
USE_BZIP2= yes
|
||||
USE_PERL5_BUILD=yes
|
||||
USE_GNOME= gtk20
|
||||
USES= ada
|
||||
USES= ada gmake
|
||||
|
||||
DESTINY= ${WRKDIR}/destino
|
||||
MAKE_ENV+= DESTDIR=${DESTINY}
|
||||
MAKE_ENV+= DESTDIR=${DESTINY} \
|
||||
PROCESSORS=${MAKE_JOBS_NUMBER}
|
||||
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
# Setting MAKE_JOBS_SAFE=yes will break the build because -j is passed
|
||||
# to gmake. So we need to roll our own parallel-job support here.
|
||||
# We can check MAKE_JOBS_NUMBER because /etc/make.conf is loaded
|
||||
# before this makefile and bsd.port.mk isn't.
|
||||
.if !defined(DISABLE_MAKE_JOBS)
|
||||
. if defined(MAKE_JOBS_NUMBER)
|
||||
MAKE_ENV+= PROCESSORS=${MAKE_JOBS_NUMBER}
|
||||
. else
|
||||
. if ${OPSYS} == FreeBSD
|
||||
NCPU!= ${SYSCTL} -n kern.smp.cpus
|
||||
. elif ${OPSYS} == DragonFly
|
||||
NCPU!= ${SYSCTL} -n hw.ncpu
|
||||
. else
|
||||
NCPU= 1
|
||||
. endif
|
||||
MAKE_ENV+= PROCESSORS=${NCPU}
|
||||
. endif
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
BUILD_DEPENDS+= sphinx-build:${PORTSDIR}/textproc/py-sphinx
|
||||
.endif
|
||||
@ -63,6 +44,11 @@ post-patch:
|
||||
@${REINPLACE_CMD} -e 's/^all: \(.*\)/all: \1 docs/g' ${WRKSRC}/Makefile.in
|
||||
.endif
|
||||
|
||||
do-build:
|
||||
# This target is recreated because -j cannot be set, but
|
||||
# MAKE_JOBS_SAFE=yes is needed for PROCESSORS value
|
||||
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} gmake all
|
||||
|
||||
post-install:
|
||||
@${MKDIR} ${DESTINY}${PREFIX}/libdata
|
||||
@${MV} ${DESTINY}${PREFIX}/lib/pkgconfig ${DESTINY}${PREFIX}/libdata/
|
||||
|
Loading…
Reference in New Issue
Block a user