Skip to content

Commit

Permalink
Reverted to qmake build-system
Browse files Browse the repository at this point in the history
CMake doesn't even make cross-compilation any easier making it useless.
New make.sh speeds up building by specifying -j #ofprocessors by default to make.
  • Loading branch information
u8sand committed Nov 26, 2014
1 parent 4f793aa commit ddb1dcf
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 186 deletions.
87 changes: 0 additions & 87 deletions CMakeLists.txt

This file was deleted.

35 changes: 35 additions & 0 deletions arch/baka-mplayer-git/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Maintainer: u8sand <u8sand@gmail.com>
pkgname=baka-mplayer-git
pkgver=2.0.0
pkgrel=1
pkgdesc="Baka MPlayer is a free and open source, cross-platform, libmpv based multimedia player."
url="http://bakamplayer.u8sand.net/"
arch=('x86_64' 'i686')
license=('GPLv2')
depends=('mpv' 'qt5-base' 'qt5-declarative' 'qt5-svg' 'qt5-x11extras')
makedepends=('git' 'make')
conflicts=('bakamplayer' 'baka-mplayer')
provides=('baka-mplayer')
source=("$pkgname"::'git://github.com/u8sand/Baka-MPlayer.git')
md5sums=('SKIP')

pkgver() {
cd "$srcdir/$pkgname"
echo $(git describe --tag | sed 's#-#_#g;s#v##')
}

build() {
cd "$srcdir/$pkgname"
./make.sh
gzip -c etc/doc/baka-mplayer.man > etc/doc/baka-mplayer.1.gz
}

package() {
cd "$srcdir/$pkgname"
install -D "build/baka-mplayer" "$pkgdir/usr/bin/baka-mplayer"
install -D "etc/doc/baka-mplayer.md" "$pkgdir/usr/share/doc/baka-mplayer/baka-mplayer.md"
install -D "etc/doc/baka-mplayer.1.gz" "$pkgdir/usr/share/man/man1/baka-mplayer.1.gz"
install -D "LICENSE" "$pkgdir/usr/share/licenses/baka-mplayer/LICENSE"
install -D "etc/logo/baka-mplayer.svg" "$pkgdir/usr/share/pixmaps/baka-mplayer.svg"
install -D "etc/baka-mplayer.desktop" "$pkgdir/usr/share/applications/baka-mplayer.desktop"
}
2 changes: 1 addition & 1 deletion arch/PKGBUILD → arch/baka-mplayer/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Maintainer: u8sand <u8sand@gmail.com>
pkgname=baka-mplayer-git
pkgname=baka-mplayer
pkgver=2.0.0
pkgrel=1
pkgdesc="Baka MPlayer is a free and open source, cross-platform, libmpv based multimedia player."
Expand Down
5 changes: 1 addition & 4 deletions etc/sbin/bakamplayer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ mxeroot=$(pwd)/mxe.$arch
# get bakamplayer
git clone https://github.com/u8sand/Baka-MPlayer.git Baka-MPlayer.$arch
cd Baka-MPlayer.$arch
mkdir -p build
cd build
# generate toolchain cmake
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=$mxeroot/usr/$arch-w64-mingw32.static/share/cmake/mxe-conf.cmake ..
$mxeroot/usr/$arch-w64-mingw32.static/qt5/bin/qmake src/Baka-MPlayer.pro
make
cd ..
42 changes: 5 additions & 37 deletions make.sh
Original file line number Diff line number Diff line change
@@ -1,40 +1,8 @@
#!/bin/bash
#!/bin/sh

ninja=1
arch=0

hash cmake 2>/dev/null || { echo >&2 "Cannot find cmake."; exit 1; }
hash ninja 2>/dev/null || { echo >&2 "Cannot find ninja."; ninja=0; }
if [[ $ninja == 0 ]]; then
hash make 2>/dev/null || { echo >&2 "Cannot find make."; exit 1; }
fi

if [[ $1 == "i686" ]]; then
arch=32
elif [[ $1 == "x86_64" ]]; then
arch=64
fi

if [[ $ninja == 1 ]]; then
if [[ $arch -ne 0 ]]; then
mkdir -p build-$arch
cd build-$arch
cmake -G Ninja CMAKE_C_FLAGS=-m$arch -DCMAKE_CXX_FLAGS=-m$arch ..
else
mkdir -p build
cd build
cmake -G Ninja ..
fi
ninja
qmake src/Baka-MPlayer.pro
if [ -z "$1" ]; then
make -j `grep -c ^processor /proc/cpuinfo`;
else
if [[ $arch -ne 0 ]]; then
mkdir -p build-$arch
cd build-$arch
cmake CMAKE_C_FLAGS=-m$arch -DCMAKE_CXX_FLAGS=-m$arch ..
else
mkdir -p build
cd build
cmake ..
fi
make
make $1;
fi
2 changes: 1 addition & 1 deletion src/Baka-MPlayer.pro
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ QT += core gui network

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = Baka-MPlayer
TARGET = baka-mplayer
DEFINES += 'BAKA_MPLAYER_VERSION=\\"2.0.0\\"' \
'SETTINGS_FILE=\\"bakamplayer\\"'

Expand Down
56 changes: 0 additions & 56 deletions src/CMakeLists.txt

This file was deleted.

0 comments on commit ddb1dcf

Please sign in to comment.