Last active
December 1, 2016 21:10
-
-
Save roccato/2ee0d4813bb06ff87c94a0e1ef0208ff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkg_name=ruby | |
pkg_origin=core | |
pkg_version=2.2.3 | |
pkg_description="A dynamic, open source programming language with a focus on \ | |
simplicity and productivity. It has an elegant syntax that is natural to \ | |
read and easy to write." | |
pkg_license=("Ruby") | |
pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>" | |
pkg_source=https://cache.ruby-lang.org/pub/${pkg_name}/${pkg_name}-${pkg_version}.tar.gz | |
pkg_upstream_url=https://www.ruby-lang.org/en/ | |
pkg_filename=${pkg_name}-${pkg_version}.tar.gz | |
pkg_shasum=df795f2f99860745a416092a4004b016ccf77e8b82dec956b120f18bdc71edce | |
pkg_deps=(core/glibc core/ncurses core/zlib/1.2.8/20161015000012 core/openssl core/libyaml core/libffi) | |
pkg_build_deps=(core/coreutils core/diffutils core/patch core/make core/gcc core/sed) | |
pkg_lib_dirs=(lib) | |
pkg_include_dirs=(include) | |
pkg_bin_dirs=(bin) | |
pkg_interpreters=(bin/ruby) | |
do_build() { | |
CFLAGS="${CFLAGS} -O3 -g -pipe" | |
patch -p1 -i "$PLAN_CONTEXT/patches/ruby-2_1_3-no-mkmf.patch" | |
# Resolves issue for older versions of RubyGems which require new trust | |
# authority SSL certificate required as of 2016-10-06. | |
# | |
# Most likely the next Ruby release will resolve this issue as the vendored | |
# version of RubyGems should be newer. | |
# | |
# For more details see: | |
# http://guides.rubygems.org/ssl-certificate-update/#manual-solution-to-ssl-issue | |
cp -v "$PLAN_CONTEXT/GlobalSignRootCA.pem" lib/rubygems/ssl_certs/ | |
./configure "--prefix=$pkg_prefix" \ | |
--enable-shared \ | |
--disable-install-doc \ | |
"--with-openssl-dir=$(_resolve_dependency core/openssl)" \ | |
"--with-libyaml-dir=$(_resolve_dependency core/libyaml)" | |
make | |
} | |
do_install() { | |
do_default_install | |
gem update --system --no-document | |
gem install rb-readline --no-document | |
} | |
do_check() { | |
make test | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This LGTM with the exception of two things: pinning zlib and the package name.
Talking about package naming first, what we will likely do with this is create a
ruby22
package as ruby 2.2 is still considered "stable" and supported.Regarding zlib, we're definitely aware that we have an issue currently with zlib because of openssl needing to be rebuilt. The only issue with rebuilding openssl is that we end up having to rebuild most of the universe after it gets rebuilt. This isn't a problem but it does mean needing to keep this open for a couple more days. Once we've got openssl and it's transitive dependencies corrected we can get this built and merged.