Browse Source

Start working on the new system. launcher, sbcl, asdf, quicklisp, have been ported. Git and emacs still need to be done.

pull/71/head
Nicolas Hafner 4 years ago
parent
commit
0b5eb2c173
28 changed files with 62 additions and 660 deletions
  1. +4
    -10
      .gitignore
  2. +1
    -0
      .portacle_root
  3. +1
    -1
      Portacle.app/Contents/MacOS/portacle.sh
  4. +4
    -8
      build/asdf.sh
  5. +1
    -0
      build/build.sh
  6. +6
    -6
      build/common.sh
  7. +4
    -5
      build/emacs.sh
  8. +0
    -25
      build/global.sh
  9. +29
    -0
      build/launcher.sh
  10. +6
    -11
      build/quicklisp.sh
  11. +5
    -5
      build/sbcl.sh
  12. +0
    -31
      build/src/fontreg.c
  13. +0
    -211
      build/src/ld-wrap.c
  14. +0
    -75
      build/src/portacle.c
  15. BIN
      build/src/portacle.ico
  16. +0
    -25
      build/src/portacle.rc
  17. +0
    -51
      emacs/lin/emacs.sh
  18. +0
    -51
      emacs/mac/emacs.sh
  19. +0
    -48
      emacs/win/emacs.bat
  20. +0
    -11
      git/lin/git.sh
  21. +0
    -13
      git/mac/git.sh
  22. +0
    -14
      git/win/bash.bat
  23. +0
    -2
      git/win/etc/gitconfig
  24. +0
    -14
      git/win/git.bat
  25. +1
    -1
      portacle.run
  26. +0
    -14
      sbcl/lin/sbcl.sh
  27. +0
    -12
      sbcl/mac/sbcl.sh
  28. +0
    -16
      sbcl/win/sbcl.bat

+ 4
- 10
.gitignore View File

@ -5,15 +5,9 @@ build/*/
build/.portacle-finished-fragments
package/
## Build results
aspell/*/*/
aspell/share/
emacs/*/*/
emacs/config/
sbcl/*/*/
git/*/*/
hunspell/*/*/
asdf/*
quicklisp/
usr/
lin/
win/
mac/
all/
## Other stuff
projects/*

+ 1
- 0
.portacle_root View File

@ -0,0 +1 @@
.

+ 1
- 1
Portacle.app/Contents/MacOS/portacle.sh View File

@ -6,5 +6,5 @@ function mreadlink() {
SCRIPT=$(dirname $(mreadlink "$0"))
export ROOT=$(mreadlink "$SCRIPT/../../../")/
"$ROOT/emacs/mac/emacs.sh"
"$ROOT/mac/bin/portacle"

+ 4
- 8
build/asdf.sh View File

@ -7,7 +7,6 @@ readonly REPOSITORY=https://gitlab.common-lisp.net/asdf/asdf.git
readonly PROGRAM=asdf
source common.sh
INSTALL_TARGET=$PORTACLE_DIR/$PROGRAM
function build() {
cd "$SOURCE_DIR"
@ -15,17 +14,14 @@ function build() {
cd "$SOURCE_DIR/build/"
cat >compile.lisp <<EOF
(cl:compile-file "asdf.lisp" :output-file "asdf.fasl")
(sb-ext:exit)
(sb-ext:exit :code 0)
EOF
case "$PLATFORM" in
win) winroot=$({ cd "$SCRIPT_DIR/.." && pwd -W; } | sed 's|/|\\|g')
cmd /c "$winroot\\sbcl\\win\\sbcl.bat --script compile.lisp" ;;
*) $SCRIPT_DIR/../sbcl/$PLATFORM/sbcl.sh --script compile.lisp;;
esac
"$SHARED_BIN_DIR/sbcl" --script compile.lisp \
|| eexit "Failed to compile ASDF."
}
function install() {
ensure-installed "$INSTALL_TARGET" "$SOURCE_DIR/build/asdf.lisp" "$SOURCE_DIR/build/asdf.fasl" \
ensure-installed "$INSTALL_DIR" "$SOURCE_DIR/build/asdf.lisp" "$SOURCE_DIR/build/asdf.fasl" \
|| eexit "Failed to copy ASDF sources."
}

+ 1
- 0
build/build.sh View File

@ -56,6 +56,7 @@ function package() {
function upgrade() {
download \
&& global \
&& launcher \
&& sbcl \
&& asdf \
&& quicklisp \

+ 6
- 6
build/common.sh View File

@ -27,11 +27,11 @@ function mreadlink() {
SCRIPT_DIR=${SCRIPT_DIR:-$(mreadlink $(dirname $0))}
SOURCE_DIR=${SOURCE_DIR:-$SCRIPT_DIR/$PROGRAM/}
PORTACLE_DIR=${PORTACLE_DIR:-$(mreadlink $SCRIPT_DIR/../)}
SHARED_DIR=${SHARED_DIR:-$PORTACLE_DIR/usr}
SHARED_BIN_DIR=${SHARED_BIN_DIR:-$SHARED_DIR/$PLATFORM/bin}
SHARED_LIB_DIR=${SHARED_LIB_DIR:-$SHARED_DIR/$PLATFORM/lib}
SHARED_DIR=${SHARED_DIR:-$PORTACLE_DIR/$PLATFORM}
SHARED_BIN_DIR=${SHARED_BIN_DIR:-$SHARED_DIR/bin}
SHARED_LIB_DIR=${SHARED_LIB_DIR:-$SHARED_DIR/lib}
INSTALL_DIR=${INSTALL_DIR:-$PORTACLE_DIR/$PLATFORM/${PROGRAM}/}
FRAGMENT_FILE=${FRAGMENT_FILE:-$SCRIPT_DIR/.portacle-finished-fragments}
INSTALL_TARGET=${INSTALL_TARGET:-$PORTACLE_DIR/$PROGRAM/$PLATFORM/}
_DEFAULT_TARGETS=(download prepare build install)
DEFAULT_TARGETS=("${DEFAULT_TARGETS[@]:-${_DEFAULT_TARGETS[@]}}")
TARGETS=("${@:-${DEFAULT_TARGETS[@]}}")
@ -187,7 +187,7 @@ function info() {
Downloading from: ${REPOSITORY}
Using tag: ${TAG}
Building in: ${SOURCE_DIR}
Installing into: ${INSTALL_TARGET}
Installing into: ${INSTALL_DIR}
Using threads: ${MAXCPUS}
Building targets: ${TARGETS[@]}
"
@ -240,7 +240,7 @@ function clean() {
}
function clean-installed() {
cd "$INSTALL_TARGET"
cd "$INSTALL_DIR"
rm -R ./*/
}

