summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@lavabit.com>2013-01-08 22:40:17 -0200
committerAndré Fabian Silva Delgado <emulatorman@lavabit.com>2013-01-08 22:40:17 -0200
commitaa55ef6181956a308635f4c6f9103a890b879488 (patch)
tree0977b9d827714c0d479ee0c11f89796d794ee7bf /pcr
parent2d862ac364c034af400863e02f791b9e99be445e (diff)
downloadabslibre-aa55ef6181956a308635f4c6f9103a890b879488.tar.gz
abslibre-aa55ef6181956a308635f4c6f9103a890b879488.tar.bz2
abslibre-aa55ef6181956a308635f4c6f9103a890b879488.zip
yabause-qt-svn: adding new package to [pcr] repo
Diffstat (limited to 'pcr')
-rw-r--r--pcr/yabause-qt-svn/PKGBUILD61
1 files changed, 61 insertions, 0 deletions
diff --git a/pcr/yabause-qt-svn/PKGBUILD b/pcr/yabause-qt-svn/PKGBUILD
new file mode 100644
index 000000000..3bfeeb316
--- /dev/null
+++ b/pcr/yabause-qt-svn/PKGBUILD
@@ -0,0 +1,61 @@
+pkgname=yabause-qt-svn
+pkgver=3010
+pkgrel=1
+pkgdesc="A Sega Saturn emulator with QT interface. (svn)"
+arch=(i686 x86_64)
+license=("GPL")
+depends=(qt sdl freeglut glu)
+makedepends=(subversion cmake mesa)
+url="http://yabause.org/"
+conflicts=(yabause yabause-qt yabause-svn)
+provides=(yabause-qt)
+_svntrunk="https://yabause.svn.sourceforge.net/svnroot/yabause/trunk"
+_svnmod="yabause"
+
+_optimal_make_jobs() {
+ if [ -r /proc/cpuinfo ]; then
+ local core_count=$(grep -Fc processor /proc/cpuinfo)
+ else
+ local core_count=0
+ fi
+ if [ $core_count -gt 1 ]; then
+ echo -n $[$core_count-1]
+ else
+ echo -n 1
+ fi
+}
+
+build() {
+ cd "${srcdir}"
+
+ if [ -d "${_svnmod}/.svn" ]; then
+ (cd "$_svnmod" && svn up -r $pkgver)
+ else
+ svn co "$_svntrunk" --config-dir ./ -r $pkgver $_svnmod
+ fi
+
+ msg 'SVN checkout done or server timeout'
+
+ rm -rf "${_svnmod}-build"
+ cp -r "$_svnmod" "${_svnmod}-build"
+ cd "${_svnmod}-build/yabause"
+
+ sed -i "s/\(#define SETTINGS_H\)/\1\n#include \"QtYabause.h\"/" src/qt/Settings.h
+ sed -i "s/\(#define QTYABAUSE_H\)/\1\n#define PACKAGE \"${pkgname%-qt}\"/" src/qt/QtYabause.h
+ sed -i "s/\(#define QTYABAUSE_H\)/\1\n#define VERSION \"${pkgver}\"/" src/qt/QtYabause.h
+ cmake \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DYAB_PORTS=qt \
+ -DYAB_MULTIBUILD=OFF \
+ -DYAB_NETWORK=ON \
+ -DYAB_OPTIMIZED_DMA=on \
+ -DYAB_PERKEYNAME=ON
+ make -j$(_optimal_make_jobs)
+}
+
+package() {
+ cd "${srcdir}/${_svnmod}-build/yabause"
+ make DESTDIR="${pkgdir}" install
+ install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+}