Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cycript #4188

Closed
szhu opened this issue May 5, 2014 · 10 comments
Closed

Add cycript #4188

szhu opened this issue May 5, 2014 · 10 comments

Comments

@szhu
Copy link
Contributor

szhu commented May 5, 2014

In light of a recent patch for GrowlVoice, it would be nice to have a formula for cycript.

Cycript seems to be distributed to be portable. The zip expands to three items:

  • cycript, a two-line launcher script
  • Cycript.framework/, which appears to be for header files
  • Cycript.lib/, for the everything else

Can these be left in the same directory for Cask?

@vitorgalvao
Copy link
Member

Homebrew-cask keeps everything from the archived download, but only links what is specified. If you download everything to a location and symlink only the launcher script, does it work as intended? If it does, it should work just as well here.

However, as per our current policy, it should first be submitted to homebrew-binary.

@nanoxd
Copy link
Contributor

nanoxd commented May 26, 2014

@shzu did you try submitting this to homebrew-binary?

@szhu
Copy link
Contributor Author

szhu commented May 26, 2014

Yes, it's Homebrew/homebrew-binary#106. It's probably being ignored/backlogged because I didn't actually write up the formula (it's an issue, not a PR).

Edit: I just noticed Homebrew/homebrew-binary#106 is already auto-mentioned in this thread so I probably said a bunch of redundant information.

@vitorgalvao
Copy link
Member

We changed our policy on this, recently, so you can submit it here, if you want. Do you need any help building the cask?

@szhu
Copy link
Contributor Author

szhu commented Jun 3, 2014

Yes please. The issue is that the download URL doesn't end with .zip even though the downloaded file is indeed a zip file, and I'm not sure how to deal with that.

@alebcay
Copy link
Member

alebcay commented Jun 3, 2014

It should be okay, as long as the downloaded file has ends up with the .zip extension.

@rolandwalker
Copy link
Contributor

@szhu, we do have some code to add a :target to the url stanza, which would allow you to download the file to a form with the desired extension. Unfortunately that feature got tangled up in a more complex PR which is still pending: #3043 .

In the meantime, you can use the following stanza to force recognition of the zip file:

  container_type :zip

The container_type stanza is documented in CASK_LANGUAGE_REFERENCE.md.

One example of its use is in adobe-arh.rb.

@alebcay
Copy link
Member

alebcay commented Jun 12, 2014

It turns out cycript doesn't play well with symlinks:

<after installation>

caleb@alebcay:~
❯ cycript
/usr/local/bin/cycript: line 23: /usr/local/bin/Cycript.lib/cycript: No such file or directory

So I ended up symlinking everything in the zip file, and now it works:

caleb@alebcay:~
❯ cycript
cy#

Here's what the Cask file I wrote looks like. Is it acceptable to symlink everything into /usr/local/bin, where technically there should be nothing but binaries?

caleb@alebcay:~
❯ cask cat cycript
class Cycript < Cask
  url 'https://cache.saurik.com/cycript/mac/Cycript_0.9.501.zip'
  homepage 'http://www.cycript.org/'
  version '0.9.501'
  sha256 '6838ccff44376ebe64c1f4d6d185e735a646d5478afa8974fc5632ca4eac51c8'
  binary 'cycript'
  binary 'Cycript.framework'
  binary 'Cycript.lib'
end

@rolandwalker
Copy link
Contributor

It's not ideal, but we have done the same recently for another similar Cask.

I wouldn't be opposed to a :shim modifier that causes binary to install a one-line bash script under /usr/local/bin which invokes the binary using the full path.

@vitorgalvao
Copy link
Member

Closing in favour of #9203.

@adidalal adidalal removed the awaiting maintainer feedback Issue needs response from a maintainer. label Apr 12, 2016
@Homebrew Homebrew locked and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants