communications-oct stable port information

Info2: <<
Package: communications-oct%type_pkg[oct]
Version: 1.1.1
Type: oct (3.6.0 3.6.1), forge (communications), gcc (4.6)
Revision: 1
Maintainer: Alexander Hansen
# unfortunately, Homepage won't do types
Homepage: http://octave.sourceforge.net/communications/index.html
Description: Communications functions for Octave
DescDetail: <<
Digital Communications, Error Correcting Codes (Channel Code), Source Code
functions, Modulation and Galois Fields.

This package provides the following functions:
Random Signals:
awgn
biterr
eyediagram
randerr
randint
randsrc
scatterplot
symerr
wgn
bsc
Source Coding:
arithenco
arithdeco
compand
dpcmdeco
dpcmenco
dpcmopt
huffmandeco
huffmandict
huffmanenco
lloyds
lz77deco
lz77enco
quantiz
shannonfanodict
shannonfanoenco
shannonfanodeco
rleenco
rledeco
riceenco
ricedeco
fiboenco
fibodeco
fibosplitstream
golombenco
golombdeco
Block Interleavers:
intrlv
algintrlv
helscanintrlv
matintrlv
randintrlv
deintrlv
matdeintrlv
randdeintrlv
Block Coding:
bchdeco
bchenco
bchpoly
convenc
cyclgen
cyclpoly
decode
encode
egolaydec
egolayenc
egolaygen
gen2par
hammgen
reedmullerdec
reedmullerenc
reedmullergen
rsgenpoly
rsdec
rsdecof
rsenc
rsencof
systematize
syndtable
vitdec
Modulations:
ademod
ademodce
amod
amodce
ammod
amdemod
apkconst
ddemod
ddemodce
demodmap
dmod
dmodce
fmmod
fmdemod
genqammod
genqamdemod
modmap
pamdemod
pammod
pskdemod
pskmod
qaskdeco
qaskenco
qammod
qamdemod
Special Filters:
hank2sys
hilbiir
rcosflt
rcosiir
rcosine
rcosfir
Galois Fields of Even Characteristic:
all
any
cosets
conv
convmtx
deconv
det
dftmtx
diag
exp
gf
fft
filter
gftable
gfweight
ifft
inv
inverse
isequal
log
lu
prod
sqrt
rank
reshape
roots
sum
sumsq
isempty
isgalois
isprimitive
length
minpol
polyval
primpoly
size
Galois Fields of Odd Characteristic:
gfadd
gfconv
gfcosets
gfdeconv
gfdiv
gffilter
gflineq
gfminpol
gfmul
gfpretty
gfprimck
gfprimdf
gfprimfd
gfrank
gfrepcov
gfroots
gfsub
gftrunc
gftuple
Utility Functions:
comms
bi2de
de2bi
oct2dec
istrellis
poly2trellis
vec2mat
qfunc
qfuncinv
<<
License: GPL3+

# Most octave-forge packages have to have the following BuildDepends:
# liboctave%type_pkg[oct]-gcc%type_pkg[gcc]-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: <<
liboctave%type_pkg[oct]-dev,
fftw3,
hdf5.7,
fink (>=0.32)
<<
RuntimeDepends: signal-oct%type_pkg[oct] (>=1.1.3-1)
Depends: <<
hdf5.7-shlibs,
octave%type_pkg[oct]-interpreter,
( %type_pkg[oct] << 360 ) gcc%type_pkg[gcc]-shlibs
<<
Conflicts: octave-forge

Source: mirror:sourceforge:octave/%type_raw[forge]-%v.tar.gz
Source-MD5: 762e82b562994000693fa8b1ea897f6f
SourceDirectory: %type_pkg[forge]

DescPackaging: <<
This package:
Octave-3.6.x has a 'LU' class, so use upstream patch to rename the 'LU' class
here. This will presumably be rectified in the next version.
Since we're patching, anyway, patch MOFLAGS entry in src/Makefile to tell it
to link to libhdf5.

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.
<<

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

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

# 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.

NoSetCPPFLAGS: true
NoSetLDFLAGS: true
SetLIBRARY_PATH: /usr/X11R6/lib:%p/lib
UseMaxBuildJobs: false
BuildAsNobody: false

CompileScript: <<
#!/bin/sh -ev
if [ $UID -ne 0 ]
then
echo "%n cannot be built with --build-as-nobody"
exit 1
fi
export OCTAVE=%p/bin/octave-%type_raw[oct]
# repack tarball, since octave-3.4.3 appears not to want to install
# from directories
cd ..
tar -cf %type_raw[forge].tar %type_raw[forge]
cd %b
pkgsrc=%type_raw[forge].tar
%p/share/octave/%type_raw[oct]/scripts/octave-forge-compile.sh $pkgsrc
<<

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

