Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI fix broken dependencies #1151

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 10 additions & 45 deletions .ci-build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
requires:
archlinux:
- appstream-glib
- biblesync
- cmake
- dbus-glib
- docbook-utils
- enchant
- git
- glib2-devel
- gnome-common
- gtk3
- gtkmm
Expand All @@ -14,7 +16,7 @@ requires:
- minizip
- python
- sword
- webkit2gtk
- webkit2gtk-4.1
- zip
# base-devel group (for AUR installs):
- autoconf
Expand Down Expand Up @@ -56,13 +58,12 @@ requires:
- libbiblesync-dev
- libdbus-glib-1-dev
- libglade2-dev
- libenchant-dev
- libgail-3-dev
- libgtk-3-dev
- libminizip-dev
- libsoup2.4-dev
- libsword-dev
- libwebkit2gtk-4.0-dev
- libwebkit2gtk-4.1-dev
- libxml2-dev
- libxml2-utils
- make
Expand All @@ -87,13 +88,15 @@ requires:
- intltool
- itstool
- libappstream-glib-devel
- libsoup3-devel
- libuuid-devel
- libxml2-devel
- make
- minizip-devel
- rpm-build
- sword-devel
- webkitgtk4-devel
- webkit2gtk4.1-devel
- yelp
- yelp-tools
- zip
Expand All @@ -108,18 +111,18 @@ requires:
- gsettings-desktop-schemas-dev
- intltool
- itstool
- libbiblesync-dev
- libdbus-glib-1-dev
- libenchant-dev
- libgail-3-dev
- libglade2-dev
- libgtk-3-dev
- libminizip-dev
- libsword-dev
- libwebkit2gtk-4.0-dev
- libwebkit2gtk-4.1-dev
- libxml2-dev
- libxml2-utils
- make
- python-dev
- python-dev-is-python3
- swig
- uuid-dev
- uuid-runtime
Expand Down Expand Up @@ -148,49 +151,11 @@ before_scripts:
aur_install biblesync
aur_install gtkhtml4
fi
if [ "${DISTRO_NAME}" == "debian" -o "${DISTRO_NAME}" == "ubuntu" ]; then
# build gtkhtml4 from source
cd "${WORK_DIR}"
curl -Ls -o gtkhtml-4.10.0.tar.xz https://download.gnome.org/sources/gtkhtml/4.10/gtkhtml-4.10.0.tar.xz
tar xf gtkhtml-4.10.0.tar.xz
cd gtkhtml-4.10.0
./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib/gtkhtml4 --localstatedir=/var --disable-static
make -j$(nproc)
make install
fi
if [ "${DISTRO_NAME}" == "ubuntu" ];then
# build biblesync from source
cd "${WORK_DIR}"
curl -Ls -o biblesync-1.2.0.tar.gz https://github.com/karlkleinpaste/biblesync/archive/1.2.0.tar.gz
tar xf biblesync-1.2.0.tar.gz
cd biblesync-1.2.0
mkdir -p build
cd build
cmake -DBUILD_SHARED_LIBS=TRUE -DCMAKE_INSTALL_PREFIX=/usr -DLIBDIR=/usr/lib ..
make -j$(nproc)
make install
# update sword from 1.7.3 to 1.8.1
cd "${WORK_DIR}"
curl -Ls -o sword-1.8.1.tar.gz https://www.crosswire.org/ftpmirror/pub/sword/source/v1.8/sword-1.8.1.tar.gz
curl -Ls -o sword-1.8.1-cmake.diff https://src.fedoraproject.org/rpms/sword/raw/master/f/sword-1.8.1-cmake.diff
curl -Ls -o sword-1.8.1-icu61.diff https://src.fedoraproject.org/rpms/sword/raw/master/f/sword-1.8.1-icu61.diff
curl -Ls -o sword-1.8.1-swig.diff https://src.fedoraproject.org/rpms/sword/raw/master/f/sword-1.8.1-swig.diff
tar xf sword-1.8.1.tar.gz
cd sword-1.8.1
patch -p1 -i ../sword-1.8.1-cmake.diff
patch -p1 -i ../sword-1.8.1-icu61.diff
patch -p1 -i ../sword-1.8.1-swig.diff
mkdir -p build
cd build
cmake -DLIBSWORD_LIBRARY_TYPE="Shared" -DSYSCONF_INSTALL_DIR='/etc' -DSWORD_BUILD_TESTS="Yes" -DSWORD_BINDINGS="Python" -DCMAKE_INSTALL_PREFIX=/usr -DLIB_INSTALL_DIR=/usr/lib/x86_64-linux-gnu ..
make -j$(nproc)
make install
fi