+ 4
- 5
build/emacs.sh View File

@ -18,7 +18,6 @@ readonly CONFIGURE_OPTIONS=(--without-jpeg
readonly PROGRAM=emacs
source common.sh
readonly SHARE_TARGET=$SCRIPT_DIR/../$PROGRAM/share/
function prepare() {
cd "$SOURCE_DIR"
@ -30,9 +29,9 @@ function prepare() {
./autogen.sh \
|| eexit "Failed to generate configure. Maybe some dependencies are missing?"
case "$PLATFORM" in
mac) ./configure --prefix="$INSTALL_TARGET" --with-ns --disable-ns-self-contained "${CONFIGURE_OPTIONS[@]}" \
mac) ./configure --prefix="$INSTALL_DIR" --with-ns --disable-ns-self-contained "${CONFIGURE_OPTIONS[@]}" \
|| eexit "Configure failed. Maybe some dependencies are missing?" ;;
*) ./configure --prefix="$INSTALL_TARGET" "${CONFIGURE_OPTIONS[@]}" \
*) ./configure --prefix="$INSTALL_DIR" "${CONFIGURE_OPTIONS[@]}" \
|| eexit "Configure failed. Maybe some dependencies are missing?" ;;
esac
}
@ -45,11 +44,11 @@ function build() {
function install() {
cd "$SOURCE_DIR"
make install datadir="$SHARE_TARGET" \
make install datadir="$INSTALL_DIR/share/" \
|| eexit "The install failed. Please check the output for error messages."
status 2 "Copying dependencies"
ensure-dependencies $(find-binaries "$INSTALL_TARGET/")
ensure-dependencies $(find-binaries "$INSTALL_DIR/")
}
main

+ 0
- 25
build/global.sh View File

@ -20,34 +20,9 @@ function download() {
curl -o "$SOURCE_DIR/ca-bundle.crt" "$SSL_CA"
}
function build() {
mkdir -p "$SOURCE_DIR"
case "$PLATFORM" in
lin)
gcc -o "$SOURCE_DIR/ld-wrap.so" -Wall -std=c99 -fPIC -shared -ldl -Wl,-init,init "$SCRIPT_DIR/src/ld-wrap.c" \
|| eexit "Failed to build ld-wrap.so"
cp -fuv "/lib64/ld-linux-x86-64.so.2" "$SOURCE_DIR/ld-linux.so" \
|| eexit "Failed to copy ld-linux.so"
;;
win)
gcc -o "$SOURCE_DIR/fontreg.exe" -Wall -std=c99 -mwindows "$SCRIPT_DIR/src/fontreg.c" \
|| eexit "Failed to build fontreg.exe"
windres "$SCRIPT_DIR/src/portacle.rc" -O coff -o "$SOURCE_DIR/portacle.res" \
|| eexit "Failed to compile resource file"
gcc -o "$SOURCE_DIR/portacle.exe" "$SCRIPT_DIR/src/portacle.c" "$SOURCE_DIR/portacle.res" -lshlwapi \
|| eexit "FAiled to build portacle.exe"
esac
}
function install() {
mkdir -p "$SHARED_LIB_DIR/"
mkdir -p "$SHARED_BIN_DIR/"
case "$PLATFORM" in
lin) ensure-installed "$SHARED_LIB_DIR/" "$SOURCE_DIR/ld-wrap.so" "$SOURCE_DIR/ld-linux.so" ;;
win) ensure-installed "$SHARED_BIN_DIR/" "$SOURCE_DIR/fontreg.exe"
ensure-installed "$PORTACLE_DIR/" "$SOURCE_DIR/portacle.exe" ;;
esac
mkdir -p "$SHARED_DIR/ssl"
ensure-installed "$SHARED_DIR/ssl/" "$SOURCE_DIR/ca-bundle.crt"

