smalltalk: Introduce the code from an internal git repository

This commit is contained in:
Holger Hans Peter Freyther 2013-01-04 06:32:56 +08:00
commit 7563b0a378
19 changed files with 483 additions and 0 deletions

View File

@ -0,0 +1,11 @@
DESCRITOPN = "ASN1 Code to work on TCAP/MAP/Camel..."
HOMEPAGE = "http://osmocom.org"
require smalltalk-package.inc
S = "${WORKDIR}/git"
SRC_URI = "git://git.osmocom.org/smalltalk/osmo-st-asn1;protocol=git;branch=master"
SRCREV = "b77da9be3fd1bc1e2327a3941b47dee69660da56"
PV = "0.0.1+gitr${SRCREV}"
PR = "${INC_PR}.0"

View File

@ -0,0 +1,13 @@
DESCRITOPN = ""
HOMEPAGE = "http://osmocom.org"
require smalltalk-package.inc
RDEPENDS += "osmo-st-logging"
S = "${WORKDIR}/git"
SRC_URI = "git://git.osmocom.org/smalltalk/osmo-st-core;protocol=git;branch=master"
SRCREV = "22f6836925cb1c682045497d214773a3d04e60b2"
PV = "0.0.1+gitr${SRCREV}"
PR = "${INC_PR}.0"

View File

@ -0,0 +1,13 @@
DESCRITOPN = "GSM utilities based on osmo-network for SCCP,BSSAP,BSSMAP,GSM48"
HOMEPAGE = "http://osmocom.org"
require smalltalk-package.inc
RDEPENDS += "osmo-st-core osmo-st-network osmo-st-logging"
S = "${WORKDIR}/git"
SRC_URI = "git://git.osmocom.org/smalltalk/osmo-st-gsm;protocol=git;branch=master"
SRCREV = "66bbafcf373af876eb6b590603e9485094ecebc1"
PV = "0.0.1+gitr${SRCREV}"
PR = "${INC_PR}.0"

View File

@ -0,0 +1,11 @@
DESCRITOPN = "A Smalltalk logging framework inspired by libosmocore's logging facilities"
HOMEPAGE = "http://osmocom.org"
require smalltalk-package.inc
S = "${WORKDIR}/git"
SRC_URI = "git://git.osmocom.org/smalltalk/osmo-st-logging;protocol=git;branch=master"
SRCREV = "39eeb846821a2b1e6b0eb1c932eb4c1326db8a28"
PV = "0.0.2+gitr${SRCREV}"
PR = "${INC_PR}.0"

View File

@ -0,0 +1,13 @@
DESCRITOPN = "This is a MGCP CallAgent written in Smalltalk"
HOMEPAGE = "http://osmocom.org"
require smalltalk-package.inc
RDEPENDS += "osmo-st-logging osmo-st-core"
S = "${WORKDIR}/git"
SRC_URI = "git://git.osmocom.org/smalltalk/osmo-st-mgcp;protocol=git;branch=master"
SRCREV = "e84e9ce915d91030cf97fd9d23c42d4d92729f67"
PV = "0.0.1+gitr${SRCREV}"
PR = "${INC_PR}.0"

View File

@ -0,0 +1,13 @@
DESCRITOPN = "This is a simple MSC done in Smalltalk"
HOMEPAGE = "http://osmocom.org"
require smalltalk-package.inc
RDEPENDS += "osmo-st-logging osmo-st-network osmo-st-gsm"
S = "${WORKDIR}/git"
SRC_URI = "git://git.osmocom.org/smalltalk/osmo-st-msc;protocol=git;branch=master"
SRCREV = "acef6cb076874ec187fbc4757201bc9e825f8856"
PV = "0.0.1+gitr${SRCREV}"
PR = "${INC_PR}.0"

View File

@ -0,0 +1,13 @@
DESCRITOPN = "osmo-network a module for networking (SCCP, M3UA, IPA) protocol handling"
HOMEPAGE = "http://osmocom.org"
require smalltalk-package.inc
RDEPENDS += "osmo-st-logging"
S = "${WORKDIR}/git"
SRC_URI = "git://git.osmocom.org/smalltalk/osmo-st-network;protocol=git;branch=master"
SRCREV = "d7b2323602771681119bdb0507de3fc58f519aae"
PV = "0.0.2+gitr${SRCREV}"
PR = "${INC_PR}.0"

