This repository has been archived by the owner on Mar 20, 2024. It is now read-only.
forked from scribusproject/scribus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
113 lines (107 loc) · 5.23 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
language: c++
matrix:
include:
- os: linux
dist: xenial
sudo: required
compiler: gcc
- os: linux
dist: xenial
sudo: required
compiler: clang
- os: osx
compiler: clang
exclude:
- os: osx
compiler: gcc
- os: linux
dist: precise
- os: linux
dist: trusty
before_install:
# Linux
- if [ $TRAVIS_OS_NAME == linux ]; then
sudo apt-add-repository ppa:beineri/opt-qt595-xenial -y;
sudo apt-add-repository ppa:ricotz/testing -y;
sudo apt-get update -qq;
fi
# OSX
- if [ $TRAVIS_OS_NAME == osx ]; then
brew update;
fi
install:
# Linux
# Build a more recent poppler than Ubuntu Xenial's poppler 0.41.0
- if [ $TRAVIS_OS_NAME == linux ]; then
sudo apt-get install --force-yes cmake libboost-python-dev libcups2-dev libhunspell-dev
libhyphen-dev liblcms2-dev libpodofo-dev libtiff-dev libxml2-dev
python-all-dev zlib1g-dev qt59base qt59declarative
qt59tools libgraphicsmagick++1-dev
libopenscenegraph-dev libpoppler-dev libpoppler-cpp-dev libcairo2-dev libwpg-dev
libmspub-dev libcdr-dev libvisio-dev libharfbuzz-dev libharfbuzz-icu0
coreutils binutils python-tk;
mkdir deps && pushd deps;
sudo apt-get install --force-yes libopenjpeg-dev;
wget https://poppler.freedesktop.org/poppler-data-0.4.9.tar.gz && tar -xf poppler-data-0.4.9.tar.gz;
pushd poppler-data-0.4.9 && cmake -DCMAKE_BUILD_TYPE=Release && sudo make install && popd;
wget https://poppler.freedesktop.org/poppler-0.58.0.tar.xz && tar -xf poppler-0.58.0.tar.xz;
pushd poppler-0.58.0 && cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_XPDF_HEADERS=1 && sudo make install && popd;
popd;
fi
# OSX
- if [ $TRAVIS_OS_NAME == osx ]; then
brew outdated cmake --verbose || brew upgrade cmake;
brew tap homebrew/dupes && brew install homebrew/dupes/zlib && brew link --force zlib;
brew install icu4c && brew link --force icu4c;
brew install xz little-cms2 cairo qt5 hunspell ghostscript graphicsmagick poppler podofo harfbuzz;
brew outdated jpeg --verbose || brew upgrade jpeg;
brew outdated libtiff --verbose || brew upgrade libtiff;
brew outdated fontconfig --verbose || brew upgrade fontconfig;
brew install openssl && brew link --force openssl;
brew outdated pkg-config --verbose || brew upgrade pkg-config;
brew outdated boost || brew upgrade boost;
brew outdated freetype || brew upgrade freetype;
brew install librevenge libwpg libvisio libmspub libcdr libpagemaker libfreehand open-scene-graph;
fi
# - export LDFLAGS+=-L/usr/local/opt/zlib/lib:-L/usr/local/opt/gettext/lib:-L/usr/local/opt/libffi/lib:-L/usr/local/opt/qt5/lib:-L/usr/local/opt/sqlite/lib:-L/usr/local/opt/openssl/lib:-L/usr/local/opt/icu4c/lib
# - export CXXFLAGS+=-I/usr/local/opt/zlib/include:-I/usr/local/opt/gettext/include:-I/usr/local/opt/qt5/include:-I/usr/local/opt/sqlite/include:-I/usr/local/opt/openssl/include:-I/usr/local/opt/icu4c/include
script:
- if [ $TRAVIS_OS_NAME == linux ]; then
source /opt/qt59/bin/qt59-env.sh;
if [[ $CC == gcc ]]; then
export NPROC=8;
else
export NPROC=1;
fi;
cmake . -DCMAKE_INSTALL_PREFIX=/usr -DWANT_HUNSPELL=1 -DWITH_PODOFO=1 -DWANT_GRAPHICSMAGICK=1 -DWANT_DEBUG=0 -DWANT_SVNVERSION=0 -DWANT_GUI_LANG=en_US;
make -j"$NPROC";
make DESTDIR=appdir -j"$NPROC" install ; find appdir/;
cp /usr/lib/python2.7/lib-dynload/_tkinter.so appdir/usr/;
cp -r /usr/lib/tcltk appdir/usr/lib/;
cp -r /usr/share/tcltk appdir/usr/share/;
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage";
chmod a+x linuxdeployqt-continuous-x86_64.AppImage;
unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH;
export VERSION=$(git rev-parse --short HEAD);
./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -bundle-non-qt-libs -executable=$(ls appdir/usr/lib/scribus/plugins/*.so | sed ':a;N;$!ba;s/\n/ -executable=/g');
./linuxdeployqt-continuous-x86_64.AppImage --appimage-extract;
mv appdir/usr/_tkinter.so appdir/usr/lib/;
( cd appdir/usr/ ; ln -s ./lib/_tkinter.so . );
./squashfs-root/usr/bin/linuxdeployqt -bundle-non-qt-libs appdir/usr/lib/_tkinter.so;
./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -appimage;
curl --upload-file "${TRAVIS_BUILD_DIR}/Scribus-${VERSION}-x86_64.AppImage" https://transfer.sh/"Scribus-${VERSION}-x86_64.AppImage";
fi
- if [ $TRAVIS_OS_NAME = osx -a $CC = clang ]; then
cmake . -DWANT_HUNSPELL=1 -DWITH_PODOFO=1 -DWANT_NOOSG=1 -DWANT_DEBUG=0 -DWANT_SVNVERSION=0 -DWANT_GUI_LANG=en_US -DWANT_NOEXAMPLES=1 -DWANT_NOTEMPLATES=1 -DCMAKE_PREFIX_PATH=/usr/local/opt/zlib -DBUILD_OSX_BUNDLE=1 -DCMAKE_OSX_ARCHITECTURES="x86_64" -DQT_PREFIX=/usr/local/opt/qt5 -DCMAKE_INSTALL_PREFIX=~/.local;
make -j8;
make install;
fi
notifications:
irc:
channels:
- "chat.freenode.net#scribus"
- "chat.freenode.net#scribus-dev"
template:
- "%{repository}/%{branch} (%{author}): %{build_url}: %{message}"
on_success: always
on_failure: always