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

can not install tsocks #11870

Closed
redguardtoo opened this Issue Apr 25, 2012 · 8 comments

Comments

Projects
None yet
7 participants
@redguardtoo

$ brew search tsocks
adamv/alt/tsocks

$ brew install tsocks
Error: No available formula for tsocks

@mistydemeo

This comment has been minimized.

Show comment
Hide comment
@mistydemeo

mistydemeo Apr 25, 2012

Contributor

tsocks isn't available in the master branch of homebrew - it's in adamv's homebrew-alt. You need to tap that repo to install it:

brew tap adamv/alt

Then you should be able to brew install tsocks.

Since the formula isn't in the main repo, please file a ticket at homebrew/alt if you have trouble building it.

Contributor

mistydemeo commented Apr 25, 2012

tsocks isn't available in the master branch of homebrew - it's in adamv's homebrew-alt. You need to tap that repo to install it:

brew tap adamv/alt

Then you should be able to brew install tsocks.

Since the formula isn't in the main repo, please file a ticket at homebrew/alt if you have trouble building it.

@mistydemeo mistydemeo closed this Apr 25, 2012

@huyl

This comment has been minimized.

Show comment
Hide comment
@huyl

huyl Jan 10, 2013

That tap is no longer available

huyl commented Jan 10, 2013

That tap is no longer available

@adamv

This comment has been minimized.

Show comment
Hide comment
@adamv

adamv Jan 10, 2013

Contributor
require 'formula'

class Tsocks < Formula
  # The original is http://tsocks.sourceforge.net/
  # This GitHub repo is a maintained fork with OSX support
  homepage 'http://github.com/pc/tsocks'
  head 'https://github.com/pc/tsocks.git'

  depends_on 'autoconf' => :build if MacOS.xcode_version.to_f >= 4.3

  def install
    system "autoconf", "-v"
    system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking", "--with-conf=#{config_file}"

    inreplace("tsocks") { |bin| bin.change_make_var! "LIBDIR", lib }

    system "make"
    system "make install"

    etc.install "tsocks.conf.simple.example" => "tsocks.conf" unless config_file.exist?
  end

  def test
    puts 'Your current public ip is:'
    ohai `curl -sS ifconfig.me 2>&1`.chomp
    puts "If your correctly configured #{config_file}, this should show the ip you have trough the proxy"
    puts 'Your ip through the proxy is:'
    ohai `tsocks curl -sS ifconfig.me 2>&1`.chomp
  end

  def config_file
    etc / 'tsocks.conf'
  end
end

Contributor

adamv commented Jan 10, 2013

require 'formula'

class Tsocks < Formula
  # The original is http://tsocks.sourceforge.net/
  # This GitHub repo is a maintained fork with OSX support
  homepage 'http://github.com/pc/tsocks'
  head 'https://github.com/pc/tsocks.git'

  depends_on 'autoconf' => :build if MacOS.xcode_version.to_f >= 4.3

  def install
    system "autoconf", "-v"
    system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking", "--with-conf=#{config_file}"

    inreplace("tsocks") { |bin| bin.change_make_var! "LIBDIR", lib }

    system "make"
    system "make install"

    etc.install "tsocks.conf.simple.example" => "tsocks.conf" unless config_file.exist?
  end

  def test
    puts 'Your current public ip is:'
    ohai `curl -sS ifconfig.me 2>&1`.chomp
    puts "If your correctly configured #{config_file}, this should show the ip you have trough the proxy"
    puts 'Your ip through the proxy is:'
    ohai `tsocks curl -sS ifconfig.me 2>&1`.chomp
  end

  def config_file
    etc / 'tsocks.conf'
  end
end

@huyl

This comment has been minimized.

Show comment
Hide comment

huyl commented Jan 10, 2013

@adamv Thanks

@ashutoshvsingh

This comment has been minimized.

Show comment
Hide comment
@ashutoshvsingh

ashutoshvsingh Feb 21, 2013

`require': no such file to load -- formula

`require': no such file to load -- formula

@ddehghan

This comment has been minimized.

Show comment
Hide comment
@ddehghan

ddehghan Sep 8, 2013

the full instruction is

copy adamv's formula to /usr/local/Library/Formula/tsocks.rb

then

brew install --HEAD tsocks

ddehghan commented Sep 8, 2013

the full instruction is

copy adamv's formula to /usr/local/Library/Formula/tsocks.rb

then

brew install --HEAD tsocks

@remohammadi

This comment has been minimized.

Show comment
Hide comment
@remohammadi

remohammadi Oct 7, 2013

Why tsocks is not included in the main repository? Is it because of some security problem? Or nobody has suggested it via pull request yet?

Why tsocks is not included in the main repository? Is it because of some security problem? Or nobody has suggested it via pull request yet?

@adamv

This comment has been minimized.

Show comment
Hide comment
@adamv

adamv Oct 7, 2013

Contributor

@remohammadi it was removed from core because it was (A) a head-only formula and (B) a fork of the original project.

Contributor

adamv commented Oct 7, 2013

@remohammadi it was removed from core because it was (A) a head-only formula and (B) a fork of the original project.

@Homebrew Homebrew locked and limited conversation to collaborators Mar 3, 2015

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