I have moved!
My new blog is at lindsaar.net
All the old content will stay here though. But check out the new blog
¿ 7/11/2007 - Getting ImageScience and ImageMagick working on OpenBSD
This took a bit of work to make it go right... but here are the basic steps:
1. Install GNU Make
You need this to get Free Image compiled later on. Dont worry, it is fine.
Go get make-3.81 I can't remember the URL... you should be able to find it easy enough.
Un tar it, cd into the directory, type "make" then "make install" and you are done.
You could also move the original make in /usr/bin/make to /usr/bin/make.old and link your GNU make as /usr/bin/make if you want... but that's up to you.
2. Install Image Magick
I got the no x11 version as none of my servers use X11. You can get it from the packages directory at OpenBSD.org.
You need this one for no x11 support.
Just down load it and do a:
"pkg_add ImageMagick-6.3.2.1-no_x11.tgz"
3. Install the other required package dependencies
From memory, you need the following packages installed as well:
ghostscript-8.54p0-no_x11.tgz
ghostscript-fonts-8.11.tgz
jasper-1.701.0p1.tgz
jbigkit-1.6p1.tgz
lcms-1.15.tgz
netpbm-10.26.38.tgz
tiff-3.8.2p0.tgz
transfig-3.2.4p0.tgz
Get them all from the same site as the Image Magick one.
4. Install FreeImage
Here you need to hack a bit.
Go to the FreeImage website and download FreeImage. Here is the link.
Unzip it in your folder of choice (I use /usr/local/src/)
$ unzip FreeImage393.zip
Change into the FreeImage directory and rename the Makefile.gnu to Makefile:
$ mv Makefile Makefile.orig
$ mv Makefile.gnu Makefile
Then modify the install script to replace group "root" with group "wheel"
Change this:
install:
install -m 644 -o root -g root $(HEADER) $(INCDIR)
install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
ldconfig
To this:
install:
install -m 644 -o root -g wheel $(HEADER) $(INCDIR)
install -m 644 -o root -g wheel $(STATICLIB) $(INSTALLDIR)
install -m 755 -o root -g wheel $(SHAREDLIB) $(INSTALLDIR)
ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
ldconfig
Then save this and type "make" (if you have done the linking thing above moving the original make away to somewhere else).
It will go off for a while and make the library. When it is done, type "make install".
5. Install Image Science
gem install image_science (nuf said)
6. TEST IT!
$ irb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'image_science'
=> true
irb(main):003:0>
And you're done!
Hope that helps someone else and reminds me how to do it next time! :)
blogLater
Mikel
|
Post A Comment! :: Send to a Friend!
|
|
|
|
About Me
AKA Raasdnil, this site is about web coding, hosting and all other matters that relate to this... especially Ruby on Rails!
Links
|
|