[oe-commits] org.oe.dev merge of '7fe4c06ce30cce4695a8e59d2e11f23206fd87c0'

hrw commit openembedded-commits at lists.openembedded.org
Thu Nov 1 16:39:46 UTC 2007


merge of '7fe4c06ce30cce4695a8e59d2e11f23206fd87c0'
     and 'c7ee16004be313b8918a1fa2f0bdd3b70fa6d398'

Author: hrw at openembedded.org
Branch: org.openembedded.dev
Revision: 7475256fe1fff23a3ffc7973d86942659360b56b
ViewMTN: http://monotone.openembedded.org/revision/info/7475256fe1fff23a3ffc7973d86942659360b56b
Files:
1
packages/alsa/alsa-lib_1.0.15.bb
packages/alsa/alsa-oss_1.0.15.bb
packages/alsa/alsa-utils_1.0.15.bb
packages/gsm/pty
packages/gsm/pty/pty.c
packages/gsm/pty_0.0.bb
packages/vte/vte_0.16.8.bb
Diffs:

#
# mt diff -r7fe4c06ce30cce4695a8e59d2e11f23206fd87c0 -r7475256fe1fff23a3ffc7973d86942659360b56b
#
# 
# 
# add_file "packages/alsa/alsa-lib_1.0.15.bb"
#  content [2e5d3f16e83a9a0cb85abacde76247c41534ae70]
# 
# add_file "packages/alsa/alsa-oss_1.0.15.bb"
#  content [7ca8c991dd2976fe24201983328f2b96c073e203]
# 
# add_file "packages/alsa/alsa-utils_1.0.15.bb"
#  content [a96036a12ca994ce724e4448bb897a719e94a500]
# 
============================================================
--- packages/alsa/alsa-lib_1.0.15.bb	2e5d3f16e83a9a0cb85abacde76247c41534ae70
+++ packages/alsa/alsa-lib_1.0.15.bb	2e5d3f16e83a9a0cb85abacde76247c41534ae70
@@ -0,0 +1,44 @@
+DESCRIPTION = "Alsa sound library"
+HOMEPAGE = "http://www.alsa-project.org"
+SECTION = "libs/multimedia"
+LICENSE = "GPL"
+
+# configure.in sets -D__arm__ on the command line for any arm system
+# (not just those with the ARM instruction set), this should be removed,
+# (or replaced by a permitted #define).
+#FIXME: remove the following
+ARM_INSTRUCTION_SET = "arm"
+
+SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-${PV}.tar.bz2 \
+           file://fix-tstamp-declaration.patch;patch=1"
+
+inherit autotools pkgconfig
+
+require alsa-fpu.inc
+EXTRA_OECONF += "${@get_alsa_fpu_setting(bb, d)} "
+
+EXTRA_OECONF = "--with-cards=pdaudiocf --with-oss=yes --disable-python"
+
+do_stage () {
+	oe_libinstall -so -C src libasound ${STAGING_LIBDIR}/
+	install -d ${STAGING_INCDIR}/alsa/sound
+	install -m 0644 include/*.h ${STAGING_INCDIR}/alsa/
+	install -m 0644 include/sound/ainstr*.h ${STAGING_INCDIR}/alsa/sound/
+	install -d ${STAGING_DATADIR}/aclocal
+	install -m 0644 utils/alsa.m4 ${STAGING_DATADIR}/aclocal/
+}
+
+PACKAGES =+ "alsa-server libasound alsa-conf-base alsa-conf alsa-doc alsa-dev"
+FILES_${PN}-dbg += "${libdir}/alsa-lib/*/.debu*"
+FILES_libasound = "${libdir}/libasound.so.*"
+FILES_alsa-server = "${bindir}/*"
+FILES_alsa-conf = "${datadir}/alsa/"
+FILES_alsa-dev += "${libdir}/pkgconfig/ /usr/include/ ${datadir}/aclocal/*"
+FILES_alsa-conf-base = "\
+${datadir}/alsa/alsa.conf \
+${datadir}/alsa/cards/aliases.conf \
+${datadir}/alsa/pcm/default.conf \
+${datadir}/alsa/pcm/dmix.conf \
+${datadir}/alsa/pcm/dsnoop.conf"
+
+RDEPENDS_libasound = "alsa-conf-base"
============================================================
--- packages/alsa/alsa-oss_1.0.15.bb	7ca8c991dd2976fe24201983328f2b96c073e203
+++ packages/alsa/alsa-oss_1.0.15.bb	7ca8c991dd2976fe24201983328f2b96c073e203
@@ -0,0 +1,17 @@
+DESCRIPTION = "Alsa OSS Compatibility Package"
+SECTION = "libs/multimedia"
+LICENSE = "GPL"
+DEPENDS = "alsa-lib"
+
+SRC_URI = "ftp://ftp.alsa-project.org/pub/oss-lib/alsa-oss-${PV}.tar.bz2"
+
+inherit autotools 
+
+do_configure_prepend () {
+	touch NEWS README AUTHORS ChangeLog
+}
+
+do_stage () {
+	oe_libinstall -C alsa -a -so libaoss ${STAGING_LIBDIR}
+	oe_libinstall -C alsa -a -so libalsatoss ${STAGING_LIBDIR}
+}
============================================================
--- packages/alsa/alsa-utils_1.0.15.bb	a96036a12ca994ce724e4448bb897a719e94a500
+++ packages/alsa/alsa-utils_1.0.15.bb	a96036a12ca994ce724e4448bb897a719e94a500
@@ -0,0 +1,61 @@
+DESCRIPTION = "ALSA Utilities"
+HOMEPAGE = "http://www.alsa-project.org"
+SECTION = "console/utils"
+LICENSE = "GPL"
+DEPENDS = "alsa-lib ncurses"
+
+SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2"
+
+# lazy hack. needs proper fixing in gettext.m4, see
+# http://bugs.openembedded.org/show_bug.cgi?id=2348
+# please close bug and remove this comment when properly fixed
+#
+EXTRA_OECONF_linux-uclibc = "--disable-nls"
+EXTRA_OECONF_linux-uclibcgnueabi = "--disable-nls"
+
+inherit autotools
+
+# This are all packages that we need to make. Also, the now empty alsa-utils
+# ipk depend on them.
+
+PACKAGES += "\
+             alsa-utils-alsamixer \
+             alsa-utils-midi \
+             alsa-utils-aplay \
+             alsa-utils-amixer \
+             alsa-utils-aconnect \
+             alsa-utils-iecset \
+             alsa-utils-speakertest \
+             alsa-utils-aseqnet \
+             alsa-utils-aseqdump \
+             alsa-utils-alsaconf \
+             alsa-utils-alsactl "
+
+# We omit alsaconf, because
+# a) this is a bash script
+# b) it creates config files not suitable for OE-based distros
+
+FILES_${PN} = ""
+FILES_alsa-utils-aplay       = "${bindir}/aplay ${bindir}/arecord"
+FILES_alsa-utils-amixer      = "${bindir}/amixer"
+FILES_alsa-utils-alsamixer   = "${bindir}/alsamixer"
+FILES_alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/"
+FILES_alsa-utils-midi        = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bindir}/amidi"
+FILES_alsa-utils-aconnect    = "${bindir}/aconnect"
+FILES_alsa-utils-aseqnet     = "${bindir}/aseqnet"
+FILES_alsa-utils-iecset      = "${bindir}/iecset"
+FILES_alsa-utils-alsactl     = "${sbindir}/alsactl"
+FILES_alsa-utils-aseqdump    = "${bindir}/aseqdump"
+FILES_alsa-utils-alsaconf    = "${sbindir}/alsaconf"
+
+DESCRIPTION_alsa-utils-aplay        = "play (and record) sound files via ALSA"
+DESCRIPTION_alsa-utils-amixer       = "command-line based control for ALSA mixer and settings"
+DESCRIPTION_alsa-utils-alsamixer    = "ncurses based control for ALSA mixer and settings"
+DESCRIPTION_alsa-utils-speakertest  = "ALSA surround speaker test utility"
+DESCRIPTION_alsa-utils-midi         = "miscalleanous MIDI utilities for ALSA"
+DESCRIPTION_alsa-utils-aconnect     = "ALSA sequencer connection manager"
+DESCRIPTION_alsa-utils-aseqnet      = "network client/server on ALSA sequencer"
+DESCRIPTION_alsa-utils-alsactl      = "saves/restores ALSA-settings in /etc/asound.state"
+DESCRIPTION_alsa-utils-alsaconf     = "a bash script that creates ALSA configuration files"
+
+ALLOW_EMPTY_alsa-utils = "1"


