From 46c5117b92242b44996b269a3e571adcf4fbc59f Mon Sep 17 00:00:00 2001 From: Pedro Cruz Date: Tue, 20 Dec 2022 12:13:59 -0400 Subject: [PATCH] +solidity (#35) Co-authored-by: Max Howell --- projects/soliditylang.org/fixture.sol | 7 +++++ projects/soliditylang.org/package.yml | 41 +++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 projects/soliditylang.org/fixture.sol create mode 100644 projects/soliditylang.org/package.yml diff --git a/projects/soliditylang.org/fixture.sol b/projects/soliditylang.org/fixture.sol new file mode 100644 index 00000000..d0b8d82f --- /dev/null +++ b/projects/soliditylang.org/fixture.sol @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: GPL-3.0 +pragma solidity ^0.8.0; +contract HelloWorld { + function helloWorld() external pure returns (string memory) { + return "Hello, World!"; + } +} diff --git a/projects/soliditylang.org/package.yml b/projects/soliditylang.org/package.yml new file mode 100644 index 00000000..0e9ac649 --- /dev/null +++ b/projects/soliditylang.org/package.yml @@ -0,0 +1,41 @@ +distributable: + url: https://github.com/ethereum/solidity/releases/download//v{{version}}/solidity_{{version}}.tar.gz + strip-components: 1 + +versions: + github: ethereum/solidity/releases/tags + +provides: + - bin/solc + - bin/yul-phaser + +dependencies: + boost.org: 1 + +interprets: + extensions: sol + args: solc --bin + +build: + dependencies: + tea.xyz/gx/cc: c99 + tea.xyz/gx/make: '*' + cmake.org: 3 + freedesktop.org/pkg-config: ^0.29 + git-scm.org: 2 + working-directory: build + script: | + cmake .. $ARGS + make --jobs {{hw.concurrency}} + make install + rm {{prefix}}/bin/solidity-upgrade + test: + make test + env: + ARGS: + - -DCMAKE_BUILD_TYPE=Release + - -DCMAKE_INSTALL_PREFIX={{prefix}} + - -DPEDANTIC=OFF # otherwise fails due to deprecations in boost ^1.81 + +test: + solc --bin fixture.sol