From 5a2ad145e8b543e8e95a959c3b26e308881ebb38 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sat, 23 Feb 2019 01:14:36 +0100 Subject: [PATCH] Add gettext and Qt5LinguistTools --- .travis.yml | 2 +- Dockerfile | 4 ++-- dist/fedora/strawberry.spec.in | 3 +++ dist/opensuse/strawberry.spec.in | 4 +++- dist/pacman/PKGBUILD.in | 4 ++-- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index def740e5..f0176ccf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,7 @@ before_install: ls /usr/local/lib/gstreamer-1.0; fi before_script: - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker exec build cmake -Hstrawberry -Bbuild -DENABLE_STREAM_DEEZER=ON ; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker exec build cmake -Hstrawberry -Bbuild -DENABLE_STREAM_DEEZER=ON -DENABLE_TRANSLATIONS=ON ; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir build; cd build; cmake .. -DUSE_BUNDLE=ON -DENABLE_STREAM_DEEZER=ON ; fi script: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker exec build make -C build -j8 ; fi diff --git a/Dockerfile b/Dockerfile index a89541fa..c3ecc6d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,12 +4,12 @@ run zypper --non-interactive --gpg-auto-import-keys ref run zypper --non-interactive --gpg-auto-import-keys dup -l -y run zypper --non-interactive --gpg-auto-import-keys install \ - lsb-release git tar make cmake gcc gcc-c++ pkg-config \ + lsb-release git tar make cmake gcc gcc-c++ pkg-config gettext-tools \ glibc-devel glib2-devel glib2-tools dbus-1-devel alsa-devel libpulse-devel libnotify-devel \ boost-devel protobuf-devel sqlite3-devel taglib-devel \ gstreamer-devel gstreamer-plugins-base-devel libxine-devel vlc-devel \ libQt5Core-devel libQt5Gui-devel libQt5Widgets-devel libQt5Concurrent-devel libQt5Network-devel libQt5Sql-devel \ - libQt5DBus-devel libqt5-qtx11extras-devel libqt5-qtbase-common-devel \ + libQt5DBus-devel libqt5-qtx11extras-devel libqt5-qtbase-common-devel libqt5-linguist-devel \ libcdio-devel libgpod-devel libplist-devel libmtp-devel libusbmuxd-devel libchromaprint-devel run mkdir -p /usr/src/app diff --git a/dist/fedora/strawberry.spec.in b/dist/fedora/strawberry.spec.in index cc073312..0aa489c2 100644 --- a/dist/fedora/strawberry.spec.in +++ b/dist/fedora/strawberry.spec.in @@ -15,6 +15,8 @@ BuildRequires: gcc-c++ BuildRequires: hicolor-icon-theme BuildRequires: make BuildRequires: git +BuildRequires: gettext +BuildRequires: cmake(Qt5LinguistTools) BuildRequires: pkgconfig BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gio-2.0) @@ -83,6 +85,7 @@ pushd %{_target_platform} %{cmake} \ -DBUILD_WERROR:BOOL=OFF \ -DCMAKE_BUILD_TYPE:STRING=Release \ + -DENABLE_TRANSLATIONS=ON .. popd diff --git a/dist/opensuse/strawberry.spec.in b/dist/opensuse/strawberry.spec.in index ab3ed2a1..a5e0b15d 100644 --- a/dist/opensuse/strawberry.spec.in +++ b/dist/opensuse/strawberry.spec.in @@ -21,7 +21,9 @@ BuildRequires: hicolor-icon-theme BuildRequires: make BuildRequires: git BuildRequires: pkgconfig +BuildRequires: gettext-tools BuildRequires: update-desktop-files +BuildRequires: cmake(Qt5LinguistTools) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(gio-unix-2.0) @@ -82,7 +84,7 @@ Features: %setup -q -n %{name}-@STRAWBERRY_VERSION_PACKAGE@ %build -%{cmake} .. -DUSE_INSTALL_PREFIX=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON +%{cmake} .. -DUSE_INSTALL_PREFIX=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DENABLE_TRANSLATIONS=ON make %{?_smp_mflags} %install diff --git a/dist/pacman/PKGBUILD.in b/dist/pacman/PKGBUILD.in index 79e99c96..8e49ba1a 100644 --- a/dist/pacman/PKGBUILD.in +++ b/dist/pacman/PKGBUILD.in @@ -6,7 +6,7 @@ pkgdesc="A music player aimed at audio enthusiasts and music collectors" arch=(x86_64) url="http://www.strawbs.org/" license=(GPL3) -makedepends=(git cmake make gcc boost) +makedepends=(git cmake make gcc boost gettext qt5-tools) depends=( desktop-file-utils hicolor-icon-theme @@ -49,7 +49,7 @@ prepare() { build() { cd build - cmake ../$pkgname-@STRAWBERRY_VERSION_PACKAGE@ \ + cmake ../${pkgname}-@STRAWBERRY_VERSION_PACKAGE@ \ -DCMAKE_INSTALL_PREFIX=/usr \ -DUSE_SYSTEM_TAGLIB=ON \ -DENABLE_STREAM_DEEZER=ON \