Subject: packaging norms for free software with optional non-free dependencies?
To: None <tech-pkg@netbsd.org>
From: Greg Troxel <gdt@ir.bbn.com>
List: tech-pkg
Date: 07/26/2004 15:13:42
I just filed pkg/26436, which changes devel/doxygen not to depend on
graphviz unless a variable is defined.
I didn't find anything in Packages.txt addressing this.
My view is that if a free software program can be configured to use a
non-free dependency, but is substantially usable without it, that
pkgsrc should default to not using the non-free dependency, and
perhaps have an option to use it. (More expansively, I probably
believe this for any dependency whose license is at least non-free and
substantially ickier than the original program.)
Hence, the test for DOXYGEN_USE_DOT in the patch in the PR, which I
include here.
Index: Makefile
===================================================================
RCS file: /NETBSD-CVS/pkgsrc/devel/doxygen/Makefile,v
retrieving revision 1.22
diff -u -r1.22 Makefile
--- Makefile 10 May 2004 00:15:49 -0000 1.22
+++ Makefile 26 Jul 2004 17:21:34 -0000
@@ -11,6 +11,12 @@
DEPENDS+= teTeX-[0-9]*:../../print/teTeX
+PLIST_SRC= # empty
+
+.include "../../mk/bsd.prefs.mk"
+
+BUILD_DEFS+=DOXYGEN_USE_DOT
+
WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
USE_GNU_TOOLS+= make
USE_LANGUAGES= c c++
@@ -20,19 +26,27 @@
CONFIGURE_ARGS= --make ${GMAKE}
CONFIGURE_ARGS+= --perl ${PERL5}
CONFIGURE_ARGS+= --install ${INSTALL}
-CONFIGURE_ARGS+= --dot ${PREFIX}/bin/dot
CONFIGURE_ARGS+= --prefix ${PREFIX}
CONFIGURE_ARGS+= --docdir ${PREFIX}/share/doc
+.ifdef DOXYGEN_USE_DOT
+CONFIGURE_ARGS+= --dot ${PREFIX}/bin/dot
+PLIST_SRC+= ${PKGDIR}/PLIST.dot
+.endif
+
SUBST_CLASSES+= pybin
SUBST_STAGE.pybin= pre-configure
SUBST_FILES.pybin= doc/Makefile.in
SUBST_SED.pybin= -e "s|@PYTHONBIN@|${PYTHONBIN}|g"
+PLIST_SRC+= ${PKGDIR}/PLIST
+
post-install:
cd ${WRKSRC} && ${GMAKE} install_docs
+.ifdef DOXYGEN_USE_DOT
.include "../../graphics/graphviz/buildlink3.mk"
+.endif
.include "../../lang/python/application.mk"
.include "../../mk/ghostscript.mk"
.include "../../mk/bsd.pkg.mk"
Index: PLIST
===================================================================
RCS file: /NETBSD-CVS/pkgsrc/devel/doxygen/PLIST,v
retrieving revision 1.6
diff -u -r1.6 PLIST
--- PLIST 10 May 2004 00:15:49 -0000 1.6
+++ PLIST 26 Jul 2004 17:21:34 -0000
@@ -70,92 +70,6 @@
share/doc/doxygen/examples/define/html/globals_defs.html
share/doc/doxygen/examples/define/html/index.html
share/doc/doxygen/examples/diagrams.cfg
-share/doc/doxygen/examples/diagrams/html/annotated.html
-share/doc/doxygen/examples/diagrams/html/class_a-members.html
-share/doc/doxygen/examples/diagrams/html/class_a.html
-share/doc/doxygen/examples/diagrams/html/class_a__coll__graph.map
-share/doc/doxygen/examples/diagrams/html/class_a__coll__graph.md5
-share/doc/doxygen/examples/diagrams/html/class_a__coll__graph.png
-share/doc/doxygen/examples/diagrams/html/class_a__inherit__graph.map
-share/doc/doxygen/examples/diagrams/html/class_a__inherit__graph.md5
-share/doc/doxygen/examples/diagrams/html/class_a__inherit__graph.png
-share/doc/doxygen/examples/diagrams/html/class_b-members.html
-share/doc/doxygen/examples/diagrams/html/class_b.html
-share/doc/doxygen/examples/diagrams/html/class_b__coll__graph.map
-share/doc/doxygen/examples/diagrams/html/class_b__coll__graph.md5
-share/doc/doxygen/examples/diagrams/html/class_b__coll__graph.png
-share/doc/doxygen/examples/diagrams/html/class_b__inherit__graph.map
-share/doc/doxygen/examples/diagrams/html/class_b__inherit__graph.md5
-share/doc/doxygen/examples/diagrams/html/class_b__inherit__graph.png
-share/doc/doxygen/examples/diagrams/html/class_c-members.html
-share/doc/doxygen/examples/diagrams/html/class_c.html
-share/doc/doxygen/examples/diagrams/html/class_c__coll__graph.map
-share/doc/doxygen/examples/diagrams/html/class_c__coll__graph.md5
-share/doc/doxygen/examples/diagrams/html/class_c__coll__graph.png
-share/doc/doxygen/examples/diagrams/html/class_c__inherit__graph.map
-share/doc/doxygen/examples/diagrams/html/class_c__inherit__graph.md5
-share/doc/doxygen/examples/diagrams/html/class_c__inherit__graph.png
-share/doc/doxygen/examples/diagrams/html/class_d-members.html
-share/doc/doxygen/examples/diagrams/html/class_d.html
-share/doc/doxygen/examples/diagrams/html/class_d__coll__graph.map
-share/doc/doxygen/examples/diagrams/html/class_d__coll__graph.md5
-share/doc/doxygen/examples/diagrams/html/class_d__coll__graph.png
-share/doc/doxygen/examples/diagrams/html/class_d__inherit__graph.map
-share/doc/doxygen/examples/diagrams/html/class_d__inherit__graph.md5
-share/doc/doxygen/examples/diagrams/html/class_d__inherit__graph.png
-share/doc/doxygen/examples/diagrams/html/class_e-members.html
-share/doc/doxygen/examples/diagrams/html/class_e.html
-share/doc/doxygen/examples/diagrams/html/class_e__coll__graph.map
-share/doc/doxygen/examples/diagrams/html/class_e__coll__graph.md5
-share/doc/doxygen/examples/diagrams/html/class_e__coll__graph.png
-share/doc/doxygen/examples/diagrams/html/class_e__inherit__graph.map
-share/doc/doxygen/examples/diagrams/html/class_e__inherit__graph.md5
-share/doc/doxygen/examples/diagrams/html/class_e__inherit__graph.png
-share/doc/doxygen/examples/diagrams/html/diagrams__a_8h-source.html
-share/doc/doxygen/examples/diagrams/html/diagrams__a_8h.html
-share/doc/doxygen/examples/diagrams/html/diagrams__a_8h__dep__incl.map
-share/doc/doxygen/examples/diagrams/html/diagrams__a_8h__dep__incl.md5
-share/doc/doxygen/examples/diagrams/html/diagrams__a_8h__dep__incl.png
-share/doc/doxygen/examples/diagrams/html/diagrams__b_8h-source.html
-share/doc/doxygen/examples/diagrams/html/diagrams__b_8h.html
-share/doc/doxygen/examples/diagrams/html/diagrams__b_8h__dep__incl.map
-share/doc/doxygen/examples/diagrams/html/diagrams__b_8h__dep__incl.md5
-share/doc/doxygen/examples/diagrams/html/diagrams__b_8h__dep__incl.png
-share/doc/doxygen/examples/diagrams/html/diagrams__c_8h-source.html
-share/doc/doxygen/examples/diagrams/html/diagrams__c_8h.html
-share/doc/doxygen/examples/diagrams/html/diagrams__c_8h__dep__incl.map
-share/doc/doxygen/examples/diagrams/html/diagrams__c_8h__dep__incl.md5
-share/doc/doxygen/examples/diagrams/html/diagrams__c_8h__dep__incl.png
-share/doc/doxygen/examples/diagrams/html/diagrams__c_8h__incl.map
-share/doc/doxygen/examples/diagrams/html/diagrams__c_8h__incl.md5
-share/doc/doxygen/examples/diagrams/html/diagrams__c_8h__incl.png
-share/doc/doxygen/examples/diagrams/html/diagrams__d_8h-source.html
-share/doc/doxygen/examples/diagrams/html/diagrams__d_8h.html
-share/doc/doxygen/examples/diagrams/html/diagrams__d_8h__dep__incl.map
-share/doc/doxygen/examples/diagrams/html/diagrams__d_8h__dep__incl.md5
-share/doc/doxygen/examples/diagrams/html/diagrams__d_8h__dep__incl.png
-share/doc/doxygen/examples/diagrams/html/diagrams__d_8h__incl.map
-share/doc/doxygen/examples/diagrams/html/diagrams__d_8h__incl.md5
-share/doc/doxygen/examples/diagrams/html/diagrams__d_8h__incl.png
-share/doc/doxygen/examples/diagrams/html/diagrams__e_8h-source.html
-share/doc/doxygen/examples/diagrams/html/diagrams__e_8h.html
-share/doc/doxygen/examples/diagrams/html/diagrams__e_8h__incl.map
-share/doc/doxygen/examples/diagrams/html/diagrams__e_8h__incl.md5
-share/doc/doxygen/examples/diagrams/html/diagrams__e_8h__incl.png
-share/doc/doxygen/examples/diagrams/html/doxygen.css
-share/doc/doxygen/examples/diagrams/html/doxygen.png
-share/doc/doxygen/examples/diagrams/html/files.html
-share/doc/doxygen/examples/diagrams/html/functions.html
-share/doc/doxygen/examples/diagrams/html/functions_vars.html
-share/doc/doxygen/examples/diagrams/html/graph_legend.dot
-share/doc/doxygen/examples/diagrams/html/graph_legend.html
-share/doc/doxygen/examples/diagrams/html/graph_legend.png
-share/doc/doxygen/examples/diagrams/html/hierarchy.html
-share/doc/doxygen/examples/diagrams/html/index.html
-share/doc/doxygen/examples/diagrams/html/inherit__graph__0.map
-share/doc/doxygen/examples/diagrams/html/inherit__graph__0.md5
-share/doc/doxygen/examples/diagrams/html/inherit__graph__0.png
-share/doc/doxygen/examples/diagrams/html/inherits.html
share/doc/doxygen/examples/diagrams_a.h
share/doc/doxygen/examples/diagrams_b.h
share/doc/doxygen/examples/diagrams_c.h
@@ -460,8 +374,6 @@
@dirrm share/doc/doxygen/examples/example
@dirrm share/doc/doxygen/examples/enum/html
@dirrm share/doc/doxygen/examples/enum
-@dirrm share/doc/doxygen/examples/diagrams/html
-@dirrm share/doc/doxygen/examples/diagrams
@dirrm share/doc/doxygen/examples/define/html
@dirrm share/doc/doxygen/examples/define
@dirrm share/doc/doxygen/examples/class/html
Index: PLIST.dot
===================================================================
RCS file: PLIST.dot
diff -N PLIST.dot
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ PLIST.dot 26 Jul 2004 17:21:34 -0000
@@ -0,0 +1,89 @@
+@commment $NetBSD$
+share/doc/doxygen/examples/diagrams/html/annotated.html
+share/doc/doxygen/examples/diagrams/html/class_a-members.html
+share/doc/doxygen/examples/diagrams/html/class_a.html
+share/doc/doxygen/examples/diagrams/html/class_a__coll__graph.map
+share/doc/doxygen/examples/diagrams/html/class_a__coll__graph.md5
+share/doc/doxygen/examples/diagrams/html/class_a__coll__graph.png
+share/doc/doxygen/examples/diagrams/html/class_a__inherit__graph.map
+share/doc/doxygen/examples/diagrams/html/class_a__inherit__graph.md5
+share/doc/doxygen/examples/diagrams/html/class_a__inherit__graph.png
+share/doc/doxygen/examples/diagrams/html/class_b-members.html
+share/doc/doxygen/examples/diagrams/html/class_b.html
+share/doc/doxygen/examples/diagrams/html/class_b__coll__graph.map
+share/doc/doxygen/examples/diagrams/html/class_b__coll__graph.md5
+share/doc/doxygen/examples/diagrams/html/class_b__coll__graph.png
+share/doc/doxygen/examples/diagrams/html/class_b__inherit__graph.map
+share/doc/doxygen/examples/diagrams/html/class_b__inherit__graph.md5
+share/doc/doxygen/examples/diagrams/html/class_b__inherit__graph.png
+share/doc/doxygen/examples/diagrams/html/class_c-members.html
+share/doc/doxygen/examples/diagrams/html/class_c.html
+share/doc/doxygen/examples/diagrams/html/class_c__coll__graph.map
+share/doc/doxygen/examples/diagrams/html/class_c__coll__graph.md5
+share/doc/doxygen/examples/diagrams/html/class_c__coll__graph.png
+share/doc/doxygen/examples/diagrams/html/class_c__inherit__graph.map
+share/doc/doxygen/examples/diagrams/html/class_c__inherit__graph.md5
+share/doc/doxygen/examples/diagrams/html/class_c__inherit__graph.png
+share/doc/doxygen/examples/diagrams/html/class_d-members.html
+share/doc/doxygen/examples/diagrams/html/class_d.html
+share/doc/doxygen/examples/diagrams/html/class_d__coll__graph.map
+share/doc/doxygen/examples/diagrams/html/class_d__coll__graph.md5
+share/doc/doxygen/examples/diagrams/html/class_d__coll__graph.png
+share/doc/doxygen/examples/diagrams/html/class_d__inherit__graph.map
+share/doc/doxygen/examples/diagrams/html/class_d__inherit__graph.md5
+share/doc/doxygen/examples/diagrams/html/class_d__inherit__graph.png
+share/doc/doxygen/examples/diagrams/html/class_e-members.html
+share/doc/doxygen/examples/diagrams/html/class_e.html
+share/doc/doxygen/examples/diagrams/html/class_e__coll__graph.map
+share/doc/doxygen/examples/diagrams/html/class_e__coll__graph.md5
+share/doc/doxygen/examples/diagrams/html/class_e__coll__graph.png
+share/doc/doxygen/examples/diagrams/html/class_e__inherit__graph.map
+share/doc/doxygen/examples/diagrams/html/class_e__inherit__graph.md5
+share/doc/doxygen/examples/diagrams/html/class_e__inherit__graph.png
+share/doc/doxygen/examples/diagrams/html/diagrams__a_8h-source.html
+share/doc/doxygen/examples/diagrams/html/diagrams__a_8h.html
+share/doc/doxygen/examples/diagrams/html/diagrams__a_8h__dep__incl.map
+share/doc/doxygen/examples/diagrams/html/diagrams__a_8h__dep__incl.md5
+share/doc/doxygen/examples/diagrams/html/diagrams__a_8h__dep__incl.png
+share/doc/doxygen/examples/diagrams/html/diagrams__b_8h-source.html
+share/doc/doxygen/examples/diagrams/html/diagrams__b_8h.html
+share/doc/doxygen/examples/diagrams/html/diagrams__b_8h__dep__incl.map
+share/doc/doxygen/examples/diagrams/html/diagrams__b_8h__dep__incl.md5
+share/doc/doxygen/examples/diagrams/html/diagrams__b_8h__dep__incl.png
+share/doc/doxygen/examples/diagrams/html/diagrams__c_8h-source.html
+share/doc/doxygen/examples/diagrams/html/diagrams__c_8h.html
+share/doc/doxygen/examples/diagrams/html/diagrams__c_8h__dep__incl.map
+share/doc/doxygen/examples/diagrams/html/diagrams__c_8h__dep__incl.md5
+share/doc/doxygen/examples/diagrams/html/diagrams__c_8h__dep__incl.png
+share/doc/doxygen/examples/diagrams/html/diagrams__c_8h__incl.map
+share/doc/doxygen/examples/diagrams/html/diagrams__c_8h__incl.md5
+share/doc/doxygen/examples/diagrams/html/diagrams__c_8h__incl.png
+share/doc/doxygen/examples/diagrams/html/diagrams__d_8h-source.html
+share/doc/doxygen/examples/diagrams/html/diagrams__d_8h.html
+share/doc/doxygen/examples/diagrams/html/diagrams__d_8h__dep__incl.map
+share/doc/doxygen/examples/diagrams/html/diagrams__d_8h__dep__incl.md5
+share/doc/doxygen/examples/diagrams/html/diagrams__d_8h__dep__incl.png
+share/doc/doxygen/examples/diagrams/html/diagrams__d_8h__incl.map
+share/doc/doxygen/examples/diagrams/html/diagrams__d_8h__incl.md5
+share/doc/doxygen/examples/diagrams/html/diagrams__d_8h__incl.png
+share/doc/doxygen/examples/diagrams/html/diagrams__e_8h-source.html
+share/doc/doxygen/examples/diagrams/html/diagrams__e_8h.html
+share/doc/doxygen/examples/diagrams/html/diagrams__e_8h__incl.map
+share/doc/doxygen/examples/diagrams/html/diagrams__e_8h__incl.md5
+share/doc/doxygen/examples/diagrams/html/diagrams__e_8h__incl.png
+share/doc/doxygen/examples/diagrams/html/doxygen.css
+share/doc/doxygen/examples/diagrams/html/doxygen.png
+share/doc/doxygen/examples/diagrams/html/files.html
+share/doc/doxygen/examples/diagrams/html/functions.html
+share/doc/doxygen/examples/diagrams/html/functions_vars.html
+share/doc/doxygen/examples/diagrams/html/graph_legend.dot
+share/doc/doxygen/examples/diagrams/html/graph_legend.html
+share/doc/doxygen/examples/diagrams/html/graph_legend.png
+share/doc/doxygen/examples/diagrams/html/hierarchy.html
+share/doc/doxygen/examples/diagrams/html/index.html
+share/doc/doxygen/examples/diagrams/html/inherit__graph__0.map
+share/doc/doxygen/examples/diagrams/html/inherit__graph__0.md5
+share/doc/doxygen/examples/diagrams/html/inherit__graph__0.png
+share/doc/doxygen/examples/diagrams/html/inherits.html
+@dirrm share/doc/doxygen/examples/diagrams/html
+@dirrm share/doc/doxygen/examples/diagrams