libplplot10-shlibs stable port information

Info2: <<
Package: libplplot10-shlibs
Version: 5.9.6
Revision: 3

BuildDepends: <<
aquaterm-dev,
cairo (>= 1.8.8-3),
cmake,
fink (>= 0.27.2),
fink-package-precedence,
fontconfig2-dev (>= 2.8.0-4),
freetype219 (>= 2.3.12-1),
glib2-dev (>= 2.22.0-1),
glitz,
lasi-dev,
libtool2,
pango1-xft2-ft219-dev (>= 1.24.5-4),
pixman (>= 0.16.0-1),
pkgconfig,
qhull5-dev,
readline5,
swig,
x11-dev
<<
Depends: <<
aquaterm-shlibs,
cairo-shlibs (>= 1.8.8-3),
fontconfig2-shlibs (>= 2.8.0-4),
freetype219-shlibs (>= 2.3.12-1),
glib2-shlibs (>= 2.22.0-1),
lasi-shlibs,
libcsiro1-shlibs (>= %v-%r),
libtool2-shlibs,
pango1-xft2-ft219-shlibs (>= 1.24.5-4),
qhull5-shlibs,
x11
<<
GCC: 4.0

Source: mirror:sourceforge:plplot/plplot-%v.tar.gz
Source-MD5: 772c772bde3a107e5f06d21cefa7f6b6

PatchFile: %n.patch
PatchFile-MD5: 46e139e1b9ad6eb0fec90480b0db37ba

PatchScript: <<
sed -e 's,@PREFIX@,%p,g' < %{PatchFile} | patch -p1
perl -pi.bak -e 's/(set\(\S+_SOVERSION\s+)(\d+)/"$1".(1+$2);/e' cmake/modules/plplot_version.cmake
perl -pi -e 's,/usr/local,%p,g' cmake/modules/FindLTDL.cmake
<<

NoSetMAKEFLAGS: true
SetMAKEFLAGS: -j1
SetCFLAGS: -MD
SetCXXFLAGS: -MD

CompileScript: <<
#!/bin/sh -ev

export CCACHE_DISABLE=1
export PKG_CONFIG_PATH=%p/lib/glib-2.0/pkgconfig-strict:%p/lib/fontconfig2/lib/pkgconfig:$PKG_CONFIG_PATH

%p/bin/cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMAKE_INSTALL_PREFIX:PATH=%p \
-DCMAKE_INSTALL_LIBDIR:PATH=%p/lib/plplot \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DDEFAULT_NO_BINDINGS:BOOL=ON \
-DENABLE_cxx:BOOL=ON \
-DPLD_wxwidgets:BOOL=OFF \
-DLTDL_LIBRARIES:FILEPATH=%p/lib/libltdl.dylib \
.
make
fink-package-precedence \
--prohibit-bdep=plplot-dev,plplot-nognome-dev \
--prohibit-bdep=libplplot10-dev \
--prohibit-bdep=libcsiro1-dev \
--depfile-ext='\.d' \
.
<<

InstallScript: <<
#!/bin/sh -ev
make install DESTDIR=%d

# can't find cmake flag to control this location
# (overriding default based on libdir)
mv %i/lib/plplot/pkgconfig %i/lib

## remove silliness from pkg-config data
#perl -pi -e 's,-L/usr/lib,,g' %i/lib/pkgconfig/plplotd.pc

# aw heck, remove *everything* except direct link (Requires:
# gets plplot sublibs, not need internal implementation libs)
perl -pi -e 's/^Libs:.*/Libs: -L\${libdir} -lplplotd/' %i/lib/pkgconfig/plplotd.pc

