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

Added Files:
        ann-oct305.info ann-oct305.patch 
Log Message:
sync. w/ 10.!4/stable, validated on powerpc-darwin8


--- NEW FILE: ann-oct305.patch ---
diff -Nurd ann-1.0.2/src/ann/bindings/ann_wrap.cpp 
ann-1.0.2.patched/src/ann/bindings/ann_wrap.cpp
--- ann-1.0.2/src/ann/bindings/ann_wrap.cpp     2009-05-08 09:18:07.000000000 
-0400
+++ ann-1.0.2.patched/src/ann/bindings/ann_wrap.cpp     2011-09-23 
16:21:57.000000000 -0400
@@ -7,6 +7,10 @@
  * changes to this file unless you know what you are doing--modify the SWIG 
  * interface file instead. 
  * 
----------------------------------------------------------------------------- */
+#include "../include/ANN/ANN.h"
+#include "../include/ANN/ANNperf.h"
+#include "../include/ANN/ANNx.h"
+
 
 #define SWIGOCTAVE
 #define SWIG_name_d      "ann"

--- NEW FILE: ann-oct305.info ---
Info2: <<
Package: ann-oct305
Version: 1.0.2
Type: oct (3.0.5), forge (ann)
Revision: 2
Maintainer: Alexander Hansen <[email protected]>
# unfortunately, Homepage won't do types
Homepage: http://octave.sourceforge.net/ann/index.html 
Description: Wrapper to the ANN library for Octave
DescDetail: <<
The Octave-forge ANN package wraps the ANN library, which provides data
structures and functions for computing exact and approximate nearest neighbors
on an arbitrarily high dimensional point set.  
<<

License: GPL

# All octave-forge packages have to have the following BuildDepends:
#  octave%type_pkg[oct]-dev | octave%type_pkg[oct]-atlas-dev,
# fftw3, 
# ( %type_pkg[oct] = 305 ) hdf5.7-oldapi,
# ( %type_pkg[oct] != 305 ) hdf5.7
#
# Packages which serve only Octave-3.0.5 or only Octave > 3.0.5 need
# not use the conditional, of course.

BuildDepends: <<
  fink (>= 0.24.12),
  liboctave%type_pkg[oct]-dev, 
  fftw3,
  ( %type_pkg[oct] = 305 ) hdf5.7-oldapi,
  ( %type_pkg[oct] != 305 ) hdf5.7 
<<
Depends: <<
  octave%type_pkg[oct]-interpreter
<<
Conflicts: octave-forge

Source-MD5: 3b383fdec459cf4f66c221e7b698aab0

#### Insert required changes here ####

PatchFile: %{ni}.patch
PatchFile-MD5: a9ca472ae5f690929f403b7de7fa443b
PatchScript: <<
%{default_script}
perl -pi -e 's|\$\(MAKELIB\)|ar rcv|' src/%type_pkg[forge]/src/Makefile
<<

######################################

# Do not change anything from this point down, unless absolutely necessary,
# since the foo-oct%type_pkg[oct] packages are designed to be built/installed
# in the same way.

Source: mirror:sourceforge:octave/%type_raw[forge]-%v.tar.gz

NoSetCPPFLAGS: true
NoSetLDFLAGS: true
SetLIBRARY_PATH: /usr/X11R6/lib:%p/lib
SetMAKEFLAGS: -j1

CompileScript: <<
#!/bin/sh -ev
export OCTAVE=%p/bin/octave-%type_raw[oct]
%p/share/octave/%type_raw[oct]/scripts/octave-forge-compile.sh 
%type_raw[forge]-%v
<<

InstallScript: << 
        #!/bin/sh -ev
        %p/share/octave/%type_raw[oct]/scripts/octave-forge-install.sh 
%type_raw[forge]-%v %i %b
        mkdir -p %i/share/octave/%type_raw[oct]/%type_raw[forge]-%v
        # copy template scripts
        cp %p/share/octave/%type_raw[oct]/scripts/octave-forge-prerm 
%p/share/octave/%type_raw[oct]/scripts/octave-forge-postinst 
%i/share/octave/%type_raw[oct]/%type_raw[forge]-%v
        cd %i/share/octave/%type_raw[oct]/%type_raw[forge]-%v
        sed -i -e 's/@PKGNAME@/%type_raw[forge]-%v/' octave-forge-postinst
        sed -i -e 's/@PKGNAME@/%type_raw[forge]/' octave-forge-prerm
        chmod a+x octave-forge*
<<

PostInstScript:  <<
        if [ -s %p/var/octave/%type_raw[oct]/octave_packages ] && [ -f 
%p/var/octave/%type_raw[oct]/octave_packages ] 
        then 
                
%p/share/octave/%type_raw[oct]/%type_raw[forge]-%v/octave-forge-postinst
        else
                mv 
%p/share/octave/%type_raw[oct]/packages/%type_raw[forge]-%v/octave_packages 
%p/var/octave/%type_raw[oct]/octave_packages
        fi
<<

PreRmScript: 
%p/share/octave/%type_raw[oct]/%type_raw[forge]-%v/octave-forge-prerm

DescPackaging: <<
This package:
Rolls its own ANN (1.1.1) library.  There's a newer upstream version (1.1.2), 
but this package wants stuff that doesn't exist in that version.

ann_wrap.cpp seems to need explicit #includes pointing to the ANN headers, so 
we patch those in.

For some reason when this package reads AR from octave_config_info, it gets 
mangled so that the system doesn't want to execute it.  We simply patch
%b/src/ann/src/Makefile just to use "ar -crv" directly.

Common for all octave-forge packages:
We read in postinst and prerm template scripts installed by octaveN and modify
them to use the name of this package because Octave's package manager can't 
cope with non-literal arguments.

The Type: forge (pkgname) is used to minimize what needs to be changed when
using this .info file as a template.
<<
<<


------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Fink-commits mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to