[blfs-dev] New package: DMD

Randy McMurchy randy at linuxfromscratch.org
Sun Mar 3 09:32:44 PST 2013


Thomas Trepl wrote these words on 03/03/13 09:45 CST:
> I've attached a patch which would add the page - you may want to have a look 
> to it and feedbacks would be appreciated.

The following is just my opinion and does not necessary reflect the ideas
of everyone. Just sort of "how it's always been done"


> +  <!ENTITY DMD-download-http "http://downloads.dlang.org.s3-website-us-east-1.amazonaws.com/releases/2013/dmd.&dmd-version;.zip">
> +  <!ENTITY DMD-download-ftp  " ">
> +  <!ENTITY DMD-md5sum        "fd2211206532ab41a8aef764a9225d3c">
> +  <!ENTITY DMD-size          "31 MB">
> +  <!ENTITY DMD-buildsize     "225 MB" >
> +  <!ENTITY DMD-time          "0.8 SBU">
> +]>
> +
> +<sect1 id="DMD" xreflabel="DMD-&dmd-version;">
> +  <?dbhtml filename="DMD.html" ?>

The entities and section id have almost always been in lower case as best
as I recall.


> +    <para>Prepare the installation of <application>DMD</application> by
> +    running the following commands:</para>
> +
> +<screen><userinput>case `uname -m` in
> +    x86_64)     MODEL=64 ;;
> +    *)          MODEL=32 ;;
> +esac &&
> +echo "&dmd-version;" > src/VERSION</userinput></screen>
> +
> +    <para>Install <application>DMD</application> by running
> +    the following commands:</para>
> +
> +   <para>Compile the D compiler:</para>
> +<screen><userinput>cd src/dmd &&
> +make MODEL=${MODEL} -f posix.mak</userinput></screen>
> +        
> +   <para>Create the D runtime:</para>
> +<screen><userinput>cd ../druntime &&
> +make MODEL=${MODEL} -f posix.mak DMD=../dmd/dmd &&
> +cd ../phobos &&
> +make MODEL=${MODEL} -f posix.mak DMD=../dmd/dmd</userinput></screen>

In almost all BLFS packages we try to encapsulate all the build commands
in one block to make cut and paste easier. Unlike the LFS book that has
a description for each command, BLFS tried to make it easy to have one
cut and paste for each block of commands, then a description of the
commands (if necessary) in the "Command Explanations" section.


> +   
> +<!--TODO: thats not true: -->
> +    <para>This package does not come with a test suite.</para>

If it's not true, why is it there? :-)


> +
> +    <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
> +
> +<screen role="root"><userinput>cd .. &&
> +install -v -m755 dmd/dmd /usr/bin/ &&
> +install -v -m644 druntime/lib/libdruntime-linux${MODEL}.a /usr/lib/ &&
> +install -v -m644 phobos/generated/linux/release/${MODEL}/libphobos2.a /usr/lib/ &&
> +install -v -d /usr/include/d/druntime &&
> +cp -v -r phobos/{*.d,etc,std} /usr/include/d/ &&
> +cp -v -r druntime/import /usr/include/d/druntime/</userinput></screen>
> +
> +    <para>Install the documentation with the following instructions 
> +    as the <systemitem class="username">root</systemitem> user:</para>
> +
> +<screen role="root"><userinput>cd .. &&
> +install -v -d /usr/share/doc/d &&
> +cp -v -r html /usr/share/doc/d/ &&
> +install -v -m644 src/druntime/LICENSE /usr/share/doc/d/LICENSE &&
> +
> +install -v -d /usr/share/man/man1 &&
> +for man in man/man1/*.1; do
> +    install -v -m644 $man /usr/share/man/man1/
> +done &&
> +install -v -d /usr/share/man/man5 &&
> +for man in man/man1/*.5; do
> +    install -v -m644 $man /usr/share/man/man5/
> +done &&
> +
> +install -v -d /usr/share/doc/d/samples &&
> +cp -v -R samples/d/* /usr/share/doc/d/samples/</userinput></screen>
> +
> +    <para>Create a configuration file which sets the default flags. This
> +    is used by default to set the search pathes for the D compiler:</para>
> +    
> +<screen><userinput>cat > /etc/dmd.conf <<EOF
> +[Environment]
> +DFLAGS=-I/usr/include/d -I/usr/include/d/druntime/import -L-L/usr/lib -L--no-warn-search-mismatch -L--export-dynamic
> +EOF
> +</userinput></screen>

Again, cut and paste would be so much easier if this was all in one block
of instructions.

-- 
Randy

rmlscsi: [bogomips 1003.23] [GNU ld version 2.16.1] [gcc (GCC) 4.0.3]
[GNU C Library stable release version 2.3.6] [Linux 2.6.14.3 i686]
11:22:01 up 87 days, 21:21, 1 user, load average: 1.53, 1.53, 1.14



More information about the blfs-dev mailing list