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

Issues creating Gentoo package for Yuescript #171

Open
alecStewart1 opened this issue Sep 4, 2024 · 0 comments
Open

Issues creating Gentoo package for Yuescript #171

alecStewart1 opened this issue Sep 4, 2024 · 0 comments

Comments

@alecStewart1
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant