Nice to meet you all. I have been struggling with getting a package that uses wxWidgets installed for some time. I am trying to modify the formula for p7zip so it will compile the app version of the program which is supported by the makefile. The package fails to brew with no obvious error. Maybe I am going about this the wrong way, I just don't know. Homebrew/Ruby is not familiar ground for me. I have been through the wiki and troubleshooting. I am a new to Mac (four months) and Homebrew (three weeks).
Environment
My platform is MBP running OSX10.8.2. My homebrew installation is in ~/Packages. I have latest Xcode installed and its command line tools. I have a brew install of wxmac --use-llvm --devel with those params and it looks good. brew --doctor only complains of some unexpected dynlibs (usb and usbpp) which I think are unrelated to this project.
Goal
Submit a new brew for an app version of p7zip or perhaps there is a way to incorporate this into the existing brew?
Output
The compile seems to end without errors however brew says there is an error. Is the different output from "make app" not being recognised as a completed compile? See attached makefile for what it does.
-- begin brew ---
# brew install p7zip --build-from-source
Already downloaded: /Library/Caches/Homebrew/p7zip-9.20.1.tar.bz2
==> make clean
==> make INCLUDE=/Users/rtfmoz/Packages/Cellar/p7zip/9.20.1/include INCLUDE=/Users/rtfmoz/Packages/include depend
==> make CC=cc $(ALLFLAGS) INCLUDE=/Users/rtfmoz/Packages/Cellar/p7zip/9.20.1/include INCLUDE=/Users/rtfmoz/Packages/include CXX=c++ $(ALLFLAGS) app
brew: superenv removed: -m64 -O
cc -m64 -O -DENV_MACOSX -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_REENTRANT -DENV_UNIX -DEXTERNAL_LZMA -DEXTERNAL_CODECS -DBREAK_HANDLER -DUNICODE -D_UNICODE -c -I. -I../../../../C -I../../../myWindows -I../../../include_windows -I../../.. ../../../../C/7zCrcOpt.c
brew: superenv removed: -m64 -O
c++ -m64 -O -DENV_MACOSX -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_REENTRANT -DENV_UNIX -DEXTERNAL_LZMA -DEXTERNAL_CODECS -DBREAK_HANDLER -DUNICODE -D_UNICODE -o ../../../../bin/7z mySplitCommandLine.o myAddExeFlag.o wine_date_and_time.o ConsoleClose.o ExtractCallbackConsole.o BenchCon.o List.o Main.o MainAr.o OpenCallbackConsole.o PercentPrinter.o UpdateCallbackConsole.o UserInputUtils.o CommandLineParser.o CRC.o IntToString.o ListFileUtils.o StdInStream.o StdOutStream.o MyString.o MyWindows.o StringConvert.o StringToInt.o UTFConvert.o MyVector.o Wildcard.o DLL.o Error.o FileDir.o FileFind.o FileIO.o FileName.o PropVariant.o PropVariantConversions.o System.o Time.o CreateCoder.o FilePathAutoRename.o FileStreams.o FilterCoder.o ProgressUtils.o StreamUtils.o ArchiveCommandLine.o ArchiveExtractCallback.o ArchiveOpenCallback.o DefaultName.o EnumDirItems.o Extract.o Bench.o ExtractingFilePath.o LoadCodecs.o OpenArchive.o PropIDUtils.o SetProperties.o SortUtils.o TempFiles.o Update.o UpdateAction.o UpdateCallback.o UpdatePair.o UpdateProduce.o OutStreamWithCRC.o CopyCoder.o Alloc.o Threads.o 7zCrc.o 7zCrcOpt.o -framework CoreFoundation
brew: superenv removed: -m64 -O
#
--- end brew ---
Modified formula
require 'formula'
class P7zip < Formula
sha1 '1cd567e043ee054bf08244ce15f32cb3258306b7'
option '32-bit'
def install
if Hardware.is_32_bit? or build.build_32_bit?
mv 'makefile.macosx_32bits', 'makefile.machine'
else
mv 'makefile.macosx_64bits', 'makefile.machine'
end
system "make", "clean"
system "make", "INCLUDE=#{prefix}/include INCLUDE=#{HOMEBREW_PREFIX}/include depend"
system "make", "CC=#{ENV.cc} $(ALLFLAGS)",
"INCLUDE=#{prefix}/include INCLUDE=#{HOMEBREW_PREFIX}/include",
"CXX=#{ENV.cxx} $(ALLFLAGS)",
"app"
system "make", "DEST_HOME=#{prefix}",
"DEST_MAN=#{man}",
"install"
# install.sh chmods to 444, which is bullshit and breaks uninstalling
system "chmod -R +w #{doc}"
end
end
Any help is hugely appreciated!
Kevin