dlang-community / Pegged

A Parsing Expression Grammar (PEG) module, using the D programming language.
534 stars 66 forks source link

dub package #109

Closed simendsjo closed 11 years ago

simendsjo commented 11 years ago

I've created a skeleton for a DUB package. Stuff like "-g -debug" and optimization flags is added by DUB, so these should probably be removed..

{
    "name": "Pegged",
    "description": "Parsing Expression Grammar (PEG) generator",
    "homepage": "https://github.com/PhilippeSigaud/Pegged",
    "copyright": "Copyright © 2012-2013, Philippe Sigaud",
    "license": "Boost",
    "authors": [ "Philippe Sigaud" ],
    "dependencies": { },
    "files": [
        "pegged/peg.d",
        "pegged/grammar.d",
        "pegged/parser.d",
        "pegged/dynamic/grammar.d",
        "pegged/dynamic/peg.d"
    ],
    "dflags-dmd": ["-g", "-w", "-wi", "-ignore", "-property", "-lib"],
    "dflags-posix-dmd": ["-oflibpegged.a"],
    "dflags-gdc": ["-Wall", "-fignore-unknown-pragmas", "-fproperty", "-g", "-ggdb"],
    "dflags-ldc": ["-w", "-wi", "-ignore", "-property", "-check-printf-calls", "-g"],
    "configurations": {
        "default": "release",
        "release": {
            "dflags-dmd": ["-O", "-release", "-inline"],
            "dflags-gdc": ["-frelease", "-O3"],
            "dflags-ldc": ["-release", "-O3", "--enable-inlining"]
        },
        "debug": {
            "dflags-dmd": ["-debug"],
            "dflags-gdc": ["-fdebug"],
            "dflags-ldc": ["-d-debug"]
        },
        "unittest": {
            "dflags-dmd": ["-unittest"],
            "dflags-gdc": ["-funittest"],
            "dflags-ldc": ["-unittest"],
        }
    }
}
PhilippeSigaud commented 11 years ago

I saw some threads on DUB, but did not read them carefully. What should I do to add it to the project?

simendsjo commented 11 years ago

Add it as package.json and register it at http://registry.vibed.org/ It's not finished though. And only tested on dmd linux. And there are a couple of outstanding dub issues that should be addressed first: https://github.com/rejectedsoftware/dub/issues/31 https://github.com/rejectedsoftware/dub/issues/29

s-ludwig commented 11 years ago

I adjusted the package.json a bit to remove all flags that are managed by DUB itself (-unittest, -of, -lib etc.). There are still some missing parts in DUB in this area and I will write up a short introduction text once everything is worked out. For now, all libraries can only be used as "source libraries", so their sources are passed to the compiler together with the application sources. But I'll add the possibility to specify explicit output types shortly.