From 51666c2d5ae633fbea8a9239827d8ae59734d7c3 Mon Sep 17 00:00:00 2001 From: Thomas Hobson Date: Sat, 6 Mar 2021 01:06:00 +1300 Subject: [PATCH] pkg(mono-6.12.0): change to new build system --- packages/csharp-mono.mk | 34 ------------------- packages/mono-6.12.0/build.sh | 16 +++++++++ packages/mono-6.12.0/compile | 3 ++ packages/mono-6.12.0/environment | 1 + packages/mono-6.12.0/metadata.json | 7 ++++ packages/mono-6.12.0/run | 5 +++ .../{csharp-mono.test => mono-6.12.0/test.cs} | 0 7 files changed, 32 insertions(+), 34 deletions(-) delete mode 100644 packages/csharp-mono.mk create mode 100755 packages/mono-6.12.0/build.sh create mode 100644 packages/mono-6.12.0/compile create mode 100644 packages/mono-6.12.0/environment create mode 100644 packages/mono-6.12.0/metadata.json create mode 100644 packages/mono-6.12.0/run rename packages/{csharp-mono.test => mono-6.12.0/test.cs} (100%) diff --git a/packages/csharp-mono.mk b/packages/csharp-mono.mk deleted file mode 100644 index b9d7f54..0000000 --- a/packages/csharp-mono.mk +++ /dev/null @@ -1,34 +0,0 @@ -NAME=csharp-mono -AUTHOR=Thomas Hobson -DEPENDENCIES= -COMPILED=true -VERSIONS=6.12.0 - -include common.mk - - -VERSION_6.12.0_FULL=6.12.0.122 - -VERSION_FULL=${VERSION_${VERSION}_FULL} - - -${RUN_FILE}: - echo 'CODE=$${1/cs/exe}' > $@ - echo 'shift' >> $@ - echo 'mono $$CODE $$*' >> $@ - -${COMPILE_FILE}: - echo 'csc $$*' > $@ - -${ENV_FILE}: - echo 'export PATH=$$PWD/bin:$$PATH' > $@ - -${BIN_DIR}: ${BUILD_DIR}mono-${VERSION_FULL}/ - $(eval TMP_DIR=${PWD}/${BUILD_DIR}tmpout/) - cd $< && ./configure --prefix ${PREFIX} - $(MAKE) -j64 -C $< - DESTDIR=${TMP_DIR} $(MAKE) -C $< install - mv ${TMP_DIR}${PREFIX} ${BIN_DIR} && rm -r ${TMP_DIR} - -${BUILD_DIR}mono-${VERSION_FULL}.tar.xz: - curl "https://download.mono-project.com/sources/mono/mono-${VERSION_FULL}.tar.xz" -o $@ diff --git a/packages/mono-6.12.0/build.sh b/packages/mono-6.12.0/build.sh new file mode 100755 index 0000000..0dddd14 --- /dev/null +++ b/packages/mono-6.12.0/build.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +mkdir -p build/tmp build/mono +cd build + +curl "https://download.mono-project.com/sources/mono/mono-6.12.0.122.tar.xz" -o mono.tar.xz +tar xf mono.tar.xz --strip-components=1 -C mono + +cd mono + +./configure --prefix /piston/packages/mono/6.12.0/mono-6.12.0 + +make +DESTDIR=build/tmp make install + +mv build/tmp/piston/packages/mono/6.12.0/mono-6.12.0 ../../output diff --git a/packages/mono-6.12.0/compile b/packages/mono-6.12.0/compile new file mode 100644 index 0000000..3151cde --- /dev/null +++ b/packages/mono-6.12.0/compile @@ -0,0 +1,3 @@ +#!/bin/bash + +csc $* \ No newline at end of file diff --git a/packages/mono-6.12.0/environment b/packages/mono-6.12.0/environment new file mode 100644 index 0000000..98fd770 --- /dev/null +++ b/packages/mono-6.12.0/environment @@ -0,0 +1 @@ +export PATH=$PWD:$PATH \ No newline at end of file diff --git a/packages/mono-6.12.0/metadata.json b/packages/mono-6.12.0/metadata.json new file mode 100644 index 0000000..24837d9 --- /dev/null +++ b/packages/mono-6.12.0/metadata.json @@ -0,0 +1,7 @@ +{ + "language": "mono", + "version": "6.12.0", + "author": "Thomas Hobson ", + "dependencies": {}, + "aliases": ["csharp", "cs"] +} \ No newline at end of file diff --git a/packages/mono-6.12.0/run b/packages/mono-6.12.0/run new file mode 100644 index 0000000..9d9b61a --- /dev/null +++ b/packages/mono-6.12.0/run @@ -0,0 +1,5 @@ +#!/bin/bash + +CODE=${1/cs/exe} +shift +mono $CODE $* \ No newline at end of file diff --git a/packages/csharp-mono.test b/packages/mono-6.12.0/test.cs similarity index 100% rename from packages/csharp-mono.test rename to packages/mono-6.12.0/test.cs