mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -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 ' --\ /--'
|
||||||
echo ' '
|
echo ' '
|
||||||
|
|
||||||
|
|
||||||
|
JS_ENABLE=0
|
||||||
|
|
||||||
gen_conf() {
|
gen_conf() {
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
}
|
}
|
||||||
@ -33,17 +36,17 @@ configure() {
|
|||||||
# Update: Thanks to JF for this solution for solving
|
# Update: Thanks to JF for this solution for solving
|
||||||
# crashes using pthread
|
# crashes using pthread
|
||||||
# -Wl,--whole-archive -lpthread -Wl,--no-whole-archive
|
# -Wl,--whole-archive -lpthread -Wl,--no-whole-archive
|
||||||
time \
|
BUILD_CMD="time \
|
||||||
CC=$1 \
|
CC='$1' \
|
||||||
LD=$2 \
|
LD='$2' \
|
||||||
LDFLAGS=$4 \
|
LDFLAGS='$4' \
|
||||||
CXX=$CXX_CUST \
|
CXX=$CXX_CUST \
|
||||||
CFLAGS="-O2 -I/usr/local/include $6" \
|
CFLAGS='$6' \
|
||||||
LIBS=$5 \
|
LIBS='$5' \
|
||||||
CXXFLAGS=$6 \
|
CXXFLAGS='$6' \
|
||||||
PKG_CONFIG="./pkg-config.sh" \
|
PKG_CONFIG='./pkg-config.sh' \
|
||||||
./configure -C \
|
./configure -C \
|
||||||
--host=$3 \
|
--host='$3' \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--enable-256-colors \
|
--enable-256-colors \
|
||||||
--enable-fastmem \
|
--enable-fastmem \
|
||||||
@ -75,7 +78,12 @@ configure() {
|
|||||||
--without-terminfo \
|
--without-terminfo \
|
||||||
--without-zlib \
|
--without-zlib \
|
||||||
--without-zstd \
|
--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
|
if [ $? -eq 0 ]; then
|
||||||
echo "--[ Configuration Sucessfull ]--"
|
echo "--[ Configuration Sucessfull ]--"
|
||||||
# turn off warnings
|
# turn off warnings
|
||||||
@ -222,8 +230,8 @@ set_arch() {
|
|||||||
LD="ld"
|
LD="ld"
|
||||||
MAKE_HOST=""
|
MAKE_HOST=""
|
||||||
BIN_SUFFIX=""
|
BIN_SUFFIX=""
|
||||||
CXXFLAGS=""
|
CXXFLAGS="-I/usr/local/include"
|
||||||
LDFLAGS=""
|
LDFLAGS="-L/usr/local/lib"
|
||||||
LIBS="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive"
|
LIBS="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -264,6 +272,7 @@ arch_menu() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# MAIN LOOP
|
# MAIN LOOP
|
||||||
|
CMDACT=$1
|
||||||
ARCHIT=""
|
ARCHIT=""
|
||||||
BIN_SUFFIX=""
|
BIN_SUFFIX=""
|
||||||
ARCHS="lin32 lin64 win32 win64 arm32 arm64 djgpp native"
|
ARCHS="lin32 lin64 win32 win64 arm32 arm64 djgpp native"
|
||||||
@ -274,8 +283,28 @@ info \
|
|||||||
build_all \
|
build_all \
|
||||||
exit"
|
exit"
|
||||||
set_arch native
|
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
|
select SEL in $CC_SEL; do
|
||||||
if [ "$SEL" = "arch" ]; then
|
if [ "$SEL" = "arch" ]; then
|
||||||
|
set_arch native
|
||||||
arch_menu
|
arch_menu
|
||||||
elif [ "$SEL" = "build" ]; then
|
elif [ "$SEL" = "build" ]; then
|
||||||
configure "$CC" "$LD" "$MAKE_HOST" "$LDFLAGS" "$LIBS" "$CXXFLAGS"
|
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"
|
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
|
else
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
fi
|
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…
x
Reference in New Issue
Block a user