Changeset 35630 in project


Ignore:
Timestamp:
06/20/18 21:31:47 (5 months ago)
Author:
sjamaan
Message:

Also add a concrete example of .egg file porting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/porting-c4-to-c5

    r35629 r35630  
    334334name, license and dependency declarations.  Added to this are
    335335"components", which make up the egg's sources.
     336
     337For simple eggs, this is also trivial.  Here's uri-generic's old
     338{{.meta}} file:
     339
     340<enscript highlight="scheme">
     341((egg "uri-generic.egg")
     342 (license "BSD")
     343 (category web)
     344 (needs matchable)
     345 (test-depends test)
     346 (author "Ivan Raikov, Peter Bex, Seth Alves")
     347 (synopsis "URI generic syntax (RFC 3986) parsing and manipulation."))
     348</enscript>
     349
     350And its {{.setup}} file:
     351
     352<enscript highlight="scheme">
     353(standard-extension 'uri-generic "2.43")
     354</enscript>
     355
     356After porting this to CHICKEN 5's {{.egg}} file, you get:
     357
     358<enscript highlight="scheme">
     359((license "BSD")
     360 (category web)
     361 (dependencies matchable srfi-1 srfi-13 srfi-14)
     362 (test-dependencies test)
     363 (author "Ivan Raikov, Peter Bex, Seth Alves")
     364 (synopsis "URI generic syntax (RFC 3986) parsing and manipulation.")
     365 (components (extension uri-generic)))
     366</enscript>
     367
     368As you can see, for eggs consisting of a single file, this is very
     369straightforward: just add any missing egg dependencies for the stuff
     370that has moved out of core, remove obsolete forms like {{(egg ..)}},
     371replace {{needs}} or {{depends}} with {{dependencies}}, replace
     372{{test-depends}} to {{test-dependencies}} and add a {{(components
     373(extension ..))}} entry which corresponds to {{standard-extension}}
     374from the old {{.setup}} file.
     375
     376For more complex examples of {{.egg}} files, just look through the
     377[[/chicken-projects/egg-index-5.html|list of available CHICKEN 5 eggs]].
     378There are a few in there with multiple source files and even some with
     379custom build scripts.
Note: See TracChangeset for help on using the changeset viewer.