diff options
author | Nick Smallbone <nick@smallbone.se> | 2024-10-06 17:02:05 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-10-08 10:13:31 +0700 |
commit | 4b4ae6b8524ddbdc859afb69b487969bd22faef8 (patch) | |
tree | 94b3dc862575d0ec20e45a24712fe7a785af1833 /development | |
parent | dcb4f499353387b6725503a479e83003b8ac9ea4 (diff) |
development/nim: Updated for version 2.2.0; new maintainer.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r-- | development/nim/README | 2 | ||||
-rw-r--r-- | development/nim/doinst.sh | 2 | ||||
-rw-r--r-- | development/nim/fix-lib-path.patch | 12 | ||||
-rw-r--r-- | development/nim/fix-nim-gdb-path.patch | 12 | ||||
-rw-r--r-- | development/nim/nim.SlackBuild | 82 | ||||
-rw-r--r-- | development/nim/nim.info | 10 | ||||
-rw-r--r-- | development/nim/remove-missing-documentation.patch | 108 | ||||
-rw-r--r-- | development/nim/slack-desc | 2 |
8 files changed, 197 insertions, 33 deletions
diff --git a/development/nim/README b/development/nim/README index 200ddf6389977..c7d503b4a1609 100644 --- a/development/nim/README +++ b/development/nim/README @@ -1,3 +1,5 @@ Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. + +This package also includes the Nimble package manager. diff --git a/development/nim/doinst.sh b/development/nim/doinst.sh index f10f578c2dd5e..6529a640ac920 100644 --- a/development/nim/doinst.sh +++ b/development/nim/doinst.sh @@ -25,3 +25,5 @@ preserve_perms() { preserve_perms etc/nim/nim.cfg.new preserve_perms etc/nim/nimdoc.cfg.new preserve_perms etc/nim/nimdoc.tex.cfg.new +preserve_perms etc/nim/config.nims.new +preserve_perms etc/nim/rename.rules.cfg.new diff --git a/development/nim/fix-lib-path.patch b/development/nim/fix-lib-path.patch new file mode 100644 index 0000000000000..50aea5da3946c --- /dev/null +++ b/development/nim/fix-lib-path.patch @@ -0,0 +1,12 @@ +diff -ur nim-2.2.0-orig/install.sh nim-2.2.0/install.sh +--- nim-2.2.0-orig/install.sh 2024-10-04 13:48:24.730391583 +0200 ++++ nim-2.2.0/install.sh 2024-10-06 15:57:45.877571032 +0200 +@@ -27,7 +27,7 @@ + "/usr/bin") + bindir=$1 + configdir="/etc/nim" +- libdir="/usr/lib/nim" ++ libdir="/usr/lib/nim/lib" + docdir="/usr/share/nim/doc" + datadir="/usr/share/nim/data" + nimbleDir="/opt/nimble/pkgs/nim-2.2.0" diff --git a/development/nim/fix-nim-gdb-path.patch b/development/nim/fix-nim-gdb-path.patch new file mode 100644 index 0000000000000..a0992d438d96c --- /dev/null +++ b/development/nim/fix-nim-gdb-path.patch @@ -0,0 +1,12 @@ +diff -ur nim-2.2.0-orig/bin/nim-gdb nim-2.2.0/bin/nim-gdb +--- nim-2.2.0-orig/bin/nim-gdb 2024-10-04 13:48:24.730391583 +0200 ++++ nim-2.2.0/bin/nim-gdb 2024-10-06 15:02:47.005375794 +0200 +@@ -14,7 +14,7 @@ + fi + + # Find out where the pretty printer Python module is +-GDB_PYTHON_MODULE_PATH="$NIM_SYSROOT/tools/debug/nim-gdb.py" ++GDB_PYTHON_MODULE_PATH="/usr/lib/nim/tools/nim-gdb.py" + + # Run GDB with the additional arguments that load the pretty printers + # Set the environment variable `NIM_GDB` to overwrite the call to a diff --git a/development/nim/nim.SlackBuild b/development/nim/nim.SlackBuild index d60a0557e66b8..3440dfbf32c87 100644 --- a/development/nim/nim.SlackBuild +++ b/development/nim/nim.SlackBuild @@ -2,6 +2,7 @@ # Slackware build script for nim +# Copyright 2024 by Nick Smallbone <nick@smallbone.se> # Copyright 2022 by Ruben Schuller <sb@rbn.im> # Maintained 2020-2021 by Benjamin Trigona-Harany <slackbuilds@jaxartes.net> # All rights reserved. @@ -26,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=nim -VERSION=${VERSION:-1.6.8} +VERSION=${VERSION:-2.2.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -50,8 +51,6 @@ fi TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -GUI=${GUI:-yes} -PGADMIN=${PGADMIN:-no} if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" @@ -62,6 +61,9 @@ elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +elif [ "$ARCH" = "aarch64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" LIBDIRSUFFIX="" @@ -82,38 +84,64 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -COMP_FLAGS="$SLKCFLAGS" \ -./build.sh - +patch -p1 < $CWD/remove-missing-documentation.patch +patch -p1 < $CWD/fix-lib-path.patch +patch -p1 < $CWD/fix-nim-gdb-path.patch +./build.sh --extraBuildArgs "$SLKCFLAGS" bin/nim c -d:release koch -./koch tools -d:release - -./install.sh pkg - -mkdir -p $PKG/usr -mv pkg/nim/bin $PKG/usr/ -for fn in nimble nimsuggest nimgrep; do cp bin/$fn $PKG/usr/bin/; done - -mkdir -p $PKG/usr/lib -mv pkg/nim/lib $PKG/usr/lib/nim -mv pkg/nim/compiler $PKG/usr/lib/nim/ -mv pkg/nim/compiler.nimble $PKG/usr/lib/nim/compiler/ - -mkdir -p $PKG/usr/include -mv $PKG/usr/lib/nim/*.h $PKG/usr/include/ - -mkdir -p $PKG/etc/nim -mv pkg/nim/config/nim.cfg $PKG/etc/nim/nim.cfg.new -mv pkg/nim/config/nimdoc.cfg $PKG/etc/nim/nimdoc.cfg.new -mv pkg/nim/config/nimdoc.tex.cfg $PKG/etc/nim/nimdoc.tex.cfg.new +./koch boot -d:release + +# Build extra tools, and documentation +./koch toolsNoExternal -d:release +./koch nimble -d:release +bin/nim c -d:release tools/niminst/niminst +# use --docCmd:skip to skip runnable examples because some require network access +./koch --localdocs doc -d:release --docCmd:skip + +DESTDIR=$PKG ./install.sh /usr/bin + +# Install extra binaries +for fn in nim-gdb nimble nimgrep nimpretty nimsuggest testament; do cp bin/$fn $PKG/usr/bin/; done +cp tools/niminst/niminst $PKG/usr/bin/ + +# Install miscellaneous stuff according to doc/packaging.md +mkdir -p $PKG/usr/lib/nim/tools/dochack $PKG/usr/lib/nim/doc +cp doc/nimdoc.css doc/nimdoc.cls $PKG/usr/lib/nim/doc/ +cp tools/dochack/dochack.js $PKG/usr/lib/nim/tools/dochack/ +cp tools/debug/nim-gdb.py $PKG/usr/lib/nim/tools/ + +# Install the compiler and dependencies +cp -r compiler $PKG/usr/lib/nim/lib +cp nim.nimble $PKG/usr/lib/nim/lib/compiler +mkdir -p $PKG/usr/lib/nim/lib/dist +cp -r dist/checksums $PKG/usr/lib/nim/lib/dist + +# Install completions +mkdir -p $PKG/usr/share/bash-completion/completions \ + $PKG/usr/share/zsh/site-functions +for i in tools/nim dist/nimble/nimble; do + cp $i.bash-completion $PKG/usr/share/bash-completion/completions/$(basename $i) + cp $i.zsh-completion $PKG/usr/share/zsh/site-functions/_$(basename $i) +done + +# Use .new for configuration files +for i in config.nims nim.cfg nimdoc.cfg nimdoc.tex.cfg rename.rules.cfg; do + mv $PKG/etc/nim/$i $PKG/etc/nim/$i.new +done +find $PKG -depth -type d -empty -delete # remove needless empty dirs find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \ grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ - copying.txt \ + copying.txt doc/html changelogs \ $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + dist/nimble/nimble-guide/docs \ + $PKG/usr/doc/$PRGNAM-$VERSION/nimble +rm $PKG/usr/doc/$PRGNAM-$VERSION/changelogs/readme.md +rm $PKG/usr/doc/$PRGNAM-$VERSION/changelogs/changelog_X_XX_X.md cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/development/nim/nim.info b/development/nim/nim.info index d7d8a94336131..6fafc57a424e1 100644 --- a/development/nim/nim.info +++ b/development/nim/nim.info @@ -1,10 +1,10 @@ PRGNAM="nim" -VERSION="1.6.8" +VERSION="2.2.0" HOMEPAGE="https://nim-lang.org" -DOWNLOAD="https://nim-lang.org/download/nim-1.6.8.tar.xz" -MD5SUM="d2a445ba7deeb27375e145826f35033e" +DOWNLOAD="https://nim-lang.org/download/nim-2.2.0.tar.xz" +MD5SUM="e2b4b57e1bc2e1e6b0d9766d17c46fb9" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" -MAINTAINER="Ruben Schuller" -EMAIL="sb@rbn.im" +MAINTAINER="Nick Smallbone" +EMAIL="nick@smallbone.se" diff --git a/development/nim/remove-missing-documentation.patch b/development/nim/remove-missing-documentation.patch new file mode 100644 index 0000000000000..0c88be760c7a5 --- /dev/null +++ b/development/nim/remove-missing-documentation.patch @@ -0,0 +1,108 @@ +diff -ur nim-2.2.0-orig/doc/lib.md nim-2.2.0/doc/lib.md +--- nim-2.2.0-orig/doc/lib.md 2024-10-04 13:48:24.723391623 +0200 ++++ nim-2.2.0/doc/lib.md 2024-10-06 14:28:26.817978213 +0200 +@@ -163,9 +163,6 @@ + * [objectdollar](objectdollar.html) + A generic `$` operator to convert objects to strings. + +-* [punycode](punycode.html) +- Implements a representation of Unicode with the limited ASCII character subset. +- + * [strbasics](strbasics.html) + Some high performance string operations. + +@@ -326,9 +323,6 @@ + * [asyncfile](asyncfile.html) + An asynchronous file reading and writing using `asyncdispatch`. + +-* [asyncftpclient](asyncftpclient.html) +- An asynchronous FTP client using the `asyncnet` module. +- + * [asynchttpserver](asynchttpserver.html) + An asynchronous HTTP server using the `asyncnet` module. + +@@ -364,9 +358,6 @@ + A selector API with backends specific to each OS. + Supported OS primitives: `epoll`, `kqueue`, `poll`, and `select` on Windows. + +-* [smtp](smtp.html) +- A simple SMTP client with support for both synchronous and asynchronous operation. +- + * [socketstreams](socketstreams.html) + An implementation of the streams interface for sockets. + +@@ -603,26 +594,6 @@ + Many help functions for handling regular expressions. + The current implementation uses PCRE. + +-Database support +----------------- +- +-* [db_mysql](db_mysql.html) +- A higher level MySQL database wrapper. The same interface is implemented +- for other databases too. +- +-* [db_odbc](db_odbc.html) +- A higher level ODBC database wrapper. The same interface is implemented +- for other databases too. +- +-* [db_postgres](db_postgres.html) +- A higher level PostgreSQL database wrapper. The same interface is implemented +- for other databases too. +- +-* [db_sqlite](db_sqlite.html) +- A higher level SQLite database wrapper. The same interface is implemented +- for other databases too. +- +- + Generic Operating System Services + --------------------------------- + +diff -ur nim-2.2.0-orig/tools/kochdocs.nim nim-2.2.0/tools/kochdocs.nim +--- nim-2.2.0-orig/tools/kochdocs.nim 2024-10-04 13:48:24.101395116 +0200 ++++ nim-2.2.0/tools/kochdocs.nim 2024-10-06 14:36:17.704553470 +0200 +@@ -94,7 +94,6 @@ + execFold(desc, cmd) + + const officialPackagesMarkdown = """ +-pkgs/atlas/doc/atlas.md + """.splitWhitespace() + + proc getMd2html(): seq[string] = +@@ -158,28 +157,9 @@ + """.splitWhitespace() + + officialPackagesList = """ +-pkgs/asyncftpclient/src/asyncftpclient.nim +-pkgs/smtp/src/smtp.nim +-pkgs/punycode/src/punycode.nim +-pkgs/db_connector/src/db_connector/db_common.nim +-pkgs/db_connector/src/db_connector/db_mysql.nim +-pkgs/db_connector/src/db_connector/db_odbc.nim +-pkgs/db_connector/src/db_connector/db_postgres.nim +-pkgs/db_connector/src/db_connector/db_sqlite.nim +-pkgs/checksums/src/checksums/md5.nim +-pkgs/checksums/src/checksums/sha1.nim +-pkgs/checksums/src/checksums/sha2.nim +-pkgs/checksums/src/checksums/sha3.nim +-pkgs/checksums/src/checksums/bcrypt.nim +-pkgs/htmlparser/src/htmlparser.nim + """.splitWhitespace() + + officialPackagesListWithoutIndex = """ +-pkgs/db_connector/src/db_connector/mysql.nim +-pkgs/db_connector/src/db_connector/sqlite3.nim +-pkgs/db_connector/src/db_connector/postgres.nim +-pkgs/db_connector/src/db_connector/odbcsql.nim +-pkgs/db_connector/src/db_connector/private/dbutils.nim + """.splitWhitespace() + + when (NimMajor, NimMinor) < (1, 1) or not declared(isRelativeTo): +@@ -348,7 +328,6 @@ + proc buildDocsDir*(args: string, dir: string) = + let args = nimArgs & " " & args + let docHackJsSource = buildJS() +- gitClonePackages(@["asyncftpclient", "punycode", "smtp", "db_connector", "checksums", "atlas", "htmlparser"]) + createDir(dir) + buildDocSamples(args, dir) + diff --git a/development/nim/slack-desc b/development/nim/slack-desc index f86ae92ca06ad..894667ace453d 100644 --- a/development/nim/slack-desc +++ b/development/nim/slack-desc @@ -12,7 +12,7 @@ nim: Nim is a statically typed compiled systems programming language. It nim: combines successful concepts from mature languages like Python, Ada nim: and Modula. nim: -nim: +nim: This package also includes the Nimble package manager. nim: nim: nim: |