Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg(ada-2012): Added ada 2012 #432

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions packages/ada/2012/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

# Using the precompiled binary packages from https://github.com/annexi-strayline/gnat-packs
compname="gnat-10.3.0-base.tar.xz"
curl -L "https://gnat-packs.annexi-strayline.com/x86_64-linux-gnu/gnat-10.3.0-base.tar.xz" -o $compname

xz -cd $compname | sudo tar xP

#curl -L "https://storage.googleapis.com/dart-archive/channels/stable/release/2.12.1/sdk/dartsdk-linux-x64-release.zip" -o dart.zip
#
#unzip dart.zip
#rm dart.zip
#
#cp -r dart-sdk/* .
#rm -rf dart-sdk
#
#chmod -R +rx bin


30 changes: 30 additions & 0 deletions packages/ada/2012/compile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash


# split out all units in to their own files
gnatchop $@

# TODO try to compile more than just the hello unit
if [ -e "test.adb" ]
then
gnatmake "test.adb"
else
echo "It looks like you don't have a \"test\" unit"
fi



#case "${PISTON_LANGUAGE}" in
# ada)
# rename 's/$/\.cs/' "$@" # Add .cs extension
# csc -out:out *.cs
# ;;
# basic)
# rename 's/$/\.vb/' "$@" # Add .vb extension
# vbnc -out:out *.vb
# ;;
# *)
# echo "How did you get here? (${PISTON_LANGUAGE})"
# exit 1
# ;;
#esac
7 changes: 7 additions & 0 deletions packages/ada/2012/environment
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

# Put 'export' statements here for environment variables
#export PATH=$PWD/bin:$PATH
export PATH=/opt/gcc-fsf-gnat/bin:$PATH
export LD_LIBRARY_PATH=/opt/gcc-fsf-gnat/lib64:/opt/gcc-fsf-gnat/lib

5 changes: 5 additions & 0 deletions packages/ada/2012/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"language": "ada",
"version": "2012",
"aliases": ["gnat"]
}
14 changes: 14 additions & 0 deletions packages/ada/2012/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

# Put instructions to run the runtime
#dart run "$@"

# assure there is only one unit in the given file
gnatchop "$1"

numSourceFiles=$(ls -1q *.adb | wc -l)

gnatmake "test.adb"



6 changes: 6 additions & 0 deletions packages/ada/2012/test.adb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
with Ada.Text_IO;
use Ada.Text_IO;
procedure Code is
begin
Put_Line ("OK");
end Code;