summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 20deeb1934df3213b4c42f93355ed865b7357e21 (plain)
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
# Maintainer: willemw <willemw12@gmail.com>
# Contributor: Pieter Goetschalckx <3.14.e.ter at gmail dot com>
# Contributors: Det, goetzc, Ner0, Lari Tikkanen, oke3, Flamelab, WAntilles

pkgname=smplayer-git
pkgver=25.6.0.r68.gd6342f1
pkgrel=1
pkgdesc='Media player with built-in codecs that can play virtually all video and audio formats'
arch=(x86_64)
url=https://www.smplayer.info
license=(GPL-2.0-or-later)
#depends=(glibc qt5-base qt5-declarative mpv libx11 zlib gcc-libs hicolor-icon-theme)
#makedepends=(git qt5-tools)
depends=(glibc qt6-base qt6-declarative qt6-5compat mpv libx11 zlib gcc-libs hicolor-icon-theme)
makedepends=(git qt6-tools)
optdepends=(
  'smplayer-themes: icon themes collection'
  'smplayer-skins: skin themes collection'
  #'smtube: browse and play youtube videos'
  'youtube-dl: youtube videos and streaming'
  'yt-dlp: youtube videos and streaming'
  'mplayer: alternative multimedia engine')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
#source=("$pkgname::git+https://github.com/smplayer-dev/smplayer.git")
source=("$pkgname::git+https://github.com/smplayer-dev/smplayer.git#branch=qt6")
sha256sums=('SKIP')

pkgver() {
  git -C $pkgname describe --long --tags --abbrev=7 --match 'v*.*.*' | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  # Compress to make build reproducible
  sed '/gzip -9/d' -i $pkgname/Makefile
}

build() {
  # Patch for newer compiler
  #export CFLAGS+=' -w -Wno-error'
  #export CXXFLAGS+=' -w -Wno-error'
  export CFLAGS+=' -Wno-error=unused-but-set-variable'
  export CXXFLAGS+=' -Wno-overloaded-virtual -Wno-deprecated-enum-enum-conversion'

  export CXXFLAGS="${CXXFLAGS} ${CPPFLAGS}"
  make -C $pkgname \
    PREFIX=/usr \
    DOC_PATH="\\\"/usr/share/doc/smplayer\\\"" \
    QMAKE=qmake6 LRELEASE=lrelease6 \
    QMAKE_OPTS=DEFINES+=NO_DEBUG_ON_CONSOLE \
    CFLAGS_EXTRA="${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" \
    all
}

package() {
  make -C $pkgname \
    PREFIX=/usr \
    DOC_PATH=/usr/share/doc/smplayer \
    DESTDIR="${pkgdir}" \
    install
}