Skip to content
2 changes: 1 addition & 1 deletion attica.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Attica < Formula
depends_on 'qt' => ["with-d-bus", "with-qt3support"]

def install
system "cmake #{std_cmake_parameters} ."
system "cmake", ".", *std_cmake_args
system "make install"
end
end
19 changes: 5 additions & 14 deletions base_kde_formula.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class BaseKdeFormula < Formula
def self.kde_build_deps
depends_on 'cmake' => :build
depends_on 'automoc4' => :build
depends_on :x11
end

def kdedir
Expand All @@ -30,11 +31,11 @@ def docbook_xsl
end

def extra_cmake_args
[]
end
def extra_prefix_path
end
def kde_default_cmake_args
raise "std_cmake_parameters has changed... #{std_cmake_parameters}, prefix is #{prefix}" if std_cmake_parameters != "-DCMAKE_INSTALL_PREFIX='#{prefix}' -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev"
s = extra_prefix_path
if s.nil?
s = kdedir
Expand All @@ -57,16 +58,11 @@ def kde_default_cmake_args
"-DBUILD_doc=FALSE",
"-DBUNDLE_INSTALL_DIR=#{bin}"
]
if extra_cmake_args.class == String
cmake_args += extra_cmake_args.split
elsif extra_cmake_args.class == Array
cmake_args += extra_cmake_args
end
cmake_args
cmake_args + extra_cmake_args
end

def build_arch
if ARGV.build_universal?
if build.universal?
'i386;x86_64'
elsif MacOS.prefer_64_bit?
'x86_64'
Expand All @@ -75,19 +71,14 @@ def build_arch
end
end

def default_install
ENV.x11
ENV['MAKEFLAGS'] = "-j4"
def install
mkdir 'build'
cd 'build'
system "cmake", *kde_default_cmake_args
system "make"
system "make install"
touch "#{prefix}/.installed"
end
def install
default_install
end

def caveats; <<-EOS.undent
Remember to run brew linkapps.
Expand Down
2 changes: 1 addition & 1 deletion kde-phonon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class KdePhonon < Formula
def install
inreplace 'cmake/FindPhononInternal.cmake',
'BAD_ALLOCATOR AND NOT WIN32', 'BAD_ALLOCATOR AND NOT APPLE'
system "cmake #{std_cmake_parameters} ."
system "cmake", ".", *std_cmake_args
system "make install"
end
end
2 changes: 1 addition & 1 deletion kde-runtime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def patches

def extra_cmake_args
phonon = Formula.factory 'kde-phonon'
"-DPHONON_INCLUDE_DIR=#{phonon.include} -DPHONON_LIBRARY=#{phonon.lib}/libphonon.dylib"
%W[-DPHONON_INCLUDE_DIR=#{phonon.include} -DPHONON_LIBRARY=#{phonon.lib}/libphonon.dylib]
end
end

Expand Down
23 changes: 1 addition & 22 deletions kdelibs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,35 +35,14 @@ def patches
"https://gist.githubusercontent.com/philacs/9297176/raw/08f340d94a91398507ad82a8af6227cc68f0ea29/kaboutdialog-osx-beautifier-kdelibs.diff"
]}
end

def extra_cmake_args
[
"-DWITH_ENCHANT=ON",
"-DWITH_Soprano=ON",
"-DWITH_lzma=OFF",
"-DWITH_Avahi=OFF",
"-DWITH_HSPELL=OFF",
"-DWITH_FAM=OFF",
"-DKJS_FORCE_DISABLE_PCRE=ON",
"-DPCRE_CONFIG_STACKRECURSE=ON",
"-DPCRE_CONFIG_UTF8=ON",
"-DHAVE_PCRE_STACK=ON",
"-DHAVE_PCRE_UTF8=ON"
]
nil
end

#def extra_cmake_args
# Formula.factory('xz').prefix
#end

def install
opoo "Compile qt formula first with: --with-qtdbus and --with-qt3support flags."
puts <<-EOS.undent
Enable QtDBus module (--with-qtdbus) and Qt3Support module (--with-qt3support)
in qt formula first to avoid errors in kdevplatform and kdevelop formulas.
EOS
default_install
super
end

def caveats; <<-EOS.undent
Expand Down
2 changes: 1 addition & 1 deletion kdepimlibs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Kdepimlibs < BaseKdeFormula
kde_build_deps

def extra_cmake_args
"-DLDAP_INCLUDE_DIR=/usr/include/"
%W[-DLDAP_INCLUDE_DIR=/usr/include/]
end

end
4 changes: 2 additions & 2 deletions oxygen-icons.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class OxygenIcons < Formula
depends_on 'cmake' => :build

def install
system "cmake #{std_cmake_parameters} ."
system "cmake", ".", *std_cmake_args
system "make install"
end
end
end
2 changes: 1 addition & 1 deletion shared-desktop-ontologies.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class SharedDesktopOntologies < Formula
depends_on 'cmake' => :build

def install
system "cmake #{std_cmake_parameters} ."
system "cmake", ".", *std_cmake_args
system "make install"
end
end
6 changes: 2 additions & 4 deletions soprano.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ def patches
def install
ENV['CLUCENE_HOME'] = HOMEBREW_PREFIX

disabled_options = [
"-DSOPRANO_DISABLE_SESAME2_BACKEND=TRUE",
].join(' ')
system "cmake #{std_cmake_parameters} #{disabled_options} ."
args = std_cmake_args + ["-DSOPRANO_DISABLE_SESAME2_BACKEND=TRUE"]
system "cmake", ".", *args
system "make install"
end
end
Expand Down
5 changes: 2 additions & 3 deletions strigi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@ def patches
end

def extra_cmake_args
"-DENABLE_EXPAT:BOOL=ON"
%W[-DENABLE_EXPAT:BOOL=ON]
end

def install
ENV['CLUCENE_HOME'] = HOMEBREW_PREFIX
ENV['EXPAT_HOME'] = '/usr/'

default_install
super
end
end

Expand Down