Opened 11 years ago

Closed 11 years ago

Last modified 6 years ago

#37881 closed submission (fixed)

New port: pdf2json

Reported by: pdf2json@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc:
Port: pdf2json

Description

We would like to submit the PDF2JON which builds on top of XPDF library to Mac Ports. This library can be used to convert PDF documents to JSON files.

Attachments (1)

pdf2json.portfile (705 bytes) - added by pdf2json@… 11 years ago.

Download all attachments as: .zip

Change History (11)

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

Thanks. Some comments:

  • The master_sites should probably just be "googlecode"
  • The empty depends_lib and configure.args lines should be removed since they do nothing.

comment:2 Changed 11 years ago by pdf2json@…

Hi Ryan, thanks for your reply, so how will you find the builds if I change the master_sites to just read googlecode? In other words how will you find the .tar.gz ?

comment:3 in reply to:  2 Changed 11 years ago by larryv (Lawrence Velázquez)

Replying to pdf2json@…:

Hi Ryan, thanks for your reply, so how will you find the builds if I change the master_sites to just read googlecode? In other words how will you find the .tar.gz ?

"googlecode" is a predefined fetch mirror.

comment:4 Changed 11 years ago by pdf2json@…

Oh I see! Cool beans. Attaching a new version of the portfile with updated master_sites and distfiles properties

comment:5 Changed 11 years ago by pdf2json@…

actually, noticed an error in the home page url. attaching again.

Changed 11 years ago by pdf2json@…

Attachment: pdf2json.portfile added

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

Cc: ryandesign@… added
Owner: changed from macports-tickets@… to ryandesign@…
Port: pdf2json added
Status: newassigned
Summary: New macport: PDF2JSONNew port: pdf2json

Thanks. I'm still working on fixing a few things before I commit this.

comment:7 Changed 11 years ago by pdf2json@…

Ok, let me know if there is anything I can do anything to help

comment:8 Changed 11 years ago by pdf2json@…

Any news on adding this macport?

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

Cc: ryandesign@… removed
Resolution: fixed
Status: assignedclosed

Sorry for the delay.

Please make sure you test your ports before you submit them; this one failed immediately with:

sh: line 0: cd: .../pdf2json-0.61: No such file or directory"

Committed in r103666 with these further changes:

  • Added "extract.mkdir yes" because the tarball does not extract into an enclosing directory.
  • Added our standard modeline.
  • Removed the line "distfiles pdf2json-0.61.tar.gz" because that's the default.
  • Changed the primary category to "textproc" because "pdf" is not a valid primary category.
  • The Makefile does not honor the --mandir argument that the configure script advertises, and does not use the value which the configure script says is the default, resulting in:
    Warning: violation by /opt/local/man
    Warning: pdf2json violates the layout of the ports-filesystems!
    Warning: Please fix or indicate this misbehavior (if it is intended), it will be an error in future releases!
    
    Added a patch to fix this, which needs to be committed to the upstream sources. (Possibly similar changes are needed to correctly support --bindir, though that's not important for MacPorts since we're fine with the default.)
  • The main Makefile contained some carriage returns which made for difficulties in applying the above patch. Added a post-extract block to remove the carriage returns.
  • Added line "conflicts poppler xpdf xpdf-tools" to this port (and indicated that poppler, xpdf and xpdf-tools conflict with pdf2json) because of these problems:
    Error: org.macports.activate for port pdf2json returned: Image error: /opt/local/bin/pdffonts is being used by the active poppler port.  Please deactivate this port first, or use 'port -f activate pdf2json' to force the activation.
    
    Error: org.macports.activate for port pdf2json returned: Image error: /opt/local/bin/pdffonts is being used by the active xpdf-tools port.  Please deactivate this port first, or use 'port -f activate pdf2json' to force the activation.
    
    Error: org.macports.activate for port pdf2json returned: Image error: /opt/local/etc/xpdfrc is being used by the active xpdf port.  Please deactivate this port first, or use 'port -f activate pdf2json' to force the activation.
    
    Ideally ports should not conflict with each other. If this can be fixed, please do (could pdf2json use the existing xpdf and xpdf-tools ports instead of providing its own copy?); otherwise, the "conflicts" line will at least alert users to the problem early.
  • Added a patch to remove -I/usr/local/include from Makefiles because we don't want to use any files the user might have installed there.
  • Added a patch to add @CXXFLAGS@ and @LDFLAGS@ in src/Makefile.in so that we're building for the right architectures.
  • Added a patch to use @CXX@ in src/Makefile.in and splash/Makefile.in so that we're UsingTheRightCompiler.
  • Copied a post-patch block from the xpdf portfile to replace /usr/local with ${prefix} in doc/sample-xpdfrc and xpdf/GlobalParams.cc.
  • The xpdf port also adds a dependency on the ghostscript port for its fonts. Does pdf2json also use those fonts? If so should we add that same dependency so pdf2json?
Note: See TracTickets for help on using tickets.