aboutsummaryrefslogtreecommitdiffstats
path: root/x11-toolkits
diff options
context:
space:
mode:
authormarino <marino@FreeBSD.org>2013-07-21 21:02:08 +0800
committermarino <marino@FreeBSD.org>2013-07-21 21:02:08 +0800
commit7c26fb3c1e36286ddfbf9c64218682256a17b424 (patch)
treebf6ee46e2e279b3970a3bdce22f9487afc56a7ba /x11-toolkits
parent5f29cf4b4f3396513063b7dade6d211fce6bf746 (diff)
downloadfreebsd-ports-gnome-7c26fb3c1e36286ddfbf9c64218682256a17b424.tar.gz
freebsd-ports-gnome-7c26fb3c1e36286ddfbf9c64218682256a17b424.tar.zst
freebsd-ports-gnome-7c26fb3c1e36286ddfbf9c64218682256a17b424.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)
Diffstat (limited to 'x11-toolkits')
-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/