Issues creating Gentoo package for Yuescript

Offen
#171 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
42/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
cmake, cpp, lua
Bereich
build-system

Rechercherichtung

Beginne mit der Untersuchung der Makefiles und CMake-Dateien des Projekts und konzentriere dich dabei auf die Auswahl der Lua-Implementierung, die Compiler- und Linker-Flags sowie den Installationsort der ausführbaren Datei yue. Vergleiche diese Build-Einstiegspunkte mit den im Issue beschriebenen Anforderungen des Gentoo-ebuilds. Als erledigt gilt die Aufgabe, wenn ein Gentoo-Paket seine Lua-Implementierung auswählen, die Benutzer-Flags beibehalten und yue unter /usr/bin installieren kann.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Hello!

I thought I'd try my hand at creating a Gentoo package for Yuescript, but I'm running into a few issues. If you want, you can read the forum post I made, but I'll try to outline the relevant issues here.

Building against different Lua implementations.

In Gentoo, you can add the ability to build certain packages against certain language versions, either multiple or single. In the case of fennel, you can build it against Lua 5.3, 5.4 or LuaJIT, not all 3. See the ebuild (it's somewhat like PKGBUILD) for fennel here.

To do this for Yuescript, I'm unsure. Using Gentoo's functionality to build Yuescript against LuaJIT, I notice that it will build with -DLUA_COMPAT_5_3. Obviously one probably doesn't want this if they want to build against Lua 5.4 or LuaJIT. How to change this specifically I imagine involves patching something in a (c)makefile.

User CFLAGS are ignored

Another Gentoo thing is that you can set your CFLAGS universally for all packages, as well as LDFLAGS and so on. See the wiki page for /etc/portage/make.conf if you want to look at it in more detail.

It seems the makefiles for Yuescript will ignore these entirely, as it will build with

-std=gnu99 -O2 -Wall -Wextra -DLUA_COMPAT_5_3 -DLUA_USE_LINUX

This excludes a lot of flags that I've set, and I suspect the build is also ignoring that I've set the default linker to be mold. Again, maybe this involves patching something in a (c)makefile.

Resulting yue executable should go in /usr/bin

This is likely the simplest thing, but in Gentoo package's executables should go in /usr/bin not /usr/local/bin. Again, probably another patch situation or just overriding some envvar Yuescript's (c)makefiles will read.


To clarify, when I say "patch" I don't mean anyone here needs to change something in the project. In Gentoo, one can have package specific patches that can be applied before building said package. These could be for project build files (makefiles) or files in the source code itself.

I can make the patches, I just need to know what needs to be patched.

Vorherrschende Sprache
Lua
Sterne
620
Forks
45
Ø Merge
9 Std. 5 Min.
Gemergte PRs (30 T.)
1

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus IppClub/YueScript

Alle Issues in IppClub/YueScript

Ähnliche Issues

Weitere Issues zu Lua

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.