Page MenuHomeFreeBSD

devel/geany and plugins: add flavors for gtk2 and gtk3

Authored by madpilot on Nov 17 2018, 4:36 PM.
Referenced Files
F78349108: D18018.id51089.diff
Sat, Mar 2, 9:21 AM
Unknown Object (File)
Sat, Feb 24, 6:53 AM
Unknown Object (File)
Mon, Feb 19, 10:27 PM
Unknown Object (File)
Thu, Feb 15, 10:07 PM
Unknown Object (File)
Jan 14 2024, 5:01 PM
Unknown Object (File)
Jan 11 2024, 12:02 AM
Unknown Object (File)
Jan 7 2024, 2:31 PM
Unknown Object (File)
Jan 4 2024, 9:51 AM



In bug report 226523 Greg V. proposed switching geany to gtk3 using an option. This was no possible due to not being able to force gtk3 in geany from the plugins.

I have built this patch set to leverage flavors, so that correct dependency chains can be enforced by pkg.

The devel/geany-plugins-l10n could actually be unflavored, but I am unable to find a way to make it unflavored and not break or pollute the dependency chain.

Test Plan

Geany and all plugins build fine in poudriere for both flavors on all supported versions.

They both run correctly on head.

Diff Detail

rP FreeBSD ports repository
Lint Not Applicable
Tests Not Applicable

Event Timeline

Gtk 2 is legacy, Gtk 3 should be used always.

Gtk 2 is legacy, Gtk 3 should be used always.

I agree on that, but this project is still in the middle of migrating.

Some plugins work only when using gtk2. Jumping unconditionally to gtk3 would force me to delete those. The plugins not working with gtk3 are listed in the UPDATING entry in the patch.

I was planning to move to flavors for now, switch to gtk3 as default flavor at a later time, hoping in the while all plugin have been migrated.

Otherwise I could make gtk3 the default flavor now and plan removing the gtk2 one soon if no user complains about the missing plugins.

madpilot edited the summary of this revision. (Show Details)
madpilot edited the test plan for this revision. (Show Details)

Made the default flavor the gtk3 one.

Also fixed plugins not working with gtk3 to not have a gtk3 flavor (which would fail)

mat requested changes to this revision.Nov 23 2018, 11:00 AM
mat added inline comments.
10 ↗(On Diff #50593)

Having only one flavor makes no sense. Simply set FLAVORS= so that it stays empty afterwards.

16–20 ↗(On Diff #50593)

Please use flavors helpers.

23–24 ↗(On Diff #50593)

FLAVOR only make sense to the current port, it is not transitive, it CANNOT be used in a _DEPENDS line. This is why framework generated flavors have their own flavors to add dependencies.

Please use static flavors in the depends names.

33 ↗(On Diff #50593)

That is awful.

This revision now requires changes to proceed.Nov 23 2018, 11:00 AM
madpilot marked 7 inline comments as done.

I marked the accepted comments as done. I'll followup with an updated diff including such changes after testing.

The while bunch of geany plugins Makefiles is a mess. If and when we get subpackages the whole bunch can be converted to one port with subpackages, since all plugins can be built together and then file picked for each generating separate packages.

I don't see an immediate way to overhaul them which would simplify things without bringing a lot of duplication.

30 ↗(On Diff #50593)

Also going to sort these.

33 ↗(On Diff #50593)

It actually is. I don't even know what possessed me when I wrote this.

58 ↗(On Diff #50593)

This one also needs to be made a constant, then.

I'm also seeing a problem with the options in the geany-plugins port. I'm planning to use groups to distinguish the ones actually available only with gtk2 and gtk3, leaving them all enabled by default, but making the gtk2 ones ineffective when the gtk3 ports are compiled.

I could also make the appear and disappear depending on the flavor, but I don't like that idea.

10 ↗(On Diff #50593)

Testing shows this creates problems later in Makefile.common, where a flavor is expected to be defined.

Since this happpens only for gtk2 flavor, I can fix it by changine the

.if ${FLAVOR} == gtk2
.elif ${FLAVOR} == gtk3


.if ${FLAVOR} == gtk3

since I don't plan adding any more flavors to these ports.

Solved the reported issues.

I also changed some RUN_DEPENDS+BUILD_DEPENDS to LIB_DEPENDS, which is what they actually are.

The OPTIONS in the devel/geany-plugins meta port are also now working correctly and subdivided using GROUPs. added inline comments.
17 ↗(On Diff #51041)

"disinstall" doesn't sound like a word :) "deinstall" or "uninstall"

20 ↗(On Diff #51041)

same here

madpilot marked 2 inline comments as done.

Change "disinstall" to "deinstall".

madpilot added inline comments.
17 ↗(On Diff #51041)

Thanks for pointing this out!

Not being a native English speaker, thia was an "italianism" from my part.

"disinstallare" is the Italian word that fooled me.

16–18 ↗(On Diff #51089)

Wrong place in the Makefile. See Chapter 15. Order of Variables in Port Makefiles.

16–18 ↗(On Diff #51041)

Wrong place in the Makefile. See Chapter 15. Order of Variables in Port Makefiles.

18–20 ↗(On Diff #51089)


madpilot marked 2 inline comments as done.
11–12 ↗(On Diff #51666)

Why +=? (Also, there should probably be a blank lines between the depends section and the flavors section.)

10–11 ↗(On Diff #51666)

Why +=?

14–16 ↗(On Diff #51666)

wrong place.

madpilot marked 4 inline comments as done.
madpilot added inline comments.
11–12 ↗(On Diff #51666)

Was += because gtk[23]_LIB_DEPENDS is already populated in Makefile.common included below. Now that it's sorted back the += needs to be moved there really.

Thanks for noticing!

madpilot marked an inline comment as done.

Move += where appropriate, and add empty lines.

Looks ok, make sure it all builds, and does not break INDEX before committing ;-)

This revision is now accepted and ready to land.Dec 9 2018, 10:28 AM
This revision was automatically updated to reflect the committed changes.