View File

@ -0,0 +1,11 @@
DESCRITOPN = ""
HOMEPAGE = "http://osmocom.org"
require smalltalk-package.inc
S = "${WORKDIR}/git"
SRC_URI = "git://git.osmocom.org/smalltalk/osmo-st-sip;protocol=git;branch=master"
SRCREV = "e134b1e825206b6cc08ab5a24c3f82e40e0f65ac"
PV = "0.0.1+gitr${SRCREV}"
PR = "${INC_PR}.0"

View File

@ -0,0 +1,13 @@
DESCRITOPN = "A simple test phone to do a LU and place a call"
HOMEPAGE = "http://osmocom.org"
require smalltalk-package.inc
RDEPENDS += "osmo-st-network osmo-st-logging osmo-st-gsm"
S = "${WORKDIR}/git"
SRC_URI = "git://git.osmocom.org/smalltalk/osmo-st-testphone;protocol=git;branch=master"
SRCREV = "99841c28a6d3a50cf40fa019e8a9fd0c51f3da94"
PV = "0.0.1+gitr${SRCREV}"
PR = "${INC_PR}.0"

View File

@ -0,0 +1,13 @@
DESCRITOPN = ""
HOMEPAGE = "https://gitorious.org/gnu-smalltalk-ports/petitparser"
require smalltalk-package.inc
RDEPENDS += "petitparser"
S = "${WORKDIR}/git"
SRC_URI = "git://gitorious.org/gnu-smalltalk-ports/petitparser-tests.git;protocol=git;branch=master"
SRCREV = "4b112d1f1af9692807bd28ae192b1fdc69f8c564"
PV = "0.0.1+gitr${SRCREV}"
PR = "${INC_PR}.0"

View File

@ -0,0 +1,11 @@
DESCRITOPN = ""
HOMEPAGE = "https://gitorious.org/gnu-smalltalk-ports/petitparser"
require smalltalk-package.inc
S = "${WORKDIR}/git"
SRC_URI = "git://gitorious.org/gnu-smalltalk-ports/petitparser.git;protocol=git;branch=master"
SRCREV = "9b76e8cf054cb6bdbc7bc5635c3126a2fefd1a85"
PV = "0.0.1+gitr${SRCREV}"
PR = "${INC_PR}.0"

View File

