nim: update to 1.6.0 (and fixes + cleanup)
Version bump to 1.6.0 including the following changes: - Nim now comes with testament - Fusion library is no longer bundled with nim - Examples no longer come with nim - FIX - non-x86_64/i686 nim.cfg compiler configuration Non-x86_64/i686 builds no longer end up with a broken nim.cfg which will try to use the package build time $CC to build packages for the package architecture as well as a bunch of others (which will simply not work). - FIX - arm nim.cfg compiler configuration The default arm.linux.gcc.(linker)?exe variables are now commented on non-x86_64/i686 builds to ensure that arm packages don't end up with the same issue as above. - CLEANUP - use koch to build non-x86_64/i686 tools The loop was unnecessary. - note: This means nimsuggest is now built without -d:release on all builds (not just x86_64/i686 builds). I am not sure if this is intentional or an upstream bug, should be investigated at some point. - CLEANUP - use make to build the bootstrap compiler
This commit is contained in:
parent
51607200f9
commit
d6763d1f26
|
@ -1,13 +1,11 @@
|
||||||
# Template file for 'nim'
|
# Template file for 'nim'
|
||||||
pkgname=nim
|
pkgname=nim
|
||||||
version=1.4.8
|
version=1.6.0
|
||||||
revision=1
|
revision=1
|
||||||
_cversion=0.20.0
|
_c1version=561b417c65791cd8356b5f73620914ceff845d10
|
||||||
_nimbleversion=0.12.0
|
_nimbleversion=0.13.1
|
||||||
_fusionversion=e942c649892b2ae3802851fba6bc5d251326e5fb
|
|
||||||
create_wrksrc=yes
|
create_wrksrc=yes
|
||||||
build_wrksrc="Nim-$version"
|
build_wrksrc="Nim-$version"
|
||||||
hostmakedepends="ed"
|
|
||||||
depends="gcc openssl-devel"
|
depends="gcc openssl-devel"
|
||||||
short_desc="Nim programming language"
|
short_desc="Nim programming language"
|
||||||
maintainer="allan <mail@may.mooo.com>"
|
maintainer="allan <mail@may.mooo.com>"
|
||||||
|
@ -15,31 +13,27 @@ license="MIT"
|
||||||
homepage="https://nim-lang.org/"
|
homepage="https://nim-lang.org/"
|
||||||
_ghsite="https://github.com/nim-lang"
|
_ghsite="https://github.com/nim-lang"
|
||||||
distfiles="${_ghsite}/Nim/archive/v${version}.tar.gz
|
distfiles="${_ghsite}/Nim/archive/v${version}.tar.gz
|
||||||
${_ghsite}/csources/archive/v${_cversion}.tar.gz>csources-${_cversion}.tar.gz
|
${_ghsite}/csources_v1/archive/${_c1version}.tar.gz>csources_v1-${_c1version}.tar.gz
|
||||||
${_ghsite}/nimble/archive/v${_nimbleversion}.tar.gz>nimble-${_nimbleversion}.tar.gz
|
${_ghsite}/nimble/archive/v${_nimbleversion}.tar.gz>nimble-${_nimbleversion}.tar.gz"
|
||||||
${_ghsite}/fusion/archive/${_fusionversion}.tar.gz>fusion-${_fusionversion}.tar.gz"
|
checksum="c202cfd24a24480da1cf851e1265b87edb22710bb42286a57b1a99c83b6a8315
|
||||||
checksum="8a687beb30670dc4eadcfefd1198d4238af283dc716438ac2342a7d65e07d9e9
|
71c823444c794a12da9027d19d6a717dd7759521ecbbe28190b08372142607ec
|
||||||
5e6fd15d90df1a8cb7614c4ffc70aa8c4198cd854d7742016202b96dd0228d3c
|
e6aa8d9ee4b3ed0321dca329b4a38fa546771b9729984482fb50fe73d3777f5d"
|
||||||
0b88d91a450f31641f85379f2d76afb0a013cf783e62144a6534525b9cb1cbac
|
|
||||||
76d10a2f0f25ba7fb3393bdb800c75e8084758d8ce69e63d07926cd36f555084"
|
|
||||||
|
|
||||||
post_extract() {
|
post_extract() {
|
||||||
mv csources-$_cversion $build_wrksrc/csources
|
mv csources_v1-$_c1version $build_wrksrc/csources_v1
|
||||||
mkdir $build_wrksrc/dist
|
mkdir $build_wrksrc/dist
|
||||||
mv nimble-$_nimbleversion $build_wrksrc/dist/nimble
|
mv nimble-$_nimbleversion $build_wrksrc/dist/nimble
|
||||||
mv fusion-$_fusionversion $build_wrksrc/dist/fusion
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_build() {
|
do_build() {
|
||||||
cd csources
|
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
i686*)
|
i686*)
|
||||||
CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= \
|
CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= \
|
||||||
sh build.sh --cpu i686;;
|
make -C csources_v1 ucpu=i686 ${makejobs};;
|
||||||
*)
|
*)
|
||||||
CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= sh build.sh;;
|
CC=cc LD=cc CFLAGS="-Os -pipe" LDFLAGS= \
|
||||||
|
make -C csources_v1 ${makejobs};;
|
||||||
esac
|
esac
|
||||||
cd ..
|
|
||||||
|
|
||||||
bin/nim c koch
|
bin/nim c koch
|
||||||
./koch boot -d:release -d:danger
|
./koch boot -d:release -d:danger
|
||||||
|
@ -54,32 +48,15 @@ do_build() {
|
||||||
|
|
||||||
case "$XBPS_TARGET_MACHINE"
|
case "$XBPS_TARGET_MACHINE"
|
||||||
in arm*|aarch64*|ppc*)
|
in arm*|aarch64*|ppc*)
|
||||||
ed config/nim.cfg <<-EDIT
|
vsed -i config/nim.cfg -e 's/^arm\.linux\.gcc\.\(linker\)\?exe /#&/'
|
||||||
,s/^arm.linux.gcc.exe .*/arm.linux.gcc.exe = "$CC"/
|
cat >>config/nim.cfg <<-EDIT
|
||||||
,s/^arm.linux.gcc.linkerexe .*/arm.linux.gcc.linkerexe = "$CC"/
|
# VOIDLINUX TEMP
|
||||||
a
|
$_arch.linux.gcc.exe = "$CC"
|
||||||
arm64.linux.gcc.exe = "$CC"
|
$_arch.linux.gcc.linkerexe = "$CC"
|
||||||
arm64.linux.gcc.linkerexe = "$CC"
|
|
||||||
powerpc.linux.gcc.exe = "$CC"
|
|
||||||
powerpc.linux.gcc.linkerexe = "$CC"
|
|
||||||
powerpc64.linux.gcc.exe = "$CC"
|
|
||||||
powerpc64.linux.gcc.linkerexe = "$CC"
|
|
||||||
powerpc64el.linux.gcc.exe = "$CC"
|
|
||||||
powerpc64el.linux.gcc.linkerexe = "$CC"
|
|
||||||
.
|
|
||||||
w
|
|
||||||
q
|
|
||||||
EDIT
|
EDIT
|
||||||
bin/nim c -d:release -d:danger --os:linux --cpu:$_arch --listCmd compiler/nim
|
bin/nim c -d:release -d:danger --os:linux --cpu:$_arch --listCmd compiler/nim
|
||||||
for _p in \
|
./koch tools --os:linux --cpu:$_arch --listCmd
|
||||||
dist/nimble/src/nimble \
|
vsed -i config/nim.cfg -e '/^# VOIDLINUX TEMP$/,$d'
|
||||||
tools/nimgrep \
|
|
||||||
nimsuggest/nimsuggest \
|
|
||||||
nimpretty/nimpretty
|
|
||||||
do
|
|
||||||
bin/nim c -d:release --os:linux --cpu:$_arch --listCmd $_p
|
|
||||||
mv $_p bin
|
|
||||||
done
|
|
||||||
;; *)
|
;; *)
|
||||||
./koch tools
|
./koch tools
|
||||||
esac
|
esac
|
||||||
|
@ -95,14 +72,13 @@ do_install() {
|
||||||
vmkdir usr/bin
|
vmkdir usr/bin
|
||||||
vmkdir usr/share/nim
|
vmkdir usr/share/nim
|
||||||
ln -sf /usr/lib/nim/bin/nim ${DESTDIR}/usr/bin/nim
|
ln -sf /usr/lib/nim/bin/nim ${DESTDIR}/usr/bin/nim
|
||||||
for _f in nimble nimsuggest nimgrep nimpretty; do
|
for _f in nimble nimsuggest nimgrep nimpretty testament; do
|
||||||
chmod 0755 bin/$_f
|
chmod 0755 bin/$_f
|
||||||
cp bin/$_f ${DESTDIR}/usr/lib/nim/bin
|
cp bin/$_f ${DESTDIR}/usr/lib/nim/bin
|
||||||
ln -sf /usr/lib/nim/bin/$_f ${DESTDIR}/usr/bin/$_f
|
ln -sf /usr/lib/nim/bin/$_f ${DESTDIR}/usr/bin/$_f
|
||||||
done
|
done
|
||||||
cp -r nimsuggest nimpretty doc examples ${DESTDIR}/usr/lib/nim
|
cp -r nimsuggest nimpretty doc ${DESTDIR}/usr/lib/nim
|
||||||
ln -sf /usr/lib/nim/doc ${DESTDIR}/usr/share/nim/doc
|
ln -sf /usr/lib/nim/doc ${DESTDIR}/usr/share/nim/doc
|
||||||
ln -sf /usr/lib/nim/examples ${DESTDIR}/usr/share/nim/examples
|
|
||||||
ln -sf /usr/lib/nim/nimsuggest ${DESTDIR}/usr/share/nim/nimsuggest
|
ln -sf /usr/lib/nim/nimsuggest ${DESTDIR}/usr/share/nim/nimsuggest
|
||||||
ln -sf /usr/lib/nim/nimpretty ${DESTDIR}/usr/share/nim/nimpretty
|
ln -sf /usr/lib/nim/nimpretty ${DESTDIR}/usr/share/nim/nimpretty
|
||||||
vlicense copying.txt
|
vlicense copying.txt
|
||||||
|
|
Loading…
Reference in New Issue