+ 29
- 0
build/launcher.sh View File

@ -0,0 +1,29 @@
#!/bin/bash
readonly TAG=
readonly REPOSITORY=https://github.com/shinmera/portacle-launcher.git
###
readonly PROGRAM=launcher
source common.sh
function build() {
cd "$SOURCE_DIR"
make $PLATFORM
}
function install() {
cd "$SOURCE_DIR"
mkdir -p "$INSTALL_DIR"
case "$PLATFORM" in
win) cp "portacle.exe" "$INSTALL_DIR/portacle";;
*) cp "portacle" "$INSTALL_DIR/portacle" ;;
esac
cd "$SHARED_BIN_DIR"
ln -rs "../$PROGRAM/portacle" "sbcl"
ln -rs "../$PROGRAM/portacle" "git"
ln -rs "../$PROGRAM/portacle" "emacs"
}
main

+ 6
- 11
build/quicklisp.sh View File

@ -7,24 +7,19 @@ readonly REPOSITORY=https://github.com/quicklisp/quicklisp-client.git
readonly PROGRAM=quicklisp
source common.sh
INSTALL_TARGET=$PORTACLE_DIR/$PROGRAM
case "$PLATFORM" in
win) readonly SBCL="$PORTACLE_DIR/sbcl/win/sbcl.bat" ;;
*) readonly SBCL="$PORTACLE_DIR/sbcl/$PLATFORM/sbcl.sh" ;;
esac
INSTALL_DIR=$PORTACLE_DIR/all/$PROGRAM
function build() {
"$SBCL" --script "$SOURCE_DIR/setup.lisp" \
"SHARED_BIN_DIR/sbcl" --script "$SOURCE_DIR/setup.lisp" \
|| eexit "Failed to set up quicklisp first-time init."
}
function install() {
mkdir -p "$INSTALL_TARGET" \
|| eexit "Failed to create $INSTALL_TARGET"
cp -Rf "$SOURCE_DIR/." "$INSTALL_TARGET" \
mkdir -p "$INSTALL_DIR" \
|| eexit "Failed to create $INSTALL_DIR"
cp -Rf "$SOURCE_DIR/." "$INSTALL_DIR" \
|| eexit "Failed to copy Quicklisp."
rm -rf "$INSTALL_TARGET/.git"
rm -rf "$INSTALL_DIR/.git"
}
main

+ 5
- 5
build/sbcl.sh View File

