summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartłomiej Piotrowski2018-01-05 17:44:02 +0100
committerBartłomiej Piotrowski2018-01-05 17:44:02 +0100
commit69feb471468d427acaba5884c5a024858764c4b9 (patch)
tree8cf34cf9336248053ff94c0f2eca46976b98de39
downloadaur-69feb471468d427acaba5884c5a024858764c4b9.tar.gz
Import from official repositories
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD33
-rw-r--r--libpng15.patch63
-rw-r--r--xnc-gcc44.patch72
4 files changed, 192 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..79922b7279d4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = xnc
+ pkgdesc = X nortern captain file manager
+ pkgver = 5.0.4
+ pkgrel = 8
+ url = http://xnc.jinr.ru/
+ arch = x86_64
+ license = GPL
+ makedepends = libxt
+ depends = gcc-libs
+ depends = libpng
+ depends = libtiff
+ depends = libsm
+ depends = libxext
+ depends = libjpeg>=7
+ options = !makeflags
+ source = https://sources.archlinux.org/other/community/xnc/xnc-5.0.4.src.tar.gz
+ source = xnc-gcc44.patch
+ source = libpng15.patch
+ md5sums = 62446cdfdf5730f125fb351a658c0bd3
+ md5sums = c0037a081824bca691e59a4ec68b6686
+ md5sums = 7159af1c645fda860f0e5057100651ad
+
+pkgname = xnc
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ba31ada4ed98
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 266875 2017-11-15 14:29:11Z foutrelis $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+
+pkgname=xnc
+pkgver=5.0.4
+pkgrel=8
+pkgdesc="X nortern captain file manager"
+arch=(x86_64)
+url="http://xnc.jinr.ru/"
+license=('GPL')
+depends=('gcc-libs' 'libpng' 'libtiff' 'libsm' 'libxext' 'libjpeg>=7')
+makedepends=('libxt')
+options=('!makeflags')
+#source=(http://xnc.jinr.ru/src-5/xnc-$pkgver.src.tar.gz xnc-gcc44.patch)
+source=(https://sources.archlinux.org/other/community/xnc/xnc-$pkgver.src.tar.gz
+ xnc-gcc44.patch
+ libpng15.patch)
+md5sums=('62446cdfdf5730f125fb351a658c0bd3'
+ 'c0037a081824bca691e59a4ec68b6686'
+ '7159af1c645fda860f0e5057100651ad')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ patch -p1 <"$srcdir"/xnc-gcc44.patch
+ patch -p1 <"$srcdir"/libpng15.patch
+ ./configure --prefix=/usr --mandir=/usr/share/man
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
diff --git a/libpng15.patch b/libpng15.patch
new file mode 100644
index 000000000000..53b941b81f09
--- /dev/null
+++ b/libpng15.patch
@@ -0,0 +1,63 @@
+diff -wbBur xnc-5.0.4/src/lib/image2/sdl_image/IMG_png.c xnc-5.0.4.my/src/lib/image2/sdl_image/IMG_png.c
+--- xnc-5.0.4/src/lib/image2/sdl_image/IMG_png.c 2002-08-05 14:43:09.000000000 +0400
++++ xnc-5.0.4.my/src/lib/image2/sdl_image/IMG_png.c 2012-01-19 13:46:48.000000000 +0400
+@@ -138,7 +138,7 @@
+ * the normal method of doing things with libpng). REQUIRED unless you
+ * set up your own error handlers in png_create_read_struct() earlier.
+ */
+- if ( setjmp(png_ptr->jmpbuf) ) {
++ if ( setjmp(png_jmpbuf(png_ptr)) ) {
+ IMG_SetError("Error reading the PNG file.");
+ goto done;
+ }
+@@ -207,9 +207,9 @@
+ Rmask = 0x000000FF;
+ Gmask = 0x0000FF00;
+ Bmask = 0x00FF0000;
+- Amask = (info_ptr->channels == 4) ? 0xFF000000 : 0;
++ Amask = (png_get_channels(png_ptr, info_ptr) == 4) ? 0xFF000000 : 0;
+ } else {
+- int s = (info_ptr->channels == 4) ? 0 : 8;
++ int s = (png_get_channels(png_ptr, info_ptr) == 4) ? 0 : 8;
+ Rmask = 0xFF000000 >> s;
+ Gmask = 0x00FF0000 >> s;
+ Bmask = 0x0000FF00 >> s;
+@@ -217,7 +217,7 @@
+ }
+ }
+ surface = SDL_AllocSurface(SDL_SWSURFACE, width, height,
+- bit_depth*info_ptr->channels, Rmask,Gmask,Bmask,Amask);
++ bit_depth*png_get_channels(png_ptr, info_ptr), Rmask,Gmask,Bmask,Amask);
+ if ( surface == NULL ) {
+ IMG_SetError("Out of memory");
+ goto done;
+@@ -252,6 +252,10 @@
+ /* read rest of file, get additional chunks in info_ptr - REQUIRED */
+ png_read_end(png_ptr, info_ptr);
+
++ png_colorp plte;
++ int num_palette;
++ png_get_PLTE(png_ptr, info_ptr, &plte, &num_palette);
++
+ /* Load the palette, if any */
+ palette = surface->format->palette;
+ if ( palette ) {
+@@ -262,12 +266,12 @@
+ palette->colors[i].g = i;
+ palette->colors[i].b = i;
+ }
+- } else if (info_ptr->num_palette > 0 ) {
+- palette->ncolors = info_ptr->num_palette;
+- for( i=0; i<info_ptr->num_palette; ++i ) {
+- palette->colors[i].b = info_ptr->palette[i].blue;
+- palette->colors[i].g = info_ptr->palette[i].green;
+- palette->colors[i].r = info_ptr->palette[i].red;
++ } else if (num_palette > 0 ) {
++ palette->ncolors = num_palette;
++ for( i=0; i<num_palette; ++i ) {
++ palette->colors[i].b = plte[i].blue;
++ palette->colors[i].g = plte[i].green;
++ palette->colors[i].r = plte[i].red;
+ }
+ }
+ }
diff --git a/xnc-gcc44.patch b/xnc-gcc44.patch
new file mode 100644
index 000000000000..120d9d467cf4
--- /dev/null
+++ b/xnc-gcc44.patch
@@ -0,0 +1,72 @@
+diff -wbBur xnc-5.0.4/src/include/commonfuncs.h xnc-5.0.4.my/src/include/commonfuncs.h
+--- xnc-5.0.4/src/include/commonfuncs.h 2002-10-16 10:44:17.000000000 +0400
++++ xnc-5.0.4.my/src/include/commonfuncs.h 2011-11-17 18:59:19.000000000 +0400
+@@ -15,7 +15,7 @@
+ extern int path_to_fullpath(char* dest, char *srcdir);
+ extern void add_path_content(char *curdir, const char *cont, int vms_host=0);
+ extern void upper_path(char *curdir, int vms_host=0);
+-extern char* get_first_content(const char *curdir, char *cont);
++extern const char* get_first_content(const char *curdir, char *cont);
+ extern void get_last_content(char *curdir, char *cont);
+ extern void get_last_and_rest_content(char* curdir, char* last, char* rest);
+ extern void str_swap(char *str1, char *str2);
+diff -wbBur xnc-5.0.4/src/lib/tool/commonfuncs.cxx xnc-5.0.4.my/src/lib/tool/commonfuncs.cxx
+--- xnc-5.0.4/src/lib/tool/commonfuncs.cxx 2002-10-16 10:44:20.000000000 +0400
++++ xnc-5.0.4.my/src/lib/tool/commonfuncs.cxx 2011-11-17 18:59:19.000000000 +0400
+@@ -117,9 +117,9 @@
+ }
+
+ //Get first content of dirname
+-char* get_first_content(const char *curdir, char *cont)
++const char* get_first_content(const char *curdir, char *cont)
+ {
+- char *b=strchr(curdir,'/');
++ const char *b=strchr(curdir,'/');
+ if(b)
+ {
+ strncpy(cont,curdir,b-curdir);
+diff -wbBur xnc-5.0.4/src/lib/vfs/afs.cxx xnc-5.0.4.my/src/lib/vfs/afs.cxx
+--- xnc-5.0.4/src/lib/vfs/afs.cxx 2003-11-27 18:36:43.000000000 +0300
++++ xnc-5.0.4.my/src/lib/vfs/afs.cxx 2011-11-17 18:59:19.000000000 +0400
+@@ -29,7 +29,7 @@
+ // The return value is static, so copy it before using the
+ // method again!
+
+-char *create_dirs(char *rootdir, char* dirlist)
++char *create_dirs(char *rootdir, const char* dirlist)
+ {
+ char str[L_MAXPATH];
+ char cont[FLIST_NAME];
+@@ -1350,7 +1350,7 @@
+ add_path_content(curdir, to_dir);
+ } else //If we here then we doing cd not to subdir but to subdir/subdir...
+ {
+- char *s=to_dir;
++ const char *s=to_dir;
+ if(*s)
+ {
+ do
+diff -wbBur xnc-5.0.4/src/lib/vfs/ftpfs.cxx xnc-5.0.4.my/src/lib/vfs/ftpfs.cxx
+--- xnc-5.0.4/src/lib/vfs/ftpfs.cxx 2002-10-30 15:47:38.000000000 +0300
++++ xnc-5.0.4.my/src/lib/vfs/ftpfs.cxx 2011-11-17 18:59:19.000000000 +0400
+@@ -1413,7 +1413,7 @@
+ return;
+ if(strcmp(dir,"/"))
+ {
+- char *s=dir;
++ const char *s=dir;
+ if(*s=='/') //Skip leading '/'
+ s++;
+ do
+diff -wbBur xnc-5.0.4/src/man_page.cxx xnc-5.0.4.my/src/man_page.cxx
+--- xnc-5.0.4/src/man_page.cxx 2002-10-02 16:54:33.000000000 +0400
++++ xnc-5.0.4.my/src/man_page.cxx 2011-11-17 18:59:00.000000000 +0400
+@@ -81,7 +81,7 @@
+ buf[j] = 0;
+ manf->size = j;
+ delete buf;
+- fp = open(tmps, O_WRONLY | O_CREAT | O_TRUNC);
++ fp = open(tmps, O_WRONLY | O_CREAT | O_TRUNC, 0600);
+ write(fp, buf2, j);
+ close(fp);
+ delete manf;