mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Merge pull request #173 from mtatton/master
[ build ] lin64 js docker and automatic build
This commit is contained in:
commit
b32f249d8b
53
build.sh
53
build.sh
@ -17,6 +17,9 @@ echo ' --[ [*] use option 8 for publishing ]--'
|
||||
echo ' --\ /--'
|
||||
echo ' '
|
||||
|
||||
|
||||
JS_ENABLE=0
|
||||
|
||||
gen_conf() {
|
||||
./autogen.sh
|
||||
}
|
||||
@ -33,17 +36,17 @@ configure() {
|
||||
# Update: Thanks to JF for this solution for solving
|
||||
# crashes using pthread
|
||||
# -Wl,--whole-archive -lpthread -Wl,--no-whole-archive
|
||||
time \
|
||||
CC=$1 \
|
||||
LD=$2 \
|
||||
LDFLAGS=$4 \
|
||||
BUILD_CMD="time \
|
||||
CC='$1' \
|
||||
LD='$2' \
|
||||
LDFLAGS='$4' \
|
||||
CXX=$CXX_CUST \
|
||||
CFLAGS="-O2 -I/usr/local/include $6" \
|
||||
LIBS=$5 \
|
||||
CXXFLAGS=$6 \
|
||||
PKG_CONFIG="./pkg-config.sh" \
|
||||
CFLAGS='$6' \
|
||||
LIBS='$5' \
|
||||
CXXFLAGS='$6' \
|
||||
PKG_CONFIG='./pkg-config.sh' \
|
||||
./configure -C \
|
||||
--host=$3 \
|
||||
--host='$3' \
|
||||
--prefix=/usr \
|
||||
--enable-256-colors \
|
||||
--enable-fastmem \
|
||||
@ -75,7 +78,12 @@ configure() {
|
||||
--without-terminfo \
|
||||
--without-zlib \
|
||||
--without-zstd \
|
||||
--without-x
|
||||
--without-x"
|
||||
if [ $JS_ENABLE == 1 ]; then
|
||||
BUILD_CMD="${BUILD_CMD/without-quickjs/with-quickjs}"
|
||||
fi
|
||||
echo "$BUILD_CMD"
|
||||
bash -c "$BUILD_CMD"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "--[ Configuration Sucessfull ]--"
|
||||
# turn off warnings
|
||||
@ -222,8 +230,8 @@ set_arch() {
|
||||
LD="ld"
|
||||
MAKE_HOST=""
|
||||
BIN_SUFFIX=""
|
||||
CXXFLAGS=""
|
||||
LDFLAGS=""
|
||||
CXXFLAGS="-I/usr/local/include"
|
||||
LDFLAGS="-L/usr/local/lib"
|
||||
LIBS="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive"
|
||||
fi
|
||||
}
|
||||
@ -264,6 +272,7 @@ arch_menu() {
|
||||
}
|
||||
|
||||
# MAIN LOOP
|
||||
CMDACT=$1
|
||||
ARCHIT=""
|
||||
BIN_SUFFIX=""
|
||||
ARCHS="lin32 lin64 win32 win64 arm32 arm64 djgpp native"
|
||||
@ -274,8 +283,28 @@ info \
|
||||
build_all \
|
||||
exit"
|
||||
set_arch native
|
||||
# command line action
|
||||
if [ ! -z $CMDACT ]; then
|
||||
if [ $CMDACT == "build" ]; then
|
||||
JS_ENABLE=1
|
||||
CC=g++
|
||||
./autogen.sh
|
||||
configure "$CC" "$LD" "$MAKE_HOST" "$LDFLAGS" "$LIBS" "$CXXFLAGS"
|
||||
if [ $? -eq 1 ]; then
|
||||
exit
|
||||
fi
|
||||
sed -i 's/^LIBS = .*/LIBS = -ltre -lssl -lcrypto -ldl -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -lidn -lexpat \/usr\/local\/lib\/quickjs\/libquickjs.a \/usr\/local\/lib\/libxml++-5.0.a -lxml2 -lz -licui18n -llzma -lsqlite3 -licuuc -licudata/g' Makefile.config
|
||||
build
|
||||
if [ $? -eq 1 ]; then
|
||||
exit
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
# user mode action
|
||||
select SEL in $CC_SEL; do
|
||||
if [ "$SEL" = "arch" ]; then
|
||||
set_arch native
|
||||
arch_menu
|
||||
elif [ "$SEL" = "build" ]; then
|
||||
configure "$CC" "$LD" "$MAKE_HOST" "$LDFLAGS" "$LIBS" "$CXXFLAGS"
|
||||
|
@ -682,7 +682,7 @@ if test "x$CONFIG_QUICKJS" = x; then
|
||||
|
||||
CFLAGS="$CFLAGS $DB_LOCALSTORAGE_CFLAGS $XMLPLUSPLUS_CFLAGS"
|
||||
|
||||
LIBS="$LIBS $DB_LOCALSTORAGE_LIBS $XMLPLUSPLUS_LIBS /usr/lib/quickjs/libquickjs.a"
|
||||
LIBS="$LIBS $DB_LOCALSTORAGE_LIBS $XMLPLUSPLUS_LIBS /usr/local/lib/quickjs/libquickjs.a"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
33
docker/lin64/Dockerfile
Normal file
33
docker/lin64/Dockerfile
Normal file
@ -0,0 +1,33 @@
|
||||
#
|
||||
# [ lin64 ] elinks docker development environment v0.1d
|
||||
#
|
||||
# with quickjs support
|
||||
#
|
||||
|
||||
# [*] base system
|
||||
|
||||
# get latest debian
|
||||
FROM debian:latest
|
||||
|
||||
# prepare system - commond base for all platforms
|
||||
RUN apt-get update && apt-get -y install bash \
|
||||
rsync vim screen git make automake
|
||||
|
||||
# [*] get sources and req libs
|
||||
RUN cd /root && git clone https://github.com/bellard/quickjs && cd /root && git clone https://github.com/libxmlplusplus/libxmlplusplus && cd /root && apt-get install -y libxml2-dev g++
|
||||
|
||||
# [*] build quickjs
|
||||
RUN cd /root/quickjs && make && make install
|
||||
|
||||
# [*] build libxmlplusplus
|
||||
RUN apt-get install -y mm-common && cd /root/libxmlplusplus && ./autogen.sh && ./configure --enable-static --prefix=/usr/local && make && make install
|
||||
|
||||
RUN ln -s /usr/local/include/libxml++-5.0/libxml++ /usr/local/include/libxml++ && ln -s /usr/local/lib/libxml++-5.0/include/libxml++config.h /usr/local/include/libxml++config.h && ln -s /usr/include/libxml2/libxml /usr/include/libxml
|
||||
|
||||
# [*] prepare openssl library and javascript preqreqs
|
||||
RUN apt-get -y install libssl-dev libsqlite3-dev zlib1g-dev liblzma-dev libtre-dev libidn11-dev libexpat1-dev
|
||||
|
||||
# disable caching for this step to get the newest elinks sources
|
||||
ARG NOCACHE=1
|
||||
RUN cd /root && git clone https://github.com/rkd77/elinks
|
||||
|
2
docker/lin64/build.sh
Executable file
2
docker/lin64/build.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
docker build --build-arg NOCACHE=0 -t "elinks-lin64-dev:latest" .
|
4
docker/lin64/cleanup.sh
Executable file
4
docker/lin64/cleanup.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
docker container stop elinks-lin64-dev
|
||||
docker container rm elinks-lin64-dev
|
||||
#docker image rm elinks-lin64-dev
|
6
docker/lin64/run.sh
Executable file
6
docker/lin64/run.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
docker run -it \
|
||||
--name=elinks-lin64-dev \
|
||||
-v /tmp:/tmp/host \
|
||||
elinks-lin64-dev:latest \
|
||||
/bin/bash
|
3
docker/lin64/shell.sh
Executable file
3
docker/lin64/shell.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
docker start elinks-lin64-dev
|
||||
docker exec -it elinks-lin64-dev bash
|
Loading…
Reference in New Issue
Block a user