@ -9,7 +9,7 @@ readonly ENABLED_FEATURES=":sb-thread :sb-safepoint :sb-thruption :sb-wtimer :sb
readonly PROGRAM=sbcl
source common.sh
readonly INSTALL_SOURCES=$SCRIPT_DIR/../$PROGRAM/sources/
readonly INSTALL_SOURCES=$INSTALL_DIR/share/src/
function prepare() {
cd "$SOURCE_DIR"
@ -47,10 +47,10 @@ function build() {
}
function install() {
cd $SOURCE_DIR
cd "$SOURCE_DIR"
unset SBCL_HOME
mkdir -p "$INSTALL_TARGET" &>/dev/null
INSTALL_ROOT="$INSTALL_TARGET" sh install.sh \
mkdir -p "$INSTALL_DIR" &>/dev/null
INSTALL_ROOT="$INSTALL_DIR" sh install.sh \
|| eexit "Failed to install SBCL."
mkdir -p "$INSTALL_SOURCES" &>/dev/null
## Can't use -t because of apple.
@ -68,7 +68,7 @@ function install() {
-name "a.out" -delete
status 2 "Copying dependencies"
ensure-dependencies $(find-binaries "$INSTALL_TARGET/")
ensure-dependencies $(find-binaries "$INSTALL_DIR/")
}
main

+ 0
- 31
build/src/fontreg.c View File

@ -1,31 +0,0 @@
#include<windows.h>
int resolve_path(char *path, char *resolved){
int len = GetFullPathName(path, MAX_PATH, resolved, 0);
if(MAX_PATH < len)
return 1;
if(len <= 0)
return 2;
return 0;
}
int add_font(char *file){
char font[MAX_PATH] = "";
if(resolve_path(file, font) != 0)
return 1;
if(AddFontResource(font) == 0)
return 2;
SendMessage(HWND_BROADCAST, WM_FONTCHANGE, 0, 0);
return 0;
}
int main(int argc, char **argv){
for(int i=1; i<argc; ++i){
if(add_font(argv[i]) != 0)
return i+1;
}
return 0;
}

+ 0
- 211
build/src/ld-wrap.c View File

@ -1,211 +0,0 @@
#define _GNU_SOURCE
#include <dlfcn.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <sys/stat.h>
#include <errno.h>
#include <paths.h>
int (*o_execve)(const char *filename, char *const argv[], char *const envp[]) = NULL;
FILE *ld_wrap_logfile = NULL;
void init(){
o_execve = dlsym(RTLD_NEXT, "execve");
}
// Returns a fresh array of strings to use as the proper argv
// to our ld-linux.so call.
char **ld_wrap_argv(const char *filename, char *const argv[]){
int len;
for(len=0; argv[len]; ++len);
char **argv_t = calloc(4+len, sizeof(char *));
argv_t[0] = "ld-linux.so";
argv_t[1] = "--library-path";
argv_t[2] = getenv("LW_LIBRARY_PATH");
argv_t[3] = (char *)filename;
for(int i=1; argv[i]; ++i){
argv_t[i+3] = argv[i];
}
argv_t[len+3] = 0;
return argv_t;
}
// Simply prints a debug message for the filename and args.
void ld_wrap_log(const char *filename, char *const argv[]){
if(ld_wrap_logfile == NULL) ld_wrap_logfile = fopen("/tmp/ld-wrap.log", "w");
fprintf(ld_wrap_logfile, "LD_WRAP: %s", filename);
for(int i=1; argv[i]; ++i)
fprintf(ld_wrap_logfile, " %s", argv[i]);
fprintf(ld_wrap_logfile, "\n");
fflush(ld_wrap_logfile);
}
// Returns a fresh copy of the search path to use.
char *ld_wrap_path(){
char *path = getenv("PATH");
if(path == NULL){
size_t len = confstr(_CS_PATH, (char *)NULL, 0);
char *path = calloc(2+len, sizeof(char));
path[0] = ':';
confstr(_CS_PATH, path+1, len);
return path;
}else{
return strdup(path);
}
}
// Returns true if the given filename exists, is a
// file and has the executable bit set.
int ld_wrap_exe_p(char *filename){
struct stat st;
return (stat(filename, &st) == 0)
&& S_ISREG(st.st_mode)
&& (S_IXUSR & st.st_mode);
}
// Attempt to resolve the filename to an absolute one
// using PATH and friends.
char *ld_wrap_resolv(const char *filename){
char *resolved = (char *)filename;
if(!strchr(filename, '/')){
char *path = ld_wrap_path();
size_t pathlen = strlen(path);
size_t filelen = strlen(filename);
char current_path[pathlen+filelen+2];
if(current_path != NULL){
size_t j=0;
for(size_t i=0; i<=pathlen; ++i){
if(path[i] == 0 || path[i] == ':'){
current_path[j] = '/';
for(int k=0; k<filelen; ++k) current_path[j+1+k]=filename[k];
current_path[j+filelen+1] = 0;
if(ld_wrap_exe_p(current_path)){
resolved = strdup(current_path);
break;
}else{
j=0;
}
}else{
current_path[j]=path[i];
++j;
}
}
}
}
return resolved;
}
int ld_wrap_elf_p(char *filename){
FILE *ldfile = fopen(filename, "rb");
if(ldfile != NULL){
char header[4];
char magic[4] = {0x7f, 0x45, 0x4c, 0x46};
fread(&header, sizeof(char), 4, ldfile);
fclose(ldfile);
for(int i=0; i<4; ++i){
if(magic[i] != header[i])
return 0;
}
return 1;
}
return 0;
}
int execve(const char *filename, char *const argv[], char *const envp[]){
const char *loader = getenv("LW_LOADER_PATH");
char **argv_t = ld_wrap_argv(filename, argv);
ld_wrap_log(loader, argv_t);
int status = o_execve(loader, argv_t, envp);
free(argv_t);
return status;
}
int execv(const char *filename, char *const argv[]){
return execve(filename, argv, environ);
}
int execvpe(const char *filename, char *const argv[], char *const envp[]){
char *resolved = ld_wrap_resolv(filename);
int status;
// execvp* have the "interesting" feature that they relaunch the command
// using a shell if the first execve fails with ENOEXEC. Since we can't
// do that here with out ld wrapper, we have to test for ELF ourselves.
if(ld_wrap_elf_p(resolved)){
status = execve(resolved, argv, envp);
}else{
int len;
for(len=0; argv[len]; ++len);
char *argv_t[len+2];
argv_t[0] = (char *)_PATH_BSHELL;
argv_t[1] = resolved;
for(int i=len; 0<i; --i)
argv_t[i+1] = argv[i];
status = execve((char *)_PATH_BSHELL, argv_t, envp);
}
free(resolved);
return status;
}
int execvp(const char *filename, char *const argv[]){
return execvpe(filename, argv, environ);
}
int execl(const char *filename, const char *arg, ...){
size_t argc;
va_list args;
va_start(args, arg);
for(argc=1; va_arg(args, const char*); ++argc);
va_end(args);
char *argv[argc + 1];
va_start(args, arg);
argv[0] = (char *)arg;
for (size_t i=1; i<=argc; ++i)
argv[i] = va_arg(args, char *);
va_end(args);
return execv(filename, argv);
}
int execlp(const char *filename, const char *arg, ...){
size_t argc;
va_list args;
va_start(args, arg);
for(argc=1; va_arg(args, const char*); ++argc);
va_end(args);
char *argv[argc + 1];
va_start(args, arg);
argv[0] = (char *)arg;
for (size_t i=1; i<=argc; ++i)
argv[i] = va_arg(args, char *);
va_end(args);
return execvp(filename, argv);
}
int execle(const char *filename, const char *arg, ...){
size_t argc;
va_list args;
va_start(args, arg);
for(argc=1; va_arg(args, const char*); ++argc);
va_end(args);
char *argv[argc + 1];
va_start(args, arg);
argv[0] = (char *)arg;
for (size_t i=1; i<=argc; ++i)
argv[i] = va_arg(args, char *);
// I don't really think this is correct, but the original glibc source
// seems to do the same kind of thing? Let's just hope nobody uses the
// variadic variants of these anyway.
const char *const *envp = va_arg(args, const char *const *);
va_end(args);
return execve(filename, argv, (char *const *)envp);
}

+ 0
- 75
build/src/portacle.c View File

@ -1,75 +0,0 @@
#ifdef __MINGW64__
#define WIN
#elseif __MINGW32__
#define WIN
#elseif __APPLE__
#define MAC
#elseif __linux__
#define LIN
#endif
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
int pathcat(char *path, char *root, int c, ...){
strcpy(path, root);
va_list argp;
va_start(argp, c);
for(var i=0; i<c; ++i){
char *part = va_arg(argp, char *);
strcat(path, PATHSEP);
strcat(path, part);
}
va_end(argp);
return 0;
}
int launch_emacs(char *root){
}
int launch_git(char *root){
char lw_loader[PATHLEN], lw_library[PATHLEN], ld_preload[PATHLEN], git[PATHLEN], xdg[PATHLEN];
pathcat(lw_loader, root, 4, "usr", "lin", "lib", "ld-linux.so");
pathcat(lw_library, root, 3, "usr", "lin", "lib");
pathcat(ld_preload, root, 4, "usr", "lin", "lib", "ld-wrap.so");
pathcat(git, root, 4, "git", "lin", "bin", "git");
pathcat(xdg, root, 2, "config", "");
set_env("LW_LOADER_PATH", lw_loader);
set_env("LW_LIBRARY_PATH", lw_library);
set_env("LD_PRELOAD", ld_preload);
set_env("XDG_CONFIG_HOME", xdg);
return launch(lw_loader_path, 3, "--library-path", lw_library, git);
}
int launch_sbcl(char *root){
char sbcl_home[PATHLEN], sbcl_bin[PATHLEN], init[PATHLEN];
pathcat(sbcl_home, root, 4, "sbcl", PLATFORM, "lib", "sbcl");
pathcat(sbcl_bin, root, 4, "sbcl", PLATFORM, "bin", "sbcl");
pathcat(init, root, 2, "config", "sbcl-init.lisp");
set_env("SBCL_HOME", sbcl_home);
set_env("LD_LIBRARY_PATH", usr);
return launch(sbcl_bin, 3, "--no-sysinit", "--userinit", init);
}
int main(int argc, char **argv){
char root[PATHLEN];
if(!find_root(root)){
return 1;
}
if(!set_env("ROOT", root)){
return 2;
}
if(argc == 0){
return launch_emacs(root);
}else{
// Dispatch
}
return 0;
}

BIN
build/src/portacle.ico View File

Before After

+ 0
- 25
build/src/portacle.rc View File

@ -1,25 +0,0 @@
0 ICON "portacle.ico"
1 VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "080904E4"
BEGIN
VALUE "CompanyName", "Shirakumo"
VALUE "FileDescription", "Portable Common Lisp IDE"
VALUE "FileVersion", "1.0"
VALUE "InternalName", "portacle"
VALUE "LegalCopyright", "Shirakumo"
VALUE "OriginalFilename", "portacle.exe"
VALUE "ProductName", "Portacle"
VALUE "ProductVersion", "1.0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x809, 1252
END
END

+ 0
- 51
emacs/lin/emacs.sh View File

@ -1,51 +0,0 @@
#!/bin/bash
function find-appropriate-file() {
local files=( $1 )
echo $(basename "${files[0]}")
}
readonly SCRIPT=$(dirname $(readlink -f "$0"))
export ROOT=${ROOT:-$(readlink -f "$SCRIPT/../../")/}
readonly EMACSVER=$(find-appropriate-file "$ROOT/emacs/share/emacs/*.*")
readonly EMACSLIBEXEC=$(find-appropriate-file "$ROOT/emacs/lin/libexec/emacs/$EMACSVER/*")
export EMACSDATA=$ROOT/emacs/share/emacs/$EMACSVER/etc/
export EMACSDOC=$ROOT/emacs/share/emacs/$EMACSVER/etc/
export EMACSLOADPATH=$ROOT/emacs/share/emacs/$EMACSVER/site-lisp:\
$ROOT/emacs/share/emacs/site-lisp:\
$ROOT/emacs/share/emacs/$EMACSVER/site-lisp:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/calc:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/calendar:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/cedet:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/emacs-lisp:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/emulation:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/erc:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/eshell:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/gnus:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/international:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/language:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/mail:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/mh-e:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/net:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/nxml:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/obsolete:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/org:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/play:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/progmodes:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/term:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/textmodes:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/url:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/vc:\
$ROOT/config
unset GTK_MODULES
export PATH=$ROOT/lin/libexec/emacs/$EMACSVER/$EMACSLIBEXEC:$PATH
export LD_LIBRARY_PATH=$ROOT/usr/lin/lib/:$LD_LIBRARY_PATH
## We do /not/ want ld-wrap.so here as processes launched by emacs
## likely have to use other libraries outside of our control and
## thus should not be confined to our ld wrapping.
"$ROOT/usr/lin/lib/ld-linux.so" --library-path "$ROOT/usr/lin/lib/" "$SCRIPT/bin/emacs" --name Portacle -T Portacle -q -l "$ROOT/config/emacs-init.el" "[email protected]"

+ 0
- 51
emacs/mac/emacs.sh View File

@ -1,51 +0,0 @@
#!/bin/bash
function mreadlink() {
python -c 'import os, sys; print os.path.realpath(sys.argv[1])' $1
}
function find_apropriate_file() {
local files=( $1 )
echo $(basename "${files[0]}")
}
readonly SCRIPT=$(dirname $(mreadlink "$0"))
export ROOT=${ROOT:-$(mreadlink "$SCRIPT/../../")/}
readonly EMACSVER=$(find_apropriate_file "$ROOT/emacs/share/emacs/*.*")
readonly EMACSLIBEXEC=$(find_apropriate_file "$ROOT/emacs/lin/libexec/emacs/$EMACSVER/*")
export EMACSDATA=$ROOT/emacs/share/emacs/$EMACSVER/etc/
export EMACSDOC=$ROOT/emacs/share/emacs/$EMACSVER/etc/
export EMACSLOADPATH=$ROOT/emacs/share/emacs/$EMACSVER/site-lisp:\
$ROOT/emacs/share/emacs/site-lisp:\
$ROOT/emacs/share/emacs/$EMACSVER/site-lisp:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/calc:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/calendar:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/cedet:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/emacs-lisp:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/emulation:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/erc:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/eshell:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/gnus:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/international:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/language:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/mail:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/mh-e:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/net:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/nxml:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/obsolete:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/org:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/play:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/progmodes:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/term:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/textmodes:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/url:\
$ROOT/emacs/share/emacs/$EMACSVER/lisp/vc:\
$ROOT/config
export PATH=$ROOT/mac/libexec/emacs/$EMACSVER/$EMACSLIBEXEC:$PATH
export DYLD_LIBRARY_PATH=$ROOT/usr/mac/lib/:$DYLD_LIBRARY_PATH
"$SCRIPT/bin/emacs" --name Portacle -T Portacle -q -l "$ROOT/config/emacs-init.el" "[email protected]"

+ 0
- 48
emacs/win/emacs.bat View File

@ -1,48 +0,0 @@
@echo off
SETLOCAL
set SCRIPT=%~dp0
set ROOT=%SCRIPT%\..\..\
rem // This crazy thing resolves the relative path
FOR /F "delims=" %%F IN ("%ROOT%") DO SET "ROOT=%%~fF"
rem // Find emacs version
FOR /D %%F IN ("%ROOT%\emacs\share\emacs\*.*") DO SET "EMACSVER=%%~nF%%~xF" & GOTO END
:END
set EMACSDATA=%ROOT%\emacs\share\emacs\%EMACSVER%\etc\
set EMACSDOC=%ROOT%\emacs\share\emacs\%EMACSVER%\etc\
set EMACSLOADPATH=%ROOT%\emacs\share\emacs\%EMACSVER%\site-lisp;^
%ROOT%\emacs\share\emacs\site-lisp;^
%ROOT%\emacs\share\emacs\%EMACSVER%\site-lisp;^
%ROOT%\emacs\share\emacs\%EMACSVER%\lisp;^
%ROOT%\emacs\share\emacs\%EMACSVER%\lisp\calc;^
%ROOT%\emacs\share\emacs\%EMACSVER%\lisp\calendar;^
%ROOT%\emacs\share\emacs\%EMACSVER%\lisp\cedet;^
%ROOT%\emacs\share\emacs\%EMACSVER%\lisp\emacs-lisp;^
%ROOT%\emacs\share\emacs\%EMACSVER%\lisp\emulation;^
%ROOT%\emacs\share\emacs\%EMACSVER%\lisp\erc;^
%ROOT%\emacs\share\emacs\%EMACSVER%\lisp\eshell;^
%ROOT%\emacs\share\emacs\%EMACSVER%\lisp\gnus;^
%ROOT%\emacs\share\emacs\%EMACSVER%\lisp\international;^
%ROOT%\emacs\share\emacs\%EMACSVER%\lisp\language;^
%ROOT%\emacs\share\emacs\%EMACSVER%\lisp\mail;^
%ROOT%\emacs\share\emacs\%EMACSVER%\lisp\mh-e;^
%ROOT%\emacs\share\emacs\%EMACSVER%\lisp\net;^
%ROOT%\emacs\share\emacs\%EMACSVER%\lisp\nxml;^
%ROOT%\emacs\share\emacs\%EMACSVER%\lisp\obsolete;^
%ROOT%\emacs\share\emacs\%EMACSVER%\lisp\org;^
%ROOT%\emacs\share\emacs\%EMACSVER%\lisp\play;^
%ROOT%\emacs\share\emacs\%EMACSVER%\lisp\progmodes;^
%ROOT%\emacs\share\emacs\%EMACSVER%\lisp\term;^
%ROOT%\emacs\share\emacs\%EMACSVER%\lisp\textmodes;^
%ROOT%\emacs\share\emacs\%EMACSVER%\lisp\url;^
%ROOT%\emacs\share\emacs\%EMACSVER%\lisp\vc;^
%ROOT%\config
set PATH=%ROOT%\emacs\win\libexec\emacs\%EMACSVER%\x86_64-w64-mingw32;%PATH%
set PATH=%ROOT%\usr\win\lib\;%PATH%
"%SCRIPT%\bin\emacs" --name Portacle -T Portacle -q -l "%ROOT%\config\emacs-init.el" %*
ENDLOCAL

+ 0
- 11
git/lin/git.sh View File

@ -1,11 +0,0 @@
#!/bin/bash
SCRIPT=$(dirname $(readlink -f "$0"))
export ROOT=${ROOT:-$(readlink -f "$SCRIPT/../../")/}
export PATH=$ROOT/git/lin/libexec/git-core:$PATH
export XDG_CONFIG_HOME=$ROOT/config
export LW_LOADER_PATH="$ROOT/usr/lin/lib/ld-linux.so"
export LW_LIBRARY_PATH="$ROOT/usr/lin/lib/"
export LD_PRELOAD="$ROOT/usr/lin/lib/ld-wrap.so"
"$LW_LOADER_PATH" --library-path "$LW_LIBRARY_PATH" "$SCRIPT/bin/git" "[email protected]"

+ 0
- 13
git/mac/git.sh View File

@ -1,13 +0,0 @@
#!/bin/bash
function mreadlink() {
python -c 'import os, sys; print os.path.realpath(sys.argv[1])' $1
}
readonly SCRIPT=$(dirname $(mreadlink "$0"))
export ROOT=${ROOT:-$(mreadlink "$SCRIPT/../../")/}
export PATH=$ROOT/git/mac/libexec/git-core:$PATH
export DYLD_LIBRARY_PATH=$ROOT/usr/mac/lib/:$DYLD_LIBRARY_PATH
export XDG_CONFIG_HOME=$ROOT/config
"$SCRIPT/bin/git" "[email protected]"

+ 0
- 14
git/win/bash.bat View File

@ -1,14 +0,0 @@
@echo off
SETLOCAL
set SCRIPT=%~dp0
set ROOT=%SCRIPT%\..\..\
rem // This crazy thing resolves the relative path
FOR /F "delims=" %%F IN ("%ROOT%") DO SET "ROOT=%%~fF"
set BASHPATH=%BASHPATH%;%ROOT%\usr\win\lib;%ROOT%\usr\win\bin
set PATH=%BASHPATH%
"%ROOT%\usr\win\bin\chroot.exe" "--skip-chdir" %ROOT% "/usr/bin/bash.exe" %*
ENDLOCAL

+ 0
- 2
git/win/etc/gitconfig View File

@ -1,2 +0,0 @@
[http]
sslcainfo = /share/ssl/ca-bundle.crt

+ 0
- 14
git/win/git.bat View File

@ -1,14 +0,0 @@
@echo off
SETLOCAL
set SCRIPT=%~dp0
set ROOT=%SCRIPT%\..\..\
rem // This crazy thing resolves the relative path
FOR /F "delims=" %%F IN ("%ROOT%") DO SET "ROOT=%%~fF"
set PATH=%ROOT%\git\win\bin;%ROOT%\git\win\libexec\git-core;%ROOT%\usr\win\lib;%ROOT%\usr\win\bin
set XDG_CONFIG_HOME=%ROOT%\config
"%ROOT%\usr\win\bin\chroot.exe" "--skip-chdir" %ROOT% "/git/win/bin/git.exe" %*
ENDLOCAL

+ 1
- 1
portacle.run View File

@ -4,4 +4,4 @@ export ROOT="$SCRIPT/"
## Fix the icon
sed -i "s,Icon=.*,Icon=$ROOT/portacle.svg,g" "$ROOT/portacle.desktop"
"$ROOT/emacs/lin/emacs.sh"
"$ROOT/lin/bin/portacle" "[email protected]"

+ 0
- 14
sbcl/lin/sbcl.sh View File

@ -1,14 +0,0 @@
#!/bin/bash
SCRIPT=$(dirname $(readlink -f "$0"))
export ROOT=${ROOT:-$(readlink -f "$SCRIPT/../../")/}
export SBCL_HOME=$ROOT/sbcl/lin/lib/sbcl/
export LD_LIBRARY_PATH=$ROOT/usr/lin/lib/:$LD_LIBRARY_PATH
## The following does not work because ???
## ld-linux.so just seems to sweep past the sbcl binary argument
## for reasons that are completely beyond me. I cannot figure out
## how to fix that behaviour either, so we revert to using system
## provided libs and hoping things work out.
# "$ROOT/usr/lib/ld-linux.so" --library-path "$ROOT/usr/lib/" "$SCRIPT/bin/sbcl" --no-sysinit --userinit "$ROOT/config/sbcl-init.lisp" "[email protected]"
"$SCRIPT/bin/sbcl" --no-sysinit --userinit "$ROOT/config/sbcl-init.lisp" "[email protected]"

+ 0
- 12
sbcl/mac/sbcl.sh View File

@ -1,12 +0,0 @@
#!/bin/bash
function mreadlink() {
python -c 'import os, sys; print os.path.realpath(sys.argv[1])' "$1"
}
SCRIPT=$(dirname $(mreadlink "$0"))
export ROOT=${ROOT:-$(mreadlink "$SCRIPT/../../")/}
export SBCL_HOME=$ROOT/sbcl/mac/lib/sbcl/
export DYLD_LIBRARY_PATH=$ROOT/usr/mac/lib/:$DYLD_LIBRARY_PATH
"$SCRIPT/bin/sbcl" --no-sysinit --userinit "$ROOT/config/sbcl-init.lisp" "[email protected]"

+ 0
- 16
sbcl/win/sbcl.bat View File

@ -1,16 +0,0 @@
@echo off
SETLOCAL
set SCRIPT=%~dp0
set ROOT=%SCRIPT%\..\..\
rem // This crazy thing resolves the relative path.
FOR /F "delims=" %%F IN ("%ROOT%") DO SET "ROOT=%%~fF"
set SBCL_HOME=%ROOT%\sbcl\win\lib\sbcl\
set PATH=%ROOT%\usr\win\lib\;%PATH%
"%SCRIPT%\bin\sbcl" --no-sysinit --userinit "%ROOT%\config\sbcl-init.lisp" %*
ENDLOCAL

Loading…
Cancel
Save