Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions switch/libntfs-3g/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.tgz
44 changes: 44 additions & 0 deletions switch/libntfs-3g/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Maintainer: Rhys Koedijk <rhys@koedijk.co.nz>

pkgname=switch-libntfs-3g
pkgver=2017.3.23
pkgrel=2
pkgdesc='Read-Write NTFS Driver'
arch=('any')
url='https://www.tuxera.com/community/open-source-ntfs-3g/'
license=('GPL')
options=(!strip libtool staticlibs)
source=("https://tuxera.com/opensource/ntfs-3g_ntfsprogs-${pkgver}.tgz")
sha256sums=('3e5a021d7b761261836dcb305370af299793eedbded731df3d6943802e1262d5')
makedepends=('switch-pkg-config' 'devkitpro-pkgbuild-helpers')
groups=('switch-portlibs')

prepare() {
cd ntfs-3g_ntfsprogs-$pkgver
patch -Np1 -i "$srcdir/../ntfs-3g_ntfsprogs-2017.3.23-fix_syslog_include.patch"
patch -Np1 -i "$srcdir/../ntfs-3g_ntfsprogs-2017.3.23-timespec_already_defined.patch"
patch -Np1 -i "$srcdir/../ntfs-3g_ntfsprogs-2017.3.23-define_dev_major_minor.patch"
patch -Np1 -i "$srcdir/../ntfs-3g_ntfsprogs-2017.3.23-remove_install_exec_hook_target.patch"
}

build() {
cd ntfs-3g_ntfsprogs-$pkgver

source /opt/devkitpro/switchvars.sh

./configure --prefix="${PORTLIBS_PREFIX}" --host=aarch64-none-elf \
--disable-shared --enable-static --disable-device-default-io-ops \
--disable-ntfs-3g --disable-ntfsprogs --disable-plugins --disable-crypto \
--without-uuid --without-hd

make
}

package() {
cd ntfs-3g_ntfsprogs-$pkgver

make DESTDIR="$pkgdir" install

install -Dm644 COPYING.LIB "$pkgdir"/opt/devkitpro/portlibs/switch/licenses/$pkgname/COPYING
rm -r "$pkgdir"/opt/devkitpro/portlibs/switch/share
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
diff --git a/libntfs-3g/dir.c b/libntfs-3g/dir.c
index a66f807..5bc0709 100644
--- a/libntfs-3g/dir.c
+++ b/libntfs-3g/dir.c
@@ -50,6 +50,19 @@
#include <sys/sysmacros.h>
#endif

+#ifndef MINORBITS
+#define MINORBITS 20
+#endif
+#ifndef MINORMASK
+#define MINORMASK ((1U << MINORBITS) - 1)
+#endif
+#ifndef major
+#define major(dev) ((unsigned int) ((dev) >> MINORBITS))
+#endif
+#ifndef minor
+#define minor(dev) ((unsigned int) ((dev) & MINORMASK))
+#endif
+
#include "param.h"
#include "types.h"
#include "debug.h"

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/libntfs-3g/ioctl.c b/libntfs-3g/ioctl.c
index 2eef5a5..b3e3801 100644
--- a/libntfs-3g/ioctl.c
+++ b/libntfs-3g/ioctl.c
@@ -48,7 +48,9 @@
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
+#ifdef HAVE_SYSLOG_H
#include <syslog.h>
+#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/libntfs-3g/Makefile.in b/libntfs-3g/Makefile.in
index d3829ec..82143d2 100644
--- a/libntfs-3g/Makefile.in
+++ b/libntfs-3g/Makefile.in
@@ -984,7 +984,7 @@ install-dvi-am:

install-exec-am: install-libLTLIBRARIES
@$(NORMAL_INSTALL)
- $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+ $(MAKE) $(AM_MAKEFLAGS)
install-html: install-html-am

install-html-am:

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/include/ntfs-3g/ntfstime.h b/include/ntfs-3g/ntfstime.h
index f3a89dd..ce0d458 100644
--- a/include/ntfs-3g/ntfstime.h
+++ b/include/ntfs-3g/ntfstime.h
@@ -36,6 +36,10 @@

#include "types.h"

+#ifdef _SYS__TIMESPEC_H_
+#define __timespec_defined
+#endif
+
/*
* assume "struct timespec" is not defined if st_mtime is not defined
*/