Update of /cvsroot/fink/dists/10.4/stable/main/finkinfo/sci
In directory vz-cvs-3.sog:/tmp/cvs-serv24421/stable/main/finkinfo/sci

Added Files:
        lpsolve-extra.info lpsolve.info lpsolve.patch 
Log Message:
lpsolve and lpsolve-extra to stable


--- NEW FILE: lpsolve.patch ---
## patchscript common with first part of that of lpsolve-extra, for ease of 
maintenance
# try for last digit of 'current version' the (hex) sum of the last 2 'digits' 
of %v (hopefully the next to last stays 0..)
comp_v=`sed -e 's,\.[^.]*$,,' <<<"$v"`
M=`sed -e 's,.*\.,,' <<<"$comp_v"`
m=`sed -e 's,.*\.,,' <<<"$v"`
cv=$(( 16*$M + $m ))
curr_v="$t.$cv"
T=`sed -e 's,\.,,g' <<<"$t"`

## for stripping:
 echo '__mh_execute_header' > symlst

### The ccc files:
## add return statement, to allow for sh -ev. Also, use %b instead of /tmp, to 
avoid collisions with parallel builds.
## and simplify things by not putting output in a "bin/$PLATFORM" subdir
 sed -i.bak -e "/printf/{s,main,int &,
        s,;,;return 0;,}
        s,/tmp,$b,g
        s,-l(m|dl),,
        s,bin/.PLATFORM/,,
        /bin\/.PLATFORM/d" `find . -name ccc`
## no strict-aliasing for the lib, since it gives a warning in lp_matrix.c 
2357-2358)
  sed -i'' -e "{
        /fpic/d
        s;-shared.*;*.o -dynamiclib -Wl,-x -dead_strip -exported_symbols_list 
../exp_sym -compatibility_version $comp_v -current_version $curr_v -o 
lib${N}.$v.dylib -install_name $p/lib/lib${N}.$t.dylib;
        /^ar /c ar rc lib${N}.$v.a *.o
        s,$T,.$v,
        }" ${N}$T/ccc
## for executable, use -mdynamic-no-pic, and strip. Also, link with the library:
  sed -i'' -e "{
# use -Os here, since far from time-critical code.
        s,-O3,-Os -fstrict-aliasing -Wall,
        s;\$src.*;-mdynamic-no-pic -Wl,-x -dead_strip -exported_symbols_list 
../symlst lp_solve.c ../${N}$T/lib${N}.dylib -o lp_solve;
        }" lp_solve/ccc

## Dynamic library filenames on darwin end with ".dylib", not ".so". Also, give 
full install_name for dlopen.
  sed -i'' -e "s,lib${N}$T.so,$p/lib/lib${N}.$t.dylib," lp_explicit.h
## hard-code the paths to the modules, for the user's convenience (preserving 
the possibility to specify
## a full path, absolute or relative), to avoid using a 
DYLD(_FALLBACK)_LIBRARY_PATH...
  sed -ri.bak -e "s:( +)  strcat\(((bfp|xli)name), \".so\"\);:&\n\1char 
finklib[128]=\"$p/lib/\";\n\
\1if(strrchr(\2,'/') != NULL) finklib[0]='\\\0';\n\
\1strcat(finklib,\2);:" \
        -e "s:(dlopen\().*name:\1finklib:" lp_lib.c
# Use vecLib :
 sed -i.bak -e 
's;myBLAS;/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/libBLAS.dylib;'
 lp_lib.h
# avoid implicit declaration of isspace
 sed -i.bak -e '1i #include <ctype.h>' lp_solve/lp_solve.c
#
 sed -i.bak -e '/WIN32/,/endif/{
        /WIN32/d
        /endif/d
        }' bfp/bfp_LUSOL/lp_LUSOL.h
 sed -i.bak -e '/3, "\.so"/,+1{
        s,3,6,
        s,so,dylib,
        }' shared/{commonlib,myblas}.c
