Opened 14 years ago

Closed 9 years ago

#25213 closed submission (wontfix)

ledger-devel Portfile

Reported by: jwiegley@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.9.0
Keywords: Cc: kurthindenburg (Kurt Hindenburg)
Port: ledger-devel

Description

The goes into the "finance" category.

Attachments (2)

Portfile (3.0 KB) - added by jwiegley@… 14 years ago.
Portfile.2 (3.4 KB) - added by jwiegley@… 12 years ago.
Current version of ledger-devel

Download all attachments as: .zip

Change History (13)

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

Cc: ryandesign@… added
Port: ledger-devel added

Comments:


maintainers         johnw@newartisans.com

You should obfuscate your email address:

maintainers         newartisans.com:johnw

master_sites        http://ftp.newartisans.com/pub/ledger/:source

Since there is only one distfile you don't need tags:

master_sites        http://ftp.newartisans.com/pub/ledger/

distname            ${name}-${version}
distfiles           ${distname}${extract.suffix}:source

These are the default so these lines can be deleted.


checksums           ${distname}${extract.suffix} \
                        md5     0ab9a855719df536a85f7ea5238b8a6e \
                        sha1    e2ee9e2951fd37bac50c91046f097c11294a6e8e \
                        rmd160  72cdfe76add63425b1ade1d03479e837e9f2dafe

Since there is only one distfile you don't need to cite it; just list the checksums:

checksums           md5     0ab9a855719df536a85f7ea5238b8a6e \
                    sha1    e2ee9e2951fd37bac50c91046f097c11294a6e8e \
                    rmd160  72cdfe76add63425b1ade1d03479e837e9f2dafe

platform darwin 9 {}
platform darwin 10 {}

These platform directives are no-ops so these lines should be removed.


variant icu description {Enable full Unicode support} {
    if {[variant_isset python25]} {
        depends_lib-delete      port:boost+python25
        depends_lib-append      port:boost+icu+python25
    }
    else if {[variant_isset python26]} {
        depends_lib-delete      port:boost+python26
        depends_lib-append      port:boost+icu+python26
    }
    else {
        depends_lib-delete      port:boost
        depends_lib-append      port:boost+icu
    }
}

None of the variants work. You appear not to have tested them. There are syntax errors ranging from "invalid command name "else"" ("else" needs to go on the same line as the closing bracket of the "if" to which it belongs) to "wrong # args: extra words after "else" clause in "if" command" ("else if" needs to be written "elseif") to "can't set "depends_lib": invalid depspec: port:boost+icu" (it is not possible to declare dependencies on variants of ports; see #126).


#livecheck.check     regex
#livecheck.url       ${homepage}
#livecheck.regex     "Latest Stable Ledger \\(Version (\\d+.\\d+.\\d+)\\)"

Here's a livecheck that works:

livecheck.check     regex
livecheck.url       [lindex ${master_sites} 0]
livecheck.regex     ${name}-(\[0-9.-\]+)\\.tar

comment:2 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

There are many differences between this proposed ledger-devel port and the existing ledger port (some of which I mentioned above). ledger and ledger-devel should be kept as similar as possible, so these differences should be minimized (by changing elements of either or both ports).

comment:3 Changed 14 years ago by jwiegley@…

You are right, I did not test the variants. I will do so before updating the attachment.

As for the different between this and the ledger port: The two versions are themselves significantly different. They have different dependencies, and different variants. Should I still strive for similarity?

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

Yes, the ports should not differ in ways they don't need to. For example:

  • The ports differ in whitespace. (ledger should be updated to use only spaces for whitespace, not a mix of spaces and tabs)
  • The categories differ. (Should the categories in ledger-devel be added to ledger?)
  • The maintainer email addresses differ. (The one in ledger-devel should be obfuscated.)
  • The homepages differ. (The correct canonical homepage -- whatever that is -- should be used in both ports.)
  • The master_sites differ. (ledger's ftp-based master_sites entry should be changed to match the http-based one in ledger-devel because ftp is a problematic protocol for some (including our primary distfiles mirror -- it cannot mirror files from ftp servers).)
  • ledger-devel disables its universal variant for the reason that "gmp and mpfr are not universal" but this is false; both those ports are universal and ledger-devel appears to build fine universal.
  • ledger has some commented-out patchfiles. (Since this does nothing these lines can be removed.)
  • ledger-devel has an empty post-destroot block. (Since this does nothing it can be removed.)

Also, ledger and ledger-devel need to be marked as conflicting with one another.

If you approve, I'll make the changes to ledger, and you can make the changes to ledger-devel and attach the new file here.

Changed 14 years ago by jwiegley@…

Attachment: Portfile added

comment:5 Changed 14 years ago by jwiegley@…

I'm still not clear, after reading #126, how to correctly handle the variants. The problem is that my dependency on Boost dependency on the dependencies specified. In fact, I'd just like to pass them all down to Boost -- except for the debug variant.

comment:6 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

MacPorts base doesn't have the capability to declare a dependency on a particular variant of a port. If you require a particular variant of a port, you must do something like a pre-configure block that checks that that port is installed with that variant, and if not, error out and explain it to the user. This block, taken from the PlasmaClient port, shows a way that you can error out if boost is not installed with python support (however, it doesn't detect which python version boost is compiled with):

if {![file exists ${prefix}/lib/libboost_python-mt.dylib]} {
    depends_lib-delete port:boost
    pre-configure {
        ui_error "
****
**** ${name} requires port boost installed with variant +python26.
**** Please do the following then try installing ${name} again:
****
****     sudo port install boost +python26
****

"
        return -code error "incompatible boost installation"
    }
}

Please also test ports before submitting them. The latest Portfile you attached still has syntax errors. If you need help with how to do that, you can ask on the macports-dev mailing list.

Changed 12 years ago by jwiegley@…

Attachment: Portfile.2 added

Current version of ledger-devel

comment:7 Changed 12 years ago by jwiegley@…

I've fixed the things you mentioned. Can we please install Portfile.2? It's been over two years now that I've been trying to make this port available to my users. Thanks, John.

comment:8 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… removed
Owner: changed from macports-tickets@… to ryandesign@…
Status: newassigned

comment:9 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)

Cc: khindenburg@… added

Cc Me!

comment:10 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)

This port moved to the github version 3.1 earlier this year. I don't see any reason for a -devel sub-port or what version/tag it would use.

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

Resolution: wontfix
Status: assignedclosed

Ok.

Note: See TracTickets for help on using tickets.