# $Id: Portfile,v 1.1 2006/03/11 12:01:38 markd Exp $

PortSystem        1.0
name              mdk
version           1.2.1
categories        lang
maintainers       aconchillo@gmail.com
platforms         darwin
description       A set of utilities for developing programs using MIX and \
                  MIXAL
long_description  MDK stands for MIX Development Kit, and provides \
                  tools for developing and executing, in a MIX virtual \
                  machine, MIXAL programs. \
                  \
                  The MIX is Donald Knuth's mythical computer, \
                  described in the first volume of The Art of Computer \
                  Programming, which is programmed using MIXAL, the MIX \
                  assembly language. \
                  \
                  MDK includes a MIXAL assembler (mixasm) and a MIX \
                  virtual machine (mixvm) with a command line \
                  interface. In addition, a GTK+ GUI to mixvm, called \
                  gmixvm, and a Guile interpreter with an embedded MIX \
                  virtual machine called mixguile, are provided. \
                  \
                  Using these interfaces, you can debug your MIXAL \
                  programs at source code level, and read/modify the \
                  contents of all the components of the MIX computer \
                  (including block devices, which are simulated using \
                  the file system).
homepage          http://www.gnu.org/software/mdk/mdk.html
master_sites      gnu:mdk/v${version}/
checksums         md5 51c10c384b03016412729051091f63a7

depends_lib       port:pkgconfig \
                  port:guile \
                  port:glib2 \
		  port:bison \
		  port:gettext \
		  port:intltool

patchfiles        patch-configure.in \
                  patch-lib-Makefile.am \
		  patch-lib-foo.c \
		  patch-mixlib-xmix_vm.c

configure.env     CPPFLAGS="-I${prefix}/include" \
                  CFLAGS="-no-cpp-precomp -I${prefix}/include" \
                  LDFLAGS="-L${prefix}/lib"
configure.args    --disable-gui \
                  --mandir=${prefix}/share/man \
                  --infodir=${prefix}/share/info

build.type        gnu
use_automake      yes
use_autoconf      yes

post-extract {
             system "touch ${worksrcpath}/lib/foo.c"
             system "cd ${worksrcpath} && aclocal -I m4"
}

variant gui {
   configure.args-delete  --disable-gui
   depends_lib-append     port:gtk2 \
                          port:libglade2

   patchfiles-append patch-mixgtk-Makefile.am \
                  patch-mixgtk-mixgtk_device.c

}

