summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMrTimscampi2015-09-29 16:16:20 +0200
committerMrTimscampi2015-09-29 16:16:20 +0200
commit804e2ef0b760d7274b79f2c979829f4e1558b221 (patch)
tree0419f3cecee9742430a2e9c6f9051b3584738916
parent724873ce76801f0a77cc005ea91c84714ed287fe (diff)
downloadaur-804e2ef0b760d7274b79f2c979829f4e1558b221.tar.gz
Added patch by fbrennan and man page, removed source from include dir
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD15
-rw-r--r--arch_use_usr_share_for_models.patch39
-rw-r--r--waifu2x.1.gzbin0 -> 1242 bytes
4 files changed, 50 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 76f0976fd7b3..0108331ff906 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = waifu2x-converter-cpp-cuda-git
- pkgdesc = Image rescaling and noise reduction using the power of convolutional neural networks
+ pkgdesc = Image rescaling and noise reduction using the power of convolutional neural networks, with CUDA support
pkgver = r250.ca65c93
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/tanakamura/waifu2x-converter-cpp
arch = i686
arch = x86_64
diff --git a/PKGBUILD b/PKGBUILD
index 9d3ba8403111..01e2f5815fb3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,11 +1,12 @@
-# Contributor : Yamashita Ren
+# Contributor: Yamashita Ren
# Contributor: Fredrick Brennan <admin@8chan.co>
+# Contributor: Julien Machiels
pkgname=waifu2x-converter-cpp-cuda-git
_gitname=${pkgname%-cuda-git}
pkgver=r250.ca65c93
-pkgrel=1
-pkgdesc="Image rescaling and noise reduction using the power of convolutional neural networks"
+pkgrel=2
+pkgdesc="Image rescaling and noise reduction using the power of convolutional neural networks, with CUDA support"
arch=('i686' 'x86_64')
url="https://github.com/tanakamura/waifu2x-converter-cpp"
license=('MIT')
@@ -23,9 +24,9 @@ pkgver() {
prepare() {
cd ${_gitname}
+ patch -Np1 -i ../../arch_use_usr_share_for_models.patch
sed -i 's/g++-4.7/g++/' CMakeLists.txt
sed -i 's/gcc-4.7/gcc/' Makefile.linux
-
}
build() {
@@ -36,9 +37,11 @@ build() {
package() {
cd ${_gitname}
- install -D ${_gitname} $pkgdir/usr/bin/${_gitname}
- install -D src/w2xconv.h $pkgdir/usr/include/w2xconv.h
+ install -D ${_gitname} $pkgdir/usr/bin/waifu2x
install -D libw2xc.so $pkgdir/usr/lib/libw2xc.so
+ install -D ../../waifu2x.1.gz $pkgdir/usr/share/man/man1/waifu2x.1.gz
+ mkdir -p $pkgdir/usr/share/waifu2x || true
+ cp -r models_rgb $pkgdir/usr/share/waifu2x
}
check() {
diff --git a/arch_use_usr_share_for_models.patch b/arch_use_usr_share_for_models.patch
new file mode 100644
index 000000000000..936f9d4cfe4c
--- /dev/null
+++ b/arch_use_usr_share_for_models.patch
@@ -0,0 +1,39 @@
+diff --git a/appendix/waifu2x-nocuda/lib/settings.lua b/appendix/waifu2x-nocuda/lib/settings.lua
+index 56f894d..3ea818c 100644
+--- a/appendix/waifu2x-nocuda/lib/settings.lua
++++ b/appendix/waifu2x-nocuda/lib/settings.lua
+@@ -21,7 +21,7 @@ cmd:text("Options:")
+ cmd:option("-seed", 11, 'fixed input seed')
+ cmd:option("-data_dir", "./data", 'data directory')
+ cmd:option("-test", "images/miku_small.png", 'test image file')
+-cmd:option("-model_dir", "./models", 'model directory')
++cmd:option("-model_dir", "/usr/share/waifu2x/models", 'model directory')
+ cmd:option("-method", "scale", '(noise|scale)')
+ cmd:option("-noise_level", 1, '(1|2)')
+ cmd:option("-scale", 2.0, 'scale')
+diff --git a/appendix/waifu2x-nocuda/waifu2x.lua b/appendix/waifu2x-nocuda/waifu2x.lua
+index 7afe284..d0b4f37 100644
+--- a/appendix/waifu2x-nocuda/waifu2x.lua
++++ b/appendix/waifu2x-nocuda/waifu2x.lua
+@@ -19,7 +19,7 @@ local function waifu2x()
+ cmd:text("Options:")
+ cmd:option("-i", "images/miku_small.png", 'path of input image')
+ cmd:option("-o", "(auto)", 'path of output')
+- cmd:option("-model_dir", "./models", 'model directory')
++ cmd:option("-model_dir", "/usr/share/waifu2x/models", 'model directory')
+ cmd:option("-m", "noise_scale", 'method (noise|scale|noise_scale)')
+ cmd:option("-noise_level", 1, '(1|2)')
+ cmd:option("-crop_size", 128, 'crop size')
+diff --git a/src/main.cpp b/src/main.cpp
+index ad1a2d4..b2a7ecc 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -52,7 +52,7 @@ int main(int argc, char** argv) {
+
+ TCLAP::ValueArg<std::string> cmdModelPath("", "model_dir",
+ "path to custom model directory (don't append last / )", false,
+- "models_rgb", "string", cmd);
++ "/usr/share/waifu2x/models_rgb", "string", cmd);
+
+ TCLAP::ValueArg<int> cmdNumberOfJobs("j", "jobs",
+ "number of threads launching at the same time", false, 0, "integer",
diff --git a/waifu2x.1.gz b/waifu2x.1.gz
new file mode 100644
index 000000000000..7bd91810b6f0
--- /dev/null
+++ b/waifu2x.1.gz
Binary files differ