Index: Portfile
===================================================================
--- Portfile	(revision 141444)
+++ Portfile	(working copy)
@@ -5,7 +5,15 @@
 PortGroup           github 1.0
 
 github.setup        michipili bsdowl 2.2.1 v
-revision            1
+if {${subport} eq ${name}} {
+    revision        1
+    conflicts       bsdowl-devel
+}
+subport bsdowl-devel {
+    github.setup    michipili bsdowl 3.0.0-20150830 v
+    conflicts       bsdowl
+}
+
 categories          devel
 platforms           darwin
 maintainers         gmail.com:michipili
@@ -12,27 +20,88 @@
 license             CeCILL-B
 supported_archs     noarch
 
-description         BSD Owl Make Scripts
+description         BSD Owl Scripts
 
-long_description    This collection of BSD Make directives can be used to   \
-                    create workflows including the following activities:    \
-                    Preparation and publication of TeX documents,           \
-                    Development of TeX macros with NOWEB, Development of    \
-                    OCaml software, Maintenance of a FreeBSD workstation    \
-                    configuration files, Preparation of a static website    \
-                    with ONSGMLS.
+long_description    This collection of BSD Make directives aims at providing\
+                    a highly portable build system targetting modern UNIX   \
+                    systems and supporting common or less command languages.\
+                    This is a build system, which means that it can be used \
+                    to organise fairly complex projects.
 
-checksums           rmd160  db48c5610a99ba001a2be009cf8c9c549d8da197 \
+use_xz              yes
+
+if {$subport eq ${name}} {
+    github.tarball_from releases
+
+    checksums       rmd160  db48c5610a99ba001a2be009cf8c9c549d8da197 \
                     sha256  269030428efec1a554f7ce038820f218e09523d771875c2ed6b6e7cd0288f4fd
 
-github.tarball_from releases
-use_xz              yes
+    depends_build-append    port:ocaml-findlib
 
-depends_build       port:ocaml-findlib
+    depends_lib-append      port:GraphicsMagick
 
-depends_lib         port:GraphicsMagick
+    # use build.type bmake when available in a released version of MacPorts
+    depends_build-append bin:bmake:bmake
+    build.cmd           bmake
+    build.post_args     -r
+}
 
-# use build.type bmake when available in a released version of MacPorts
-depends_build-append bin:bmake:bmake
-build.cmd           bmake
-build.post_args     -r
+subport bsdowl-devel {
+    github.tarball_from releases
+
+    checksums           rmd160  ffd78139c1ed4c2f5108945fddb23bb0e95efc69 \
+                        sha256  83b69078231fadd2acd2b22dfed556f99b69e9a4bb7db47789d416c2f9cd53b4
+
+    depends_build-append bin:bmake:bmake
+    depends_lib-append  bin:awk:gawk bin:m4:m4
+
+    # Not entirely sure what this does
+    configure.args-append   --with-credentials=no
+
+    # The configure script will auto-add any dependencies it finds.
+    configure.args-append   --without-gm --without-gpg --without-noweb \
+                            --without-ocaml --without-findlib \
+                            --without-opensp --without-tex \
+                            --without-tidy
+
+    # use build.type bmake when available in a released version of MacPorts
+    build.cmd           bmake _MAKE_ALLSUBTARGET='configure depend build doc'
+    build.post_args     -r
+
+    variant gm description {Support conversion of METAPOST pictures to PNG with GraphicsMagick} {
+        depends_lib-append      port:GraphicsMagick
+        configure.args-replace  --without-gm    --with-gm
+    }
+
+    variant gpg description {Support signing of distribution files with GPG} {
+        depends_lib-append      port:gnupg2
+        configure.args-replace  --without-gpg   --with-gpg
+    }
+
+    variant noweb description {Support literate programming with noweb} {
+        depends_lib-append      port:noweb
+        configure.args-replace  --without-noweb --with-noweb
+    }
+
+    variant ocaml description {Support preparation of OCaml projects} {
+        depends_lib-append      port:ocaml port:ocaml-findlib
+        configure.args-replace  --without-ocaml --with-ocaml
+        configure.args-replace  --without-findlib --with-findlib
+    }
+
+    variant opensp description {Support static HTML pages generation with OpenSP} {
+        depends_lib-append      port:opensp
+        configure.args-replace  --without-opensp    --with-opensp
+    }
+
+    variant tex description {Support preparation of TeX documents} {
+        depends_lib-append      port:texlive-latex
+        configure.args-replace  --without-tex   --with-tex
+    }
+
+    variant tidy description {Support use of tidy to canonise HTML pages} {
+        depends_lib-append      port:tidy
+        configure.args-replace  --without-tidy  --with-tidy
+    }
+}
+
