summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Eriksson2017-09-09 18:15:26 +0200
committerSimon Eriksson2017-09-09 18:15:26 +0200
commitdef807e5ddd92e6237406cbdb2995bdb1aab8519 (patch)
tree39d831de85d97f7bbae157285c2b27ce145b4147
parent7ddd333ef4c63543d0c5ef206a26eb59e6bf214c (diff)
downloadaur-def807e5ddd92e6237406cbdb2995bdb1aab8519.tar.gz
Compile fixes
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD8
-rw-r--r--mempak.diff58
3 files changed, 65 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 19af22737b8..6b62cc9a947 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
pkgbase = libdragon-git
- pkgver = r105.c30a5d6
+ pkgver = r109.64df04a
pkgrel = 1
url = http://www.dragonminded.com/n64dev/libdragon
arch = i686
@@ -11,10 +11,10 @@ pkgbase = libdragon-git
depends = mips64-elf-newlib
source = git://github.com/DragonMinded/libdragon.git
source = noconvtool.diff
- source = inthandler.diff
+ source = mempak.diff
sha256sums = SKIP
sha256sums = ec37b8d10ee3911979092916a6b9361e62b13a3a3cfb1736281d6baf304bfc95
- sha256sums = 1ee0a47efcdc9aabd83f52b4b21e910362473fd79fdd810252f6f746655710a8
+ sha256sums = a447b78fe5ab8e706d8acacb33dde0822133216b125af1db83e64429b077ae70
pkgname = libdragon-git
pkgdesc = Open source library for Nintendo 64 game development
diff --git a/PKGBUILD b/PKGBUILD
index 7c4bae7f1a4..95e321924cb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,17 +1,17 @@
#Maintainer: Simon Eriksson <simon.eriksson.1187+aur AT gmail.com>
pkgname=('libdragon-git' 'libdragon-tools-git')
-pkgver=r105.c30a5d6
+pkgver=r109.64df04a
pkgrel=1
url="http://www.dragonminded.com/n64dev/libdragon"
arch=('i686' 'x86_64')
license=('custom:UNLICENSE')
makedepends=('git' 'mips64-elf-gcc-stage1')
depends=('libpng' 'mips64-elf-newlib')
-source=("git://github.com/DragonMinded/libdragon.git" "noconvtool.diff" "inthandler.diff")
+source=("git://github.com/DragonMinded/libdragon.git" "noconvtool.diff" "mempak.diff")
sha256sums=('SKIP'
'ec37b8d10ee3911979092916a6b9361e62b13a3a3cfb1736281d6baf304bfc95'
- '1ee0a47efcdc9aabd83f52b4b21e910362473fd79fdd810252f6f746655710a8')
+ 'a447b78fe5ab8e706d8acacb33dde0822133216b125af1db83e64429b077ae70')
pkgver() {
cd libdragon
@@ -21,7 +21,7 @@ pkgver() {
prepare(){
cd libdragon
patch -p1 < "${srcdir}/noconvtool.diff"
- patch -p1 < "${srcdir}/inthandler.diff"
+ patch -p1 < "${srcdir}/mempak.diff"
}
build(){
diff --git a/mempak.diff b/mempak.diff
new file mode 100644
index 00000000000..d7f2b26f840
--- /dev/null
+++ b/mempak.diff
@@ -0,0 +1,58 @@
+diff --git a/src/mempak.c b/src/mempak.c
+index 35e55e8..c5ffddb 100644
+--- a/src/mempak.c
++++ b/src/mempak.c
+@@ -116,6 +116,26 @@ int write_mempak_sector( int controller, int sector, uint8_t *sector_data )
+ }
+
+ /**
++ * @brief Calculate the checksum of a header
++ *
++ * @param[in] block
++ * A block at the start of a header
++ *
++ * @return The 16 bit checksum over the header
++ */
++ static uint16_t __get_header_checksum( uint16_t *block )
++ {
++ uint32_t sum = 0;
++
++ for ( int i = 0; i < 14; i++ )
++ {
++ sum += *(block++);
++ }
++
++ return sum & 0xFFFF;
++ }
++
++/**
+ * @brief Check a mempak header for validity
+ *
+ * @param[in] sector
+@@ -154,26 +174,6 @@ static int __validate_header( uint8_t *sector )
+ }
+
+ /**
+- * @brief Calculate the checksum of a header
+- *
+- * @param[in] block
+- * A block at the start of a header
+- *
+- * @return The 16 bit checksum over the header
+- */
+-static uint16_t __get_header_checksum( uint16_t *block )
+-{
+- uint32_t sum = 0;
+-
+- for ( int i = 0; i < 14; i++ )
+- {
+- sum += *(block++);
+- }
+-
+- return sum & 0xFFFF;
+-}
+-
+-/**
+ * @brief Calculate the checksum over a TOC sector
+ *
+ * @param[in] sector