Page MenuHomeSolus

libtcod
Closed, ResolvedPublic

Description

Roguelike graphics/utility library - libtcod is a free, fast, portable and uncomplicated API for roguelike developers providing an advanced true color console, input, and lots of other utilities frequently used in roguelikes.

This is a prerequisite for brogue (T1295)

Related Objects

StatusSubtypeAssignedTask
Resolvedsubpop
ResolvedJoshStrobl
ResolvedJoshStrobl

Event Timeline

JoshStrobl triaged this task as Normal priority.Nov 14 2016, 8:43 PM
JoshStrobl moved this task from Backlog to Awaiting Fixes on the Patch Submission board.
JoshStrobl added a subscriber: JoshStrobl.
  • BSD-3-Clause-Clear should use be BSD-3-Clause.
  • Component needs to be changed to programming.
+builddeps  :
+    - sdl1-devel
+    - libx11-devel
+    - libglu-devel
  • You need to use pkgconfigs and and check the appropriate dependencies of things like -devel sub-packages. For instance, libglu-devel depends on mesalib-devel, which depends on libx11-devel, thus specifying libx11-devel or its pkgconfig is unnecessary.

/usr/bin/install

  • Why is /usr/bin/ being added? It's in the bin folder, that isn't necessary. You also should combine -D -m 644 to be -Dm00644. Preferably have / between your use of variable macros, and $installdir%PREFIX% needs to be changed to $installdir/usr.
  • BSD-3-Clause-Clear should use be BSD-3-Clause.

Darn. I looked at the different BSD license formats and the libtcod looked like it matched BSD-3-Clause-Clear the most. Using * to list the redistribution restrictions instead of a numbered list.

  • Component needs to be changed to programming.

Thanks. I wasn't sure where just libraries should go.

+builddeps  :
+    - sdl1-devel
+    - libx11-devel
+    - libglu-devel
  • You need to use pkgconfigs and and check the appropriate dependencies of things like -devel sub-packages. For instance, libglu-devel depends on mesalib-devel, which depends on libx11-devel, thus specifying libx11-devel or its pkgconfig is unnecessary.

I didn't use pkgconfig() because the makefiles don't actually invoke pkg-config to get lib and include paths. Does specifying pkgconfig() over the package name just future-proof us a bit in case the providing package changes?

/usr/bin/install

  • Why is /usr/bin/ being added? It's in the bin folder, that isn't necessary

Fair enough. Just a habit I have in writing scripts.

You also should combine -D -m 644 to be -Dm00644.

Will do.

Preferably have / between your use of variable macros, and $installdir%PREFIX% needs to be changed to $installdir/usr.

Why is %PREFIX% not preferred?

Using * to list the redistribution restrictions instead of a numbered list.

Yea that's fairly normal. I just noticed it off to bat at BSD-3-Clause...which is both convenient and kinda sad at the same time.

Does specifying pkgconfig() over the package name just future-proof us a bit in case the providing package changes?

That and for autotools-based stuff, like using configure (while yes, I acknowledge that isn't something present here), it typically checks pkg-configs first.

Why is %PREFIX% not preferred?

Because our prefix isn't ever going to change, so it's just cleaner to use /usr.

That and for autotools-based stuff, like using configure (while yes, I acknowledge that isn't something present here), it typically checks pkg-configs first.

autotools can be configured to use pkg-configs or can check directly for header files and libraries. Fedora takes a split-policy approach. If the build process uses pkg-config and the pkgconfig AM macros, then you should use pkgconfig(foo) in BuildRequires:, but if it doesn't (instead opting to check for libraries directly, etc.) then you should BuildRequires: the foo-devel package.

That seemed sensible to me, so I followed that reasoning here. That being said, I'm happy always using pkgconfig(foo) if there is one, so I'll make those updates.

Our policy for using pkgconfig is: Always use it except when it doesn't exist. Regardless of whatever any other operating system does ;)

Amended patch with changes from comments:

JoshStrobl moved this task from Awaiting Fixes to Ready For Merge on the Patch Submission board.
+patterns   :
+    - /usr/lib64

Not sure why you're doing this, but I imagine it was to keep the .so file in the main package. I'll go ahead and build this locally to see, and if that ended up being the case I'll use our libsplit: no and drop the pattern post-merge. Moving this into "Ready for Merge" and I'll do the above mentioned stuff post-merge of patch :)