lpsolve _unstable_ port information

Info2: <<
Package: lpsolve
Description: Mixed Integer Linear Programming (ILP) solver
Type: maj (5.5)
Version: 5.5.2.0
Revision: 1

BuildDepends: sed | ssed, bison, flex-devel, fink (>= 0.24.12)
Depends: %N%type_raw[maj]-shlibs (= %v-%r)
Suggests: lpsolve-extra

Source: mirror:sourceforge:%n/lp_solve_%v_source.tar.gz
Source-MD5: 167c0fb4ab178e0b7ab50bf0a635a836
SourceDirectory: lp_solve_%type_raw[maj]

PatchFile: %{Ni}.patch
PatchFile-MD5: f27f7a5dbd1d2411e2b83ac7db502bf9
PatchScript: <<
#!/bin/sh -ev
N=%N
v=%v
p=%p
b=%b
t=%type_raw[maj]
. %{PatchFile}
<<

CompileScript: <<
#!/bin/sh -ev
export PATH=%p/lib/flex/bin:$PATH
export CPATH=%p/lib/flex/include:%p/include
export LIBRARY_PATH=%p/lib/flex/lib:%p/lib
# Run bison and flex
. ./lp_rlp.bat

# Build the library
sed -r -e '/EXPORTS/d' -e 's,^ +,_,' < lp_solve.def > exp_sym
cd %N%type_pkg[maj]
. ./ccc

# Symbolic links to library
ln -s lib%N.%v.dylib lib%N.%type_raw[maj].dylib
ln -s lib%N.%type_raw[maj].dylib lib%N.dylib
ln -s lib%N.%v.a lib%N.a

# Build the lp_solve executable
cd ../lp_solve
. ./ccc
<<

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

# Libraries
mkdir -p %i/lib
cp -pPR %N%type_pkg[maj]/lib%N* %i/lib

# Headers
mkdir -p %i/include/%N/bfp/bfp_LUSOL/LUSOL
mkdir -p %i/include/%N/colamd
mkdir -p %i/include/%N/shared
cp *.h %i/include/%N
cp bfp/*.h %i/include/%N/bfp
cp bfp/bfp_LUSOL/*.h %i/include/%N/bfp/bfp_LUSOL
cp bfp/bfp_LUSOL/LUSOL/*.h %i/include/%N/bfp/bfp_LUSOL/LUSOL
cp colamd/*.h %i/include/%N/colamd
cp shared/*.h %i/include/%N/shared
# # Additional "headers" (for %N-extra):
# cp yacc_read.c lp_Hash.c lp_utils.c %i/include/%N
# cp shared/{commonlib,myblas}.c %i/include/%N/shared
# cp colamd/colamd.c %i/include/%N/colamd

# Executable
mkdir -p %i/bin
install lp_solve/lp_solve %i/bin

# link the doc files:
mkdir -p %i/share/doc
ln -s %N%type_raw[maj]-shlibs %i/share/doc/%n
<<

SplitOff: <<
Package: %N%type_raw[maj]-shlibs
Files: lib/lib%N.*.dylib
Shlibs: %p/lib/lib%N.%type_raw[maj].dylib 5.5.2 %n (>= 5.5.0.0-1)
DocFiles: README.txt lp_solve.def
<<

SplitOff2: <<
Package: %N%type_raw[maj]-dev
Depends: %N%type_raw[maj]-shlibs (= %v-%r)
Replaces: lpsolve-extra (<= 5.5.0.10-3)
BuildDependsOnly: true
Files: include lib
InstallScript: <<
# link the doc files:
mkdir -p %i/share/doc
ln -s %N%type_raw[maj]-shlibs %i/share/doc/%n
<<
<<

DescDetail: <<
lp_solve is a free linear (integer) programming solver based on the revised
simplex method and the Branch-and-bound method for the integers. It solves pure
linear, (mixed) integer/binary, semi-continuous and special ordered sets (SOS)
models. It can be called as a library from different languages like C, VB,
.NET, Delphi, Excel, Java, ...
<<

DescPort: <<
Experimenting with -combine is very negative:
total size of .o files w/o combining : 751216; combined: 876720; stripped dylib after combining: 753208
(cmp to 601832 _ cf below)
(independently [except of course for the size of the combined .o file, 876720] of whether first compile, then link,
or, "compile-and-link in 1 go")

Those figures are quite robust: the following sizes of the dylib are independent of the various combinations
of '-s' and '-gfull' in the compile stage :
-fno-common, -single-module: 601776
-fno-common, multiple-modules: 609436
common; -single-module: 601832 (vers 5.5.2: 544096 32bit, 536768 64bit)

[Above figures from before using the exported_symbols_list; now size=509400,
and adding -DINTEGERTIME would gain an additional 32 bytes, and -fno-common 56]
<<

DescPackaging: <<
Library name changed from "%N%type_pkg[maj]" to "%N".
So the install_name (and the splitoff-names) must contain "%type_raw[maj]"...

Use dynamic linking for the executable.

Demos, docs, MP-language interfaces, and additional engines, are in lpsolve-extra pkg.
Interfaces from octave, python, and scilab are in the corresponding lpsolve-xyz pkgs.
<<

DescUsage: <<
For demo and docs, install lpsolve-extra and go to %p/share/doc/lpsolve-extra,
or cf http://lpsolve.sourceforge.net/%type_raw[maj]/
<<

License: LGPL
HomePage: http://sourceforge.net/projects/%N/
Maintainer: JF Mertens
<<