svn commit: r323381 - head/x11-toolkits/gtkada
John Marino
marino at FreeBSD.org
Sun Jul 21 13:02:09 UTC 2013
Author: marino
Date: Sun Jul 21 13:02:08 2013
New Revision: 323381
URL: http://svnweb.freebsd.org/changeset/ports/323381
Log:
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)
Modified:
head/x11-toolkits/gtkada/Makefile
Modified: head/x11-toolkits/gtkada/Makefile
==============================================================================
--- head/x11-toolkits/gtkada/Makefile Sun Jul 21 13:00:46 2013 (r323380)
+++ head/x11-toolkits/gtkada/Makefile Sun Jul 21 13:02:08 2013 (r323381)
@@ -14,38 +14,19 @@ COMMENT= Ada graphical toolkit based on
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/
More information about the svn-ports-head
mailing list