Permalink
Browse files

raspberry build wip1

  • Loading branch information...
Fenomenolo
Fenomenolo committed Apr 27, 2016
1 parent e1c9748 commit 0bedd390b212e36c04baa25f540823b30219d0c5
Showing with 23 additions and 5 deletions.
  1. BIN base-tcl-armv7l
  2. +8 −0 bootstrap.tcl
  3. +13 −1 build.tcl
  4. +2 −0 run.sh
  5. +0 −4 sample/main.tcl
BIN +3.53 MB base-tcl-armv7l
Binary file not shown.
@@ -30,6 +30,7 @@ proc generalize-arch {arch} {
switch -glob $arch {
i?86 {return ix86}
x86_64 {return x86_64}
armv7l {return armv7l}
default {error "Unrecognized CPU architecture"}
}
}
@@ -121,6 +122,8 @@ proc fpm-arch {arch} {
return x86_64
} elseif {$arch eq "ix86"} {
return i386
} elseif {$arch eq "armv7l"} {
return armv7l
} else {
error "fpm-arch unrecognized arch: $arch"
}
@@ -165,6 +168,11 @@ proc copy-pkg {os arch pkgname ver proj} {
[catch {file copy -force [file join lib generic $pkgname-$ver] $libdir}]} {
#if both copy attempts failed raise error
error "Could not find $pkgname-$ver neither in lib/$os-$arch nor lib/generic"
}
# this is the fix for Tclx on Raspbian
# need to rename Tclx-8.4 to tclx8.4 when inside the starkit
if {$pkgname ne [string tolower $pkgname]} {
file rename -force [file join $libdir $pkgname-$ver] [file join $libdir [string map {- ""} [string tolower $pkgname-$ver]]]
}
}
@@ -33,6 +33,8 @@ proc base-ver {arch} {
return "8.6.3.1.298687"
} elseif {$arch eq "ix86"} {
return "8.6.3.1.298685"
} elseif {$arch eq "armv7l"} {
return "8.6"
} else {
error "base-ver unrecognized arch: $arch"
}
@@ -54,9 +56,15 @@ proc copy-flags {countries {sizes {16 24 64}}} {
proc build-fruho {os arch} {
spit fruho/builddate.txt $::builddate
spit fruho/buildver.txt $::FRUHO_VERSION
if {$arch eq "armv7l"} {
set tlsversion 1.6.7
} else {
set tlsversion 1.6.7.1
}
#copy-flags {PL GB UK DE FR US EMPTY}
#build $os $arch fruho base-tk-[base-ver $arch] {sklib-0.0.0 Tkhtml-3.0 tls-1.6.7.1 Tclx-8.4 cmdline-1.5 json-1.3.3 snit-2.3.2 doctools-1.4.19 textutil::expander-1.3.1}
build $os $arch fruho base-tk-[base-ver $arch] {sklib-0.0.0 tls-1.6.7.1 Tclx-8.4 cmdline-1.5 json-1.3.3 uri-1.2.5 base64-2.4.2 tktray-1.3.9}
build $os $arch fruho base-tk-[base-ver $arch] [list sklib-0.0.0 tls-$tlsversion Tclx-8.4 cmdline-1.5 json-1.3.3 uri-1.2.5 base64-2.4.2 tktray-1.3.9]
# this is necessary to prevent "cp: cannot create regular file ‘/usr/local/sbin/fruho.bin’: Text file busy"
if {[file exists /usr/local/bin/fruho.bin]} {
@@ -249,10 +257,14 @@ set ::FRUHO_VERSION 0.0.22
prepare-lib sklib 0.0.0
#build linux x86_64 sample base-tk-[base-ver x86_64] {sklib-0.0.0 tls-1.6.7.1 Tclx-8.4 cmdline-1.5 json-1.3.3 uri-1.2.5 base64-2.4.2 tktray-1.3.9}
#build linux armv7l sample base-tk-[base-ver armv7l] {sklib-0.0.0 tls-1.6.7 cmdline-1.5 json-1.3.3 uri-1.2.5 base64-2.4.2 tktray-1.3.9}
#build-total
#build-total ix86
#build-total x86_64
#build-fruho linux armv7l
#build-fruhod linux armv7l
#build-deb-rpm armv7l
#build-fruho linux x86_64
#ex fruho
2 run.sh
@@ -1,6 +1,8 @@
#!/bin/sh
if [ `uname -m` = x86_64 ]; then
./base-tcl-x86_64 bootstrap.tcl "$@"
elif [ `uname -m` = armv7l ]; then
./base-tcl-armv7l bootstrap.tcl "$@"
else
./base-tcl-ix86 bootstrap.tcl "$@"
fi
@@ -11,10 +11,6 @@ if {![catch {package require starkit}]} {
package require http
package require tls
package require https
package require linuxdeps
package require skutil
# unix requires Tclx which litters global namespace. Need to clean up to avoid conflict with csp
rename ::select ""
package require csp
namespace import csp::*

0 comments on commit 0bedd39

Please sign in to comment.