Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Pike-7.8.700: New formula #14783

Closed
wants to merge 3 commits into from

4 participants

@hww3

Pike is a dynamic programming language with a syntax similar to Java and C. It is simple to learn, does not require long compilation passes and has powerful built-in data types allowing simple and really fast data manipulation.

Note: this is an attempt at preparing a brew-compliant formula, it also updates the version deployed to the latest, official release.

@hww3 hww3 Pike-7.8.700: New formula
Pike is a dynamic programming language with a syntax similar to Java and C.
It is simple to learn, does not require long compilation passes and has
powerful built-in data types allowing simple and really fast data manipulation.

Note: this is a second attempt at preparing a brew-compliant formula, it
also updates the version deployed to the latest, official release.
c79caf2
@adamv
Owner

NOTE: If you keep your pull request in a non-master branch, you can git push -f to update the pull request in-place.

@adamv
Owner

Is the X dependency optional?

@adamv
Owner

This compiles and I'm mostly ready to pull, but we may need an option to disable X.

@adamv
Owner

I don't think that works; :x11 doesn't support :optional or :recommended tags. @jacknagel @mikemcquaid - ?

@jacknagel
Owner

They do as of fb490be

@adamv adamv closed this pull request from a commit
@hww3 hww3 pike 7.8.700
Closes #14783.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
22311e6
@adamv adamv closed this in 22311e6
@adamv
Owner

Sorry for the long delay on this.

@hww3

Thanks so much! Sorry for all of the back and forth this required.

@nicke

great job! Thanks!

@sessyargc sessyargc referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@snakeyroc3 snakeyroc3 referenced this pull request from a commit in snakeyroc3/homebrew
@hww3 hww3 pike 7.8.700
Closes #14783.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
9bb8d33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 7, 2012
  1. @hww3

    Pike-7.8.700: New formula

    hww3 authored
    Pike is a dynamic programming language with a syntax similar to Java and C.
    It is simple to learn, does not require long compilation passes and has
    powerful built-in data types allowing simple and really fast data manipulation.
    
    Note: this is a second attempt at preparing a brew-compliant formula, it
    also updates the version deployed to the latest, official release.
Commits on Sep 10, 2012
  1. @hww3
Commits on Nov 1, 2012
  1. @hww3
This page is out of date. Refresh to see the latest.
Showing with 105 additions and 0 deletions.
  1. +105 −0 Library/Formula/pike.rb
View
105 Library/Formula/pike.rb
@@ -0,0 +1,105 @@
+require 'formula'
+
+class Pike < Formula
+ homepage 'http://pike.ida.liu.se'
+ url 'http://pike.ida.liu.se/pub/pike/all/7.8.700/Pike-v7.8.700.tar.gz'
+ sha1 '877bd50d2bb202aa485d1f7c62398922d60696c7'
+
+ depends_on "nettle"
+ depends_on "gmp"
+ depends_on "pcre"
+ depends_on :x11 => :recommended
+ depends_on 'libtiff' => :recommended
+
+ # optional dependencies
+ depends_on 'gettext' if build.include? 'with-gettext' or build.include? 'with-all'
+ depends_on 'gdbm' if build.include? 'with-gdbm' or build.include? 'with-all'
+ depends_on 'gtk+' if build.include? 'with-gtk2' or build.include? 'with-all'
+ depends_on 'mysql' if build.include? 'with-mysql' or build.include? 'with-all'
+ depends_on 'sdl' if build.include? 'with-sdl' or build.include? 'with-all'
+ depends_on 'sane-backends' if build.include? 'with-sane' or build.include? 'with-all'
+ depends_on 'pdflib-lite' if build.include? 'with-pdf' or build.include? 'with-all'
+ depends_on 'mesalib-glw' if build.include? 'with-gl' or build.include? 'with-all'
+
+ option 'with-gettext', 'Include Gettext support'
+ option 'with-gdbm', 'Include Gdbm support'
+ option 'with-gtk2', 'Include GTK2 support'
+ option 'with-mysql', 'Include Mysql support'
+ option 'with-pcre', 'Include Regexp.PCRE support'
+ option 'with-sdl', 'Include SDL support'
+ option 'with-sane', 'Include Sane support'
+ option 'with-pdf', 'Include PDF support'
+ option 'with-gl', 'Include GL support'
+ option 'with-all', 'Include all features'
+ option 'with-machine-code', 'Enables machine code'
+
+ fails_with :llvm do
+ build 2335
+ cause <<-EOS.undent
+ Fails to build multiset.c, results in a Abort trap being caught.
+ EOS
+ end
+
+ def install
+ cargs = [ "--prefix=#{prefix}",
+ "--without-bundles"
+ ]
+
+ if MacOS.prefer_64_bit? and not build.build_32_bit?
+ ENV.append 'CFLAGS', '-m64'
+ cargs << "--with-abi=64"
+ else
+ ENV.append 'CFLAGS', '-m32'
+ cargs << "--with-abi=32"
+ end
+
+ unless build.include? 'with-machine-code'
+ cargs << "--without-machine-code"
+ end
+
+ ENV.j1
+
+ system "make", "CONFIGUREARGS='" + cargs.join(' ') + "'"
+
+ # installation is complicated by some of brew's standard patterns.
+ # hopefully these notes explain the reasons for diverging from
+ # the path that most other formulae use.
+ #
+ # item 1
+ #
+ # basically, pike already installs itself naturally as brew would want
+ # it; that is, if prefix=/Cellar, installation would create
+ # /Cellar/pike/ver/bin and so forth. We could just go with that, but it's
+ # possible that homebrew might change its layout and then the formula
+ # would no longer work.
+ #
+ # so, rather than guessing at it, we do this alternate gyration, forcing
+ # pike to install in a slightly nonstandard way (for pike, at least)
+ #
+ # item 2
+ #
+ # a second problem crops up because the during installation, the link
+ # function tries to pull in stuff from lib/, which is really more like
+ # what one would expect share or libexec in homebrew might be: pike
+ # specific files, rather than shared libraries. we could approach this
+ # in a similar fashion, but the result would be a really odd arrangement
+ # for anyone remotely familar with standard pike installs.
+ #
+ # because there's no way to override the keg.link command, this formula
+ # installs the whole pike install into prefix/libexec and then links the
+ # man page and binary back into prefix/share and prefix/bin. not so
+ # elegant, but that's the way brew works.
+ system "make", "install",
+ "prefix=#{libexec}",
+ "exec_prefix=#{libexec}",
+ "share_prefix=#{libexec}/share",
+ "lib_prefix=#{libexec}/lib",
+ "man_prefix=#{libexec}/man",
+ "include_path=#{libexec}/include",
+ "INSTALLARGS=--traditional"
+
+ bin.install_symlink "#{libexec}/bin/pike"
+ share.install_symlink "#{libexec}/share/man"
+
+ end
+end
Something went wrong with that request. Please try again.