Opened 9 years ago

Closed 9 years ago

#32075 closed update (fixed)

Tesseract update to 3.01

Reported by: markemer (Mark Anderson) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: maintainer haspatch Cc: ryandesign (Ryan Schmidt)
Port: tesseract

Description

Portfile diff to upgrade Tesseract to 3.01

Attachments (2)

Portfile.diff (1.2 KB) - added by markemer (Mark Anderson) 9 years ago.
Diff of tesseract portfile to upgrade to 3.01
tesseract-3.01.diff (21.0 KB) - added by ryandesign (Ryan Schmidt) 9 years ago.
proposed patch using subports

Download all attachments as: .zip

Change History (9)

Changed 9 years ago by markemer (Mark Anderson)

Attachment: Portfile.diff added

Diff of tesseract portfile to upgrade to 3.01

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

Cc: ryandesign@… added
Keywords: maintainer haspatch added
Milestone: MacPorts 2.0.4

The revision should drop to 0 when the version is increased.

I think we can improve on this port w.r.t. the way the language files are handled. It's not optimal the way it currently has to re-download the language files when a new version of tesseract is released, even if they haven't changed, and similarly, it has to re-download the tesseract source if any of the language files change. Since this port was made, MacPorts 2 has been released, which has the new subport feature, and I think having a separate subport for each language file would be the best solution. This will also make it easier for users to decide later which language files they need, without having to reinstall the main port.

Since subports are still new and not documented well, I'll see if I can come up with a patch for your consideration.

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

Did you test your patch before submitting it? It doesn't work for me as is:

config.status: error: cannot find input file: `Makefile.in'

Indeed Makefile.in is missing from the distribution. Looks like we'll have to run automake.


Here's my patch to use subports instead of variants. See what you think and let me know if I should commit it. You can test it with:

cd $(port dir tesseract)
sudo patch -p0 < ~/Downloads/tesseract-3.01.diff
sudo port install subport=tesseract-eng

"port info" in that directory will show you all the subports available.

I admit the Portfile has gotten a bit complicated. Partly this is because upstream has released version 3.01 of some of the language packs, which are packaged one way, but others are only available in version 3.00, which is packaged a different way. It might have been simpler to make a portgroup and a separate port for each language pack but I don't feel like rewriting it again at the moment.

Changed 9 years ago by ryandesign (Ryan Schmidt)

Attachment: tesseract-3.01.diff added

proposed patch using subports

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

I alphabetized the list of language packs, and added the ones the port didn't already have.

comment:4 Changed 9 years ago by markemer (Mark Anderson)

Yeah, I did test it, but I may have had a build directory lying around accidentally. I'll see what the deal is.

comment:5 Changed 9 years ago by markemer (Mark Anderson)

I see you fixed it already. I'm going to complain upstream, since I don't think they should ship a ./configure if we need to use automake.

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

Where are we with this? Should I commit my patch, or do you have other suggestions?

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

Resolution: fixed
Status: newclosed

Mark sent an email reply saying:

I think your patch is the best we are going to do until 3.02 comes out, which I am told is "soon".

So I committed it in r89002.

Note: See TracTickets for help on using tickets.