# fix installation of docfiles to use upstream set but in
# fink-policy-required location: save and restore automatic
mv %i/share/doc/plplot TARGET_DOC_FILES
<<
DocFiles: TARGET_DOC_FILES/*
Shlibs: <<
%p/lib/plplot/libplplotd.10.dylib 10.0.0 %n (>= 5.9.6-1)
%p/lib/plplot/libplplotcxxd.10.dylib 10.0.0 %n (>= 5.9.6-1)
%p/lib/plplot/libqsastime.1.dylib 1.0.0 %n (>= 5.9.6-1)
<<

SplitOff: <<
Package: libplplot10-dev
Depends: libplplot10-shlibs (= %v-%r)
Replaces: <<
plplot-dev, plplot-nognome-dev
<<
BuildDependsOnly: true
Files: <<
include
lib/pkgconfig
lib/plplot/libplplotd.dylib
lib/plplot/libplplotcxxd.dylib
lib/plplot/libqsastime.dylib
share/plplot5.9.6/examples
<<
DocFiles: TARGET_DOC_FILES/*
<<

SplitOff10: <<
Package: libcsiro1-shlibs
Depends: qhull5-shlibs
Files: <<
lib/plplot/libcsirocsa.*.dylib
lib/plplot/libcsironn.*.dylib
<<
Shlibs: <<
%p/lib/plplot/libcsirocsa.1.dylib 1.0.0 %n (>= 5.9.6-1)
%p/lib/plplot/libcsironn.1.dylib 1.0.0 %n (>= 5.9.6-1)
<<
DocFiles: TARGET_DOC_FILES/*
<<

SplitOff11: <<
Package: libcsiro1-dev
Depends: libcsiro1-shlibs (= %v-%r)
BuildDependsOnly: true
Files: <<
lib/plplot/libcsirocsa.dylib
lib/plplot/libcsironn.dylib
<<
DocFiles: TARGET_DOC_FILES/*
<<

SplitOff2: <<
Package: plplot-bin
Depends: <<
libcsiro1-shlibs (>= %v-%r),
libplplot10-shlibs (>= %v-%r),
libtool2-shlibs,
qhull5-shlibs
<<
Replaces: plplot, plplot-nognome
Files: <<
bin
share/man
<<
DocFiles: TARGET_DOC_FILES/*
<<

Description: Scientific plotting package

DescDetail: <<
PLplot is relatively small, portable, freely distributable, and is rich
enough to satisfy most users. It has a wide range of plot types
including line (linear, log), contour, 3D, fill, and almost 1000
characters (including Greek and mathematical) in its extended font set.
The package is designed to make it easy to quickly get graphical output;
only a handful of function calls is typically required. For more
advanced use, virtually all aspects of plotting are configurable.

"plplot-bin" is some useful utility programs (plm2gif, plpr,
pltex). Some formerly-supplied programs are no longer available
because they were buggy and/or obsolete (plrender, pltex), or
specifically related to certain bindings sets (pltcl, plserver).

This packaging is just the basic libraries (no bindings for languages
that are themselves large fink package trees).
<<
DescUsage: <<
<<
DescPackaging: <<
Fix aqt.cmake to use fink's aquaterm package instead of
non-fink Framework installation of it.

Try to fix ldtl detection to look in fink dir (cmake tests
don't know to look in "nothing special" (use-test) rather than
searching for file by name?) but mainly hardcode it because
cmake library detection is an opaque mess.

Bump all SOVERSION by 1 so that none are zero because
compatibility_version 0.0.0 has a special meaning that cmake
doesn't understand (libtool was smart enough to do this
automatically). There does not appear to be a separate
variable for c_v and VERSION only affects the .x.y.z.dylib
filename not the .x.filename (WTF?)

No idea why default installation with certain features
disabled installs headers specifically for them (gcw.h), but
not fixing it for now. That and the splitoff divisions based
on debian's packaging.

All symbols are resolved, so neuter un-needed linking from .pc
Libs. The csiro stuff looks like only used internally and by
own binaries (no public .h).

Old plplot suite layout was a disaster, with multiple
providers of same libs that could not swap cleanly (removing
one left hole in other!) because of Provides, and Replaces
without Conflicts. Even with new %n for headers, we cannot
Replaces/Conflicts to eject the old -dev packages because
there are runtime Depends on them (BDO:false) and having the
same name in a Provides and a real Package confuses dpkg. So
we just kill old .info and Replaces much of it, hopefully old
will eventually fade away from users' systems.
<<
License: LGPL
Maintainer: None
Homepage: http://plplot.sourceforge.net
<<

libplplot10-shlibs stable port .patch

diff -Nurd -x'*~' plplot-5.9.6.orig/cmake/modules/aqt.cmake plplot-5.9.6/cmake/modules/aqt.cmake
--- plplot-5.9.6.orig/cmake/modules/aqt.cmake 2010-06-05 12:11:39.000000000 -0400
+++ plplot-5.9.6/cmake/modules/aqt.cmake 2010-08-11 15:36:30.000000000 -0400
@@ -36,8 +36,8 @@
include(FindAQT)
if(AQT_FOUND)
message(STATUS "Found AQT: ${AQT_FRAMEWORK}")
- set(aqt_COMPILE_FLAGS "-ObjC")
- set(aqt_LINK_FLAGS "-framework AquaTerm -framework Foundation")
+ set(aqt_COMPILE_FLAGS "-ObjC -I@PREFIX@/include")
+ set(aqt_LINK_FLAGS "-lobjc -laquaterm -L@PREFIX@/lib -framework Foundation")
set(DRIVERS_LINK_FLAGS ${DRIVERS_LINK_FLAGS} ${aqt_LINK_FLAGS})
else(AQT_FOUND)
set(PLD_aqt OFF CACHE BOOL "Enable aqt device" FORCE)

libplplot10-shlibs _unstable_ port .patch