## if one wanted to remove all srcs compiled here from lpsolve-extra, one would 
need to uncomment the next 2 lines:
#  tr ' ' '\n'<<<"allocINT createLink firstActiveLink is_nativeBLAS load_BLAS 
nextActiveLink removeLink sortByINT\
# daxpy dscal idamax init_BLAS unload_BLAS allocREAL timeNow freeLink 
allocCHAR"|sed -r -e 's,^,   ,' >> lp_solve.def
# this would cost 596 bytes in the size of the lib, and for the so's:
# GLPK, CPLEX, LINDO: +4, LUSOL -3860, etaPFI +120, DIMACS, MathProg: -
# Thus: not worthwhile (at least not till default bfp and xli are taken out of 
the lib...) 
## rm irrelevant files
  rm -f xli/*/xli_* bfp/*/bfp_* */*/c*.bat */*.bat */.DS_Store
## turn the .bat scripts into usable shell scripts
  find . -name '*.bat' | xargs sed -i.bak -e 's,^del,rm,' -e 's,\r$,,' -e 
'/^rem /d'

--- NEW FILE: lpsolve.info ---
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 <[email protected]>
<<

--- NEW FILE: lpsolve-extra.info ---
Info2: <<
Package: lpsolve-extra
Description: External Language Interfaces for lpsolve
Version: 5.5.2.0
Revision: 1
# rev-up and adapt next line at version-increases of lpsolve or glpk
Type: glpk (4.44), maj (5.5)

BuildDepends: lpsolve%type_raw[maj]-dev (>= %v-1), glpk (>= %type_raw[glpk]-1), 
bison, flex, sed | ssed, fink (>= 0.24.12)
Depends: lpsolve%type_raw[maj]-shlibs (>= %type_raw[maj].0.0-1)

# we need the lp_solve source again, for yacc_read.c lp_Hash.c lp_utils.c 
shared/{commonlib,myblas}.c and colamd/colamd.c
Source: mirror:sourceforge:lpsolve/lp_solve_%v_source.tar.gz
Source-MD5: 167c0fb4ab178e0b7ab50bf0a635a836
# those are the real sources:
Source2: mirror:sourceforge:lpsolve/lp_solve_%v_xli_MathProg_source.tar.gz
Source2-MD5: ce59814ac2857b2407bc90f716b0342b
Source3: mirror:sourceforge:lpsolve/lp_solve_%v_xli_CPLEX_source.tar.gz
Source3-MD5: 1c5285c4dfe96461d83e606e174195de
Source4: mirror:sourceforge:lpsolve/lp_solve_%v_xli_DIMACS_source.tar.gz
Source4-MD5: dcfb45d81a8619521e814c7c854f1367
Source5: mirror:sourceforge:lpsolve/lp_solve_%v_xli_LINDO_source.tar.gz
Source5-MD5: 27b3d2ddce2ba21e33ee21b495b0efb0
Source6: mirror:sourceforge:lpsolve/lp_solve_%v_bfp_GLPK_source.tar.gz
Source6-MD5: b42c91798f593a9a62cb3ca661369836
Source7: mirror:sourceforge:lpsolve/lp_solve_%v_bfp_LUSOL_source.tar.gz
Source7-MD5: 4252ce513b9914fa998fe20c838a588e
Source8: mirror:sourceforge:lpsolve/lp_solve_%v_bfp_etaPFI_source.tar.gz
Source8-MD5: 2d01a13c9e530512349fb3dbaa56dfe1
Source9: mirror:sourceforge:lpsolve/lp_solve_%v_doc.tar.gz
Source9-MD5: 7886d6b94477c821c88142c3730f4e65
Source9ExtractDir: lp_solve_%type_raw[maj]/doc
# ZIMPL needs more work _ this version doesn't even seem to fit lpsolve55 ..
#Source10: http://personales.upv.es/arodrigu/SolverWS/descargas/xli_ZIMPL.zip
#Source10-MD5: 274645d82a31bc9f7ffc8b758811c285
#Source10ExtractDir: lp_solve_%type_raw[maj]/xli/xli_ZIMPL
Source11: mirror:gnu:glpk/glpk-%type_raw[glpk].tar.gz
Source11-MD5: f2ac7013bc0420d730d052e7ba24bdb1
#
SourceDirectory: lp_solve_%type_raw[maj]

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

