After much searching and grumbling, I found Thilo Planz's post on building CamelBones 0.2 under Panther (http://www.nntp.perl.org/group/perl.macosx/6383). After getting this to work, I thought I would type up more complete directions that work with Xcode and post a new archive for people to use.

You can download a readymade framework to be installed in /Library/Frameworks from http://www.zachlipton.com/camelbones/CamelBones-0.2-Panther.dmg

Also, you can download the source from http://www.zachlipton.com/camelbones/CamelBones-0.2-Panther-source.dmg

This source has already been modified to build under Panther and is useful if you want to include CamelBones in your own application bundle.

A nice touch if someone with better skills than I came across this would be to build a combined framework that worked under both Jaguar and Panther (it looks like this should be possible).

Another extension from here would be to get this working with CamelBones 0.3-pre. This is beyond my skill level though.

How to transform a stock 0.2 tree (from /Developer/Source/CamelBones if you installed the source when you installed CamelBones) into a Panther version (the framework will not work under pre-Panther OS's):

1. Open CamelBones.pbproj and follow the prompts to convert it to Xcode

2. Open the Targets group in the files pane (on the left) and double click the CamelBones target.

3. Choose "Search Paths" from the list on the left.

4. Click "Headers" and the plus button at the bottom and navigate to /System/Perl/5.8.1/darwin-thread-multi-2level/CORE/

5. Click "Libraries" and the plus button and navigate to /System/Perl/5.8.1/darwin-thread-multi-2level/CORE/

6. Choose "Linker Settings" from the list on the left

7. Replace the "Other Mach-O Linker Flags" field with this:
-seg1addr 0x10000000 -lm -lperl -lc ${SYSTEM_LIBRARY_DIR}/Perl/5.8.1/darwin-thread-multi-2level/auto/ DynaLoader/DynaLoader.a


8. Choose the second "Shell Script Files" entry under "Build Phases"

9. Change the location of $xsubpp (the second line) to:
my $xsubpp = "perl /System/Library/Perl/5.8.1/ExtUtils/xsubpp -typemap /System/Library/Perl/5.8.1/ExtUtils/typemap";


10. Close the "Target: CamelBones" window

11. Double-click "CBPerlGuts.h" from the list at right.

12. Add the line:

#include <XSUB.h>

after:

#include <perl.h>

13. Close the "CBPerlGuts.h" window

14. Double-click "CBPerlGuts.m" from the file list at right

15. Press CMD-F and search for the string:

// Try to get %OBJC_METHOD_SIGNATURES out

16. Add these two lines above this comment:

const char *tmpCString;
tmpCString = [[NSString stringWithFormat: @"%@::OBJC_METHOD_SIGNATURES", className] cString];


17. Modify the line after the comment to look like this:

methodSignaturesHash = get_hv(tmpCString, NO);

18. Close the "CBPerlGuts.m" window

19. Press the build button in the toolbar to compile CamelBones. Assuming that the source tree was in /Developer/Source/CamelBones, the compiled framework will be found in /Developer/Source/CamelBones/build

Reply via email to