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

New Package: odin-0.10.0 #12322

Closed
wants to merge 1 commit into from
Closed

New Package: odin-0.10.0 #12322

wants to merge 1 commit into from

Conversation

logenkain
Copy link
Contributor

@logenkain logenkain commented Jun 8, 2019

Odin doesn't seem to have an installer yet and it requires the executable to be local to it's shared and core folders.

I could change it up so it only copies the binary and the two required folders, but odin is still early days so I figure I should leave it all there in case anyone wants to look at it.

EDIT:

Or if future updates requires something else to be kept local to the executable.

pkgname=odin
version=0.10.0
revision=1
archs="x86_64-musl x86_64"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be abbreviated with archs="x86_64*".

build_style="gnu-makefile"
hostmakedepends="pkg-config clang llvm"
depends="clang"
short_desc="Fast. concise, readable, pragmatic and open programming language"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: . instead of ,

depends="clang"
short_desc="Fast. concise, readable, pragmatic and open programming language"
maintainer="Logen Kain <logen@sudotask.com>"
license="BSD"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the SPDX license identifier.

homepage="https://odin-lang.org"
distfiles="https://github.com/odin-lang/Odin/archive/v${version}.tar.gz"
checksum=04a1c9e8719281a598cac5e9cc3e5ca2316cc038a8b8f9ae43f514aba967c635
nopie=1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at other packages, the convention here seems to be nopie=yes.

distfiles="https://github.com/odin-lang/Odin/archive/v${version}.tar.gz"
checksum=04a1c9e8719281a598cac5e9cc3e5ca2316cc038a8b8f9ae43f514aba967c635
nopie=1
make_build_args+=" debug"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For specifying the build target, you can use make_build_target="debug".

nopie=1
make_build_args+=" debug"

do_build() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let the gnu-makefile buildstyle handle do_build(): There is the make_use_env variable for doing exactly this do_build().

vlicense LICENSE
ln -s /opt/odin/odin ${DESTDIR}/usr/bin/odin
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This empty line can be removed.

@daniel-eys
Copy link
Contributor

I could change it up so it only copies the binary and the two required folders, but odin is still early days so I figure I should leave it all there in case anyone wants to look at it.

There are a lot of unneeded files (.bat, appveyor.yml, .gitkeep, etc) which shouldn't be included, so please just include the binary and the required folders.
People wanting to look at language internals should use upstream directly.

@logenkain
Copy link
Contributor Author

Ah, I didn't get that last message till I pushed that last commit. I'll get right on it.

@logenkain
Copy link
Contributor Author

Alright, fixed.

Thanks a lot, it's been a while since I've put together a package. You're doing great work.

@@ -2,25 +2,20 @@
pkgname=odin
version=0.10.0
revision=1
archs="x86_64-musl x86_64"
archs="x86_64"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please note the * from my first review comment, so archs="x86_64*".

@@ -20,7 +20,9 @@ make_use_env=yes
do_install() {
vmkdir opt/odin
vmkdir usr/bin
vcopy "*" opt/odin
vcopy "shared" opt/odin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really needed? It just includes an empty .gitkeep.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only just started messing around with the language, but their github readme explicitly states that core and shared library folders need to stay relative to the executable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like to be a placeholder where .so (or .odin?) files can be dropped for importing from within odin, so maybe just keep this.
(I had a concern that odin maybe uses this directory for temporary storing shared objects before linking the final binary. This would be problematic with a root-owned /opt.)

@daniel-eys
Copy link
Contributor

While trying to compile the demo.odin example, odin complained for not having /usr/bin/opt installed, so llvm needs to be added do depends.

@logenkain
Copy link
Contributor Author

I thought I tested that, but llvm8 was still installed, ah well.

@daniel-eys
Copy link
Contributor

Looks good so far. To finalize, please squash all commits into one named like the initial commit: New Package: odin-0.10.0

odin: revise template to standards

odin: limit installed files to what is needed

odin: fix xlint errors

odin: fix target archs

odin: add llvm depend
Copy link
Contributor

@daniel-eys daniel-eys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your contribution!

@silvernode
Copy link
Contributor

.I agree with logenkain. See how I named lbreakouthd. This is it. Sometimes it's easier. Free choice. Welcome to the humanity

I also agree and try to remain lower-case when submitting packages. Things like libGL don't bother me though.

@logenkain
Copy link
Contributor Author

Closing to clean up pull requests since it's clearly not going to be merged (probably need to update it by now anyway)

@logenkain logenkain closed this Mar 24, 2020
@logenkain logenkain deleted the odin branch November 21, 2020 12:43
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants