homebrew-core/Formula/rpm.rb
Anders F Bjorklund 257b45d89d rpm 5.4 (new formula)
Requires a patch to build with clang (no nested functions).
The ltmain.sh was broken due to a faulty Mandriva libtoolize.
Make sure that the OpenMP setting matches what beecrypt has.
Also ensure that all "mandatory" features are enabled.

Closes Homebrew/homebrew#12618.
Closes Homebrew/homebrew#12635.
Closes Homebrew/homebrew#19559.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-05-10 14:33:52 +01:00

67 lines
1.5 KiB
Ruby

require 'formula'
class RpmDownloadStrategy < CurlDownloadStrategy
attr_reader :tarball_name
def initialize name, package
super
package_name = @spec == :name ? @ref : name
@tarball_name="#{package_name}-#{package.version}.tar.gz"
end
def stage
safe_system "rpm2cpio.pl <#{@tarball_path} | cpio -vi #{@tarball_name}"
safe_system "/usr/bin/tar -xzf #{@tarball_name} && rm #{@tarball_name}"
chdir
end
def ext
".src.rpm"
end
end
class Rpm < Formula
homepage 'http://www.rpm5.org/'
url 'http://rpm5.org/files/rpm/rpm-5.4/rpm-5.4.10-0.20120706.src.rpm',
:using => RpmDownloadStrategy, :name => 'rpm'
version '5.4.10'
sha1 'ce43b5871c4f884bea679f6c37d5cb9df7f2e520'
depends_on 'db'
depends_on 'libmagic'
depends_on 'popt'
depends_on 'beecrypt'
depends_on 'libtasn1'
depends_on 'neon'
depends_on 'gettext'
depends_on 'xz'
depends_on 'ossp-uuid'
depends_on 'pcre'
depends_on 'rpm2cpio' => :build
depends_on 'libtool' => :build
# nested functions are not std C
def patches
'http://rpm5.org/cvs/patchset?cn=16840'
end
def install
args = %W[
--prefix=#{prefix}
--with-path-cfg=#{etc}/rpm
--disable-openmp
--disable-nls
--disable-dependency-tracking
--with-libtasn1
--with-neon
--with-uuid
--with-pcre
--with-lua
--with-syck
--without-apidocs
]
system 'glibtoolize -if' # needs updated ltmain.sh
system "./configure", *args
system "make"
system "make install"
end
end