lensfun stable port information

Info4: <<
Package: lensfun
Version: 0.2.3
Revision: 2
Description: Photographic lens library
License: GPL/LGPL
Maintainer: Benjamin Reed

Depends: %N-shlibs (>= %v-%r)
BuildDepends: <<
fink (>= 0.28-1),
glib2-dev,
libpng3,
make (>= 3.81-1),
pkgconfig
<<
BuildDependsOnly: true

Source: http://download.berlios.de/%n/%n-%v.tar.bz2
Source-MD5: c5c04be4f53e3eef450ff4948d8f65b3
PatchFile: %n.patch
PatchFile-MD5: 72c31c547abb8a2ba77be61eb4595f27

SetCFLAGS: -I%p/lib/freetype219/include/freetype2 -I%p/lib/freetype219/include -I%p/include -I%p/include/libpng12
SetLDFLAGS: -L%p/lib/freetype219/lib
SetLIBS: -L%p/lib -L/usr/X11/lib -L/usr/X11R6/lib
NoSetCPPFLAGS: true
NoSetLDFLAGS: true

CompileScript: <<
./configure %c
make all
<<

InstallScript: <<
make install INSTALL_PREFIX=%d
rm -rf %i/lib/liblensfun.dylib
rm -rf %i/lib/liblensfun.dylib.0
mv %i/lib/liblensfun.dylib.%v %i/lib/liblensfun.0.dylib
ln -sf liblensfun.0.dylib %i/lib/liblensfun.dylib
install_name_tool -id %p/lib/liblensfun.0.dylib %i/lib/liblensfun.0.dylib
mv %i/share/doc/%n-%v %i/share/doc/%n
<<
SplitOff: <<
Package: %N-shlibs
Depends: <<
glib2-shlibs,
libpng3-shlibs,
<<
Replaces: %N (<= 1.9.14-2)
DocFiles: README docs/*gpl*
Files: lib/liblensfun.0*.dylib
Shlibs: %p/lib/liblensfun.0.dylib 0.0.0 %n (>= 0.2.3-1)
<<

Homepage: http://developer.berlios.de/projects/lensfun/

DescDetail: <<
The project provides a database of photographic lenses and a library that
allows advanced access to the database including functions to correct
images based on intimate knowledge of lens characteristics and calibration
data.
<<
DescPackaging: <<
Hooray! Someone's crappy special home-grown build system. Easier
to fix after the fact than to change the build system any more than
I have to. ;)
<<
<<

lensfun stable port .patch

diff -Nurd lensfun-0.2.3/build/mak/compiler/gcc.mak lensfun-0.2.3-patched/build/mak/compiler/gcc.mak
--- lensfun-0.2.3/build/mak/compiler/gcc.mak 2008-05-11 11:50:15.000000000 -0400
+++ lensfun-0.2.3-patched/build/mak/compiler/gcc.mak 2009-03-18 16:55:53.000000000 -0400
@@ -72,8 +72,14 @@

LINK.GCC.AR = $(GCC.AR) $(GCC.ARFLAGS) $@ $^
LINK.GCC.EXEC = $(GCC.LD) -o $@ $(GCC.LDFLAGS) $(LDFLAGS) $1 $^ $(GCC.LDFLAGS.LIBS) $(LDFLAGS.LIBS) $2
+
+ifeq ($(TARGET),mac)
+else
+RPATH.SONAME = -Wl,"-soname=$(notdir $@).$(basename $(basename $(SHARED.$3)))"
+endif
+
define LINK.GCC.SO
- $(GCC.LD) -o $@.$(SHARED.$3) -Wl,"-soname=$(notdir $@).$(basename $(basename $(SHARED.$3)))" $(GCC.LDFLAGS.SHARED) $(GCC.LDFLAGS) $(LDFLAGS) $1 $^ $(GCC.LDFLAGS.LIBS) $(LDFLAGS.LIBS) $2
+ $(GCC.LD) -o $@.$(SHARED.$3) $(RPATH.SONAME) $(GCC.LDFLAGS.SHARED) $(GCC.LDFLAGS) $(LDFLAGS) $1 $^ $(GCC.LDFLAGS.LIBS) $(LDFLAGS.LIBS) $2
ln -fs $(notdir $@.$(SHARED.$3)) $@.$(basename $(basename $(SHARED.$3)))
ln -fs $(notdir $@.$(basename $(basename $(SHARED.$3)))) $@
endef
diff -Nurd lensfun-0.2.3/build/mak/host/mac.mak lensfun-0.2.3-patched/build/mak/host/mac.mak
--- lensfun-0.2.3/build/mak/host/mac.mak 2008-07-14 15:23:30.000000000 -0400
+++ lensfun-0.2.3-patched/build/mak/host/mac.mak 2009-03-18 16:58:42.000000000 -0400
@@ -5,12 +5,12 @@
# $1 - file, $2 - target dir, $3 - mode
define SINGLE.INSTALL
if [ ! -d $2 ]; then install -m 0755 -d $2; fi
- if [ -L $1 ]; then cp -d $1 $2$(notdir $1); else install -m $3 $1 $2$(notdir $1); fi
+ if [ -L $1 ]; then cp -RP $1 $2$(notdir $1); else install -m $3 $1 $2$(notdir $1); fi
endef

# $1 - directory, $2 - target dir, $3 - mode for files
define SINGLE.INSTALLDIR
if [ ! -d $2 ]; then install -m 0755 -d $2; fi
- cp -drP $1* $2
+ cp -RP $1* $2
find $2 -type f -print0 | xargs -0 chmod $3
endef

lensfun _unstable_ port .patch