diff options
author | Piotr Rogoża | 2016-12-14 20:40:10 +0100 |
---|---|---|
committer | Piotr Rogoża | 2016-12-14 20:40:10 +0100 |
commit | af3d1f543c894328d12da70f77111e5b9236917a (patch) | |
tree | eed72fdd35db8f5669b41e8c449dc2bc03144cc3 | |
parent | 5466fa0b675e97074818f48e5fe254b853c02801 (diff) | |
download | aur-af3d1f543c894328d12da70f77111e5b9236917a.tar.gz |
Upgraded to 2.5.0
-rw-r--r-- | .SRCINFO | 27 | ||||
-rw-r--r-- | Makefile.patch | 11 | ||||
-rw-r--r-- | PKGBUILD | 79 | ||||
-rw-r--r-- | c_hist.patch | 13 | ||||
-rw-r--r-- | opencv.patch | 23 | ||||
-rwxr-xr-x | oqapy.sh | 8 |
6 files changed, 115 insertions, 46 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Tue Jan 12 17:07:24 UTC 2016 +# Wed Dec 14 19:39:42 UTC 2016 pkgbase = oqapy pkgdesc = An application intended to sort files of the image type in graphic mode. - pkgver = 2.3.0 - pkgrel = 2 + pkgver = 2.5.0 + pkgrel = 1 url = http://www.oqapy.eu/ arch = i686 arch = x86_64 @@ -16,10 +16,23 @@ pkgbase = oqapy depends = dcraw depends = python2-imaging depends = opencv - source = http://www.oqapy.eu/releases/oqapy-2.3.0.tar.gz - source = Makefile.patch - sha256sums = 6c978f21c02cbd24a53bd38bbf21179c5ee4e5c946accda32f2ae3f9bc4b74f7 - sha256sums = 5faffa555c37b8c991434b5fc8ece0a99805ae2783101da15e62a37fba75cd22 + depends = opencv2-opt + source = http://www.oqapy.eu/releases/oqapy-2.5.0.tar.gz + source = https://launchpad.net/oqapy/trunk/oqapy/+download/oqapy-iproc.0.1.0.tar.gz + source = oqapy.sh + source = https://launchpad.net/oqapy/trunk/oqapy/+download/python-oqapy-iproc.0.1.1.tar.gz + source = c_hist.patch + source = opencv.patch + sha256sums = 34904d957fb0d7e07d8cad620a1b5fc78207e7f7e8f8ac7eca24181a4b2eb902 + sha256sums = 68842337327a1ecd062d2940d2bebc27fd27ca7448a9743dcc2cd6f8aec83cbc + sha256sums = 87b5f1c69c4ec9812366987372a3ab476b70e95b25cd03eb170b45ee0667f93a + sha256sums = 91e63ee25ef87587e47ca80e06c01c5d0967d042878210d17e0f30bc264f8c63 + sha256sums = 5e560616a135302fecb275c16921ecd8b472607782c7334fdf6912d5545bacef + sha256sums = 5bcef10f039c0768c38f222e3f34023cafb0a90598767ac21dad7244e5b7656d pkgname = oqapy +pkgname = oqapy-iproc + +pkgname = python-oqapy-iproc + diff --git a/Makefile.patch b/Makefile.patch index ed0946bf58a5..7befac1eb5c5 100644 --- a/Makefile.patch +++ b/Makefile.patch @@ -1,18 +1,13 @@ diff --git a/Makefile b/Makefile -index 2400c7ae..1a175cba 100644 +index 3b06f103..60bb737f 100644 --- a/Makefile +++ b/Makefile -@@ -5,11 +5,11 @@ HFILES = sipAPIoqapy_iproc.h +@@ -5,7 +5,7 @@ HFILES = sipAPIoqapy_iproc.h CC = gcc CXX = g++ LINK = g++ -CPPFLAGS = -DNDEBUG -I. -I/usr/include/python2.7 +CPPFLAGS = -DNDEBUG -I. -I/usr/include/python2.7 -I../src - CFLAGS = -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fPIC -O2 -Wall -W + CFLAGS = -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fPIC -O2 -Wall -W CXXFLAGS = -pipe -fPIC -O2 -Wall -W LFLAGS = -Wl,-O1,--sort-common,--as-needed,-z,relro -shared -Wl,-rpath,/usr/lib -Wl,-rpath,/usr/lib/x86_64-linux-gnu/ -Wl,--version-script=oqapy_iproc.exp --LIBS = -L/usr/lib -L/usr/lib/x86_64-linux-gnu/ -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_contrib -lopencv_features2d -lopencv_ml -lopencv_gpu -loqapy-iproc -+LIBS = -L/usr/lib -L/usr/lib/x86_64-linux-gnu/ -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_contrib -lopencv_features2d -lopencv_ml -lopencv_gpu -loqapy-iproc -L../src - .SUFFIXES: .c .o .cpp .cc .cxx .C - - @@ -1,9 +1,11 @@ # Maintainer: dracorp aka Piotr Rogoza <piotr.r.public@gmail.com> # Contributor: Huguenin Loïs <huguenindl at gmail dot com> -pkgname=oqapy -pkgver=2.3.0 -pkgrel=2 +pkgbase=oqapy +pkgname=($pkgbase{,-iproc} python-$pkgbase-iproc) +# pkgname=oqapy +pkgver=2.5.0 +pkgrel=1 pkgdesc="An application intended to sort files of the image type in graphic mode." arch=(i686 x86_64) url="http://www.oqapy.eu/" @@ -17,52 +19,67 @@ gphoto2 dcraw python2-imaging opencv +opencv2-opt ) source=( http://www.oqapy.eu/releases/$pkgname-$pkgver.tar.gz -Makefile.patch +https://launchpad.net/oqapy/trunk/oqapy/+download/oqapy-iproc.0.1.0.tar.gz +oqapy.sh +https://launchpad.net/oqapy/trunk/oqapy/+download/python-oqapy-iproc.0.1.1.tar.gz +c_hist.patch +opencv.patch ) -sha256sums=('6c978f21c02cbd24a53bd38bbf21179c5ee4e5c946accda32f2ae3f9bc4b74f7' - '5faffa555c37b8c991434b5fc8ece0a99805ae2783101da15e62a37fba75cd22') +sha256sums=('34904d957fb0d7e07d8cad620a1b5fc78207e7f7e8f8ac7eca24181a4b2eb902' + '68842337327a1ecd062d2940d2bebc27fd27ca7448a9743dcc2cd6f8aec83cbc' + '87b5f1c69c4ec9812366987372a3ab476b70e95b25cd03eb170b45ee0667f93a' + '91e63ee25ef87587e47ca80e06c01c5d0967d042878210d17e0f30bc264f8c63' + '5e560616a135302fecb275c16921ecd8b472607782c7334fdf6912d5545bacef' + '5bcef10f039c0768c38f222e3f34023cafb0a90598767ac21dad7244e5b7656d') +prepare() { + cd $srcdir/python-oqapy-iproc.0.1.1 + rm -f liboqapy-iproc.so + patch -p1 -i $srcdir/opencv.patch + patch -p1 -i $srcdir/c_hist.patch -build() { - cd "$srcdir"/$pkgname-$pkgver - pushd lib/src + cd $srcdir/oqapy-iproc.0.1.0 + rm -f liboqapy-iproc.so +} +build(){ + msg2 "Building oqapy-iproc library" + cd $srcdir/oqapy-iproc.0.1.0 sh ./build.sh - popd - pushd lib/sip + msg2 "Building oqapy-iproc python module" + cd $srcdir/python-oqapy-iproc.0.1.1 python2 configure.py - patch -p1 -i "$srcdir"/Makefile.patch + sed -e "12 s#\$# -L$srcdir/oqapy-iproc.0.1.0#" -i Makefile make } -package() { +package_oqapy-iproc() { + cd $srcdir/oqapy-iproc.0.1.0 + install -Dm644 liboqapy-iproc.so $pkgdir/usr/lib/liboqapy-iproc.so +} +package_python-oqapy-iproc(){ + cd $srcdir/python-oqapy-iproc.0.1.1 + make DESTDIR=$pkgdir install +} +package_oqapy() { cd "$srcdir"/$pkgname-$pkgver install -dm755 "$pkgdir"/usr/bin - install -dm755 "$pkgdir"/usr/lib - install -dm755 "$pkgdir"/usr/share/$pkgname + install -dm755 "$pkgdir"/usr/share/oqapy install -dm755 "$pkgdir"/usr/share/pixmaps install -dm755 "$pkgdir"/usr/share/applications install -dm755 "$pkgdir"/usr/share/man/man1 - mv oqapy.1 "$pkgdir"/usr/share/man/man1 - mv *.desktop "$pkgdir"/usr/share/applications/ - mv locale/ "$pkgdir"/usr/share - mv medias/oqapy_ic_48.png "$pkgdir"/usr/share/pixmaps/ - mv $pkgname "$pkgdir"/usr/bin/ - - mv lib/src/liboqapy-iproc.so "$pkgdir"/usr/lib - pushd lib/sip - make DESTDIR=$pkgdir install - popd - rm -rf lib - - cp -r . $pkgdir/usr/share/$pkgname/ - sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \ -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ -e "s|\"python\"|\"python2\"|" \ - $(find $pkgdir -name "$pkgname.py" -or -name "$pkgname" -and -perm -o+rx -type f) - chmod 0644 "$pkgdir"/usr/share/oqapy/medias/No_Preview_200x150.jpg + $(find . -name "$pkgname.py" -or -name "$pkgname" -and -perm -o+rx -type f) + cp -R ./ $pkgdir/usr/share/oqapy + mv $pkgdir/usr/share/oqapy/oqapy.1 $pkgdir/usr/share/man/man1 + mv $pkgdir/usr/share/oqapy/oqapy.desktop $pkgdir/usr/share/applications/ + install -Dm644 $pkgdir/usr/share/oqapy/medias/oqapy_ic_48.png \ + "$pkgdir"/usr/share/pixmaps/ + install -Dm755 $srcdir/oqapy.sh $pkgdir/usr/bin/oqapy } diff --git a/c_hist.patch b/c_hist.patch new file mode 100644 index 000000000000..b29350d8a5e4 --- /dev/null +++ b/c_hist.patch @@ -0,0 +1,13 @@ +diff --git a/oqapy-iproc.h b/oqapy-iproc.h +index c52bb0b1..554112b3 100644 +--- a/oqapy-iproc.h ++++ b/oqapy-iproc.h +@@ -52,7 +52,7 @@ private : + Mat b_hist; + Mat g_hist; + Mat r_hist; +- float c_hist[]; ++ float* c_hist; + void getColorHistogram(); + void setContrastStretching(int min, int max, int index); + diff --git a/opencv.patch b/opencv.patch new file mode 100644 index 000000000000..0c99157ee0a4 --- /dev/null +++ b/opencv.patch @@ -0,0 +1,23 @@ +diff --git a/configure.py b/configure.py +index f17db980..debc9197 100644 +--- a/configure.py ++++ b/configure.py +@@ -14,14 +14,14 @@ os.system(" ".join([config.sip_bin, "-c", ".", "-b", build_file, "oqapy_iproc.si + # Create the Makefile. + makefile = sipconfig.SIPModuleMakefile(config, build_file) + +-makefile.extra_lib_dirs=["/usr/lib", "/usr/lib/x86_64-linux-gnu/"] ++makefile.extra_lib_dirs=["/usr/lib", "/usr/lib/x86_64-linux-gnu/", "../src/oqapy-iproc.0.1.0"] + + # Add the library we are wrapping. The name doesn't include any platform + # specific prefixes or extensions (e.g. the "lib" prefix on UNIX, or the + # ".dll" extension on Windows). +-makefile.extra_libs = ["opencv_core", "opencv_highgui", "opencv_imgproc", +- "opencv_legacy", "opencv_contrib", "opencv_features2d", +- "opencv_ml", "opencv_gpu", "oqapy-iproc"] ++makefile.extra_libs = ["opencv_core", "opencv_highgui", "opencv_imgproc", ++ "opencv_features2d", ++ "opencv_ml", "oqapy-iproc"] + + # Generate the Makefile itself. + makefile.generate() diff --git a/oqapy.sh b/oqapy.sh new file mode 100755 index 000000000000..6b1440a39df4 --- /dev/null +++ b/oqapy.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +PYTHONPATH+=:/opt/opencv2/lib/python2.7/site-packages +LD_LIBRARY_PATH+=:/opt/opencv2/lib +export PYTHONPATH +export LD_LIBRARY_PATH +cd /usr/share/oqapy +python2 ./oqapy "$@" |