SUMMARY="A programming language focused on simplicity and productivity" DESCRIPTION="Ruby is a dynamic, reflective, object-oriented, general-purpose \ programming language. It was designed and developed in the mid-1990s \ by Yukihiro 'Matz' Matsumoto in Japan. Ruby embodies syntax inspired by Perl with Smalltalk-like features and \ was also influenced by Eiffel and Lisp. It supports multiple \ programming paradigms, including functional, object oriented, and \ imperative. It also has a dynamic type system and automatic memory \ management. Therefore, it is similar in varying degrees to, Smalltalk, \ Python, Perl, Lisp, Dylan, and CLU." HOMEPAGE="https://www.ruby-lang.org/" COPYRIGHT="1993-2021 Yukihiro Matsumoto" LICENSE="Ruby BSD (3-clause)" REVISION="4" SOURCE_URI="https://cache.ruby-lang.org/pub/ruby/2.7/ruby-$portVersion.tar.bz2" CHECKSUM_SHA256="bffa8aec9da392eda98f1c561071bb6e71d217d541c617fc6e3282d79f4e7d48" SOURCE_DIR="ruby-$portVersion" PATCHES="ruby-$portVersion.patchset" ADDITIONAL_FILES="gemrc" ARCHITECTURES="all !x86_gcc2" SECONDARY_ARCHITECTURES="x86" GLOBAL_WRITABLE_FILES="settings/gemrc keep-old" libVersion="$portVersion" libVersionCompat="$libVersion compat >= ${libVersion%.*}" PROVIDES=" ruby$secondaryArchSuffix = $libVersionCompat cmd:bundle = $libVersionCompat cmd:bundler = $libVersionCompat cmd:erb = $libVersionCompat cmd:gem = $libVersionCompat cmd:irb = $libVersionCompat cmd:racc = $libVersionCompat cmd:racc2y = $libVersionCompat cmd:rake = $libVersionCompat cmd:rdoc = $libVersionCompat cmd:ri = $libVersionCompat cmd:ruby = $libVersionCompat cmd:testrb = $libVersionCompat cmd:y2racc = $libVersionCompat lib:libruby$secondaryArchSuffix = $libVersionCompat " REQUIRES=" haiku$secondaryArchSuffix lib:libcrypto$secondaryArchSuffix lib:libedit$secondaryArchSuffix lib:libffi$secondaryArchSuffix lib:libgdbm$secondaryArchSuffix lib:libgmp$secondaryArchSuffix lib:libiconv$secondaryArchSuffix lib:libncursesw$secondaryArchSuffix lib:libssl$secondaryArchSuffix lib:libz$secondaryArchSuffix " PROVIDES_devel=" ruby${secondaryArchSuffix}_devel = $portVersion devel:libruby$secondaryArchSuffix = $libVersionCompat " REQUIRES_devel=" ruby$secondaryArchSuffix == $portVersion base " BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel devel:libcrypto$secondaryArchSuffix devel:libedit$secondaryArchSuffix devel:libffi$secondaryArchSuffix devel:libgdbm$secondaryArchSuffix devel:libgmp$secondaryArchSuffix devel:libiconv$secondaryArchSuffix devel:libncursesw$secondaryArchSuffix devel:libssl$secondaryArchSuffix devel:libz$secondaryArchSuffix " BUILD_PREREQUIRES=" cmd:autoconf cmd:bison cmd:g++$secondaryArchSuffix cmd:gcc$secondaryArchSuffix cmd:git cmd:libtoolize$secondaryArchSuffix cmd:make cmd:pkg_config$secondaryArchSuffix " defineDebugInfoPackage ruby$secondaryArchSuffix \ "$libDir"/libruby.so.$libVersion PATCH() { # Hack for ripper build sed -i \ -e "/#define YYLTYPE_IS_DECLARED 1/a #define YYEMPTY -2" \ -e "/#define YYLTYPE_IS_DECLARED 1/a #define YYUNDEF 257" \ -e "/#define YYLTYPE_IS_DECLARED 1/a #define YYerror 256" \ $sourceDir/ext/ripper/ripper.y } BUILD() { export CFLAGS="-D_BSD_SOURCE" autoconf touch parse.c # Otherwise BASERUBY will be required, which results in circular dependency. runConfigure --omit-dirs binDir ./configure \ --enable-shared \ --disable-silent-rules \ --enable-debug-env \ --bindir=$prefix/bin \ --with-dbm-type=gdbm_compat # The build process needs to run ruby, and without this it fails to find # libruby.so. export LIBRARY_PATH=$LIBRARY_PATH:%A make $jobArgs } INSTALL() { export LIBRARY_PATH=$LIBRARY_PATH:%A make install prepareInstalledDevelLib libruby fixPkgconfig packageEntries devel $developDir cp -f $portDir/additional-files/gemrc $settingsDir/gemrc } TEST() { export LIBRARY_PATH=$LIBRARY_PATH:%A make check }