On Thu, Jan 24, 2013 at 12:01 AM, Stefan Marr <smalltalk@stefan-marr.de> wrote:
Hi Ciprian:

On 23 Jan 2013, at 22:06, Stefan Marr wrote:

> Well, if I add all the headers manually to the generation, I run into the trouble of the non-existing classes again.

After working around the order issue, I am still running into more issues.

Some of the classes for which methods are generated are completely missing in the list of generated classes, and other changes in the list result in colliding renames of callback classes.

yes, renaming classes was a good idea... You can try to update to the latest packages, I've modified this to use subclassing instead of renaming, this way if we have n callback that happen to share the same signature, the each one will be a subclass...�

I will try to generate the bindings step by step, seeing what I actually need.

But if you would have a chance to look into these problems, that would be great.

Below I added the methods I used to generate the bindings.

Thanks a lot
Stefan


!CLForeign2NBGenerator class methodsFor: 'libgit2' stamp: 'StefanMarr 1/23/2013 22:04'!
libgit2Headers
� � � � ^ {'git2.h'.
'git2/version.h'.

'git2/common.h'.
'git2/threads.h'.
'git2/errors.h'.

'git2/types.h'.

'git2/oid.h'.
'git2/signature.h'.
'git2/odb.h'.

'git2/repository.h'.
'git2/revwalk.h'.
'git2/merge.h'.
'git2/graph.h'.
'git2/refs.h'.
'git2/reflog.h'.
'git2/revparse.h'.

'git2/object.h'.
'git2/blob.h'.
'git2/commit.h'.
'git2/tag.h'.
'git2/tree.h'.
'git2/diff.h'.

'git2/index.h'.
'git2/config.h'.
'git2/transport.h'.
'git2/remote.h'.
'git2/clone.h'.
'git2/checkout.h'.
'git2/push.h'.

'git2/attr.h'.
'git2/ignore.h'.
'git2/branch.h'.
'git2/refspec.h'.
'git2/net.h'.
'git2/status.h'.
'git2/indexer.h'.
'git2/submodule.h'.
'git2/notes.h'.
'git2/reset.h'.
'git2/message.h'.
'git2/pack.h'.
'git2/stash.h'.}! !

!CLForeign2NBGenerator class methodsFor: 'libgit2' stamp: 'StefanMarr 1/3/2013 19:41'!
libgit2Mapping
� � � � | path includeDir options builder hFiles |
� � � � path := self libgit2Path.
� � � � includeDir := path / 'include'.
� � � � options := {('-I' , (path / 'include') fullName).
� � � � '-D__STDC_CONSTANT_MACROS'.
� � � � '-D__STDC_LIMIT_MACROS'}.
� � � � hFiles := self libgit2Headers.
� � � � builder := (CLForeign2NBGenerator for: #LibGit2)
� � � � � � � � platform: NativeBoostConstants mac32PlatformId libPath: (path / 'build/libgit2.dylib') fullName;
� � � � � � � � compilationOptions: options;
� � � � � � � � includeDir: includeDir;
� � � � � � � � addHeaderFiles: hFiles;
� � � � � � � � classPrefix: 'LG2';
� � � � � � � � ffiSelectorBlock: [ :selector |
� � � � � � � � � � � � � � � � � � � � (selector beginsWith: 'git_')
� � � � � � � � � � � � � � � � � � � � � � � � ifTrue: [ (selector copyFrom: 4 to: selector size) withFirstCharacterDownshifted ]
� � � � � � � � � � � � � � � � � � � � � � � � ifFalse: [ selector withFirstCharacterDownshifted ] ];
� � � � � � � � ignoreUnsupported;
� � � � � � � � generate;
� � � � � � � � openChanges! !

!CLForeign2NBGenerator class methodsFor: 'libgit2' stamp: 'StefanMarr 1/23/2013 15:06'!
libgit2Path
� � � � ^ FileReference / 'Users/smarr/tmp/libgit/libgit2'! !



--
Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
http://soft.vub.ac.be/~smarr
Phone: +32 2 629 2974
Fax: � +32 2 629 3525





--
Dr. Ciprian TEODOROV
Ing
nieur�D�veloppement�CAO

t�l : 06 08 54 73 48

mail :�ciprian.teodorov@gmail.com
www.teodorov.ro