Introduction
Introduction Statistics Contact Development Disclaimer Help
Allow static compilation w/o installed deps - pee - Pee a password manager;Pee …
git clone git://vernunftzentrum.de/pee.git
Log
Files
Refs
LICENSE
---
commit 7a88e2804ae2cd6fdce70ecf46d257df4454e9f1
parent 5090a86785a73a89d30da9ef24aa32bcb85a2873
Author: Christian Kellermann <[email protected]>
Date: Sun, 21 Aug 2016 19:15:09 +0200
Allow static compilation w/o installed deps
This will setup a local private repo, install the dependencies into that
so that import libraries will be found.
Before this patch compilation would have worked only when some deps have
been available in the system wide CHICKEN repo.
Diffstat:
compile.sh | 78 ++++++++++++++++++++-----------
1 file changed, 51 insertions(+), 27 deletions(-)
---
diff --git a/compile.sh b/compile.sh
@@ -1,41 +1,65 @@
#!/bin/sh
set -e
+#to debug change this
+DEVNULL=/dev/null
+
+# order matters
+DEPS="\
+fmt \
+matchable \
+string-utils \
+check-errors \
+blob-utils \
+foreigners \
+getopt-long \
+stty \
+tweetnacl \
+"
+
+echo "Getting version info from git"
echo -n '(define-constant commit-id "'\
$(git show -q | grep ^commit| awk '{print $2 }') '")' > hash
echo -n '(define-constant program-version "' $(git tag | sort -nr | head -1) '…
-chicken-install -r blob-utils >/dev/null || echo Fetching blob-utils has faile…
-chicken-install -r check-errors >/dev/null || echo Fetching check-errors has f…
-chicken-install -r foreigners >/dev/null || echo Fetching foreigners has faile…
-chicken-install -r getopt-long >/dev/null || echo Fetching getopt-long has fai…
-chicken-install -r matchable >/dev/null || echo Fetching matchable has failed.
-chicken-install -r string-utils >/dev/null || echo Fetching string-utils has f…
-chicken-install -r stty >/dev/null || echo Fetching stty has failed.
-chicken-install -r tweetnacl >/dev/null || echo Fetching tweetnacl has failed.
-chicken-install -r fmt > /dev/null || echo Fetching fmt has failed.
+echo "Creating local repo"
+chicken-install -i ./repo > $DEVNULL
+export CHICKEN_REPOSITORY=$(pwd)/repo
+CSC_OPTION="-r ./repo"
+
+echo -n "Downloading dependencies: "
+for d in $DEPS
+do
+ echo -n "$d "
+ chicken-install -r $d 2>&1 >$DEVNULL || (echo "Fetching $d has failed." &&…
+ cd $d && (chicken-install) 2>&1 >$DEVNULL && echo -n "(inst), " && cd - > …
+done
+echo "done."
+echo
+echo -n "Building static pee program... "
cd fmt
-csc -unit fmt -emit-import-library fmt -uses ports,srfi-1,srfi-69,srfi-13,extr…
+csc -unit fmt -emit-import-library fmt -uses ports,srfi-1,srfi-69,srfi-13,extr…
cd ..
cd matchable
-csc -unit matchable -emit-import-library matchable -c matchable.scm -o matchab…
+csc -unit matchable -emit-import-library matchable -c matchable.scm -o matchab…
mv matchable.o matchable.import.scm ..; cd ..
-csc -unit to-hex -emit-import-library to-hex -c string-utils/to-hex.scm -o to-…
-csc -unit type-errors -J -c ./check-errors/type-errors.scm -o type-errors.o
-csc -unit type-checks -uses type-errors -J -c ./check-errors/type-checks.scm -…
-csc -unit blob-hexadecimal -uses type-checks -uses to-hex -emit-import-library…
-csc -unit crypto-helper -uses blob-hexadecimal -emit-import-library crypto-hel…
-csc -unit foreigners -uses matchable -emit-import-library foreigners -emit-imp…
-csc -unit getopt-long -uses srfi-13 -uses srfi-14 -uses data-structures -uses …
-csc -unit tweetnacl -emit-import-library tweetnacl -c tweetnacl/tweetnacl.scm …
-csc -uses matchable -uses foreigners -c stty/stty.scm -emit-import-library stt…
-csc -uses srfi-1,srfi-4,srfi-13,srfi-14,utils,stty,crypto-helper,tweetnacl,get…
-csc -static *o ./tweetnacl/tweetnacl.impl.o -o pee
-
-strip ./pee
-
-rm -r matchable blob-utils check-errors foreigners getopt-long string-utils st…
-rm *.o *.import.*
+csc -unit to-hex -emit-import-library to-hex -c string-utils/to-hex.scm -o to-…
+csc -unit type-errors -J -c ./check-errors/type-errors.scm -o type-errors.o 2…
+csc -unit type-checks -uses type-errors -J -c ./check-errors/type-checks.scm -…
+csc -unit blob-hexadecimal -uses type-checks -uses to-hex -emit-import-library…
+csc -unit crypto-helper -uses blob-hexadecimal -emit-import-library crypto-hel…
+csc -unit foreigners -uses matchable -emit-import-library foreigners -emit-imp…
+csc -unit getopt-long -uses srfi-13 -uses srfi-14 -uses data-structures -uses …
+csc -unit tweetnacl -emit-import-library tweetnacl -c tweetnacl/tweetnacl.scm …
+csc -uses matchable -uses foreigners -c stty/stty.scm -emit-import-library stt…
+csc -uses srfi-1,srfi-4,srfi-13,srfi-14,utils,stty,crypto-helper,tweetnacl,get…
+csc -strip -static *.o ./tweetnacl/tweetnacl.impl.o -o pee 2>&1 >$DEVNULL
+echo "done."
+
+echo "Cleaning up."
+rm -r $DEPS repo
+rm -f *.o *.import.* pee.c
+echo "Build done."
You are viewing proxied material from vernunftzentrum.de. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.