Difference between revisions of "Libmad"

From CBLFS
Jump to navigationJump to search
Line 45: Line 45:
 
Install the package:
 
Install the package:
  
  make install
+
  make install &&
 +
mv -v /usr/include/mad{,-32}.h
  
 
  cat > /usr/lib/pkgconfig/mad.pc << "EOF"
 
  cat > /usr/lib/pkgconfig/mad.pc << "EOF"
Line 70: Line 71:
 
Install the package:
 
Install the package:
  
  make install
+
  make install &&
 +
mv -v /usr/include/mad{,-n32}.h
  
 
  cat > /usr/lib32/pkgconfig/mad.pc << "EOF"
 
  cat > /usr/lib32/pkgconfig/mad.pc << "EOF"
Line 95: Line 97:
 
Install the package:
 
Install the package:
  
  make install
+
  make install &&
mkdir -pv /usr/include/64 &&
+
  mv -v /usr/include/mad{,-64}.h
  mv -v /usr/include/mad.h /usr/include/64
 
  
 
  cat > /usr/lib64/pkgconfig/mad.pc << "EOF"
 
  cat > /usr/lib64/pkgconfig/mad.pc << "EOF"
Line 113: Line 114:
 
  EOF
 
  EOF
  
Fix the Headers
+
==== Creating a Stub Header ====
+
 
 
  cat > /usr/include/mad.h << "EOF"
 
  cat > /usr/include/mad.h << "EOF"
 +
/* mad.h  Stub Header  */
 
  #ifndef __STUB__MAD_H__
 
  #ifndef __STUB__MAD_H__
 
  #define __STUB__MAD_H__
 
  #define __STUB__MAD_H__
  #ifdef __x86_64__
+
  #include "64/mad.h"
+
  #if defined(__x86_64) || \
 +
    defined(__sparc64__) || \
 +
    defined(__arch64__) || \
 +
    defined(__powerpc64__) || \
 +
    defined (__s390x__)
 +
  # include "mad-64.h"
 
  #else
 
  #else
  #include "32/mad.h"
+
  # include "mad-32.h"
  #endif /* __x86_64__ */
+
  #endif
 +
 +
#endif /* __STUB_MAD_H__ */
 +
EOF
 +
 
 +
==== Creating a Stub Header For Mips ====
 +
 
 +
cat > /usr/include/python2.5/pyconfig.h << "EOF"
 +
/* mad.h.  Stub Header  */
 +
#ifndef __STUB__MAD_H__
 +
#define __STUB__MAD_H__
 +
 +
#include <sgidefs.h>
 +
 +
#if (_MIPS_SIM == _ABIO32)
 +
# include "mad-32.h"
 +
#elif (_MIPS_SIM == _ABIN32)
 +
# include "mad-n32.h"
 +
#elif (_MIPS_SIM == _ABI64)
 +
# include "mad-64.h"
 +
#endif
 +
 
  #endif /* __STUB__MAD_H__ */
 
  #endif /* __STUB__MAD_H__ */
 
  EOF
 
  EOF

Revision as of 14:11, 25 September 2006

Download Source: http://prdownloads.sourceforge.net/mad/libmad-0.15.1b.tar.gz

Dependencies

Non-Multilib

Configure and compile the package:

./configure --prefix=/usr &&
make

Install the package:

make install
cat > /usr/lib/pkgconfig/mad.pc << "EOF"
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: mad
Description: MPEG audio decoder
Requires:
Version: 0.15.1b
Libs: -L${libdir} -lmad
Cflags: -I${includedir}
EOF

Multilib

32Bit

Configure and compile the package:

CC="gcc ${BUILD32}" ./configure --prefix=/usr &&
make

Install the package:

make install &&
mv -v /usr/include/mad{,-32}.h
cat > /usr/lib/pkgconfig/mad.pc << "EOF"
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: mad
Description: MPEG audio decoder
Requires:
Version: 0.15.1b
Libs: -L${libdir} -lmad
Cflags: -I${includedir}
EOF

N32

Configure and compile the package:

CC="gcc ${BUILDN32}" ./configure --prefix=/usr --libdir=/usr/lib32 &&
make

Install the package:

make install &&
mv -v /usr/include/mad{,-n32}.h
cat > /usr/lib32/pkgconfig/mad.pc << "EOF"
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib32
includedir=${prefix}/include

Name: mad
Description: MPEG audio decoder
Requires:
Version: 0.15.1b
Libs: -L${libdir} -lmad
Cflags: -I${includedir}
EOF

64Bit

Configure and compile the package:

CC="gcc ${BUILD64}" ./configure --prefix=/usr --libdir=/usr/lib64 &&
make

Install the package:

make install &&
mv -v /usr/include/mad{,-64}.h
cat > /usr/lib64/pkgconfig/mad.pc << "EOF"
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib64
includedir=${prefix}/include

Name: mad
Description: MPEG audio decoder
Requires:
Version: 0.15.1b
Libs: -L${libdir} -lmad
Cflags: -I${includedir}
EOF

Creating a Stub Header

cat > /usr/include/mad.h << "EOF"
/* mad.h  Stub Header  */
#ifndef __STUB__MAD_H__
#define __STUB__MAD_H__

#if defined(__x86_64) || \
    defined(__sparc64__) || \
    defined(__arch64__) || \
    defined(__powerpc64__) || \
    defined (__s390x__)
# include "mad-64.h"
#else
# include "mad-32.h"
#endif

#endif /* __STUB_MAD_H__ */
EOF

Creating a Stub Header For Mips

cat > /usr/include/python2.5/pyconfig.h << "EOF"
/* mad.h.  Stub Header  */
#ifndef __STUB__MAD_H__
#define __STUB__MAD_H__

#include <sgidefs.h>

#if (_MIPS_SIM == _ABIO32)
# include "mad-32.h"
#elif (_MIPS_SIM == _ABIN32)
# include "mad-n32.h"
#elif (_MIPS_SIM == _ABI64)
# include "mad-64.h"
#endif

#endif /* __STUB__MAD_H__ */
EOF
Retrieved from "?title=Libmad&oldid=2174"