build_scripts:
- |
set -ex
export PKG_CONFIG_PATH=/usr/lib/pkgconfig
cmake -B build -DCMAKE_INSTALL_PREFIX=/usr -DGTKHTML=ON -DCMAKE_MAKE_PROGRAM=/usr/bin/make .
cmake -B build -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_MAKE_PROGRAM=/usr/bin/make -DWEBKIT1=ON -DUSE_WEBKIT2=ON .
make -C build -j$(nproc)
make -C build mhelp package_source
13 changes: 3 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,10 @@ endif()
list (APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
list (APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules)

# parse the current version based on git tags, then cache a result on behalf
# of source tarballs that don't have the repo .git metadata
# get version number from file
set(SOURCE_VERSION_CACHE "${PROJECT_SOURCE_DIR}/cmake/source_version.txt")
if(EXISTS "${PROJECT_SOURCE_DIR}/.git")
include(GetGitRevisionDescription)
git_describe(GIT_VERSION --tags)
string(REGEX REPLACE "-([0-9]*).*" ".\\1" VERSION "${GIT_VERSION}")
file(WRITE ${SOURCE_VERSION_CACHE} "${VERSION}")
else()
file(STRINGS ${SOURCE_VERSION_CACHE} VERSION)
endif()
file(WRITE ${SOURCE_VERSION_CACHE} "0.0.1")
file(STRINGS ${SOURCE_VERSION_CACHE} VERSION)

# configure project name and version
project (xiphos
Expand Down
36 changes: 8 additions & 28 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ Create a build directory as a sibling of the xiphos directory:

## 3. Install dependencies

$ sudo dnf install cmake gcc-c++ intltool make gtk3-devel dbus-glib-devel gtkhtml3-devel webkitgtk4-devel libidn-devel libxml2-devel libgsf-devel minizip-devel sword-devel libuuid-devel biblesync-devel intltool libappstream-glib-devel desktop-file-utils itstool yelp yelp-tools
$ sudo dnf install cmake gcc-c++ intltool make gtk3-devel dbus-glib-devel gtkhtml3-devel webkitgtk4-devel libidn-devel libxml2-devel libgsf-devel minizip-devel sword-devel libuuid-devel biblesync-devel intltool libappstream-glib-devel desktop-file-utils itstool yelp yelp-tools libsoup3-devel webkit2gtk4.1-devel

## 4. Configure build

Expand All @@ -250,31 +250,11 @@ Create a build directory as a sibling of the xiphos directory:
Build Xiphos On *Debian*, *Ubuntu*, or *Linux Mint*:
===================================================

## 1. Install GTKHtml

$ curl -Ls -o gtkhtml-4.10.0.tar.xz https://download.gnome.org/sources/gtkhtml/4.10/gtkhtml-4.10.0.tar.xz
$ tar xf gtkhtml-4.10.0.tar.xz
$ cd gtkhtml-4.10.0
$ ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib/gtkhtml4 --localstatedir=/var --disable-static
$ make -j2
$ make install

## 2. Install Biblesync

$ curl -Ls -o biblesync-1.2.0.tar.gz https://github.com/karlkleinpaste/biblesync/archive/1.2.0.tar.gz
$ tar xf biblesync-1.2.0.tar.gz
$ cd biblesync-1.2.0
$ mkdir -p build
$ cd build
$ cmake -DBUILD_SHARED_LIBS=TRUE -DCMAKE_INSTALL_PREFIX=/usr -DLIBDIR=/usr/lib ..
$ make -j2
$ make install

## 3. Clone git
## 1. Clone git

$ git https://github.com/crosswire/xiphos.git

## 4. Create and enter the build directory
## 2. Create and enter the build directory

Create a build directory as a sibling of the xiphos directory:

Expand All @@ -283,15 +263,15 @@ Create a build directory as a sibling of the xiphos directory:
build xiphos
$ cd build

## 5. Install the required dependencies:
## 3. Install the required dependencies:

$ sudo apt-get appstream-util cmake g++ desktop-file-utils fp-utils git gsettings-desktop-schemas-dev intltool itstool libdbus-glib-1-dev libenchant-dev libgail-3-dev libglade2-dev libgtk-3-dev libminizip-dev libsword-dev libwebkit2gtk-4.1-dev libxml2-dev libxml2-utils make python-dev swig uuid-dev uuid-runtime yelp-tools xzip
$ sudo apt-get install appstream-util cmake g++ desktop-file-utils fp-utils git gsettings-desktop-schemas-dev intltool itstool libbiblesync-dev libdbus-glib-1-dev libgail-3-dev libglade2-dev libgtk-3-dev libminizip-dev libsword-dev libwebkit2gtk-4.1-dev libxml2-dev libxml2-utils make python-dev-is-python3 swig uuid-dev uuid-runtime yelp-tools xzip

## 6. Configuration:
## 4. Configuration:

$ cmake -DCMAKE_INSTALL_PREFIX=/usr -DWEBKIT1=ON ../xiphos
$ cmake -DCMAKE_INSTALL_PREFIX=/usr -DWEBKIT1=ON -DUSE_WEBKIT2=ON ../xiphos

## 7. Build and install
## 5. Build and install

$ make -j$(nproc) && make install

Expand Down
2 changes: 1 addition & 1 deletion cmake/XiphosDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ else (GTK2)
# Gtk+-3.0 + Webkit1 + GtkHtml-editor
pkg_check_modules(Gtk REQUIRED IMPORTED_TARGET
"gtk+-3.0"
"webkitgtk-3.0"
"webkit2gtk-4.1"
)
endif()
if (NOT WEBKIT1 AND GTKHTML)
Expand Down
4 changes: 2 additions & 2 deletions src/editor/editor.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <config.h>
#endif

#ifdef USE_WEBKIT_EDITOR
#ifndef USE_WEBKIT_EDITOR

/* X keyboard #definitions, to handle shortcuts */
/* we must define the categories of #definitions we need. */
Expand All @@ -32,7 +32,7 @@
#include <X11/keysymdef.h>

#include <gtk/gtk.h>
#include <webkit/webkit.h>
#include <webkit2/webkit2.h>

#include "editor/webkit_editor.h"
#include "editor/editor.h"
Expand Down
Loading
Loading