Homebrew/homebrew-science — pull request #13 by chrisberkhout (2012-08-02 02:00:04+00:00)
Title: qgis: added dependency on libspatialite

I couldn't compile without it. After a manual `brew install libspatialite` the `qgis` formula worked seamlessly.

The error I was getting was:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
SPATIALITE_INCLUDE_DIR
used as include directory in directory /tmp/homebrew-qgis-1.8.0-1g5s/qgis-1.8.0/src/plugins/offline_editing
SPATIALITE_LIBRARY
linked by target "offlineeditingplugin" in directory /tmp/homebrew-qgis-1.8.0-1g5s/qgis-1.8.0/src/plugins/offline_editing

The full output was:

$ brew install qgis
Warning: You have Xcode-4.3.2, which is outdated.
Please install Xcode 4.3.3.
==> Downloading http://qgis.org/downloads/qgis-1.8.0.tar.bz2
Already downloaded: /Users/chris.berkhout/Library/Caches/Homebrew/qgis-1.8.0.tar.bz2
==> Downloading http://ftpmirror.gnu.org/bison/bison-2.5.tar.bz2
Already downloaded: /Users/chris.berkhout/Library/Caches/Homebrew/bison-2.5.tar.bz2
==> ./configure --prefix=/private/tmp/homebrew-qgis-1.8.0-1g5s/qgis-1.8.0/bison --disable-debug
==> make install
==> Downloading http://sourceforge.net/projects/qwt/files/qwt/5.2.2/qwt-5.2.2.tar.bz2
Already downloaded: /Users/chris.berkhout/Library/Caches/Homebrew/qwt-5.2.2.tar.bz2
==> qmake -spec macx-g++ -config release
==> make install
==> cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/qgis/1.8.0 -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LA
-- The C compiler identification is GNU 4.2.1
-- The CXX compiler identification is GNU 4.2.1
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/llvm-gcc
-- Check for working C compiler: /usr/bin/llvm-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/bin/llvm-g++
-- Check for working CXX compiler: /usr/bin/llvm-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Quantum GIS version: 1.8.0 Lisboa (10800)
-- Could not find GRASS
-- Touch support disabled
-- Looking for openpty
-- Looking for openpty - found
-- Found Proj: /usr/local/lib/libproj.dylib
-- Found GEOS: /usr/local/Cellar/geos/3.3.5/lib/libgeos_c.dylib
-- Found GDAL: /usr/local/Cellar/gdal/1.9.1/lib/libgdal.dylib (1.9.1)
-- Found Expat: /usr/lib/libexpat.dylib
-- Found Spatialindex: /usr/local/lib/libspatialindex.dylib
-- Found Qwt: /tmp/homebrew-qgis-1.8.0-1g5s/qgis-1.8.0/qwt52/lib/libqwt.a (5.2.2)
-- Found Sqlite3: /usr/local/lib/libsqlite3.dylib
-- Found PostgreSQL: /usr/lib/libpq.dylib
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - not found.
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found.
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - found
-- Looking for QT_MAC_USE_COCOA
-- Looking for QT_MAC_USE_COCOA - found
-- Found Qt4: /usr/local/bin/qmake (found suitable version "4.8.2", required is "4.4.0")
-- Pedantic compiler settings enabled
-- Found PythonInterp: /usr/bin/python (found version "2.7.1")
-- Found Python executable: /usr/bin/python
-- Found Python version: 2.7.1
-- Found Python library: -framework Python
-- Found SIP version: 4.13.3
-- Found PyQt4 version: 4.9.4
-- Found GSL: -L/usr/local/Cellar/gsl/1.15/lib -lgsl -lgslcblas
-- txt2tags not found - disabled
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
SPATIALITE_INCLUDE_DIR
used as include directory in directory /tmp/homebrew-qgis-1.8.0-1g5s/qgis-1.8.0/src/plugins/offline_editing
SPATIALITE_LIBRARY
linked by target "offlineeditingplugin" in directory /tmp/homebrew-qgis-1.8.0-1g5s/qgis-1.8.0/src/plugins/offline_editing

-- Configuring incomplete, errors occurred!
==> Build Environment
HOMEBREW_VERSION: 0.9.2
HEAD: a732c9b9913b4e2fc5a85ef9261cc80ec84276b5
CPU: dual-core 64-bit penryn
OS X: 10.7.3-x86_64
Xcode: 4.3.2
CLT: 1.0.0.9000000000.1.1249367152
GCC-4.0: N/A
GCC-4.2: build 5666
LLVM: build 2335
Clang: 2.1 build 163
X11: 2.6.3 @ /usr/X11
CC: /usr/bin/llvm-gcc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CXX: /usr/bin/llvm-g++ => /usr/llvm-gcc-4.2/bin/llvm-g++-4.2
LD: /usr/bin/llvm-gcc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CFLAGS: -Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.7
CXXFLAGS: -Os -w -pipe -march=core2 -msse4.1 -mmacosx-version-min=10.7
CPPFLAGS: -I/usr/local/Cellar/readline/6.2.4/include -isystem /usr/local/include
LDFLAGS: -L/usr/local/Cellar/readline/6.2.4/lib -L/usr/local/lib
MACOSX_DEPLOYMENT_TARGET: 10.7
MAKEFLAGS: -j2
Error: Failed executing: cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/qgis/1.8.0 -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev -DQWT_INCLUDE_DIR=/private/tmp/homebrew-qgis-1.8.0-1g5s/qgis-1.8.0/qwt52/include -DQWT_LIBRARY=/private/tmp/homebrew-qgis-1.8.0-1g5s/qgis-1.8.0/qwt52/lib/libqwt.a -DBISON_EXECUTABLE=/private/tmp/homebrew-qgis-1.8.0-1g5s/qgis-1.8.0/bison/bin/bison -DENABLE_TESTS=NO -DQGIS_MACAPP_BUNDLE=0 -DQGIS_MACAPP_DEV_PREFIX='/usr/local/Cellar/qgis/1.8.0/lib' -DQGIS_MACAPP_INSTALL_DEV=YES (qgis.rb:108)
This may help you fix or report the issue if `brew doctor` does not:
https://github.com/homebrew/homebrew-science/issues/new
$