svn commit: r348013 - in head/textproc/adabrowse: . files
John Marino
marino at FreeBSD.org
Wed Mar 12 23:00:11 UTC 2014
Author: marino
Date: Wed Mar 12 23:00:09 2014
New Revision: 348013
URL: http://svnweb.freebsd.org/changeset/ports/348013
QAT: https://qat.redports.org/buildarchive/r348013/
Log:
textproc/adabrowse: switch build to .gpr to avoid ASIS rebuilds
At least with the upcoming gcc49 and ASIS 2013, I've been seeing gmake
Makefile-based builds trying to rebuild ASIS rather than just use the
provided static library. I don't know what causes that, but I did notice
that it doesn't happen with GNAT project files.
1) Disregard gmake completely and provide a new build.gpr file
This will work when gcc-aux is moved to gcc49.
2) Add DOCS option and install the html documentation optionally
3) Relocate LICENSE to make portlint happy
4) Using GPR makes this jobs safe (although the job number might be
limited to 1 anyway in this case)
Added:
head/textproc/adabrowse/files/ad-projects-impl.ads (contents, props changed)
head/textproc/adabrowse/files/build.gpr (contents, props changed)
Deleted:
head/textproc/adabrowse/files/patch-Makefile
Modified:
head/textproc/adabrowse/Makefile
Modified: head/textproc/adabrowse/Makefile
==============================================================================
--- head/textproc/adabrowse/Makefile Wed Mar 12 22:43:12 2014 (r348012)
+++ head/textproc/adabrowse/Makefile Wed Mar 12 23:00:09 2014 (r348013)
@@ -3,6 +3,7 @@
PORTNAME= adabrowse
PORTVERSION= 4.0.3
+PORTREVISION= 1
CATEGORIES= textproc
MASTER_SITES= http://home.datacomm.ch/t_wolf/tw/ada95/adabrowse/
DISTNAME= ${PORTNAME}_${PORTVERSION}_src
@@ -10,17 +11,36 @@ DISTNAME= ${PORTNAME}_${PORTVERSION}_src
MAINTAINER= marino at FreeBSD.org
COMMENT= HTML generator for Ada 95 library unit specifications
+LICENSE= GPLv2
+
BUILD_DEPENDS= asis>=2011:${PORTSDIR}/lang/asis \
gnat_util>=2013:${PORTSDIR}/lang/gnat_util
-LICENSE= GPLv2
-
-USES= ada gmake
+USES= ada
WRKSRC= ${WRKDIR}/${PORTNAME}_${PORTVERSION}
-MAKE_ENV= ADA_INCLUDE_PATH=${LOCALBASE}/lib/asis
-MAKE_JOBS_UNSAFE=yes
+PORTDOCS= *.html *.css
+
+OPTIONS_DEFINE= DOCS
+
+.include <bsd.port.options.mk>
+
+post-extract:
+ ${CP} ${FILESDIR}/ad-* ${FILESDIR}/build.gpr ${WRKSRC}
+ ${RM} ${WRKSRC}/sdefault.adb
+
+do-build:
+# Since we only need one C object, just compile it manually rather
+# than bring in GPRBuild as a dependency
+ ${MKDIR} ${WRKSRC}/obj
+ (cd ${WRKSRC}/obj && ${SETENV} ${MAKE_ENV} ada -c -O2 ../util-nl.c)
+ (cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} gnatmake -Pbuild)
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/adabrowse ${STAGEDIR}${PREFIX}/bin/adabrowse
+.if ${PORT_OPTIONS:MDOCS}
+ ${MKDIR} ${STAGEDIR}/${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/*.html ${WRKSRC}/doc/*.css \
+ ${STAGEDIR}/${DOCSDIR}/
+.endif
.include <bsd.port.mk>
Added: head/textproc/adabrowse/files/ad-projects-impl.ads
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/textproc/adabrowse/files/ad-projects-impl.ads Wed Mar 12 23:00:09 2014 (r348013)
@@ -0,0 +1,8 @@
+-- The FSF GNAT 4.9 Project code is hopelessly too modern for AdaBrowse to
+-- hook into it. Just build AdaBrowse without it.
+
+pragma License (GPL);
+
+with AD.Projects.Impl_No;
+private package AD.Projects.Impl
+ renames AD.Projects.Impl_No;
Added: head/textproc/adabrowse/files/build.gpr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/textproc/adabrowse/files/build.gpr Wed Mar 12 23:00:09 2014 (r348013)
@@ -0,0 +1,16 @@
+with "asis";
+with "gnat_util";
+project Build is
+
+ for Languages use ("Ada", "C");
+ for Source_Dirs use (".");
+ for Object_dir use "obj";
+ for Exec_Dir use ".";
+ for Main use ("adabrowse");
+
+ package Compiler is
+ for Default_Switches ("C") use ("-O2");
+ for Default_Switches ("ada") use ("-O2", "-gnatwa");
+ end Compiler;
+
+end Build;
More information about the svn-ports-all
mailing list