This repository has been archived by the owner. It is now read-only.

Added pdf2htmlex formula, which provides accurate pdf rendering to html ... #15030

Closed
wants to merge 4 commits into
from

Conversation

Projects
None yet
8 participants
Contributor

jamiely commented Sep 21, 2012

...using modern web techniques

@jamiely jamiely referenced this pull request in coolwanglu/pdf2htmlEX Sep 21, 2012

Closed

Homebrew Formula #17

Jamie Ly Used the downloads URL generated by the tag and updated the sha appro…
…priately. Also moved head below sha.
4c15d19
Contributor

jamiely commented Sep 21, 2012

Thanks for the review, I modified the code accordingly.

@jacknagel jacknagel commented on an outdated diff Sep 21, 2012

Library/Formula/pdf2htmlex.rb
+
+ head 'https://github.com/coolwanglu/pdf2htmlEX.git'
+
+ depends_on 'cmake' => :build
+ depends_on 'fontforge'
+ depends_on 'libpng'
+ depends_on 'poppler'
+
+ def install
+ system "cmake", ".", *std_cmake_args
+ system "make"
+ system "make install"
+ end
+
+ def test
+ system "curl http://partners.adobe.com/public/developer/en/xml/AdobeXMLFormsSamples.pdf -o /tmp/tmp.pdf && pdf2htmlEX /tmp/tmp.pdf"
@jacknagel

jacknagel Sep 21, 2012

Contributor

Don't download stuff into /tmp; use

mktemp do
  # test code
end

which will clean up the temp directory afterwards.

@jacknagel

jacknagel Sep 21, 2012

Contributor

Also we prefer not to use && chains, and we have a "curl" utility method:

mktemp do
  curl "-O", "http://partners.adobe.com/public/developer/en/xml/AdobeXMLFormsSamples.pdf"
  system "#{bin}/pdf2htmlEX", "AdobeXMLFormsSamples.pdf"
end
Jamie Ly Used curl utility method instead of system call and used mktemp metho…
…d with block rather than saving to the /tmp directory
bec4b7f
Contributor

jamiely commented Sep 21, 2012

Thank you for the review. I have altered the code per suggestions.

Contributor

adamv commented Oct 4, 2012

Not building for me on Snow Leopard:

cc1plus: error: unrecognized command line option "-std=c++0x"

(Also missing a pkg-config dep.)

Don´t work form me..on lion

same than adamv

make[2]: *** Waiting for unfinished jobs....
cc1plus: error: unrecognized command line option "-std=c++0x"
make[2]: *** [CMakeFiles/pdf2htmlEX.dir/src/HTMLRenderer/general.cc.o] Error 1
make[1]: *** [CMakeFiles/pdf2htmlEX.dir/all] Error 2
make: *** [all] Error 2

Error: pdf2htmlex did not build
Logs: /Users/sangar1982/Library/Logs/Homebrew/pdf2htmlex/
Help: https://github.com/mxcl/homebrew/wiki/troubleshooting
mxcl#15030

Contributor

jamiely commented Oct 23, 2012

I'm still trying to get a Snow Leopard environment up to test this.

@sangar82 What's the version of your compiler?

Contributor

mistydemeo commented Oct 23, 2012

This also fails for me on 10.6, using gcc-4.2 and llvm-gcc-4.2.

Contributor

mistydemeo commented Oct 23, 2012

(Can't test with clang on Xcode 3.2.6.)

4.2 would be too old. C++11 support is necessary.
That's why I suggest add higher dependency in the Formula.

On Tue, Oct 23, 2012 at 11:59 PM, Misty De Meo notifications@github.comwrote:

This also fails for me on 10.6, using gcc-4.2 and llvm-gcc-4.2.


Reply to this email directly or view it on GitHubhttps://github.com/mxcl/homebrew/pull/15030#issuecomment-9707423.

@coolwanglu

gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)

Mac OS 10.7.4

@sangar82 That's the problem, it does not support c++11. Please upgrade it.

lsinger commented Jan 15, 2013

bump

Contributor

jamiely commented Jan 15, 2013

So I kind of forgot about this. I got stuck on how to determine whether the compiler brew is using supports c++11.

  1. If the compiler is gcc, how does one determine it supports c++11? Is there an argument that can be passed?
  2. What should happen if the compiler is clang?
Contributor

adamv commented Jan 15, 2013

Do any Apple-provided compilers on any version of Xcode support C++11? Certainly none on Snow Leopard do.

Owner

MikeMcQuaid commented Jan 15, 2013

Those with Lion and Mountain Lion do. SL is pretty old at this point.

On Tuesday, 15 January 2013, Adam Vandenberg wrote:

Do any Apple-provided compilers on any version of Xcode support C++11?
Certainly none on Snow Leopard do.


Reply to this email directly or view it on GitHubhttps://github.com/mxcl/homebrew/pull/15030#issuecomment-12271871.

Mike McQuaid
http://mikemcquaid.com

Contributor

adamv commented Jan 29, 2013

Can we get this squashed to a single commit for review? Will add a Lion-or-newer requirement.

Contributor

jamiely commented Jan 30, 2013

Here you go: mxcl#17427

Contributor

adamv commented Jan 31, 2013

Closing as dupe of #17427.

@adamv adamv closed this Jan 31, 2013

@adamv adamv added a commit that referenced this pull request Feb 1, 2013

@jamiely @adamv jamiely + adamv pdf2htmlex 0.6
Closes #17427.
Closes #15030.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
3114097

@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.