@ -0,0 +1,17 @@
DEPENDS = "smalltalk"
INC_PR="r4"
do_compile() {
gst < /dev/null
gst-package --target-directory=. package.xml
}
do_install () {
install -d ${D}${datadir}/smalltalk
install -m 0644 ${S}/*.star ${D}${datadir}/smalltalk
}
FILES_${PN} += "${datadir}/smalltalk"

View File

@ -0,0 +1,91 @@
>From f711b657b29bf94792da89612328b5d32a5ebf70 Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <address@hidden>
Date: Thu, 22 Sep 2011 10:33:36 +0200
Subject: [PATCH] improve Delay and millisecondClock behavior across image
save
2011-09-22 Paolo Bonzini <address@hidden>
* kernel/Delay.st: Restart pending delays when the image restarts.
* kernel/Time.st: Make the millisecondClockValue monotonic across
image save.
libgst:
2011-09-22 Paolo Bonzini <address@hidden>
* libgst/dict.c: Add the ClockOnImageSave class variable to time.
---
kernel/Delay.st | 8 +++++++-
kernel/Time.st | 9 +++++++--
libgst/dict.c | 2 +-
5 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/kernel/Delay.st b/kernel/Delay.st
index fbb46ec..65f21e9 100644
--- a/kernel/Delay.st
+++ b/kernel/Delay.st
@@ -166,7 +166,13 @@ created.'>
sortBlock: [:d1 :d2 | d1 resumptionTime >= d2 resumptionTime].
TimeoutSem := Semaphore new.
DelayProcess := [self runDelayProcess] forkAt: Processor timingPriority.
- TimeoutSem signal "get going"
+ ObjectMemory addDependent: self.
+ self update: #returnFromSnapshot
+ ]
+
+ Delay class >> update: aspect [
+ "Prime the timer event loop when the image starts running."
+ aspect == #returnFromSnapshot ifTrue: [TimeoutSem signal]
]
Delay class >> initialize [
diff --git a/kernel/Time.st b/kernel/Time.st
index 71926d9..d3810e7 100644
--- a/kernel/Time.st
+++ b/kernel/Time.st
@@ -42,6 +42,7 @@ time value, and a block execution timing facility.'>
SecondClockAdjustment := nil.
ClockOnStartup := nil.
+ ClockOnImageSave := nil.
Time class >> utcSecondClock [
"Answer the number of seconds since the midnight of 1/1/1901 (unlike
@@ -143,6 +144,7 @@ time value, and a block execution timing facility.'>
<category: 'initialization'>
SecondClockAdjustment := 86400 * 36159.
+ ClockOnImageSave := 0.
ObjectMemory addDependent: self
]
@@ -150,8 +152,11 @@ time value, and a block execution timing facility.'>
"Private - Initialize the receiver's instance variables"
<category: 'initialization'>
- aspect == #returnFromSnapshot
- ifTrue: [ClockOnStartup := Time primMillisecondClock]
+ | time |
+ aspect == #returnFromSnapshot ifTrue: [
+ ClockOnStartup := Time primMillisecondClock - ClockOnImageSave].
+ aspect == #aboutToSnapshot ifTrue: [
+ ClockOnImageSave := Time millisecondClock].
]
Time class >> now [
diff --git a/libgst/dict.c b/libgst/dict.c
index 806aabe..42b5b6e 100644
--- a/libgst/dict.c
+++ b/libgst/dict.c
@@ -337,7 +337,7 @@ static const class_definition class_info[] = {
{&_gst_time_class, &_gst_magnitude_class,
GST_ISP_FIXED, false, 1,
"Time", "seconds",
- "SecondClockAdjustment ClockOnStartup", NULL },
+ "SecondClockAdjustment ClockOnStartup ClockOnImageSave", NULL },
{&_gst_date_class, &_gst_magnitude_class,
GST_ISP_FIXED, false, 4,
--
1.7.6

View File

@ -0,0 +1,17 @@
--- a/libgst/save.c
+++ b/libgst/save.c
@@ -765,6 +765,13 @@ fixup_object (OOP oop, gst_object dest, gst_object src, int numBytes)
}
}
+ /* File descriptors are invalidated on resume. */
+ else if (is_a_kind_of (class_oop, _gst_file_descriptor_class))
+ {
+ gst_file_stream file = (gst_file_stream) dest;
+ file->fd = _gst_nil_oop;
+ }
+
/* The other case is to reset CFunctionDescriptor objects, so that we'll
relink the external functions when we reload the image. */
else if (is_a_kind_of (class_oop, _gst_c_callable_class))
--

View File

@ -0,0 +1,37 @@
From 2fc74b9ec068a8a594bf507c5c48d61bcb63591f Mon Sep 17 00:00:00 2001
From: Holger Hans Peter Freyther <zecke@selfish.org>
Date: Mon, 30 May 2011 00:09:00 +0200
Subject: [PATCH] scripts/Remote.st: Allow to specify the hostname for the bind
Allow to bind the server to a specific address. The ServerSocket
will not attempt to resolve the string to an address. Do this before.
2011-05-30 Holger Hans Peter Freyther <holger@freyther.de>
* scripts/Remote.st: Resolve the hostname to an address to be
used by Sockets.ServerSocket>>#port:bindTo:.
---
ChangeLog | 5 +++++
scripts/Remote.st | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/scripts/Remote.st b/scripts/Remote.st
index 10f228d..ec65de4 100644
--- a/scripts/Remote.st
+++ b/scripts/Remote.st
@@ -182,10 +182,10 @@ available in the PATH of the remote machine.
opt isNil ifTrue: [
host isNil ifFalse: [ self error: 'multiple hosts are invalid' ].
(arg includes: $@)
- ifFalse: [ host := arg ]
+ ifFalse: [ host := TCP.SocketAddress byName: arg ]
ifTrue: [
login isNil ifFalse: [ self error: 'multiple logins are invalid' ].
- login := arg copyUpTo: $@.
+ login := TCP.SocketAddress byName: (arg copyUpTo: $@).
host := arg copyAfter: $@ ] ].
]
--
1.7.2.5

