Page MenuHomeFreeBSD

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

Authored by madpilot on Nov 17 2018, 4:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 28, 11:47 AM
Unknown Object (File)
Mar 19 2024, 4:35 AM
Unknown Object (File)
Mar 15 2024, 11:28 PM
Unknown Object (File)
Mar 15 2024, 11:28 PM
Unknown Object (File)
Mar 15 2024, 11:28 PM
Unknown Object (File)
Mar 15 2024, 11:28 PM
Unknown Object (File)
Mar 15 2024, 11:28 PM
Unknown Object (File)
Mar 15 2024, 11:28 PM

Details

Summary

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

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 21198
Build 20550: arc lint + arc unit

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.
devel/geany-plugin-debugger/Makefile
11

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

devel/geany-plugin-markdown/Makefile
16–20

Please use flavors helpers.

devel/geany-plugins/files/Makefile.common
23–24

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.

32

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.

UPDATING
30

Also going to sort these.

devel/geany-plugins/files/Makefile.common
32

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

58–59

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.

devel/geany-plugin-debugger/Makefile
11

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
.endif

to

.if ${FLAVOR} == gtk3
.else
.endif

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.

val_packett.cool added inline comments.
UPDATING
17

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

20

same here

madpilot marked 2 inline comments as done.

Change "disinstall" to "deinstall".

madpilot added inline comments.
UPDATING
17

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.

devel/geany-plugin-markdown/Makefile
16–18

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

16–18

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

devel/geany-plugin-vc/Makefile
18–20

same.

madpilot marked 2 inline comments as done.
devel/geany-plugin-markdown/Makefile
11–12

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

devel/geany-plugin-vc/Makefile
10–11

Why +=?

devel/geany-plugin-webhelper/Makefile
14–16

wrong place.

madpilot marked 4 inline comments as done.
madpilot added inline comments.
devel/geany-plugin-markdown/Makefile
11–12

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.