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

Add Analog web analyzer tool. #21477

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
@thaxter
Contributor

thaxter commented Jul 27, 2013

Re-submitting pull request #15016 as single commit to non-master branch.

+ depends_on 'libpng'
+
+ def install
+ system "make DEFS='-DLANGDIR=\\\"#{share}/analog/lang/\\\"'"

This comment has been minimized.

Show comment Hide comment
@jacknagel

jacknagel Jul 27, 2013

Contributor

If you split this into multiple arguments to system you won't have to do all this escaping.

@jacknagel

jacknagel Jul 27, 2013

Contributor

If you split this into multiple arguments to system you won't have to do all this escaping.

This comment has been minimized.

Show comment Hide comment
@thaxter

thaxter Aug 1, 2013

Contributor

I've got the rest queued up, but this one is confusing as there's only
one argument. It has ruby quotes on the outside, then single quotes,
then double quotes inside, escaped because it works. In a shell it's:

make DEFS='-DLANGDIR="/foo-share/analog/lang"'

The escaping is due to
On Sat, 2013-07-27 at 09:34 -0700, Jack Nagel wrote:

In Library/Formula/analog.rb:

@@ -0,0 +1,25 @@
+require 'formula'
+
+class Analog < Formula

  • depends_on 'gd'
  • depends_on 'jpeg'
  • depends_on 'libpng'
  • def install
  • system "make DEFS='-DLANGDIR=\"#{share}/analog/lang/\"'"

If you split this into multiple arguments to system you won't have to
do all this escaping.


Reply to this email directly or view it on GitHub.

@thaxter

thaxter Aug 1, 2013

Contributor

I've got the rest queued up, but this one is confusing as there's only
one argument. It has ruby quotes on the outside, then single quotes,
then double quotes inside, escaped because it works. In a shell it's:

make DEFS='-DLANGDIR="/foo-share/analog/lang"'

The escaping is due to
On Sat, 2013-07-27 at 09:34 -0700, Jack Nagel wrote:

In Library/Formula/analog.rb:

@@ -0,0 +1,25 @@
+require 'formula'
+
+class Analog < Formula

  • depends_on 'gd'
  • depends_on 'jpeg'
  • depends_on 'libpng'
  • def install
  • system "make DEFS='-DLANGDIR=\"#{share}/analog/lang/\"'"

If you split this into multiple arguments to system you won't have to
do all this escaping.


Reply to this email directly or view it on GitHub.

This comment has been minimized.

Show comment Hide comment
@jacknagel

jacknagel Aug 1, 2013

Contributor

Yep. But if you use the multiple argument form, the arguments are passed as-is directly to make, bypassing shell expansion, so you can lose some of the escaping.

@jacknagel

jacknagel Aug 1, 2013

Contributor

Yep. But if you use the multiple argument form, the arguments are passed as-is directly to make, bypassing shell expansion, so you can lose some of the escaping.

+ def install
+ system "make DEFS='-DLANGDIR=\\\"#{share}/analog/lang/\\\"'"
+ system "mkdir -p #{bin}"
+ system "cp analog #{bin}"

This comment has been minimized.

Show comment Hide comment
@jacknagel

jacknagel Jul 27, 2013

Contributor

These two lines can be just bin.install 'analog'

@jacknagel

jacknagel Jul 27, 2013

Contributor

These two lines can be just bin.install 'analog'

+ system "mkdir -p #{bin}"
+ system "cp analog #{bin}"
+ system "mkdir -p #{share}/analog"
+ system "cp -R examples how-to images lang #{share}/analog/"

This comment has been minimized.

Show comment Hide comment
@jacknagel

jacknagel Jul 27, 2013

Contributor

Similarily, (share/'analog').install 'examples', 'how-to', 'images', 'lang'

@jacknagel

jacknagel Jul 27, 2013

Contributor

Similarily, (share/'analog').install 'examples', 'how-to', 'images', 'lang'

+ system "cp analog #{bin}"
+ system "mkdir -p #{share}/analog"
+ system "cp -R examples how-to images lang #{share}/analog/"
+ system "cp analog.cfg #{share}/analog/analog.cfg-dist"

This comment has been minimized.

Show comment Hide comment
@jacknagel

jacknagel Jul 27, 2013

Contributor

(share/'analog').install 'analog.cfg' => 'analog.cfg-dist'

@jacknagel

jacknagel Jul 27, 2013

Contributor

(share/'analog').install 'analog.cfg' => 'analog.cfg-dist'

+
+ depends_on 'gd'
+ depends_on 'jpeg'
+ depends_on 'libpng'

This comment has been minimized.

Show comment Hide comment
@jacknagel

jacknagel Jul 27, 2013

Contributor

Use :libpng rather than 'libpng'

@jacknagel

jacknagel Jul 27, 2013

Contributor

Use :libpng rather than 'libpng'

@adamv

This comment has been minimized.

Show comment Hide comment
@adamv

adamv Jul 31, 2013

Contributor

Ping.

Contributor

adamv commented Jul 31, 2013

Ping.

@adamv

This comment has been minimized.

Show comment Hide comment
@adamv

adamv Aug 30, 2013

Contributor

@BrewTestBot test this please

Contributor

adamv commented Aug 30, 2013

@BrewTestBot test this please

@adamv adamv closed this in 8803323 Aug 30, 2013

handyman5 pushed a commit to handyman5/homebrew that referenced this pull request Oct 7, 2013

Analog 6.0
Closes #21477.

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

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

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