View File

@ -0,0 +1,78 @@
From c4915d9232edb576dfb9697501370877032288dc Mon Sep 17 00:00:00 2001
From: Gwenael Casaccio <mrgwen@gmail.com>
Date: Tue, 5 Jul 2011 10:34:48 +0200
Subject: [PATCH 1/1] fix resumption of an image that had been created via gst-remote
2011-08-13 Gwenael Casaccio <mrgwen@gmail.com>
* scripts/Remote.st: Suspend/resume server process across snapshots.
---
ChangeLog | 4 ++++
scripts/Remote.st | 37 +++++++++++++++++++++++++++++++++++--
2 files changed, 39 insertions(+), 2 deletions(-)
diff --git a/scripts/Remote.st b/scripts/Remote.st
index cf383bd..39f2407 100644
--- a/scripts/Remote.st
+++ b/scripts/Remote.st
@@ -39,6 +39,38 @@ DLD addLibrary: 'libc'.
SystemDictionary compile: '
getpid [ ^''--pid not available'' ]' ].
+Object subclass: RemoteServer [
+
+ RemoteServer class >> new [
+
+ ^ super new
+ initialize;
+ yourself
+ ]
+
+ | remoteProcess |
+
+ initialize [
+ <category: 'initialize'>
+
+ ObjectMemory addDependent: self
+ ]
+
+ update: aSymbol [
+ <category: 'initialize'>
+
+ aSymbol == #aboutToSnapshot ifTrue: [ ^ remoteProcess suspend ].
+ aSymbol == #finishedSnapshot ifTrue: [ ^ remoteProcess resume ].
+ aSymbol == #returnFromSnapshot ifTrue: [ ObjectMemory removeDependent: self ].
+ ]
+
+ process: aProcess [
+ <category: 'accessing'>
+
+ remoteProcess := aProcess
+ ]
+]
+
TextCollector subclass: MultiplexingTextCollector [
| default outputs |
initialize [
@@ -69,7 +101,7 @@ TextCollector subclass: MultiplexingTextCollector [
]
]
-| helpString commands server port host login |
+| helpString commands server port host login remoteServer |
commands := OrderedCollection new.
server := false.
port := 12345.
@@ -207,7 +239,8 @@ available in the PATH of the remote machine.
server ifTrue: [
PackageLoader fileInPackage: 'Compiler'.
Transcript := MultiplexingTextCollector message: Transcript message.
- [
+ remoteServer := RemoteServer new.
+ remoteServer process: [
| queue |
queue := TCP.ServerSocket port: port bindTo: host.
[
--
1.7.2.5

View File

@ -0,0 +1,46 @@
From c6e5359374ee9b46777be790da9d64d7c408a5c1 Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <bonzini@gnu.org>
Date: Tue, 5 Jul 2011 10:50:58 +0200
Subject: [PATCH 1/1] fix typo in 2fc74b9
2011-08-13 Paolo Bonzini <bonzini@gnu.org>
* scripts/Remote.st: Fix typo in 2fc74b9.
---
ChangeLog | 4 ++++
scripts/Remote.st | 10 +++++++---
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/scripts/Remote.st b/scripts/Remote.st
index ec65de4..cf383bd 100644
--- a/scripts/Remote.st
+++ b/scripts/Remote.st
@@ -182,11 +182,14 @@ available in the PATH of the remote machine.
opt isNil ifTrue: [
host isNil ifFalse: [ self error: 'multiple hosts are invalid' ].
(arg includes: $@)
- ifFalse: [ host := TCP.SocketAddress byName: arg ]
+ ifFalse: [ host := arg ]
ifTrue: [
login isNil ifFalse: [ self error: 'multiple logins are invalid' ].
- login := TCP.SocketAddress byName: (arg copyUpTo: $@).
- host := arg copyAfter: $@ ] ].
+ login := arg copyUpTo: $@.
+ host := arg copyAfter: $@ ].
+ (TCP.SocketAddress byName: host)
+ ifNil: [ self error: 'invalid host %1' %{host} ]
+ ifNotNil: [ :addr | host := addr ] ].
]
ifError: [
@@ -197,6 +200,7 @@ available in the PATH of the remote machine.
('gst-remote: ', ex messageText, '
') displayOn: stderr.
stderr flush.
+ "ex pass."
helpString displayOn: stderr.
ObjectMemory quit: 1 ].
--
1.7.2.5

View File

@ -0,0 +1,51 @@
DESCRIPTION = "GNU Smalltalk."
HOMEPAGE = "http://people.freedesktop.org/~whot/evtest/"
LICENSE = "GPLv2"
PR = "r9"
DEPENDS = "smalltalk-native"
DEPENDS_virtclass-native = ""
SRC_URI = " \
ftp://ftp.gnu.org/gnu/smalltalk/smalltalk-3.2.4.tar.gz \
file://gst-remote-hostname.patch \
file://gst-remote-typo.patch \
file://gst-remote-resume.patch \
file://fix_clock_behavior_across_image.patch \
file://fix_fd_resume.patch \
"
SRC_URI[md5sum] = "a36a7c9beddca08dc492b500738efc82"
SRC_URI[sha256sum] = "901cc7090a1fa44bc60900a970d207de4aa3bdfdce72bea55114e243bc1eb1b3"
EXTRA_OECONF = "--disable-static --disable-gtk --without-x"
PACKAGES =+ "${PN}-digest ${PN}-expat ${PN}-gdbm ${PN}-opengl ${PN}-sdl ${PN}-sqlite"
FILES_${PN}-digest = "${libdir}/smalltalk/digest*.so"
FILES_${PN}-expat = "${libdir}/smalltalk/expat*.so"
FILES_${PN}-gdbm = "${libdir}/smalltalk/gdbm*.so"
FILES_${PN}-opengl = "${libdir}/smalltalk/gstopengl*.so"
FILES_${PN}-sdl = "${libdir}/smalltalk/sdl*.so"
FILES_${PN}-sqlite = "${libdir}/smalltalk/dbd-sqlite*.so"
FILES_${PN}-dbg += "${libdir}/smalltalk/.debug ${libexecdir}/smalltalk/.debug"
#FILES_${PN}-dev += "${libdir}/smalltalk/*.so ${libdir}/smalltalk/*.la"
FILES_${PN}-dev += "${libdir}/smalltalk/*.la"
FILES_${PN}-static += "${libdir}/smalltalk/lib*.a"
inherit autotools
do_configure() {
sed -i -e 's/^GST = .*$/GST = gst --no-user-files $(GST_OPTS)/' ${S}/Makefile.am
sed -i -e 's/^GST_PACKAGE = .*$/GST_PACKAGE = XZIP="$(XZIP)" gst-package $(GST_OPTS)/' ${S}/Makefile.am
sed -i -e 's/"$(abs_top_builddir)\/gst$(EXEEXT)"/gst/' ${S}/Makefile.am
autotools_do_configure
}
do_configure_virtclass-native() {
autotools_do_configure
sed -i -e 's/^module_DATA.*$//' ${S}/Makefile
rm -f ${S}/libc.la
}
BBCLASSEXTEND = "native"

View File

@ -0,0 +1,11 @@
DESCRITOPN = ""
HOMEPAGE = "https://gitorious.org/gnu-smalltalk-ports/soapopera"
require smalltalk-package.inc
S = "${WORKDIR}/git"
SRC_URI = "git://gitorious.org/gnu-smalltalk-ports/soapopera.git;protocol=git;branch=master"
SRCREV = "21132f02889ef82e368144dbf8892d321d27661c"
PV = "0.0.1+gitr${SRCREV}"
PR = "${INC_PR}.0"