Skip to content

Commit

Permalink
Merge pull request conda-forge#6 from ccordoba12/qt5
Browse files Browse the repository at this point in the history
Update recipe for OS X
  • Loading branch information
msarahan committed Jun 3, 2016
2 parents 3f491f9 + 8aece68 commit 122940b
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 38 deletions.
70 changes: 48 additions & 22 deletions recipes/qt5/build.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#!/bin/bash

# Main variables
# --------------
BIN=$PREFIX/lib/qt5/bin
QTCONF=$BIN/qt.conf


# Compile
# -------
chmod +x configure

if [ `uname` == Linux ]; then
Expand All @@ -23,17 +28,30 @@ if [ `uname` == Linux ]; then
-nomake examples \
-nomake tests \
-verbose \
-no-libudev \
-gtkstyle \
-qt-xcb \
-qt-pcre \
-openssl \
-skip enginio \
-skip location \
-skip sensors \
-skip serialport \
-skip script \
-skip serialbus \
-skip quickcontrols2 \
-skip wayland \
-skip canvas3d \
-skip 3d \
-system-libjpeg \
-system-libpng \
-system-zlib \
-qt-pcre \
-qt-xcb \
-qt-xkbcommon \
-xkb-config-root $PREFIX/lib \
-dbus
-dbus \
-c++11 \
-no-linuxfb \
-no-libudev

LD_LIBRARY_PATH=$PREFIX/lib make -j $MAKE_JOBS
make install
fi

if [ `uname` == Darwin ]; then
Expand Down Expand Up @@ -61,14 +79,22 @@ if [ `uname` == Darwin ]; then
-nomake examples \
-nomake tests \
-verbose \
-skip qtwebengine \
-openssl \
-skip enginio \
-skip location \
-skip sensors \
-skip serialport \
-skip script \
-skip serialbus \
-skip quickcontrols2 \
-skip wayland \
-skip canvas3d \
-skip 3d \
-system-libjpeg \
-system-libpng \
-system-zlib \
-qt-pcre \
-platform macx-g++ \
-no-c++11 \
-qt-freetype \
-c++11 \
-no-framework \
-no-dbus \
-no-mtdev \
Expand All @@ -77,28 +103,28 @@ if [ `uname` == Darwin ]; then
-no-xcb-xlib \
-no-libudev \
-no-egl

DYLD_FALLBACK_LIBRARY_PATH=$PREFIX/lib make -j $MAKE_JOBS
make install
fi

make -j $MAKE_JOBS
make install


# Post build setup
# ----------------

# Remove unneeded files
rm -rf $PREFIX/share/qt5

# Make symlinks of binaries in $BIN to $PREFIX/bin
for file in $BIN/*
do
ln -sfv ../lib/qt5/bin/$(basename $file) $PREFIX/bin/$(basename $file)-qt5
done

#removes doc, phrasebooks, and translations
rm -rf $PREFIX/share/qt5

# Remove static libs
rm -rf $PREFIX/lib/*.a

# Add qt.conf file to the package to make it fully relocatable
cat <<EOF >$QTCONF
[Paths]
Prefix = $PREFIX/lib/qt5
Libraries = $PREFIX/lib
Headers = $PREFIX/include/qt5
EOF
cp $RECIPE_DIR/qt.conf $BIN/

31 changes: 17 additions & 14 deletions recipes/qt5/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,35 +36,38 @@ build:
requirements:
build:
- 7za # [win]
- curl
- bison # [linux]
- curl # [win]
- flex # [linux]
- fontconfig # [linux]
- freetype # [unix]
- freetype # [linux]
- gcc # [linux]
- gst-plugins-base # [linux]
- icu
- icu 56*
- jom # [win]
- jpeg
- libpng 1.6*
- libxcb # [linux]
- openssl
- perl >=5.20
- m2-gperf # [win]
- m2-bison # [win]
- m2-flex # [win]
- m2-git # [win]
- openssl # [win or linux]
- perl >=5.20 # [win]
- python
- xz # [unix]
- zlib
- m2-gperf # [win]
- m2-bison # [win]
- m2-flex # [win]
- m2-git # [win]

run:
- freetype # [unix]
- fontconfig # [linux]
- freetype # [linux]
- gst-plugins-base # [linux]
- jpeg
- icu
- icu 56*
- libgcc # [linux]
- libpng 1.6*
- libxcb # [linux]
- fontconfig # [linux]
- openssl
- gst-plugins-base # [linux]
- openssl # [win or linux]
- zlib

about:
Expand Down
4 changes: 2 additions & 2 deletions recipes/qt5/notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ You need the following packages to build Qt5 on CentOS 6
- To build Qt5 you need XCode in your system, Command Line Tools is not
accepted. See this [Qt bug](https://bugreports.qt.io/browse/QTBUG-41908)
for details.
- The right XCode version for your OS X version is listed
[here](https://github.com/Homebrew/homebrew/blob/master/Library/Homebrew/os/mac/xcode.rb)
- The minimal XCode version accepted is 6.1
- The minimal OS X version accepted is 10.9 (Mavericks)

## Notes concerning Windows:

Expand Down
4 changes: 4 additions & 0 deletions recipes/qt5/qt.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[Paths]
Prefix = /opt/anaconda1anaconda2anaconda3/lib/qt5
Libraries = /opt/anaconda1anaconda2anaconda3/lib
Headers = /opt/anaconda1anaconda2anaconda3/include/qt5

0 comments on commit 122940b

Please sign in to comment.