Replies: 5 comments
-
Turning off |
Beta Was this translation helpful? Give feedback.
-
Thanks @alexesprit, this is my build script with the following relevant parts:
# build compiler
gcc $SLKCFLAGS -o v v.c -lm
# build tools
cat > tools/vup.v << EOF
fn main(){
println('This is a packaged v installation. v up is disabled')
}
EOF
for tool in tools/vrepl.v tools/vtest.v tools/vfmt.v tools/vcreate.v tools/vup.v; do
echo "build $tool"
./v build $tool
done
# build libraries
for lib in thirdparty/cJSON/cJSON thirdparty/bignum/bn thirdparty/glad/glad thirdparty/zip/zip ; do
(
cd ${lib%/*}
echo "build $lib.c"
gcc $SLKCFLAGS -I. -c ${lib##*/}.c -o ${lib##*/}.o
)
done
# install wrapper
mkdir -p $PKG/usr/bin
cat > $PKG/usr/bin/v << EOF
#!/bin/sh
/usr/lib$LIBDIRSUFFIX/$PRGNAM-$VERSION/v \$@
EOF
chmod 0755 $PKG/usr/bin/v
# update timestamps of executables post install to avoid recompilation of some tools
cat > $PKG/install/doinst.sh << EOF
touch /usr/lib$LIBDIRSUFFIX/$PRGNAM-$VERSION/tools/vrepl
touch /usr/lib$LIBDIRSUFFIX/$PRGNAM-$VERSION/tools/vtest
touch /usr/lib$LIBDIRSUFFIX/$PRGNAM-$VERSION/tools/vcreate
touch /usr/lib$LIBDIRSUFFIX/$PRGNAM-$VERSION/tools/vfmt
touch /usr/lib$LIBDIRSUFFIX/$PRGNAM-$VERSION/tools/vup
EOF the resulting package is
that seems to work fine (for now). Thanks |
Beta Was this translation helpful? Give feedback.
-
@ilmich , great work! You may need to edit your build script a little, since tools/ was recently moved to cmd/tools/ . Also, the command to build the cmd/tools/vfmt.v tool is slightly different than the others: |
Beta Was this translation helpful? Give feedback.
-
About:
I think it is also MIT. NB: it is possible to compile a specific version (given a commit hash) from the source: 0[19:47:39]delian@nemesis: /v/nv $ cmd/tools/oldv 7bf49ab
################# context.commit_v: 7bf49ab #####################
# v commit hash: 7bf49aba54a3372c9c3cb4b51d47f76e454b97ac
# checkout folder: /home/delian/.cache/v_at_7bf49ab
0[19:49:09]delian@nemesis: /v/nv $ /home/delian/.cache/v_at_7bf49ab/v version
V 0.1.24 7882312
0[19:50:14]delian@nemesis: /v/nv $ ./v version
V 0.1.25 5142747
0[19:50:22]delian@nemesis: /v/nv $ ^ Here, cmd/tools/oldv (which you can compile with Note: oldv needs to have internet access by default because it clones https://github.com/vlang/v and https://github.com/vlang/vc (although you can clone them locally then tell it to use the local folders if you want). |
Beta Was this translation helpful? Give feedback.
-
@ilmich THank you for your script and hard work, I'm very likely going to add Vlang to https://github.com/prologic/ulinux based on your script. Thanks heaps! |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm trying to package vlang for my linux distribution (slackware) and everything works pretty well, but i have two questions:
under what license can I redistribute the generated c source of vlang?!?!? I need it because it's currently impossible to compile a specific version from source.
by installing vlang as a system application it's possible to disable in some way the command up !?!?! Or I need to use external patches?!?!
Thanks in advance
Michele
Beta Was this translation helpful? Give feedback.
All reactions