diff options
author | Felix Kauselmann | 2015-07-08 09:50:52 +0200 |
---|---|---|
committer | Felix Kauselmann | 2015-07-08 09:50:52 +0200 |
commit | b0ee75d58ef9ab10a5eca4814e7ccbc66bf518be (patch) | |
tree | bfec31869a478ee3a8867f6f9351fa15395267d3 | |
download | aur-b0ee75d58ef9ab10a5eca4814e7ccbc66bf518be.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 35 | ||||
-rw-r--r-- | fseeko.patch | 42 |
3 files changed, 94 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..4ef704164fa6 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = libunarr-git + pkgdesc = A lightweight decompression library with support for rar, tar and zip archives. + pkgver = r188.c4136ab + pkgrel = 1 + arch = i686 + arch = x86_64 + makedepends = cmake + makedepends = git + source = git+https://github.com/zeniko/unarr + source = https://raw.githubusercontent.com/selmf/unarr/master/CMakeLists.txt + source = fseeko.patch + md5sums = SKIP + md5sums = 2a4efbaab8d331302cb3ae21c912a061 + md5sums = 128ad4e9ffc1019ec88f53d539921297 + +pkgname = libunarr-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..7ad79e5ae54f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,35 @@ +pkgname=libunarr-git +pkgver=r188.c4136ab +pkgrel=1 +arch=('i686' 'x86_64') +pkgdesc=('A lightweight decompression library with support for rar, tar and zip archives.') +source=('git+https://github.com/zeniko/unarr' + 'https://raw.githubusercontent.com/selmf/unarr/master/CMakeLists.txt' + 'fseeko.patch') +makedepends=('cmake' 'git') + +pkgver() { + cd "${srcdir}/unarr" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/unarr" + cp ../CMakeLists.txt . + cp ../fseeko.patch . + patch -p1 < fseeko.patch +} + +build() { + cd "${srcdir}/unarr" + cmake ./ -DCMAKE_INSTALL_PREFIX=/usr + make +} + +package() { + cd "${srcdir}/unarr" + make DESTDIR=$pkgdir install +} +md5sums=('SKIP' + '2a4efbaab8d331302cb3ae21c912a061' + '128ad4e9ffc1019ec88f53d539921297') diff --git a/fseeko.patch b/fseeko.patch new file mode 100644 index 000000000000..1c6c86921c85 --- /dev/null +++ b/fseeko.patch @@ -0,0 +1,42 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8b2c0dc..e41410e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,7 +20,7 @@ find_package(ZLIB) + find_package(BZip2) + + if (UNIX OR MINGW) +- add_compile_options(-std=c99 -fomit-frame-pointer) ++ add_compile_options(-fomit-frame-pointer -D_FILE_OFFSET_BITS=64) + endif (UNIX OR MINGW) + + #sources +diff --git a/common/stream.c b/common/stream.c +index 18c1ebf..242174a 100644 +--- a/common/stream.c ++++ b/common/stream.c +@@ -61,10 +61,12 @@ static bool file_seek(void *data, off64_t offset, int origin) + {
+ #ifdef _MSC_VER
+ return _fseeki64(data, offset, origin) == 0;
++#elif defined __unix__
++ return fseeko(data, offset, origin) == 0;
+ #else
+- if (offset > INT32_MAX)
+- return false;
+- return fseek(data, (long)offset, origin) == 0;
++ if (offset > INT32_MAX)
++ return false;
++ return fseek(data, (long)offset, origin) == 0;
+ #endif
+ }
+
+@@ -72,6 +74,8 @@ static off64_t file_tell(void *data) + {
+ #ifdef _MSC_VER
+ return _ftelli64(data);
++#elif defined __unix__
++ return ftello(data);
+ #else
+ return ftell(data);
+ #endif
|