Uncategorised
- Details
- Written by Pham Ngoc Hai
New vhba-1.0.0.ebuild with patches
This needs the two patches from here:
makefile.patch
scatterlist.patch
There are two more files you need to download from here in order to make this ebuild work:
cdemud.conf.d
cdemud.init.d
[code]# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit linux-info linux-mod eutils
DESCRIPTION="VHBA module provides Virtual (SCSI) Host Bus Adapter \
for the cdemu suite"
HOMEPAGE="http://cdemu.org"
SRC_URI="mirror://sourceforge/cdemu/vhba-module-${PV}.tar.bz2"
LICENSE="GPL-V2"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~hppa ~ppc"
IUSE=""
DEPEND=">=virtual/linux-sources-2.6.19"
RDEPEND=""
S="${WORKDIR}/vhba-module-${PV}"
MODULE_NAMES="vhba(block:${S})"
BUILD_TARGETS="clean modules"
pkg_setup() {
CONFIG_CHECK="~BLK_DEV_SR ~CHR_DEV_SG"
check_extra_config
}
src_unpack() {
unpack ${A}
cd ${S}
einfo "Patching Makefile"
epatch "${FILESDIR}"/makefile.patch || die "Failed to patch Makefile"
if kernel_is 2 6 24 ; then
einfo "Patching scatterlist"
epatch "${FILESDIR}"/scatterlist.patch || die "Failed to patch scatterlist"
fi
}
src_compile() {
linux-mod_src_compile || die "Error: building module failed!"
}
src_install() {
KV_OBJ="ko"
linux-mod_src_install || die "Error: installing module failed!"
UDEV_RULES="/etc/udev/rules.d/70-vhba.rules"
einfo "Generating UDEV-rules ..."
mkdir -p "${D}"/${UDEV_RULES%/*}
echo -e "# do not edit this file, it will be overwritten on update\n#" \
> "${D}"/${UDEV_RULES}
echo -e "KERNEL==\"vhba_ctl\", NAME=\"%k\", MODE=\"0660\", OWNER=\"root\",GROUP=\"cdemu\"" >> "${D}"/${UDEV_RULES}
}
pkg_postinst() {
einfo "Generating cdemu group ..."
enewgroup cdemu
elog "Don't forget to add yourself to the cdemu group "
elog "if you want to be able to use virtual cdemu devices."
linux-mod_pkg_postinst
}
pkg_postrm() {
linux-mod_pkg_postrm
}[/code]
- Details
- Written by Pham Ngoc Hai
Patch for vhba-module to work with kernel >= 2.6.23
This is my patch to make vhba-module compiled with kernel
>= 2.6.23 with commit
18dabf473e15850c0dbc8ff13ac1e2806d542c15
If you got error like:
error: 'struct scatterlist' has no member named 'page'
then this patch is for you.
Tested with kernel 2.6.24-rc4 on x86_64 arch [code]
--- vhba-module-1.0.0/vhba.c 2007-12-20 02:56:57.000000000 +0100
+++ vhba-module-new/vhba.c 2008-01-06 08:49:18.000000000 +0100
@@ -26,6 +26,7 @@
#include <linux/platform_device.h>
#include <linux/miscdevice.h>
#include <linux/poll.h>
+#include <linux/scatterlist.h>
#include <asm/uaccess.h>
#include <scsi/scsi.h>
#include <scsi/scsi_host.h>
@@ -520,7 +521,7 @@
}
uaddr += len;
- kaddr = kmap_atomic(sg[i].page, KM_USER0);
+ kaddr = kmap_atomic(sg_page(&sg[i]), KM_USER0);
memcpy(kaddr + sg[i].offset, kbuf, len);
kunmap_atomic(kaddr, KM_USER0);
[/code]
- Details
- Written by Pham Ngoc Hai
Patch for vhba-1.0.0 Makefile to use EXTRA_CFLAGS and correct MAKE value
If you see make prints warning like:
warning: jobserver unavailable: using -j1. Add `+' to parent make rule.
then apply this patch.
(This only happen if this is a submake) [code]--- vhba-module-1.0.0/Makefile 2007-12-20 02:56:57.000000000 +0100
+++ vhba-module-new/Makefile 2008-01-10 21:59:56.000000000 +0100
@@ -1,21 +1,20 @@
VHBA_VERSION = 1.0.0
PACKAGE = vhba-module-$(VHBA_VERSION)
-CFLAGS += -DVHBA_VERSION=\"$(VHBA_VERSION)\"
+EXTRA_CFLAGS += -DVHBA_VERSION=\"$(VHBA_VERSION)\"
obj-m += vhba.o
PWD ?= `pwd`
KDIR := /lib/modules/`uname -r`/build
-KMAKE := $(MAKE) -C $(KDIR) M=$(PWD)
all: modules
modules:
- $(KMAKE) modules
+ $(MAKE) -C $(KDIR) M=$(PWD) modules
module_install:
- $(KMAKE) modules_install
+ $(MAKE) -C $(KDIR) M=$(PWD) modules_install
install: module_install
@@ -24,7 +23,7 @@
cp Makefile $(distdir)
clean:
- $(KMAKE) clean
+ $(MAKE) -C $(KDIR) M=$(PWD) clean
rm -fr $(PACKAGE)
dist: dist-gzip[/code]
- Details
- Written by Pham Ngoc Hai
media-sound/baudline/baudline-1.07.ebuild
This is my modified ebuild for Baudline 1.07 with proper binary source for each arch.
The original ebuild is from Ilya Kashirin at https://bugs.gentoo.org/show_bug.cgi?id=202845
You can find this ebuild there as well.
[code]# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $ Ilya Kashirin (This email address is being protected from spambots. You need JavaScript enabled to view it.)
inherit eutils versionator
MY_PV=$(replace_version_separator 2 '')
DESCRIPTION="Baudline is a time-frequency browser designed for scientific visualization of the spectral domain. Signal analysis is performed by Fourier, correlation, and raster transforms that create colorful spectrograms with vibrant detail. Conduct test and measurement experiments with the built in function generator, or play back audio files with a multitude of effects and filters. The baudline signal analyzer combines fast digital signal processing, versatile high speed displays, and continuous capture tools for hunting down and studying elusive signal characteristics."
HOMEPAGE="http://www.baudline.com/"
if use x86 ; then
MY_ARCH="linux_i686"
elif use amd64 ; then
MY_ARCH="linux_x86_64"
elif use ppc ; then
MY_ARCH="linux_ppc"
elif use sparc ; then
MY_ARCH="solaris_sparc"
fi
SRC_URI="http://www.baudline.com/baudline_${MY_PV}_${MY_ARCH}.tar.gz"
LICENSE="AS-IS"
SLOT="0"
KEYWORDS="~x86"
RESTRICT="fetch"
RDEPEND="x11-libs/libXau
x11-libs/libX11
x11-libs/libXt
x11-libs/libXext
x11-libs/libSM
x11-libs/libxcb
jack? ( media-sound/jack-audio-connection-kit )
"
DEPEND="${RDEPEND}"
IUSE="jack"
if use x86 ; then
MY_ARCH="linux_i686"
elif use amd64 ; then
MY_ARCH="linux_x86_64"
elif use ppc ; then
MY_ARCH="linux_ppc"
elif use sparc ; then
MY_ARCH="solaris_sparc"
fi
S=${WORKDIR}/baudline_${MY_PV}_${MY_ARCH}
INSTALLDIR="/opt/${PN}"
pkg_nofetch() {
einfo "May not be automatically fetched due to licensing"
einfo "restrictions. You must manually fetch baudline_${MY_PV}_${MY_ARCH}.tar.gz from"
einfo "${SRC_URI}. Once ${PN}"
einfo "has been downloaded, move it to ${DISTDIR} and then"
einfo "restart this ebuild"
}
src_unpack () {
unpack ${A}
cd ${S}
}
src_install() {
dodir /${INSTALLDIR}/
cp ${S}/baudline "${D}/${INSTALLDIR}/" || die "Install failed!"
dosym ${INSTALLDIR}/baudline /usr/bin/baudline
cp -R ${S}/icons "${D}/${INSTALLDIR}/" || die "Install failed!"
cp -R ${S}/palettes "${D}/${INSTALLDIR}/" || die "Install failed!"
if use jack; then
cp ${S}/baudline_jack "${D}/${INSTALLDIR}/" || die "Install failed!"
dosym ${INSTALLDIR}/baudline_jack /usr/bin/baudline_jack
fi
doicon ${FILESDIR}/baudline.png
make_desktop_entry ${PN} ${PN} ${PN}.png "AudioVideo;Player"
dodoc README mailcap.txt mime.types.txt
}
pkg_postinst() {
einfo "Baudline has been installed."
einfo "to run Baudline use \"baudline\""
if use jack; then
einfo "To run Baudline with Jack support use \"baudline_jack\""
fi
einfo "More information about usage Baudline you can obtain at http://baudline.com/manual/index.html"
}[/code]
- Details
- Written by Pham Ngoc Hai
media-plugins/audacious-mac/audacious-mac-0.3.10.ebuild
After searching for awhile, I decided to write my own ebuild for audacious-mac plugin, a plugin to play monkey audio files (.ape) with audacious.
Here it is
[code]# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
DESCRIPTION="Monkey Audio plugin for audacious"
HOMEPAGE="http://www.netswarm.net"
SRC_URI="http://www.netswarm.net/misc/${PN}-${PV}.tar.gz"
KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
SLOT="0"
LICENSE="Free"
IUSE=""
RESTRICT="mirror"
RDEPEND="media-libs/mac-port
>=media-sound/audacious-1.4"
DEPEND="${RDEPEND}"
src_compile() {
econf || die "econf failed"
emake || die "emake failed"
}
src_install() {
emake DESTDIR="${D}" install || die "emake install failed"
}[/code]
Page 8 of 11