Package Details: plutolang 0.10.3-1

Git Clone URL: https://aur.archlinux.org/plutolang.git (read-only, click to copy)
Package Base: plutolang
Description: A superset of Lua 5.4 with a focus on general-purpose programming.
Upstream URL: https://github.com/PlutoLang/Pluto
Licenses: MIT
Conflicts: pluto
Provides: libpluto.so
Submitter: Sainan
Maintainer: Sainan
Last Packager: Sainan
Votes: 1
Popularity: 0.000524
First Submitted: 2023-12-20 04:50 (UTC)
Last Updated: 2024-12-02 06:03 (UTC)

Required by (0)

Sources (1)

Latest Comments

« First ‹ Previous 1 2

Sainan commented on 2024-01-16 22:56 (UTC) (edited on 2024-01-16 22:57 (UTC) by Sainan)

Because you are unable to point out specific issues. It works completely fine using makepkg and yay in my Arch VM and runs as I would expect it to. Why should I fix what isn't broken?

alerque commented on 2024-01-16 19:09 (UTC)

I'm sorry you feel that way. I wasn't trying to be hostile at all. I do want a good quality package to the benefit of both the upstream project and the downsteam users. To that end I pointed out quite a few things that were some level of outright broken or sub-optimal. I understand you aren't even an Arch user yourself and don't expect you to understand all the nuances of a good package, but we do have packaging guidelines, many of which you skipped. I sent a patch to turn this into a good package, why would you refuse do do the right thing like include required fields and dependencies? If you just refuse to fix those issues then what is the advantage of having a "first party" package? Why not take a few tips from sombody who has done a lot of packaging for Arch?

Sainan commented on 2024-01-13 20:08 (UTC)

I think it's great that you're having such a hostile attitude towards a software vendor providing a first-party AUR package.

alerque commented on 2024-01-05 14:57 (UTC)

I started to write a list when I first found it and there were more issues than package, hence why I sent the patch. You asked for specifics, the patch has specifics. I can update the patch or send you a PKGBUILD. The package guidelines are all in the Wiki, I don't have time to rehash them all there. As one pointer though makepkg is not the measure of whether a packge is correct because it builds on your host system, not using the dependencies specified by the package (which you are missing). You can install devtools and use extra-x86_64-build to test whether a package builds in a clean chroot. This does not yet. After that namcap will have some more errors to fix even after it builds. The rest of the things I changed are also all guidelines detailed in the Wiki.

Sainan commented on 2024-01-05 10:40 (UTC)

Please be more specific as to what issues you see. I am not an Arch Linux user, but I've verified this package works with makepkg and yay in a VM.

alerque commented on 2024-01-05 10:14 (UTC)

I'm sorry but yes you did miss lots of things, and my patch is not particularly over-zealous. I'm not trying to be rude I was trying to be helpful but it is evident you don't know much about PKGBUILDs.

  • The dependencies are required.
  • The make dependencies I've added are required.
  • The url and license fields I've added are required.
  • The conflicts info I added is correct.
  • The compiler flags and some other things are following Arch's package guidelines.

Just because it "works for you" does not make it correct. Notably this package as you have it will not build at all using many AUR helpers and other build tools that correctly use chroot environments to build. It only works for you because you're building in on a leaky host system without any isolation, the packaging is wrong.

And I didn't rebrand Pluto as "lua++", what are you even talking about? You are using CPP sources and not passing C++ flags from the host environment so the build doesn't have features Arch packages expect.

Sainan commented on 2024-01-05 10:01 (UTC)

I do recognise that the files should be put in /usr/bin instead of /usr/local/bin, which we also fixed in our .deb distrubtion recently, so I've fixed it here as well.

If there's any other discrete changes I've missed in your overzealous patch, let me know. I certainly wouldn't go as far as rebranding Pluto to Lua++. 😉

alerque commented on 2024-01-05 07:06 (UTC) (edited on 2024-01-05 07:10 (UTC) by alerque)

This package has quite a few problems. It is missing required fields, it is missing required dependencies and make dependencies, and it installs things to the wrong place, it doesn't pass compiler flags, and so forth. I overhauled it to follow Arch packaging guidelines and including the fixes here. You can apply the following patch by saving it to a file (being sure to include the blank line at the end) and applying it in your repository with git am < file.patch.

From 1c123f6cfa3120af33346c8ed7cc759328d0fe9c Mon Sep 17 00:00:00 2001
From: Caleb Maclennan <caleb@alerque.com>
Date: Fri, 5 Jan 2024 10:02:07 +0300
Subject: [PATCH] Overhaul packaging

Signed-off-by: Caleb Maclennan <caleb@alerque.com>
---
 .SRCINFO | 11 +++++++++--
 PKGBUILD | 29 ++++++++++++++++++-----------
 2 files changed, 27 insertions(+), 13 deletions(-)

diff --git a/.SRCINFO b/.SRCINFO
index 2561636..75c39b9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,15 @@
 pkgbase = plutolang
-   pkgdesc = A superset of Lua 5.4 — with unique features, optimizations, and improvements.
+   pkgdesc = A superset of Lua 5.4 with unique features, optimizations, and improvements
    pkgver = 0.8.0
-   pkgrel = 1
+   pkgrel = 2
+   url = https://github.com/PlutoLang/Pluto
    arch = x86_64
+   license = MIT
+   makedepends = git
+   depends = gcc-libs
+   depends = glibc
+   depends = readline
+   conflicts = pluto
    source = pluto-git::git+https://github.com/PlutoLang/Pluto#tag=0.8.0
    sha256sums = SKIP

diff --git a/PKGBUILD b/PKGBUILD
index 3883207..3b1931e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,21 +1,28 @@
 # Maintainer: Sainan <sainan@calamity.gg>
+# Contributor: Caleb Maclennan <caleb@alerque.com>
+
 pkgname=plutolang
-pkgdesc="A superset of Lua 5.4 — with unique features, optimizations, and improvements."
 pkgver=0.8.0
-pkgrel=1
-arch=('x86_64')
-source=("pluto-git::git+https://github.com/PlutoLang/Pluto#tag=$pkgver")
+pkgrel=2
+pkgdesc='A superset of Lua 5.4 with unique features, optimizations, and improvements'
+arch=(x86_64)
+url='https://github.com/PlutoLang/Pluto'
+license=(MIT)
+depends=(gcc-libs
+         glibc
+         readline)
+makedepends=(git)
+conflicts=(pluto)
+source=("pluto-git::git+$url#tag=$pkgver")
 sha256sums=('SKIP')

 build () {
-   cd pluto-git
-   cd src
-   make -j PLAT=linux
+   cd pluto-git/src
+   make MYCFLAGS="$CXXFLAGS -fPIC" MYLDFLAGS="$LDFLAGS" CC=g++ LUA_A=liblua++.a LUA_SO=liblua++.so linux-readline
 }

 package () {
-   cd $srcdir/pluto-git
-   mkdir -p $pkgdir/usr/local/bin
-   cp src/pluto $pkgdir/usr/local/bin/pluto
-   cp src/plutoc $pkgdir/usr/local/bin/plutoc
+   cd pluto-git
+   install -Dm0755 -t "$pkgdir/usr/bin/" src/{pluto,plutoc}
+   install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
 }
-- 
2.43.0