Opened 11 years ago

Closed 11 years ago

#38871 closed update (fixed)

tesseract @3.02.02 version upgrade

Reported by: mdbecque@… Owned by: markemer (Mark Anderson)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc: cooljeanius (Eric Gallager), ryandesign (Ryan Carsten Schmidt)
Port: tesseract

Description

The 3.02 version upgrade.

Attachments (4)

Tess-Portfile (11.7 KB) - added by mdbecque@… 11 years ago.
tesseract30202.diff (1.7 KB) - added by mdbecque@… 11 years ago.
Attempted diff file.
tesseract-Portfile.diff (22.1 KB) - added by markemer (Mark Anderson) 11 years ago.
Portfile diff with all the new langs an update to 3.02.02
portfile-tesseract.diff (22.2 KB) - added by mdbecque@… 11 years ago.
New patch with revision number deleted.

Download all attachments as: .zip

Change History (23)

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

The livecheck should also be fixed:

Local-Admins-MacBook-Pro:~ ericgallager$ port -v livecheck tesseract
Error: cannot check if tesseract was updated (Couldn't resolve host 'googlecode:tesseract-ocr')

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

Cc: egall@… added

Cc Me!

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

Keywords: tesseract ocr removed
Owner: changed from macports-tickets@… to emer@…
Version: 2.1.3

Thanks. In the future, please Cc relevant port maintainers.

comment:4 in reply to:  1 ; Changed 11 years ago by larryv (Lawrence Velázquez)

Replying to egall@…:

The livecheck should also be fixed

Open a separate ticket for this.

comment:5 in reply to:  4 Changed 11 years ago by cooljeanius (Eric Gallager)

Replying to larryv@…:

Replying to egall@…:

The livecheck should also be fixed

Open a separate ticket for this.

OK, #38873. I just thought this would be relevant here because usually it's useful to post a livecheck result as evidence that a port should be updated.

comment:6 Changed 11 years ago by markemer (Mark Anderson)

I've been meaning to do this since the last time the Portfile broke, so I'll get right on it.

Changed 11 years ago by mdbecque@…

Attachment: Tess-Portfile added

comment:7 Changed 11 years ago by mdbecque@…

I was able to build 3.02.02 with leptonica-1.69 with libgif 4.1.6 : libjpeg 9 : libpng 1.5.15 : libtiff 4.0.3 : zlib 1.2.7 with the attached port file. Hope this helps.

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

As per the guide, please instead attach a unified diff of the Portfile vs. trunk.

Changed 11 years ago by mdbecque@…

Attachment: tesseract30202.diff added

Attempted diff file.

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

Ok, sorry I've been off this so long. I think the diff file gets us most of the way there, thanks. I think it needs a tweak or two. Will do so soon.

Edit: Actually, I take that back. This checks out from SVN, but googlecode has the 3.02 files we need. I am, however, still on the case.

Last edited 11 years ago by markemer (Mark Anderson) (previous) (diff)

comment:10 Changed 11 years ago by markemer (Mark Anderson)

Ok, so this is more complicated than I thought. This patch out from SVN, but googlecode has the 3.02 files we need. So, I did that, but now I need to check to see if we still need to hack autoconf, or if we can configure like normal people.

comment:11 Changed 11 years ago by markemer (Mark Anderson)

And now, for more complication - There are a lot of new languages that need to be added as subports. The guys at the tesseract don't like making my life easy. :-P

comment:12 Changed 11 years ago by markemer (Mark Anderson)

Ok, I have not given up on this, I'm currently on 10.9 which is making my life tough ala macports, but I'm closing in on a proper 3.02.02 build, which has been a huge pain in the ass. I'm going to post it soon, after I'm sure it works on 10.9 and 10.8 which is all I have access to easily.

Changed 11 years ago by markemer (Mark Anderson)

Attachment: tesseract-Portfile.diff added

Portfile diff with all the new langs an update to 3.02.02

comment:13 Changed 11 years ago by markemer (Mark Anderson)

I added a new portfile for 3.02.02 with all the new languages and checksums. I'm not sure if we still need the old patches. It builds on my machine without them, but I forget exactly why we needed them, and I think it was something I could not replicate. If someone could try that out, that'd be cool.

comment:14 in reply to:  13 Changed 11 years ago by mdbecque@…

Replying to emer@…:

I added a new portfile for 3.02.02 with all the new languages and checksums. I'm not sure if we still need the old patches. It builds on my machine without them, but I forget exactly why we needed them, and I think it was something I could not replicate. If someone could try that out, that'd be cool.

I used your diff to patch the old portfile. 3.02.02 built and deployed like a charm on my machine. tesseract-eng installed without a problem.

comment:15 Changed 11 years ago by markemer (Mark Anderson)

I think we're good. We can move ahead on this I think.

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

As with all version increases, the revision line needs to be deleted.

Changed 11 years ago by mdbecque@…

Attachment: portfile-tesseract.diff added

New patch with revision number deleted.

comment:17 Changed 11 years ago by markemer (Mark Anderson)

Indeed it does, good catch. Still works for me.

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

Cc: ryandesign@… added
Keywords: haspatch added

I'm working on committing this; stand by.

comment:19 in reply to:  13 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

The patch was reversed but that's easy to deal with.

Replying to emer@…:

I'm not sure if we still need the old patches. It builds on my machine without them, but I forget exactly why we needed them, and I think it was something I could not replicate. If someone could try that out, that'd be cool.

The only reason we were patching configure.ac and running autoreconf was to fix a failure when $CC has a space in it, e.g. when ccache is being used (which it is on my system). Running autoreconf necessitated making the empty m4 directory. This bug in the configure script is fixed in 3.02 so we no longer need this patch nor to run autoreconf nor to create the m4 directory.

The only reason we were patching strngs.h was to remove the UTF-8 byte order marker from the file, which older GCC compilers failed on. In 3.02 there is no UTF-8 BOM on this file so we don't need to patch it.

There was a special-case section in the language subport code for dealing with version 3.00 language files. Since the port now doesn't have any of those anymore I removed the special-case code.

Some of the subports appear to conflict with one another. For example, tesseract-eng fails to activate, saying:

Error: org.macports.activate for port tesseract-eng returned: Image error: /opt/local/share/tessdata/eng.cube.params is being used by the active tesseract-ara port.  Please deactivate this port first, or use 'port -f activate tesseract-eng' to force the activation.

Why does tesseract-ara install files for other languages?

$ port cont tesseract-ara
Port tesseract-ara contains:
  /opt/local/share/tessdata/ara.cube.bigrams
  /opt/local/share/tessdata/ara.cube.fold
  /opt/local/share/tessdata/ara.cube.lm
  /opt/local/share/tessdata/ara.cube.nn
  /opt/local/share/tessdata/ara.cube.params
  /opt/local/share/tessdata/ara.cube.size
  /opt/local/share/tessdata/ara.cube.word-freq
  /opt/local/share/tessdata/ara.traineddata
  /opt/local/share/tessdata/eng.cube.params
  /opt/local/share/tessdata/fra.cube.params
  /opt/local/share/tessdata/hin.cube.params
  /opt/local/share/tessdata/ita.cube.params
  /opt/local/share/tessdata/rus.cube.params
  /opt/local/share/tessdata/spa.cube.params

Similarly, tesseract-fra fails to activate:

Error: org.macports.activate for port tesseract-fra returned: Image error: /opt/local/share/tessdata/dan-frak.traineddata is being used by the active tesseract-dan port.  Please deactivate this port first, or use 'port -f activate tesseract-fra' to force the activation.

And so on. I've committed the port as is in r112497 but we need to figure out how we want to handle this: either marking the ports as conflicting with one another, or making them not conflict. I'll file a new ticket.

Note: See TracTickets for help on using tickets.