Compiling UFRAW on OSX
From UFRaw
Contents |
From a Standing Start with DarwinPorts
From a standing start it can be quite daunting to arrive at a functioning ufraw. Go slowly and take your time.
- Step 1: Install X Windows from "Mac OSX Install Disc 1"
Run "Optional Installs.mpkg" - select "X11" under "Applications" in the "Installation Type" step
- Step 2: Download Xcode utilities from http://developer.apple.com/tools/download/ (version 2.4.1 at time of writing)
Some sources say don't use the one from the OS CD because it may be out of date.
Mount the disk image once it's installed.
- Step 3: Install X Windows development kit
Run "Xcode Tools.mpkg".
Be sure to select as a minimum gcc 4.0, gcc 3.3 and X11 SDK under Software Development Kits in the "Installation Type" step.
- Step 4: Install Darwin Ports
Go to http://darwinports.com/install/
Ignore Steps 1 and 2 (you've done them already and they don't work in the order set out on this page).
Follow the shell setup instructions.
Run the installer - whether as root or under sudo is your choice.
- Step 5: Install some important prerequisites and their dependents:
port install gimp2
port install lcms
port install exiv2
Each of these will take some time - think a bottle of wine rather than a cup of coffee. You might like to redirect stderr to an output file to see it; there's a lot.
- Step 6: Download the ufraw files from http://sourceforge.net/project/downloading.php?group_id=127649&filename=ufraw-0.12.1.tar.gz
Unpack the files into a convenient directory. It's temporary so don't worry about where it is.
- Step 7: Get Ready
Go to where the unzipped, untarred files are. For a Bourne or Bash Shell:
export CFLAGS="-I/opt/local/include"
export LDFLAGS="-L/opt/local/lib"
For a C-Shell or TCSH:
setenv CFLAGS "-I/opt/local/include"
setenv LDFLAGS "-L/opt/local/lib"
For both shells:
./configure --enable-extras
- Step 8: Patch
Add lines below line 25 in dcraw_api.cc:
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
- Step 9: Make it:
make -j 2
Use two for a core duo, four for a four processor machine, etc
- Step 10: Install it:
make install
- Step 11: Run it:
You'll need to have X Windows running. Type at a terminal:
/usr/local/bin/ufraw (interactive)
/usr/local/bin/ufraw-batch (command line)
Use --help to get a lead-in
- Step 12: Add an OSX Application
Go to http://6v8.gamboni.org/UFRaw-on-OSX-with-Exif-support.html#titre-2 for something that launches directly from the dock. Note that this isn't a ready-compiled version and you still have to go through the previous steps.
Compiling with Fink
The main page of UFRaw says that it is quite easy to compile it relying on Fink. Here you can find some additional information.
Here are the steps for the fink users:
- install the required packages from Fink Unstable:
fink install exiv2 libexiv2 libjpeg libpng3 libtiff gtk+2 gtk+2-dev
- download the source of UFRaw
http://sourceforge.net/project/downloading.php?group_id=127649&filename=ufraw-0.12.1.tar.gz
- add the current directory to the path and set the loading path. Execute on the command line:
export PATH=.:$PATH
export PKG_CONFIG_PATH="/sw/lib/pkgconfig/"
export LDFLAGS="-L/sw/lib/"
export CPPFLAGS="-I/sw/include"
- launch the configuration:
./configure --enable-extras
you should get:
configure: ====================== summary =====================
configure: build gimp plug-in: yes
configure: hidden directories support (GTK>=2.6): yes
configure: EXIF support using exiv2: yes
configure: JPEG support: yes
configure: TIFF support: yes
configure: TIFF deflate (lossless compression) support: yes
- It might be possible to replace the above two steps with the command: (someone with a Mac should confirm this)
./configure --enable-extras --with-prefix=/sw --prefix=/sw
- you can now do a make and sudo make install to install UFRaw.
Using Mac Ports
sudo port install ufraw
Launching, etc...
To launch the UFRaw editor, you will need to have X11 installed.
You can go here: http://6v8.gamboni.org/UFRaw-on-OSX-with-Exif-support.html to get a .app that will launch UFRaw from the Finder, etc...
Using Terminal Application with ufraw in your path (as in Mac Ports):
open-x11 ufraw
