in the eclipse.desktop that gets installed by the package, it has the Icon set to Icon=icon.xpm which would be resolvable to /usr/local/share/eclipse/icon.xpm But unfortunately that isn't a real icon. If instead you link it to one of the PNG icons included in the source but buried under a "plugin", it works: Icon=/usr/local/share/eclipse/plugins/org.eclipse.sdk_4.37.0.v20251012-1536/eclipse256.png now the icon shows up correctly in the menu on KDE alternatively the port could just be updated to find one of these pngs with a glob like org.eclipse.sdk.${PORTVERSION}*/eclipse256.png install that to ${DATADIR}/icon.png Then just update the .desktop to reference Icon=icon.png and it should work reliably across future releases
So I checked under xfce (I don't use KDE, sorry) and made it possible with the following change: set Icon in Desktop/eclipse.desktop to: Icon=/usr/local/share/eclipse/icon.xpm There is no need for an eclipse port change - so the best would be to add a message in files/pkg-message.in that is displayed after the port/package is installed :-) PS: I am not so familar with all the portage settings and files - but I think the file pkg-message.in is okay for that, or?
Sorry, I was not correct with my formulation - of course it would be a port change, when adding a pkg-message.in file - but it would not affect the port compilation / build step :-)
Testing this modification to Makefile: _ICONS_PNG= 16 22 24 32 48 64 128 256 512 1024 _ICONS_SVG= 16 32 48 _VER= ${DISTVERSION}.0.v20250906-0132 do-build: cd ${WRKSRC} && ${SETENV} ${MAVEN_ENV} mvn ${MAVEN_PARAMS} do-install: ${MKDIR} ${STAGEDIR}${DATADIR} ${TAR} -x --directory ${STAGEDIR}${DATADIR}/.. --file ${WRKSRC}/${ECLIPSE_RESULT} ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin .for _ICON in ${_ICONS_PNG} ${INSTALL_DATA} \ ${STAGEDIR}${DATADIR}/plugins/org.eclipse.platform_${_VER}/${PORTNAME}${_ICON}.png \ ${STAGEDIR}${PREFIX}/share/icons/hicolor/${_ICON}x${_ICON}/apps/${PORTNAME}.png .endfor .for _ICON in ${_ICONS_SVG} ${INSTALL_DATA} \ ${STAGEDIR}${DATADIR}/plugins/org.eclipse.platform_${_VER}/${PORTNAME}${_ICON}.svg \ ${STAGEDIR}${PREFIX}/share/icons/hicolor/${_ICON}x${_ICON}/apps/${PORTNAME}.svg .endfor
This work for me: _ICONS_PNG= 16 22 24 32 48 64 128 256 512 1024 _ICONS_SVG= 16 32 48 _ICONS_PATH= ${STAGEDIR}${DATADIR}/plugins/org.eclipse.platform_${DISTVERSION}.0.v* do-build: cd ${WRKSRC} && ${SETENV} ${MAVEN_ENV} mvn ${MAVEN_PARAMS} do-install: ${MKDIR} ${STAGEDIR}${DATADIR} ${TAR} -x --directory ${STAGEDIR}${DATADIR}/.. --file ${WRKSRC}/${ECLIPSE_RESULT} ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin ${MKDIR} ${_ICONS_PNG:C|([0-9]*)|${STAGEDIR}${PREFIX}/share/icons/hicolor/\1x\1/apps|} .for _ICON in ${_ICONS_PNG} ${INSTALL_DATA} \ ${_ICONS_PATH}/${PORTNAME}${_ICON}.png \ ${STAGEDIR}${PREFIX}/share/icons/hicolor/${_ICON}x${_ICON}/apps/${PORTNAME}.png .endfor .for _ICON in ${_ICONS_SVG} ${INSTALL_DATA} \ ${_ICONS_PATH}/${PORTNAME}${_ICON}.svg \ ${STAGEDIR}${PREFIX}/share/icons/hicolor/${_ICON}x${_ICON}/apps/${PORTNAME}.svg .endfor # Generate dynamic plist, to cater for different ARCHS post-install: cd ${STAGEDIR}${PREFIX} && ${FIND} -s bin/${PORTNAME} \ share/${PORTNAME} share/icons -not -type d >> ${TMPPLIST} cd ${STAGEDIR}${PREFIX} && ${FIND} -ds share/${PORTNAME} -type d | \ ${SED} -e 's,^,@dir ,' >> ${TMPPLIST}
Thanks - sounds nice :-) I will "crosscheck" when I find time...
(In reply to Norbert Grundmann from comment #1) Perhaps this will work. I just reinstalled Eclipse and looked at the icon.xpm with Gimp and it renders an icon, but when I looked at it previously it was an empty image. Could have been a bug on my end and you don't need to look for a suitable png icon
Anyway install icons in ${PREFIX}/share/icons/hicolor/ is good idea.