#
# mt diff -rc7ee16004be313b8918a1fa2f0bdd3b70fa6d398 -r7475256fe1fff23a3ffc7973d86942659360b56b
#
# 
# 
# add_dir "packages/gsm/pty"
# 
# add_file "packages/gsm/pty/pty.c"
#  content [7a2613f0b781a75de9ea3f481fc8d3790867d26e]
# 
# add_file "packages/gsm/pty_0.0.bb"
#  content [8ac2b04ce6b9a1f198e37c508f7a21b989c2d21c]
# 
# patch "packages/vte/vte_0.16.8.bb"
#  from [4642ff116b6101c8293be250f4507ca114aa02b7]
#    to [1b97608593a056a762e15abfbe4eed0386f61689]
# 
============================================================
--- packages/gsm/pty/pty.c	7a2613f0b781a75de9ea3f481fc8d3790867d26e
+++ packages/gsm/pty/pty.c	7a2613f0b781a75de9ea3f481fc8d3790867d26e
@@ -0,0 +1,141 @@
+/*
+ * Copyright (C) 2007 OpenedHand, Ltd.
+ * Contact: <andrew at o-hand.com>
+ *
+ * This file is licensed under the terms of GNU GPL v2.
+ *
+ * $ pty [<hostname|ip> <port>]
+ * Opens a new pseudo terminal and forwards data between standard input
+ * and the pty and between the pty and standard output.  If a hostname and
+ * port number are given, reads and writes to the socket instead of
+ * standard input or output.  Path to the slave pty is printed on standard
+ * error.
+ */
+#include <unistd.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netdb.h>
+
+#define CHECK(val, name)	\
+	if (val == -1) {	\
+		fprintf(stderr, #name ": %s (%i)\n", strerror(errno), errno);\
+		return -errno;	\
+	}
+
+#define min(a, b)	((a) < (b) ? (a) : (b))
+#define max(a, b)	((a) > (b) ? (a) : (b))
+
+static int forward2(int in0, int out0, int in1, int out1) {
+	int inpos = 0, inlen = 0, outpos = 0, outlen = 0, ret, n;
+	fd_set rfds, wfds;
+	char in[0x100], out[0x100];
+
+	n = max(max(in0, in1), max(out0, out1)) + 1;
+	while (1) {
+		FD_ZERO(&rfds);
+		FD_ZERO(&wfds);
+		if (inlen < sizeof(in))
+			FD_SET(in0, &rfds);
+		if (outlen < sizeof(out))
+			FD_SET(in1, &rfds);
+		if (inlen)
+			FD_SET(out0, &wfds);
+		if (outlen)
+			FD_SET(out1, &wfds);
+		CHECK(select(n, &rfds, &wfds, 0, 0), select);
+
+		if (FD_ISSET(in0, &rfds)) {
+			ret = (inpos + inlen) & (sizeof(in) - 1);
+			ret = read(in0, in + ret,
+					sizeof(in) - max(ret, inlen));
+			CHECK(ret, read(0));
+			if (!ret)
+				return 0;
+			inlen += ret;
+		}
+		if (FD_ISSET(in1, &rfds)) {
+			ret = (outpos + outlen) & (sizeof(out) - 1);
+			ret = read(in1, out + ret,
+					sizeof(out) - max(ret, outlen));
+			if (ret > 0)
+				outlen += ret;
+		}
+		if (FD_ISSET(out0, &wfds)) {
+			ret = write(out0, in + inpos,
+					min(sizeof(in) - inpos, inlen));
+			CHECK(ret, write(pty));
+			inlen -= ret;
+			inpos += ret;
+			inpos &= sizeof(in) - 1;
+		}
+		if (FD_ISSET(out1, &wfds)) {
+			ret = write(out1, out + outpos,
+					min(sizeof(out) - outpos, outlen));
+			CHECK(ret, write(1));
+			outlen -= ret;
+			outpos += ret;
+			outpos &= sizeof(out) - 1;
+		}
+	}
+
+	return pause();
+}
+
+int main(int argc, char *argv[], char **envp) {
+	int sock, fd;
+	struct sockaddr_in sa;
+	struct hostent *hi;
+
+	fd = posix_openpt(O_RDWR | O_NOCTTY);
+	CHECK(fd, open);
+	CHECK(grantpt(fd), grantpt);
+	CHECK(unlockpt(fd), unlockpt);
+
+	fprintf(stderr, "%s\n", ptsname(fd));
+#if 0
+	/* Connect stdin & stdout with a pty */
+	CHECK(close(0), close(0));
+	CHECK(close(1), close(1));
+	CHECK(dup(fd), dup(0));
+	CHECK(dup(fd), dup(1));
+	return pause();
+#endif
+	if (argc != 3)
+		return forward2(0, fd, fd, 1);
+
+#if 0
+	/* Connect a sub-process with a pty */
+	for (len = 0, i = 1; i < argc; i ++)
+		len += strlen(argv[i]) + 4;
+	param = malloc(len);
+	strcpy(param, argv[1]);
+	for (i = 2; i < argc; i ++)
+		sprintf(param + strlen(param), " \"%s\"", argv[i]);
+	i = fileno(popen(param, O_RDWR));
+	CHECK(i, popen);
+	free(param);
+	return forward2(i, fd, fd, i);
+#endif
+
+	/* Connect a TCP socket with a pty */
+	hi = gethostbyname(argv[1]);
+	if (!hi) {
+		errno = h_errno;
+		CHECK(-1, gethostbyname);
+	}
+	sa.sin_family = hi->h_addrtype;
+	memcpy(&sa.sin_addr.s_addr, hi->h_addr_list[0], hi->h_length);
+	sa.sin_port = htons(strtol(argv[2], 0, 0));
+	sock = socket(AF_INET, SOCK_STREAM, 0);
+
+	CHECK(sock, socket);
+	CHECK(connect(sock, (struct sockaddr *) &sa, sizeof(sa)), connect);
+	return forward2(sock, fd, fd, sock);
+}
============================================================
--- packages/gsm/pty_0.0.bb	8ac2b04ce6b9a1f198e37c508f7a21b989c2d21c
+++ packages/gsm/pty_0.0.bb	8ac2b04ce6b9a1f198e37c508f7a21b989c2d21c
@@ -0,0 +1,15 @@
+DESCRIPTION = "Forwards a socket to a tty"
+LICENSE = "GPLv2"
+
+SRC_URI = "file://pty.c"
+
+do_compile() {
+        cp ${WORKDIR}/*.c ${S}/
+	${CC} pty.c -o pty -I${STAGING_INCDIR} -L${STAGING_LIBDIR}
+}
+
+do_install() {
+        install -d ${D}${bindir}
+	install -m 0755 pty ${D}${bindir}/
+}
+
============================================================
--- packages/vte/vte_0.16.8.bb	4642ff116b6101c8293be250f4507ca114aa02b7
+++ packages/vte/vte_0.16.8.bb	1b97608593a056a762e15abfbe4eed0386f61689
@@ -1,5 +1,6 @@ LICENSE = "LGPL"
 DESCRIPTION = "vte is a virtual terminal emulator"
 LICENSE = "LGPL"
+DEPENDS += " glib-2.0 gtk+"
 RDEPENDS = "termcap"
 PR = "r3"
 






More information about the Openembedded-commits mailing list