<<

communications-oct stable port .patch

diff -Nurd communications/src/Makefile communications.patched/src/Makefile
--- communications/src/Makefile 2008-03-27 11:45:25.000000000 -0400
+++ communications.patched/src/Makefile 2012-01-19 21:12:57.000000000 -0500
@@ -26,7 +26,7 @@
DELETES = $(OBJECTS) $(GALOISDEPENDS) $(OTHERDEPENDS) *~ $(TARGETS) core octave-core

DEFINES = -DGALOIS_DISP_PRIVATES
-MOFLAGS =
+MOFLAGS = -lhdf5

.PHONY: all dist clean realclean count
.SUFFIXES:
diff -Nurd communications/src/galois.cc communications.patched/src/galois.cc
--- communications/src/galois.cc 2011-05-20 18:48:58.000000000 -0400
+++ communications.patched/src/galois.cc 2012-01-19 19:23:01.000000000 -0500
@@ -882,7 +882,7 @@
template class base_lu ;

void
-LU::factor (const galois& a, const pivot_type& typ)
+galoisLU::factor (const galois& a, const pivot_type& typ)
{
int a_nr = a.rows ();
int a_nc = a.cols ();
@@ -898,7 +898,7 @@
int jp = j;

// Find the pivot and test for singularity
- if (ptype == LU::ROW) {
+ if (ptype == galoisLU::ROW) {
for (int i = j+1; i < a_nr; i++)
if (a_fact(i,j) > a_fact(jp,j))
jp = i;
@@ -911,7 +911,7 @@
ipvt(j) = jp;

if (a_fact(jp,j) != 0) {
- if (ptype == LU::ROW) {
+ if (ptype == galoisLU::ROW) {
// Apply the interchange to columns 1:NC.
if (jp != j)
for (int i = 0; i < a_nc; i++) {
@@ -962,7 +962,7 @@
}

galois
-LU::L (void) const
+galoisLU::L (void) const
{
int a_nr = a_fact.rows ();
int a_nc = a_fact.cols ();
@@ -981,7 +981,7 @@
}

galois
-LU::U (void) const
+galoisLU::U (void) const
{
int a_nr = a_fact.rows ();
int a_nc = a_fact.cols ();
@@ -1049,7 +1049,7 @@
info = 0;
retval(0,0) = 1;
} else {
- LU fact (*this);
+ galoisLU fact (*this);

if ( ! fact.singular()) {
galois A (fact.a_fact);
@@ -1110,7 +1110,7 @@
return galois();
} else if (nc > nr) {
// Under-determined system, use column interchanges.
- LU fact ((*this), LU::COL);
+ galoisLU fact ((*this), galoisLU::COL);

if (fact.singular()) {
info = -1;
@@ -1173,7 +1173,7 @@
}

} else {
- LU fact (*this);
+ galoisLU fact (*this);

if (fact.singular()) {
info = -1;
diff -Nurd communications/src/galois.h communications.patched/src/galois.h
--- communications/src/galois.h 2011-05-20 18:48:58.000000000 -0400
+++ communications.patched/src/galois.h 2012-01-19 19:29:57.000000000 -0500
@@ -131,7 +131,7 @@
};

class
-LU : public base_lu
+galoisLU : public base_lu
{
friend class galois;
public:
@@ -141,15 +141,15 @@
COL
};

- LU (void) : base_lu () { }
+ galoisLU (void) : base_lu () { }

- LU (const galois& a, const pivot_type& typ) { factor (a, typ); }
+ galoisLU (const galois& a, const pivot_type& typ) { factor (a, typ); }

- LU (const galois& a) { factor (a, LU::ROW); }
+ galoisLU (const galois& a) { factor (a, galoisLU::ROW); }

- LU (const LU& a) : base_lu (a) { }
+ galoisLU (const galoisLU& a) : base_lu (a) { }

- LU& operator = (const LU& a)
+ galoisLU& operator = (const galoisLU& a)
{
if (this != &a)
base_lu :: operator = (a);
@@ -157,7 +157,7 @@
return *this;
}

- ~LU (void) { }
+ ~galoisLU (void) { }

galois L (void) const;

diff -Nurd communications/src/gf.cc communications.patched/src/gf.cc
--- communications/src/gf.cc 2011-05-22 15:32:41.000000000 -0400
+++ communications.patched/src/gf.cc 2012-01-19 21:23:52.000000000 -0500
@@ -855,7 +855,7 @@
}

if (! error_state) {
- LU fact (m);
+ galoisLU fact (m);

switch (nargout) {
case 0:

communications-oct _unstable_ port .patch