mirror of https://gitlab.com/nakst/essence
32 lines
1.8 KiB
Plaintext
32 lines
1.8 KiB
Plaintext
#import "util/get_source.script" get_source;
|
|
|
|
str targetName #option;
|
|
str toolchainPrefix #option;
|
|
int processorCount #option;
|
|
|
|
void Start() {
|
|
str rootDirectory = PathGetDefaultPrefix() + "/root";
|
|
str version = "2.6.9";
|
|
if processorCount == 0 processorCount = SystemGetProcessorCount();
|
|
get_source.Get("https://netix.dl.sourceforge.net/project/bochs/bochs/%version%/bochs-%version%.tar.gz", "bochs-%version%",
|
|
"ee5b677fd9b1b9f484b5aeb4614f43df21993088c0c0571187f93acb0866e98c");
|
|
assert FileCopy("ports/bochs/config.cc", "bin/source/config.cc");
|
|
assert FileCopy("ports/bochs/config.h.in", "bin/source/config.h.in");
|
|
assert FileCopy("ports/bochs/configure.in", "bin/source/configure.in");
|
|
assert FileCopy("ports/bochs/main.cc", "bin/source/main.cc");
|
|
assert FileCopy("ports/bochs/Makefile.in", "bin/source/Makefile.in");
|
|
assert FileCopy("ports/bochs/plugin.cc", "bin/source/plugin.cc");
|
|
assert FileCopy("ports/bochs/plugin.h", "bin/source/plugin.h");
|
|
assert FileCopy("ports/bochs/essence.cc", "bin/source/gui/essence.cc");
|
|
assert FileCopy("ports/bochs/gui_Makefile.in", "bin/source/gui/Makefile.in");
|
|
assert SystemShellExecuteWithWorkingDirectory("bin/source", "autoconf");
|
|
assert SystemShellExecuteWithWorkingDirectory("bin/source",
|
|
"./configure --with-essence CC=%toolchainPrefix%-gcc CXX=%toolchainPrefix%-g++ "
|
|
+ "CFLAGS=\" -O2 -D_GNU_SOURCE \" CXXFLAGS=\" -O2 -D_GNU_SOURCE \" "
|
|
+ "--host=%toolchainPrefix% --prefix=\"/Applications/POSIX\" --exec-prefix=\"/Applications/POSIX\" "
|
|
+ "--enable-cpu-level=6 --enable-x86-64 --enable-all-optimizations");
|
|
assert SystemShellExecuteWithWorkingDirectory("bin/source", "make -j %processorCount%");
|
|
assert SystemShellExecuteWithWorkingDirectory("bin/source", "make DESTDIR=%rootDirectory% install");
|
|
PathDeleteRecursively("bin/source");
|
|
}
|