#### ZIMPL
#  sed -r -e 's,CPLEX,ZIMPL,' -e "s,^(src=).*,\1'lp_ZIMPL.c'," < 
xli/xli_CPLEX/ccc > xli/xli_ZIMPL/ccc
#### the ccc files
  sed -ri.bak -e "{
        # remove colamd from the srcs; never needed :
        s,[-./Ia-z]*colamd(\.c|) ,,
        # set optimisation flags; use -Os for the non time-critical parts
        s,opts='',opts='-Os'\nopts=\"\$opts -fstrict-aliasing\",
        # -fpic not availaible on MacOSX, -fPIC default
        s, \-fpic,,
        # link as bundles
        s,so=\"\-s.*,so='-bundle',
        # strip (and -lc -lm are libSystem, which is always there)
        s: \-lc \-lm: -Wl,-x -dead_strip -exported_symbols_list ../exp_sym:
        # Remove from the srcs everything which is already in the lib
        # (the differences in -D flags do not matter), and link with the lib.
#       /^src=/s,\.\./\.\./[^ ']*,,g
#       s,\-Wl,-L%p/lib -llpsolve &,
        # Finally use by preference the installed lpsolve headers _ doesn't 
matter irrespective of the previous choice _ ,
        # so the only files we still need from Source1 (if previous choice is 
not commented out) are yacc_read.c and lp_Hash.c
        s,\-I\.\./\.\./,-I%p/include/lpsolve/,g
        s,\-I\.\./\.\.,-I%p/include/lpsolve &,
        }" */*/ccc
# SpaceChars is used :
  sed -ri -e '/static char SpaceChars/{ i */
                                        a /*
        }' xli/xli_DIMACS/lp_Dimacs.c
# Else plenty of errors "'struct _lprec' has no member named 'lpfunc'" in those 
2 complilations :
  sed -ri -e '/RELEASE/s,0,2,' xli/xli_DIMACS/lp_{Dimacs,network}.c
# No xli_glpsql.c to be found _ neither in the buildir, nor on my machine, nor 
on the net..
# Let is provisionally replace it by a compilation of glpsql.c; but this needs 
a real include-dir for mysql:
  sed -ri -e 's,/usr,%p,' -e 's,xli_glpsql,${glpkdir}/src/glpsql,' 
xli/xli_MathProg/ccc

#### glpk
# the bfp would still build with glpk-4.14, given the following changes _ but 
would still require
# a special build of glpk, installing a number of headers that have become 
internal _ not worth it.
#  # accomodate changes in glpk 4.14
#  perl -pi -e 's,glp_inv_,inv_,g' bfp/bfp_GLPK/lp_glpkLU.c
#  # link the bfp with glpk (4.14) instead of re-compiling:
#  perl -pi.bak -e 's, \$\{glpk\},,; s,I\$\{glpkdir\},I%p,; s,\-Wl,-L%p/lib 
-lglpk $&,' bfp/bfp_GLPK/ccc
  # for xli_MathProg, use the downloaded glpk-4.13 :
  perl -pi -e 's,=/glpk.*,=%b/../glpk-%type_raw[glpk],' 
{bfp/bfp_GLPK,xli/xli_MathProg}/ccc
<<
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
# skip bfp_GLPK for the moment :
  sed -i '1i return 0' bfp/bfp_GLPK/ccc

  for d in xli/xli_CPLEX xli/xli_LINDO; do cd $d; . ./*.bat; cd -; done
  for d in bfp xli; do \
        cd $d
        D=`echo $d|tr "[:lower:]" "[:upper:]"`
        sed -r -e '/EXPORTS/d' -e 's,^ +,_,' < lp_$D.def > exp_sym
        for n in ${d}_*; do cd $n; . ./ccc; cd -; done
        cd ..
  done
<<
InstallScript: <<
#!/bin/sh -ev
  # bundles
  mkdir -p %i/lib
  cp -p */*/*.so %i/lib
  chmod 644 %i/lib/*
  # Headers
  for d in bfp xli; do \
        cd $d
        mkdir -p %i/include/lpsolve/$d
        cp *.{def,h,c} %i/include/lpsolve/$d
        for n in ${d}_* ; do mkdir -p %i/include/lpsolve/$d/$n; cp $n/*.h 
%i/include/lpsolve/$d/$n; done
        cd ..
  done
  # the following are already in lpsolve
  rm -f %i/include/lpsolve/bfp/{lp_BFP,bfp_LUSOL/lp_LUSOL}.h
  # docs
  sed -ri -e '/^(This directory|To build)/d' -e '/^$/d' xli/*/readme.txt
  mkdir -p %i/share/doc/%n/examples/lpsolve %i/share/doc/%n/examples/DIMACS 
