by on
Mac DevelopmentSort Me

Because they aren’t bsd ports.

  • They force you to carry redundant dependencies.
  • They do not allow you to fetch and compile the source files in a transparent way.
  • They do not give you clean access to the patches they use to make things work.
  • They haven’t had a current version of avr-gcc in over 4 years.
  • They just dont get it.

Today, I am working on a cross platform USB device which I hope to interface with ruby, python, and perl using libusb. The ruby bindings for libusb are for 1.0.xx which actually almost works on OSX nowadays. A quick sampling of using ruby-usb on osx, like most things embedded in apple land, is a trip more or less to hell. (see: http://www.jedi.be/blog/2009/11/11/ruby-usb-libusb/ http://www.ruby-forum.com/topic/192042) . Since most of my ruby is gem installed I just need a working version of libusb so I go to the darwin ports recommended above. Looking at the “raw” port file I see that there are really only two patches and so I go find them. They aren’t exposed for reasons that seem pretty stupid to me,  but I did find them at. http://libusb.darwinports.com/dports/devel/libusb/files/patch-libusb__io.c and  http://libusb.darwinports.com/dports/devel/libusb/files/patch-libusb__os__darwin_usb.c

When I downloaded the source file and went to wget the patches it got even more screwey.

wget http://libusb.darwinports.com/dports/devel/libusb/files/patch-libusb__io.c
--2010-07-06 00:28:13--  http://libusb.darwinports.com/dports/devel/libusb/files/patch-libusb__io.c
Resolving libusb.darwinports.com... 208.185.168.32
Connecting to libusb.darwinports.com|208.185.168.32|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
2010-07-06 00:28:13 ERROR 403: Forbidden.

I didn’t want to deal with it so I just saved the links in my browser and patched the source files manually. After that a

./configure; make && make install && make clean

let me do the normal ruby thing.

gem install ruby-usb

Just like on all the other operating systems.

Leave a Reply

  • (will not be published)