aboutsummaryrefslogtreecommitdiff
path: root/x11-toolkits/gtkada
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2013-07-21 13:02:08 +0000
committerJohn Marino <marino@FreeBSD.org>2013-07-21 13:02:08 +0000
commit7e7f71ea2758ccc33b8f62a51ff840e8d914e664 (patch)
treebf6ee46e2e279b3970a3bdce22f9487afc56a7ba /x11-toolkits/gtkada
parente753d5da3fc55e2f2db3169f151f04dd316a50e1 (diff)
downloadports-7e7f71ea2758ccc33b8f62a51ff840e8d914e664.tar.gz
ports-7e7f71ea2758ccc33b8f62a51ff840e8d914e664.zip
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)
Notes
Notes: svn path=/head/; revision=323381
Diffstat (limited to 'x11-toolkits/gtkada')
-rw-r--r--x11-toolkits/gtkada/Makefile30
1 files changed, 8 insertions, 22 deletions
diff --git a/x11-toolkits/gtkada/Makefile b/x11-toolkits/gtkada/Makefile
index c1d44ebf9173..78cc50b0ea3e 100644
--- a/x11-toolkits/gtkada/Makefile
+++ b/x11-toolkits/gtkada/Makefile
@@ -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/