summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b07da0f2becc7fed2b619583256a713ec0c4215c (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
# Maintainer: Kristian Gunstone <kristian.gunstone.butnotthispart@pean.northis.org>
# Contributor: Hugo Arpin ("harpin")
# Contributor: Paula Breton <paula@parashep.com>
# Contributor: robb_force <robb_force@holybuffalo.net>

pkgname=ucon64
pkgver=2.2.1
pkgrel=2
pkgdesc="A ROM backup tool and emulator's Swiss Army knife program." 
arch=('i686' 'x86_64')
url="https://ucon64.sourceforge.io/index.php"
license=('GPL')
depends=('zlib' 'libusb-compat')
optdepends=('libieee1284: libcd64 enhancements')
source=(https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}-src.tar.gz)
sha256sums=('e814f427a59866e16fe757bf4af51004ac68be29cabd78944590878f1df73f79')

# Apply minor patches (which will be included in the next release)
# change_mem2.patch affects 64-bit systems, the bug of which was found just a 
# few days after the release of 2.2.1.
# V64_send_gauge.patch fixes a minor issue with the progressbar when uploading
# ROMs to the Doctor V64.
source+=("https://sourceforge.net/projects/${pkgname}/files/${pkgname}/${pkgname}-${pkgver}/patches/change_mem2.patch"
         "https://sourceforge.net/projects/${pkgname}/files/${pkgname}/${pkgname}-${pkgver}/patches/V64_send_gauge.patch")
sha256sums+=('65ff85255878e077c2e5fc57565cf0b93833ce8ac03bf81d46ba91ec837accf7'
             'b60a0eb53be238aa8d3a6b33e4708b8a2f953f11603a1a492b8b8b3cfd623d66')

srcroot="${pkgname}-${pkgver}-src/src"

prepare()
{
    patch -d "${srcdir}" -p2 < ../aur_discmage_path.patch

    # XXX Remember to remove these patches on the next release (>2.2.1)
    patch -d "${srcdir}" -p0 < change_mem2.patch
    patch -d "${srcdir}" -p0 < V64_send_gauge.patch
}

build() 
{
    cd "$srcroot"
    export CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
    ./configure --prefix=/usr --with-libusb --with-libcd64 --with-libdiscmage
    make
}

package() 
{
    cd "$srcroot"

    install -Dm775 ucon64 "${pkgdir}"/usr/bin/ucon64
    install -Dm755 libdiscmage/discmage.so "${pkgdir}"/usr/lib/discmage.so
}