Opened 11 years ago

Last modified 11 years ago

#39989 new submission

HPGS @1.1.8

Reported by: potmj (Michael Pot) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.2.0
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port: hpgs

Description

Easy HPGS installation for macports users

My first Portfile creation & submission

Developed on 10.5.8

Attachments (6)

Portfile (1.7 KB) - added by potmj (Michael Pot) 11 years ago.
First Portfile for HPGS
Portfile.2 (1.8 KB) - added by ryandesign (Ryan Carsten Schmidt) 11 years ago.
revised portfile proposal
Portfile.3 (1.9 KB) - added by potmj (Michael Pot) 11 years ago.
Updated working Portfile
patch-build-macos-shared-Makefile.diff (357 bytes) - added by potmj (Michael Pot) 11 years ago.
prefix fix from Fink to Macports
patch-src-hpgsimage.c.diff (629 bytes) - added by potmj (Michael Pot) 11 years ago.
Lib version patch
patch-src-include.mak.diff (812 bytes) - added by potmj (Michael Pot) 11 years ago.
gcc flags conflict fix for dependent generation

Download all attachments as: .zip

Change History (11)

Changed 11 years ago by potmj (Michael Pot)

Attachment: Portfile added

First Portfile for HPGS

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Thanks. Some observations:

  • The license should be indicated.
  • MacPorts does follow HTTP redirects when downloading.
  • To download from sourceforge, use the sourceforge fetch group rather than hardcoding one specific sourceforge server.
  • Why are you setting the worksrcdir in a pre-build block instead of globally? Doesn't that cause destroot to fail if you run it separately from build? (i.e. "sudo port build && sudo port destroot")
  • When you disable the configure phase you're responsible for adding a universal variant and ensuring that the port is UsingTheRightCompiler and -arch flags.
  • "distname ${name}-${version}" is the default so you don't need to list that.

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

Also the proper way to obfuscate your email address is like this:

 actrix.co.nz:fmw

comment:3 in reply to:  1 Changed 11 years ago by potmj (Michael Pot)

Replying to ryandesign@…: Dear Ryan
Sorry, this submission was not meant to go out - I thought I stopped the submission when I found some problems while attaching the files (Patch file naming etc).
I logged out without pushing the submit button, so not sure what happened!!!
I ran out of time, so will have another go in a day or so , and try & fix some of the things you have mentioned (I don't understand how to deal with them all - fetch group & configure).
Many thanks
Michael

Last edited 11 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: Portfile.2 added

revised portfile proposal

comment:4 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Port: hpgs added

I've attached a revised portfile, with these changes:

  • indicated license LGPL-2.1+
  • used sourceforge fetch group
  • set build.dir instead of conditionally setting worksrcdir in the build phase
  • set correct -arch flags and optimization flags and ensure UsingTheRightCompiler
  • removed unnecessary distname directive
  • fixed obfuscation of maintainer email address
  • reformatted description and fixed whitespace to conform to modeline

Since I don't have the patchfiles referenced I can't see if it builds properly or work on adding a universal variant, though doing so could be as simple as adding the line "variant universal {}" before the first invocation of the get_canonical_archflags proc. I'm not sure what the Makefile patch does; maybe it's unnecessary with the correct build.args passed in from the Portfile. I can guess that the hpgsimage.c patch will make it compatible with libpng 1.4 and later.

Changed 11 years ago by potmj (Michael Pot)

Attachment: Portfile.3 added

Updated working Portfile

Changed 11 years ago by potmj (Michael Pot)

prefix fix from Fink to Macports

Changed 11 years ago by potmj (Michael Pot)

Attachment: patch-src-hpgsimage.c.diff added

Lib version patch

Changed 11 years ago by potmj (Michael Pot)

Attachment: patch-src-include.mak.diff added

gcc flags conflict fix for dependent generation

comment:5 in reply to:  4 Changed 11 years ago by potmj (Michael Pot)

Many thanks for doing all that - it has pointed me in the right direction - I hope.
I have used your Portfile.2 and adjusted it so it now builds on intel 10.5.8 with gcc 4.2, > file reports:
/opt/local/bin/hpgs: Mach-O fat file with 2 architectures: [ : Mach-O ppc_7400 executable ] [ I386: Mach-O i386 executable ]

It might be possible to eliminate the Makefile patch with some changes in the Portfile build.args
The patch adjusts a prefix variable at the start

Yes the hpgsimage.c patch makes it do libpng15. I couldn't find a way of making it do something like libpng >= 1.5 and making it work with the Portfile depends_lib section.

There is an additional include.mak patch to cope with a flags conflict, and again, there may be better ways to handel that, but I think it is at least working correctly.

Note: See TracTickets for help on using tickets.