Difference between revisions of "LADSPA"

From CBLFS
Jump to navigationJump to search
m (Initial creation. Currently contains the starting template only.)
 
m (Intermediate save. Sorry for this. I'm new. I'll get better, eventually.)
Line 2: Line 2:
 
|-
 
|-
 
!Download Source:
 
!Download Source:
| URL
+
| URL - http://www.ladspa.org/download/ladspa_sdk_1.13.tgz
|-
+
}
!Download Patch:
 
| URL - This should be a URL beginning with http://svn.cross-lfs.org/svn/repos/patches/.  See http://patches.cross-lfs.org/patch-submitter for instructions on submitting patches for CBLFS.
 
|}
 
  
 
----
 
----
  
{{Package-Introduction|Brief description of the package you are enlightening us with.  Try to provide a description in your own words. Add a link to the package's homepage for someone unfamiliar with the package to research further.|http://homepage/to/cool/package}}
+
{{Package-Introduction|LADSPA is the "Linux Audio Developer's Simple Programming API," whose goal is to provide a versatile audio plug-in capability similar to VST. It is deliberately designed to be extremely simple. As described on the project web site, "The 'S' in 'LADSPA' is meant seriously." The LADSPA development "framework" consists of just one C header file, plus the development tools you will build here. |http://www.ladspa.org}}
  
 
----
 
----
  
'''<font style="color: green">If there is some reason you are adding a package and are unable to provide a brief description of it's functionality, please do two things.  First, reconsider installing software that you have no idea what it does.  Second, please use this template.  It allows us to identify packages that need introductions without "hunting" through the wiki.</font>'''
+
== Common Build Instructions ==
  
{{Blank-Package-Introduction}}
+
The build system is not autotools based. However, the makefile is so simple that you will probably want to simply edit and run the makefile manually.
  
'''<font style="color: green">Use this template to add notes where ever a note is appropriate.</font>'''
+
Build the package
  
{{Note|ADD SOMETHING NOTEWORTHY}}
+
cd src
 +
edit makefile
 +
    INSTALL_PLUGINS_DIR = ...
 +
    INSTALL_INCLUDE_DIR = ...
 +
    INSTALL_BINARY_DIR = ...
 +
make
  
== Dependencies ==
+
Install the package
  
'''<font style="color: green">If there are no dependencies, omit this section.</font>'''
+
make install
 
+
create multiarch wrappers for all 3 binaries
=== Required ===
 
* [[Required Dependency #1]]
 
* [[Required Dependency #2]]
 
 
 
=== Recommended ===
 
* [[Recommended Dependency #1]]
 
* [[Recommended Dependency #2]]
 
 
 
=== Optional ===
 
* [[Optional Dependency #1]]
 
* [[Optional Dependency #2]]
 
 
 
=== Runtime ===
 
* [[Runtime Dependency #1]]
 
* [[Runtime Dependency #2]]
 
  
== Creating the <NAME> User & Group ==
+
Here is a script that automates this process, while also adding DESTDIR capability, which is missing in the original makefile:
  
'''<font style="color: green">This is an optional section. If your package requires a user/group add this section to the page then append the table on the [[System User and Groups]] page. Below is an example. If there is no need to create a user or group, omit this section.</font>'''
+
cat > build.sh << "EOF"
 +
: ${CLFS_LIB32:="lib"}
 +
: ${CLFS_LIBN32:="lib32"}
 +
: ${CLFS_LIB64:="lib64"}
 +
  : ${CLFS_LIB:="lib"}
  
  groupadd -g ''[id]'' ''[name]'' &&
+
  eval CLFS_LIB='$'CLFS_LIB${USE_ARCH} &&
  useradd -c "''[desc]''" -d /dev/null \
+
  eval BUILD='$'BUILD${USE_ARCH} &&
        -u ''[id]'' -g ''[name]'' -s /bin/false ''[name]''
+
eval LD_BUILD='$'LD_BUILD${USE_ARCH} &&
  
== Configuration Information ==
+
pushd src &&
  
'''<font style="color: green">This section can contain options that you may want to include when configuring the package, but should be left as a choice. However, don't just reproduce the output of ./configure --help; be judicious in your selection. If there are no configuration options that warrant discussion, omit this section.</font>'''
+
if [ -e makefile-original ]; then
 +
 +
    make clean
 +
    mv -f -v makefile-original makefile
 +
 +
fi
 +
 +
CLFS_LIB=${CLFS_LIB} \
 +
sed -i-original \
 +
    -e 's/$(INSTALL_PLUGINS_DIR)/$(DESTDIR)$(INSTALL_PLUGINS_DIR)/g' \
 +
    -e 's/$(INSTALL_INCLUDE_DIR)/$(DESTDIR)$(INSTALL_INCLUDE_DIR)/g' \
 +
    -e 's/$(INSTALL_BINARY_DIR)/$(DESTDIR)$(INSTALL_BINARY_DIR)/g' \
 +
    -e "s|/usr/local|/usr|g" \
 +
    -e "s|/lib/|/${CLFS_LIB}/|g" \
 +
    makefile &&
 +
 +
make \
 +
    DESTDIR=${DESTDIR} \
 +
    CC="gcc ${BUILD}" \
 +
    CPP="g++ ${BUILD}" \
 +
    LD="ld ${LD_BUILD}" &&
 +
 +
make install &&
 +
 +
if [ "$USE_ARCH" != "" ]; then
 +
   
 +
    mv -v ${DESTDIR}/usr/bin/analyseplugin ${DESTDIR}/usr/bin/analyseplugin-${USE_ARCH} &&
 +
    mv -v ${DESTDIR}/usr/bin/applyplugin ${DESTDIR}/usr/bin/applyplugin-${USE_ARCH} &&
 +
    mv -v ${DESTDIR}/usr/bin/listplugins ${DESTDIR}/usr/bin/listplugins-${USE_ARCH}
 +
 +
fi
 +
 +
if [ "${USE_ARCH}" == "64" ]; then
 +
 +
    ln -sfv multiarch_wrapper ${DESTDIR}/usr/bin/analyseplugin &&
 +
    ln -sfv multiarch_wrapper ${DESTDIR}/usr/bin/applyplugin &&
 +
    ln -sfv multiarch_wrapper ${DESTDIR}/usr/bin/listplugins
 +
 +
fi
 +
 +
popd
 +
EOF
 +
 +
  chmod +x build.sh
  
{|
 
|-
 
|''--enable-someoption:'' brief description of the non-default functionality provided by someoption.
 
|-
 
|''--disable-someotheroption:'' brief description of the default functionality removed by disabling someotheroption.
 
|-
 
|''--with-somepackage=DIR:''
 
|}
 
 
'''<font style="color: green">Generally speaking, CBLFS packages are installed in the /usr hierarchy although there are some exceptions.  Even if you passed --prefix=/home/fubar/stuff/CBLFS/is/really/awesome/some/package/version/5.0/hope/this/works to the configure script, please use --prefix=/usr for the wiki.  Thanks.  Also, the instructions presume that the source package has been retrieved to the local machine, unpacked, and you have cd'd to the top of the source tree.  Generally, we don't need those instructions unless there is something very unique about the process for the package you are adding.</font>'''
 
  
 
== Non-Multilib ==
 
== Non-Multilib ==
  
Compile the package:
+
Compile and install the package:
 
 
./configure --prefix=/usr &&
 
make
 
  
Install the package:
+
  ./build.sh
 
 
  make install
 
  
 
== Multilib ==
 
== Multilib ==
  
'''<font style="color: green">If appropriate, add this line and only include the 64-bit instructions:</font>'''
 
 
'''''This package does not provide any libraries or other ABI-specific information so only one installation is required.'''''
 
 
'''<font style="color: green">If package documentation is not installed by the 'make install' step, only include the commands to install the documentation in the 64-bit section.</font>'''
 
  
 
=== 32Bit ===
 
=== 32Bit ===
  
Compile the package:
+
Compile and install the package:
  
  CC="gcc ${BUILD32}" ./configure --prefix=/usr &&
+
  USE_ARCH=32 ./build.sh
make
 
 
 
Install the package:
 
 
 
make install
 
  
 
=== N32 ===
 
=== N32 ===
  
Compile the package:
+
Compile and install the package:
 
 
CC="gcc ${BUILDN32}" ./configure --prefix=/usr \
 
    --libdir=/usr/lib32 &&
 
make
 
 
 
Install the package:
 
  
make install
+
To Do: (Please Contribute. It is intended that "USE_ARCH=N32 ./build.sh" should work.)
  
 
=== 64Bit ===
 
=== 64Bit ===
  
Compile the package:
+
Compile and install the package:
  
  CC="gcc ${BUILD64}" ./configure --prefix=/usr \
+
  USE_ARCH=64 ./build.sh
    --libdir=/usr/lib64 &&
 
make
 
  
Install the package:
+
== Configuring ==
  
make install
+
An environment variable, LADSPA_PATH, is required.
  
== Configuring ==
+
cat > /etc/profile.d/50-ladspa.sh << "EOF"
 
+
export LADSPA_PATH=/usr/lib/ladspa:/usr/lib32/ladspa:/usr/lib64/ladspa
'''<font style="color: green">This section should contain information about the post-installation configuration of a package, bootscript(s), other files, creating directories. Omit this section if there is no post-installation configuration required.</font>'''
 
  
 
== Contents ==
 
== Contents ==
 
'''<font style="color: green">You can find an application [[User:Weibullguy|here]] that can be used to make creating this table reasonably pain free.</font>'''
 
  
 
{| style="text-align: left;"
 
{| style="text-align: left;"
 
|-valign="top"
 
|-valign="top"
 
!Installed Directories:
 
!Installed Directories:
|/path/to/dir
+
|/usr/lib{,32,64}/ladspa
 
|-valign="top"
 
|-valign="top"
 
!Installed Programs:
 
!Installed Programs:
|Program 1, Program 2
+
|analyseplugin, applyplugin, listplugins
 
|-valign="top"
 
|-valign="top"
 
!Installed Libraries:
 
!Installed Libraries:
|library1.{a,so}, library2.{a,so}
+
|amp.so, delay.so, filter.so, noise.so, sine.so
 
|}
 
|}
  
Line 143: Line 141:
 
{| style="text-align: left;"
 
{| style="text-align: left;"
 
|-valign="top"
 
|-valign="top"
!Program 1
+
!analyseplugin, applyplugin, listplugins
|is a program that converts pennies to dollars.
+
|are tools for inspecting and testing ladspa plug-ins.
 
|-valign="top"
 
|-valign="top"
!Program 2
+
!amp.so, delay.so, filter.so, noise.so, sine.so
|is a program that converts dollars to pennies.
+
|are sample plug-ins
 
|-valign="top"
 
|-valign="top"
!library1.{so,a}
+
! /usr/include/ladspa.h
|is a library that contains functions necessary to convert from dollars to pennies and vice versa.
+
| is the API, in its entirety. The comments in this (well-commented) header file comprise the API documentation.
 
|}
 
|}
  
[[Category:<PUT APPROPRIATE CATEGORY HERE>]] '''<font style="color: green">See http://cblfs.cross-lfs.org/index.php/Special:Categories for a list of categories.  Likely your package will fit in one of the existing categories.  If not, and think long and hard about it, create a new category.'''
+
[[Category:<Programming>]]

Revision as of 20:49, 20 July 2009

Download Source: URL - http://www.ladspa.org/download/ladspa_sdk_1.13.tgz

}


Introduction to LADSPA

LADSPA is the "Linux Audio Developer's Simple Programming API," whose goal is to provide a versatile audio plug-in capability similar to VST. It is deliberately designed to be extremely simple. As described on the project web site, "The 'S' in 'LADSPA' is meant seriously." The LADSPA development "framework" consists of just one C header file, plus the development tools you will build here.

Project Homepage: http://www.ladspa.org


Common Build Instructions

The build system is not autotools based. However, the makefile is so simple that you will probably want to simply edit and run the makefile manually.

Build the package

cd src
edit makefile
    INSTALL_PLUGINS_DIR = ...
    INSTALL_INCLUDE_DIR = ...
    INSTALL_BINARY_DIR = ...
make

Install the package

make install
create multiarch wrappers for all 3 binaries

Here is a script that automates this process, while also adding DESTDIR capability, which is missing in the original makefile:

cat > build.sh << "EOF"
: ${CLFS_LIB32:="lib"}
: ${CLFS_LIBN32:="lib32"}
: ${CLFS_LIB64:="lib64"}
: ${CLFS_LIB:="lib"}
eval CLFS_LIB='$'CLFS_LIB${USE_ARCH} &&
eval BUILD='$'BUILD${USE_ARCH} &&
eval LD_BUILD='$'LD_BUILD${USE_ARCH} &&
pushd src &&
if [ -e makefile-original ]; then

    make clean
    mv -f -v makefile-original makefile

fi

CLFS_LIB=${CLFS_LIB} \
sed -i-original \
    -e 's/$(INSTALL_PLUGINS_DIR)/$(DESTDIR)$(INSTALL_PLUGINS_DIR)/g' \
    -e 's/$(INSTALL_INCLUDE_DIR)/$(DESTDIR)$(INSTALL_INCLUDE_DIR)/g' \
    -e 's/$(INSTALL_BINARY_DIR)/$(DESTDIR)$(INSTALL_BINARY_DIR)/g' \
    -e "s|/usr/local|/usr|g" \
    -e "s|/lib/|/${CLFS_LIB}/|g" \
    makefile &&

make \
    DESTDIR=${DESTDIR} \
    CC="gcc ${BUILD}" \
    CPP="g++ ${BUILD}" \
    LD="ld ${LD_BUILD}" &&

make install &&

if [ "$USE_ARCH" != "" ]; then

    mv -v ${DESTDIR}/usr/bin/analyseplugin ${DESTDIR}/usr/bin/analyseplugin-${USE_ARCH} &&
    mv -v ${DESTDIR}/usr/bin/applyplugin ${DESTDIR}/usr/bin/applyplugin-${USE_ARCH} &&
    mv -v ${DESTDIR}/usr/bin/listplugins ${DESTDIR}/usr/bin/listplugins-${USE_ARCH}

fi

if [ "${USE_ARCH}" == "64" ]; then

    ln -sfv multiarch_wrapper ${DESTDIR}/usr/bin/analyseplugin &&
    ln -sfv multiarch_wrapper ${DESTDIR}/usr/bin/applyplugin &&
    ln -sfv multiarch_wrapper ${DESTDIR}/usr/bin/listplugins

fi

popd
EOF

chmod +x build.sh


Non-Multilib

Compile and install the package:

./build.sh

Multilib

32Bit

Compile and install the package:

USE_ARCH=32 ./build.sh

N32

Compile and install the package:

To Do: (Please Contribute. It is intended that "USE_ARCH=N32 ./build.sh" should work.)

64Bit

Compile and install the package:

USE_ARCH=64 ./build.sh

Configuring

An environment variable, LADSPA_PATH, is required.

cat > /etc/profile.d/50-ladspa.sh << "EOF"
export LADSPA_PATH=/usr/lib/ladspa:/usr/lib32/ladspa:/usr/lib64/ladspa

Contents

Installed Directories: /usr/lib{,32,64}/ladspa
Installed Programs: analyseplugin, applyplugin, listplugins
Installed Libraries: amp.so, delay.so, filter.so, noise.so, sine.so

Short Descriptions

analyseplugin, applyplugin, listplugins are tools for inspecting and testing ladspa plug-ins.
amp.so, delay.so, filter.so, noise.so, sine.so are sample plug-ins
/usr/include/ladspa.h is the API, in its entirety. The comments in this (well-commented) header file comprise the API documentation.

[[Category:<Programming>]]

Retrieved from "?title=LADSPA&oldid=18757"