Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#42378 closed enhancement (fixed)

Upgrade icon programming language to 9.5.1 and check for X11 existence

Reported by: t.tensi@… Owned by: michipili (Michael Grünewald)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: cooljeanius (Eric Gallager)
Port: icon

Description

Dear all,

I have updated the icon portfile to support the following:

  • icon has been updated to version 9.5.1
  • icon can be built with or without X11 graphics support and this has to be configured

Therefore I have added an x11 variant that switches between the two modes of configuration.

Best regards, Thomas

Attachments (2)

Portfile (2.0 KB) - added by t.tensi@… 11 years ago.
revised icon portfile for 9.5.1 with conditional graphics configuration
icon-portfile.diff (1.2 KB) - added by t.tensi@… 11 years ago.
portfile with 9.5.1 version and default variant +x11

Download all attachments as: .zip

Change History (17)

Changed 11 years ago by t.tensi@…

Attachment: Portfile added

revised icon portfile for 9.5.1 with conditional graphics configuration

comment:1 Changed 11 years ago by mf2k (Frank Schima)

Keywords: upgrade X11 removed
Owner: changed from macports-tickets@… to michael.grunewald@…
Version: 2.2.1

In the future, please use Cc the port maintainers (port info --maintainers icon).

Per the guidelines, please instead attach a unified diff of the Portfile.

comment:2 in reply to:  1 Changed 11 years ago by t.tensi@…

Sorry, I have attached the unified diff.

I hope this helps.

comment:3 Changed 11 years ago by mf2k (Frank Schima)

Thanks. A couple of changes need to be made:

  1. Replace the sha1 checksum with the correct sha256 checksum. sha1 and md5 are obsolete and should only be used if upstream provides those.
  2. The following code is wrong:
if {[file exists /usr/X11R6/include/X11/Core.h]} { 
	    default_variants +x11 
	} else { 
	    default_variants -x11 
} 

I have X11 and that file does not exist for me. I have the Macports xorg-server port installed.

comment:4 in reply to:  3 Changed 11 years ago by t.tensi@…

  1. Replace the sha1 checksum with the correct sha256 checksum. sha1 and md5 are obsolete and should only be used if upstream provides those.

Okay, I had just mimicked the original Portfile that had exactly those checksums. In the attached corrected Portfile there is only sha256 and rmd160.

  1. The following code is wrong:

[...]

I have X11 and that file does not exist for me. I have the Macports xorg-server port installed.

I now check for the existence of several X-files as mentioned in the Macports guide. Unfortunately I have 10.4 only, so if you could kindly check the conditions on your system, that would be fine.

Last edited 11 years ago by t.tensi@… (previous) (diff)

comment:5 Changed 11 years ago by mf2k (Frank Schima)

That still doesn't work for at least 2 reasons.

  1. I'm on Mavericks and there is no "boms" directory in /Library/Receipts/.
  2. Even directly in /Library/Receipts/, I have no receipt for X11 because I have it installed via Macports.

comment:6 in reply to:  5 Changed 11 years ago by t.tensi@…

Hi Frank,

sorry for the hassle! I have neither a current Intel installation nor X11 on my machine. So it is kind of a blind flight for me, thanks for your patience ;-)

Now with the current Portfile - when querying for an X11 installation - I am just checking for the existence of "/Applications/MacPorts/X11.app" . This rules out the standard Apple X11 server, but requires that you have a MacPorts xorg installation. If not, a non-graphics version of icon will be built; this also happens when you do not have X11 at all.

Additionally I have added a post-patch modification of the Makedefs file. Currently it blindly assumes that the X11 includes are in "/opt/X11/include" and the X11 libs in "/usr/X11/lib".

If we really want to support all kinds of X11 servers, the portfile gets more complicated. As far as I can tell the only port currently depending on "icon" is "noweb" and this does not need any graphics...

Best regards,

Thomas

comment:7 Changed 11 years ago by mf2k (Frank Schima)

That's still not quite right. The Macports application directory should really reference the applications_dir variable. But it is perfectly acceptable to not check at all for X11 and make it the default variant. Many other ports do this including inkscape and gimp2 (which does not even have an X11 variant because it is simply the default window system).

comment:8 in reply to:  7 Changed 11 years ago by t.tensi@…

Replying to macsforever2000@…:

[...] The Macports application directory should really reference the applications_dir variable. But it is perfectly acceptable to not check at all for X11 and make it the default variant [like in ] inkscape and gimp2

Hi Frank,

I haven't quite got your preference here:

  • Shall I repair the check by replacing set x11_file /Applications/MacPorts/X11.app with set x11_file ${applications_dir}/X11.app to have a generic solution?

or

  • Shall I remove the check altogether and blindly assume +x11 as the default variant?

In my opinion the first approach is safer, but it will definitely miss an Apple installation of X11 and requires a MacPorts installation.

Best regards,

Thomas

comment:9 Changed 11 years ago by mf2k (Frank Schima)

I'm saying the latter. Macports allows the user to choose how to install X11 and no other X11 port that I know of checks for it.

comment:10 Changed 11 years ago by larryv (Lawrence Velázquez)

Also note the difference between depending on MacPorts’ X11 client libraries (e.g., the xorg-libX11 port) and its X11 server (the xorg-server port).

comment:11 in reply to:  10 Changed 11 years ago by t.tensi@…

Dear all,

sorry for provoking such a long discussion thread, but now I am a bit lost. Shall I provide a port patch

  • just for the 9.5.1 update?
  • Or 9.5.1 plus the variant "x11" with a default of +x11 and no checking?
  • Or 9.5.1 plus the variant "x11" with an intelligent check for X11 for calculating the default variant?

The current productive Portfile blindly assumes X11, because the configuration is always done as make X-Configure. This bombs on Quartz-only configurations (like mine). Here a make Configure should be done instead.

My proposal: Michael as the port owner shall decide on how to proceed and I will provide the patch as required.

But be aware that I have a PPC Tiger system only, so some verification will be required ;-)

Best regards,

Thomas

comment:12 Changed 11 years ago by mf2k (Frank Schima)

Sorry for losing track of this ticket. Please do your 2nd option: "9.5.1 plus the variant "x11" with a default of +x11 and no checking"

comment:13 in reply to:  12 Changed 11 years ago by t.tensi@…

Dear all,

I have added the portfile diff as requested by Frank:

... Please do your 2nd option: "9.5.1 plus the variant "x11" with a default of +x11 and no checking"

Best regards,

Thomas

Changed 11 years ago by t.tensi@…

Attachment: icon-portfile.diff added

portfile with 9.5.1 version and default variant +x11

comment:14 Changed 11 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: newclosed

Committing with maintainer timeout. r118828.

comment:15 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

Note: See TracTickets for help on using tickets.