Remilia's SlackBuild packages for Slackware Linux
修訂 | 1acc1022dbd8cec9ff96f1cc8a32da267ec6e128 (tree) |
---|---|
時間 | 2023-06-13 07:31:11 |
作者 | Remilia Scarlet <alexa@part...> |
Commiter | Remilia Scarlet |
Actually, remove crystal-lang for now so that we can just keep the
main branch stable.
@@ -1,27 +0,0 @@ | ||
1 | -Crystal is a programming language with the following goals: | |
2 | - | |
3 | -* Have a syntax similar to Ruby (but compatibility with it is not a goal). | |
4 | -* Statically type-checked but without having to specify the type of variables or | |
5 | - method arguments. | |
6 | -* Be able to call C code by writing bindings to it in Crystal. | |
7 | -* Have compile-time evaluation and generation of code, to avoid boilerplate | |
8 | - code. | |
9 | -* Compile to efficient native code. | |
10 | - | |
11 | -The x86-64 and aarch64 architectures are both supported by this SlackBuild. | |
12 | -This will not build a 32-bit version of Crystal. | |
13 | - | |
14 | -It is strongly suggested to also install my Shards SlackBuild. | |
15 | - | |
16 | -**NOTE 1**: This SlackBuild builds the compiler from scratch and CANNOT be | |
17 | -installed alongside my other SlackBuild, "crystal-lang-bin". Additionally, it | |
18 | -cannot be installed alongside the SlackBuild for crystal-lang on | |
19 | -slackbuilds.org. | |
20 | - | |
21 | -**NOTE 2**: This SlackBuild is **only** supported on Slackware-current at time | |
22 | -of writing! While it will build on 15.0, the resulting compiler will not be | |
23 | -able to build binaries that support multi-threadding. This is because the libgc | |
24 | -that comes with Slackware 15.0 is missing a required feature. | |
25 | - | |
26 | -**NOTE 3**: This uses a statically linked prebuilt binary from Alpine Linux to | |
27 | -bootstrap this process. |
@@ -1,139 +0,0 @@ | ||
1 | -#!/bin/bash | |
2 | - | |
3 | -# Slackware build script for Crystal | |
4 | -# | |
5 | -# Copyright 2023 Remilia Scarlet, Colorado, United States | |
6 | -# All rights reserved. | |
7 | -# | |
8 | -# Redistribution and use of this script, with or without modification, is | |
9 | -# permitted provided that the following conditions are met: | |
10 | -# | |
11 | -# 1. Redistributions of this script must retain the above copyright | |
12 | -# notice, this list of conditions and the following disclaimer. | |
13 | -# | |
14 | -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED | |
15 | -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |
16 | -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | |
17 | -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
18 | -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | |
19 | -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | |
20 | -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | |
21 | -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
22 | -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | |
23 | -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
24 | -cd $(dirname $0) ; CWD=$(pwd) | |
25 | - | |
26 | -PRGNAM=crystal-lang | |
27 | -PRGNAM_SHORT=crystal | |
28 | -VERSION=${VERSION:-1.8.2} | |
29 | -BUILD=${BUILD:-1} | |
30 | -TAG=${TAG:-_rem} | |
31 | -PKGTYPE=${PKGTYPE:-tgz} | |
32 | - | |
33 | -# Variables for the pre-compiled binary we use to bootstrap things. | |
34 | -PRECOMP_VERSION=${PRECOMP_VERSION:-1.7.3} | |
35 | -PRECOMP_SUFFIX="alpine-linux-musl" | |
36 | - | |
37 | -# Automatically determine the architecture we're building on: | |
38 | -if [ -z "$ARCH" ]; then | |
39 | - case "$( uname -m )" in | |
40 | - i?86) ARCH=i586 ;; | |
41 | - arm*) ARCH=arm ;; | |
42 | - # Unless $ARCH is already set, use uname -m for all other archs: | |
43 | - *) ARCH=$( uname -m ) ;; | |
44 | - esac | |
45 | -fi | |
46 | - | |
47 | -if [ "$ARCH" = "i586" ]; then | |
48 | - echo "Not supported on this architecture via this SlackBuild" | |
49 | - exit 1 | |
50 | -elif [ "$ARCH" = "i686" ]; then | |
51 | - echo "Not supported on this architecture via this SlackBuild" | |
52 | - exit 1 | |
53 | -elif [ "$ARCH" = "x86_64" ]; then | |
54 | - SLKCFLAGS="-O2 -fPIC" | |
55 | - LIBDIRSUFFIX="64" | |
56 | - PRECOMP_ARCH="x86_64" | |
57 | -elif [ "$ARCH" = "aarch64" ]; then | |
58 | - SLKCFLAGS="-O2 -fPIC" | |
59 | - LIBDIRSUFFIX="64" | |
60 | - PRECOMP_ARCH="aarch64" | |
61 | -else | |
62 | - echo "Not supported on this architecture via this SlackBuild" | |
63 | - exit 1 | |
64 | -fi | |
65 | - | |
66 | -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what | |
67 | -# the name of the created package would be, and then exit. This information | |
68 | -# could be useful to other scripts. | |
69 | -if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then | |
70 | - echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" | |
71 | - exit 0 | |
72 | -fi | |
73 | - | |
74 | -TMP=${TMP:-/tmp/SBo} | |
75 | -PKG=$TMP/package-$PRGNAM | |
76 | -OUTPUT=${OUTPUT:-/tmp} | |
77 | - | |
78 | -set -e # Exit on most errors | |
79 | - | |
80 | -rm -rf $PKG | |
81 | -mkdir -p $TMP $PKG $OUTPUT | |
82 | -cd $TMP | |
83 | -rm -rf $PRGNAM_SHORT-$VERSION | |
84 | -tar xvf $CWD/$PRGNAM_SHORT-$VERSION.tar.gz | |
85 | -cd $PRGNAM_SHORT-$VERSION | |
86 | - | |
87 | -# Unpack the pre-compiled binary that we'll use for bootstrapping. | |
88 | -tar xvf $CWD/$PRGNAM_SHORT-$PRECOMP_VERSION-$PRECOMP_ARCH-$PRECOMP_SUFFIX.tar.gz | |
89 | - | |
90 | -chown -R root:root . | |
91 | -find -L . \ | |
92 | - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ | |
93 | - -o -perm 511 \) -exec chmod 755 {} \; -o \ | |
94 | - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ | |
95 | - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; | |
96 | - | |
97 | -# Change the path so that we use the pre-compiled binary for bootstrapping. | |
98 | -PATH="$PRGNAM_SHORT-$PRECOMP_VERSION-$PRECOMP_ARCH-$PRECOMP_SUFFIX/bin:$PATH" | |
99 | - | |
100 | -# Patch from upstream to support LLVM 16, which will be in Crystal >= 1.9, but | |
101 | -# not in 1.8.2 | |
102 | -patch -p1 < $CWD/support-llvm-16.patch | |
103 | - | |
104 | -# Build the compiler | |
105 | -CFLAGS="$SLKCFLAGS" \ | |
106 | - make release=1 progress=1 interpreter=1 | |
107 | -make install PREFIX=/usr DESTDIR=$PKG | |
108 | - | |
109 | -# Fix some installation directories | |
110 | -mv -v $PKG/usr/share/man $PKG/usr/man | |
111 | - | |
112 | -# Strip binaries and libraries - this can be done with 'make install-strip' | |
113 | -# in many source trees, and that's usually acceptable if so, but if not, | |
114 | -# use this: | |
115 | -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | |
116 | - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true | |
117 | - | |
118 | -# Copy program documentation into the package | |
119 | -# The included documentation varies from one application to another, so be sure | |
120 | -# to adjust your script as needed | |
121 | -# Also, include the SlackBuild script in the documentation directory | |
122 | -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION | |
123 | -cp -a README.md $PKG/usr/doc/$PRGNAM-$VERSION | |
124 | -cp -a CHANGELOG.md $PKG/usr/doc/$PRGNAM-$VERSION | |
125 | -mv -v $PKG/usr/share/licenses/crystal/LICENSE $PKG/usr/doc/$PRGNAM-$VERSION | |
126 | -rmdir $PKG/usr/share/licenses/crystal # Not needed | |
127 | -rmdir $PKG/usr/share/licenses # Not needed | |
128 | -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild | |
129 | - | |
130 | -# Copy the slack-desc into ./install | |
131 | -mkdir -p $PKG/install | |
132 | -cat $CWD/slack-desc > $PKG/install/slack-desc | |
133 | - | |
134 | -# Make the package; be sure to leave it in $OUTPUT | |
135 | -# If package symlinks need to be created during install *before* | |
136 | -# your custom contents of doinst.sh runs, then add the -p switch to | |
137 | -# the makepkg command below -- see makepkg(8) for details | |
138 | -cd $PKG | |
139 | -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |
@@ -1,16 +0,0 @@ | ||
1 | -PRGNAM="crystal-lang" | |
2 | -VERSION="1.8.2" | |
3 | -HOMEPAGE="https://crystal-lang.org" | |
4 | -DOWNLOAD="UNSUPPORTED" | |
5 | -MD5SUM="" | |
6 | -DOWNLOAD_x86_64="https://github.com/crystal-lang/crystal/archive/refs/tags/1.8.2.tar.gz \ | |
7 | - https://dev.alpinelinux.org/archive/crystal/crystal-1.7.3-x86_64-alpine-linux-musl.tar.gz" | |
8 | -MD5SUM_x86_64="817499a459e5ad6ff21c9245f1573016 \ | |
9 | - 7d54ec9bfb464bc2b8b41bf2ea488a30" | |
10 | -DOWNLOAD_aarch64="https://github.com/crystal-lang/crystal/archive/refs/tags/1.8.2.tar.gz \ | |
11 | - https://dev.alpinelinux.org/archive/crystal/crystal-1.7.3-aarch64-alpine-linux-musl.tar.gz" | |
12 | -MD5SUM_aarch64="817499a459e5ad6ff21c9245f1573016 \ | |
13 | - f5905f49daf419cf1ffab4a8329847d5" | |
14 | -REQUIRES="" | |
15 | -MAINTAINER="Remilia Scarlet" | |
16 | -EMAIL="remilia@sdf.org" |
@@ -1,19 +0,0 @@ | ||
1 | -# HOW TO EDIT THIS FILE: | |
2 | -# The "handy ruler" below makes it easier to edit a package description. | |
3 | -# Line up the first '|' above the ':' following the base package name, and | |
4 | -# the '|' on the right side marks the last column you can put a character in. | |
5 | -# You must make exactly 11 lines for the formatting to be correct. It's also | |
6 | -# customary to leave one space after the ':' except on otherwise blank lines. | |
7 | - | |
8 | - |-----handy-ruler------------------------------------------------------| | |
9 | -crystal-lang: crystal-lang (a compiled Ruby-like language with static typing) | |
10 | -crystal-lang: | |
11 | -crystal-lang: Crystal is a statically typed programming language with Ruby-like | |
12 | -crystal-lang: syntax, and built on an LLVM backend. | |
13 | -crystal-lang: | |
14 | -crystal-lang: This is a repackaging of the official pre-compiled binaries. | |
15 | -crystal-lang: | |
16 | -crystal-lang: | |
17 | -crystal-lang: | |
18 | -crystal-lang: Homepage: https://crystal-lang.org/ | |
19 | -crystal-lang: | |
\ No newline at end of file |
@@ -1,29 +0,0 @@ | ||
1 | -diff -u -r ./src/llvm/ext/llvm-versions.txt ../new/src/llvm/ext/llvm-versions.txt | |
2 | ---- ./src/llvm/ext/llvm-versions.txt 2023-05-09 02:52:26.000000000 -0600 | |
3 | -+++ ./src/llvm/ext/llvm-versions.txt 2023-06-12 16:21:37.411411241 -0600 | |
4 | -@@ -1 +1 @@ | |
5 | --15.0 14.0 13.0 12.0 11.1 11.0 10.0 9.0 8.0 | |
6 | -+16.0 15.0 14.0 13.0 12.0 11.1 11.0 10.0 9.0 8.0 | |
7 | -diff -u -r ./src/llvm/ext/llvm_ext.cc ../new/src/llvm/ext/llvm_ext.cc | |
8 | ---- ./src/llvm/ext/llvm_ext.cc 2023-05-09 02:52:26.000000000 -0600 | |
9 | -+++ .w/src/llvm/ext/llvm_ext.cc 2023-06-12 16:21:24.943165258 -0600 | |
10 | -@@ -25,6 +25,10 @@ | |
11 | - #include <llvm/Bitcode/BitcodeWriter.h> | |
12 | - #include <llvm/Analysis/ModuleSummaryAnalysis.h> | |
13 | - | |
14 | -+#if LLVM_VERSION_GE(16, 0) | |
15 | -+#define makeArrayRef ArrayRef | |
16 | -+#endif | |
17 | -+ | |
18 | - typedef DIBuilder *DIBuilderRef; | |
19 | - #define DIArray DINodeArray | |
20 | - template <typename T> T *unwrapDIptr(LLVMMetadataRef v) { | |
21 | -@@ -358,7 +362,7 @@ | |
22 | - .setOptLevel((CodeGenOpt::Level)options.OptLevel) | |
23 | - .setTargetOptions(targetOptions); | |
24 | - bool JIT; | |
25 | -- if (Optional<CodeModel::Model> CM = unwrap(options.CodeModel, JIT)) | |
26 | -+ if (auto CM = unwrap(options.CodeModel, JIT)) | |
27 | - builder.setCodeModel(*CM); | |
28 | - if (options.MCJMM) | |
29 | - builder.setMCJITMemoryManager( |