Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id A1BCB781A67 for <~alpine/aports@lists.alpinelinux.org>; Wed, 31 Mar 2021 01:18:04 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outerpassage.net; s=key1; t=1617153483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Py6KvBt4Bn61DlPbwgNM75hhTRsYTRVL/6kTirtszRI=; b=oHErzp3nk3dm0jsVMgEKv4StvGCdnSXvqxIrxkmMKPIn1/DF+E38F5pyf9tlNM5mlKGuei jLECjoWO3LR9aZUt0q/Oxnr71LVKKGl5tcviD4WBOcivwNHOzmP+UmJjgitHoZtohsorkf d5ghtSpYgo7qzfbGhJXGW1zID6Js85U= From: River Dillon To: ~alpine/aports@lists.alpinelinux.org Cc: River Dillon , Leo Subject: [PATCH v3] testing/agda: new aport Date: Tue, 30 Mar 2021 18:17:53 -0700 Message-Id: <20210331011753.12371-1-river@outerpassage.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: river@outerpassage.net https://wiki.portal.chalmers.se/agda/pmwiki.php dependently typed functional programming language Co-authored-by: Leo --- I just noticed that Leo has already added some other fixes here https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/19900 so I merged the previous patch with that branch. Is it preferred to submit MRs via gitlab to avoid missing things like this? testing/agda/APKBUILD | 71 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 testing/agda/APKBUILD diff --git a/testing/agda/APKBUILD b/testing/agda/APKBUILD new file mode 100644 index 0000000000..b6bd737fd7 --- /dev/null +++ b/testing/agda/APKBUILD @@ -0,0 +1,71 @@ +# Contributor: River Dillon +# Maintainer: River Dillon +pkgname=agda +pkgver=2.6.1.3 +pkgrel=0 +pkgdesc="dependently typed functional programming language" +options="net" # Requires contact haskell +url="https://wiki.portal.chalmers.se/agda/pmwiki.php" +arch="x86_64" # Limited by 'ghc' +license="agda" +makedepends=" + ghc + cabal + zlib-dev + ncurses-dev + icu-dev + py3-sphinx + py3-sphinx_rtd_theme + bash + imagemagick + texlive-full + " +subpackages="$pkgname-doc" +source="$pkgname-$pkgver.tar.gz::https://github.com/agda/agda/archive/refs/tags/v$pkgver.tar.gz" + +export CABAL_DIR="$srcdir/cabal" +export PATH="$PATH:$CABAL_DIR/bin" + +# Agda provides a 'test' target in the makefile, but I haven't been able to get +# it working yet. Agda should support the nix-style cabal commands soon, which +# will make this easier. +options="$options !check" + +prepare() { + default_prepare + cabal v2-update + touch doc/user-manual.pdf # hack + cabal v2-install -j --only-dependencies + cabal v2-install alex happy # just to add to path +} + +build() { + ghcver=$(runhaskell --version | awk '{print $2;}') # GHC version + runhaskell Setup.hs configure \ + "--package-db=$CABAL_DIR/store/ghc-$ghcver/package.db" \ + "--prefix=/usr" \ + "--datasubdir=$pkgname" \ + "--docdir=\$datadir/doc/$pkgname" + runhaskell Setup.hs build -j "--ghc-options=-j -O1" + make user-manual-pdf + make user-manual-html +} + +package() { + # copy everything + runhaskell Setup.hs copy "--destdir=$pkgdir" + + # install license in the correct location + rm -r "$pkgdir/usr/share/doc" + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + + # don't need development files + rm -r "$pkgdir/usr/lib" + + # documentation + install -Dm644 "doc/user-manual.pdf" \ + "$pkgdir/usr/share/doc/$pkgname/pdf/user-manual.pdf" + cp -r "doc/user-manual/_build/html" "$pkgdir/usr/share/doc/$pkgname/html" +} + +sha512sums="3c9ca47181aca143f717642c143fb6a8124eb0cffec2b2f05e7b257a252e9c3253982a05af177974bc16da9c44244bb38731dd032f4f0fb0ede3c0a4f7fb77ac agda-2.6.1.3.tar.gz" -- 2.30.2