%i/share/doc/lpsolve%type_raw[maj]-shlibs
  mv doc %i/share/doc/%n/html
  echo "#!/bin/sh
        open html/contents.htm" > %i/share/doc/%n/viewdoc
  echo "#!/bin/sh
        open html/search.htm" > %i/share/doc/%n/searchdoc
  chmod a+x %i/share/doc/%n/{view,search}doc
  ln -s other/README.txt %i/share/doc/%n/readme_lpsolve
  ln -s ../lpsolve%type_raw[maj]-shlibs %i/share/doc/%n/other
  ln -s ../%n %i/share/doc/lpsolve%type_raw[maj]-shlibs/extras
  cp -p xli/xli_DIMACS/*.net xli/xli_DIMACS/*.htm 
%i/share/doc/%n/examples/DIMACS
  ln -s examples/DIMACS %i/share/doc/%n/DIMACS
  # And since we had anyway to expand the src of lpsolve, we can as well 
install its demo
  # Here we delete the $src, and link instead with the dylib, forgetting our 
scruples about different '-D' flags ...
  # for a demo, the risk is compensated by the gain in space : 18K vs > 600K
  cd demo
  sed -ri -e 's,\$src ,,' -e 's,\$math \$dl,%p/lib/liblpsolve.dylib 
-mdynamic-no-pic -Os -fstrict-aliasing -s -dead_strip,' ccc
  sh -ev ccc
  cp -p demo %i/share/doc/%n/examples/lpsolve
  ln -s examples/lpsolve/demo %i/share/doc/%n/lpsolve_demo
<<

DocFiles: <<
  bfp/bfp_LUSOL/LUSOL/LUSOL-overview.txt:overview_LUSOL
  xli/xli_CPLEX/readme.txt:readme_CPLEX
  xli/xli_LINDO/readme.txt:readme_LINDO
  xli/xli_MathProg/readme.txt:readme_MathProg
<<
DescDetail: <<
External Language Interfaces (XLI) and Basis Factorization Packages (BFP)
for the linear (mixed integer) programming solver lpsolve.
<<

DescPackaging: <<
<<

DescUsage: <<
For doc and demos, cf %p/share/doc/%n
For a (lpsolve, not lpsolve-extra) demo, type : %p/share/doc/%n/lpsolve_demo
Mailing list is at [email protected]
<<
License: LGPL
HomePage: http://sourceforge.net/projects/lpsolve/
Maintainer: JF Mertens <[email protected]>
<<


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Fink-commits mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to