Date: Thursday, November 21, 2013 @ 13:18:33
  Author: bpiotrowski
Revision: 101269

archrelease: copy trunk to community-i686, community-x86_64

Added:
  arj/repos/community-i686/
  arj/repos/community-i686/001_arches_align.patch
    (from rev 101268, arj/trunk/001_arches_align.patch)
  arj/repos/community-i686/002_no_remove_static_const.patch
    (from rev 101268, arj/trunk/002_no_remove_static_const.patch)
  arj/repos/community-i686/003_64_bit_clean.patch
    (from rev 101268, arj/trunk/003_64_bit_clean.patch)
  arj/repos/community-i686/PKGBUILD
    (from rev 101268, arj/trunk/PKGBUILD)
  arj/repos/community-i686/arj-3.10.22-custom-printf.patch
    (from rev 101268, arj/trunk/arj-3.10.22-custom-printf.patch)
  arj/repos/community-x86_64/
  arj/repos/community-x86_64/001_arches_align.patch
    (from rev 101268, arj/trunk/001_arches_align.patch)
  arj/repos/community-x86_64/002_no_remove_static_const.patch
    (from rev 101268, arj/trunk/002_no_remove_static_const.patch)
  arj/repos/community-x86_64/003_64_bit_clean.patch
    (from rev 101268, arj/trunk/003_64_bit_clean.patch)
  arj/repos/community-x86_64/PKGBUILD
    (from rev 101268, arj/trunk/PKGBUILD)
  arj/repos/community-x86_64/arj-3.10.22-custom-printf.patch
    (from rev 101268, arj/trunk/arj-3.10.22-custom-printf.patch)

---------------------------------------------------+
 community-i686/001_arches_align.patch             |   34 +++
 community-i686/002_no_remove_static_const.patch   |   20 ++
 community-i686/003_64_bit_clean.patch             |  194 ++++++++++++++++++++
 community-i686/PKGBUILD                           |   53 +++++
 community-i686/arj-3.10.22-custom-printf.patch    |   15 +
 community-x86_64/001_arches_align.patch           |   34 +++
 community-x86_64/002_no_remove_static_const.patch |   20 ++
 community-x86_64/003_64_bit_clean.patch           |  194 ++++++++++++++++++++
 community-x86_64/PKGBUILD                         |   53 +++++
 community-x86_64/arj-3.10.22-custom-printf.patch  |   15 +
 10 files changed, 632 insertions(+)

Copied: arj/repos/community-i686/001_arches_align.patch (from rev 101268, 
arj/trunk/001_arches_align.patch)
===================================================================
--- community-i686/001_arches_align.patch                               (rev 0)
+++ community-i686/001_arches_align.patch       2013-11-21 12:18:33 UTC (rev 
101269)
@@ -0,0 +1,34 @@
+#DPATCHLEVEL=1
+diff -Naur arj-3.10.19.orig/arj_proc.c arj-3.10.19/arj_proc.c
+--- arj-3.10.19.orig/arj_proc.c        2004-02-20 14:18:52.000000000 +0100
++++ arj-3.10.22/arj_proc.c     2004-04-08 14:06:58.000000000 +0200
+@@ -2898,7 +2898,7 @@
+ }
+ #endif
+ 
+-#if defined(WORDS_BIGENDIAN)&&!defined(ARJDISP)&&!defined(REGISTER)
++#if (defined(WORDS_BIGENDIAN) || defined(ALIGN_POINTERS)) && 
!defined(ARJDISP) && !defined(REGISTER)
+ /* Model-independent routine to get 2 bytes from far RAM */
+ 
+ unsigned int mget_word(char FAR *p)
+diff -Naur arj-3.10.19.orig/arj_proc.h arj-3.10.19/arj_proc.h
+--- arj-3.10.19.orig/arj_proc.h        2004-01-25 01:40:00.000000000 +0100
++++ arj-3.10.22/arj_proc.h     2004-04-08 14:07:18.000000000 +0200
+@@ -12,7 +12,7 @@
+ 
+ #define mget_byte(p) (*(unsigned char FAR *)(p)&0xFF)
+ #define mput_byte(c, p) *(unsigned char FAR *)(p)=(unsigned char)(c)
+-#ifndef WORDS_BIGENDIAN
++#if !defined(ALIGN_POINTERS) && !defined(WORDS_BIGENDIAN)
+ #define mget_word(p) (*(unsigned short *)(p)&0xFFFF)
+ #define mput_word(w,p) (*(unsigned short *)(p)=(unsigned short)(w))
+ #define mget_dword(p) (*(unsigned long *)(p))
+@@ -60,7 +60,7 @@
+ void unpack_mem(struct mempack *mempack);
+ void strip_lf(char *str);
+ char *ltrim(char *str);
+-#ifdef WORDS_BIGENDIAN
++#if defined(ALIGN_POINTERS) || defined(WORDS_BIGENDIAN)
+ unsigned int mget_word(char FAR *p);
+ unsigned long mget_dword(char FAR *p);
+ void mput_word(unsigned int w, char FAR *p);

Copied: arj/repos/community-i686/002_no_remove_static_const.patch (from rev 
101268, arj/trunk/002_no_remove_static_const.patch)
===================================================================
--- community-i686/002_no_remove_static_const.patch                             
(rev 0)
+++ community-i686/002_no_remove_static_const.patch     2013-11-21 12:18:33 UTC 
(rev 101269)
@@ -0,0 +1,20 @@
+#DPATCHLEVEL=1
+diff -Naur arj-3.10.22.orig/gnu/makefile.in arj-3.10.22/gnu/makefile.in
+--- arj-3.10.22.orig/gnu/makefile.in   2004-04-17 14:28:06.000000000 +0300
++++ arj-3.10.22/gnu/makefile.in        2005-08-04 21:50:24.000000000 +0300
+@@ -192,6 +192,15 @@
+ dispose:
+ 
+ #
++# XXX: Do not use -O2, it removes the static const variable with gcc 4.x
++#
++
++INTEGR_DIRS = $(ARJ_DIR) $(REARJ_DIR) $(ARJCRYPT_DIR) $(REGISTER_DIR)
++
++$(patsubst %,%/integr.o, $(INTEGR_DIRS)): $(SRC_DIR)/integr.c
++      $(CC) -Wall -g -c -o$@ $<
++
++#
+ # The tools
+ #
+ 

Copied: arj/repos/community-i686/003_64_bit_clean.patch (from rev 101268, 
arj/trunk/003_64_bit_clean.patch)
===================================================================
--- community-i686/003_64_bit_clean.patch                               (rev 0)
+++ community-i686/003_64_bit_clean.patch       2013-11-21 12:18:33 UTC (rev 
101269)
@@ -0,0 +1,194 @@
+#DPATCHLEVEL=1
+diff -Naur -x .svn -x CVS arj-3.10.22.orig/arj_arcv.c arj-3.10.22/arj_arcv.c
+--- arj-3.10.22.orig/arj_arcv.c        2005-06-21 22:53:12.000000000 +0300
++++ arj-3.10.22/arj_arcv.c     2005-11-24 02:50:31.000000000 +0200
+@@ -59,27 +59,27 @@
+ #define setup_hput(ptr) (tmp_hptr=(ptr))
+ 
+ #define hget_byte() (*(tmp_hptr++)&0xFF)
+-#define hput_byte(c) (*(tmp_hptr++)=(char) (c))
++#define hput_byte(c) (*(tmp_hptr++)=(uint8_t) (c))
+ 
+ /* Reads two bytes from the header, incrementing the pointer */
+ 
+-static unsigned int hget_word()
++static uint16_t hget_word()
+ {
+- unsigned int result;
++ uint16_t result;
+ 
+  result=mget_word(tmp_hptr);
+- tmp_hptr+=sizeof(short);
++ tmp_hptr+=sizeof(uint16_t);
+  return result;
+ }
+ 
+ /* Reads four bytes from the header, incrementing the pointer */
+ 
+-static unsigned long hget_longword()
++static uint32_t hget_longword()
+ {
+- unsigned long result;
++ uint32_t result;
+ 
+  result=mget_dword(tmp_hptr);
+- tmp_hptr+=sizeof(unsigned long);
++ tmp_hptr+=sizeof(uint32_t);
+  return result;
+ }
+ 
+@@ -87,18 +87,18 @@
+ 
+ /* Writes two bytes to the header, incrementing the pointer */
+ 
+-static void hput_word(unsigned int w)
++static void hput_word(uint16_t w)
+ {
+  mput_word(w,tmp_hptr); 
+- tmp_hptr+=sizeof(unsigned short);
++ tmp_hptr+=sizeof(uint16_t);
+ }
+ 
+ /* Writes four bytes to the header, incrementing the pointer */
+ 
+-static void hput_longword(unsigned long l)
++static void hput_longword(uint32_t l)
+ {
+  mput_dword(l,tmp_hptr);
+- tmp_hptr+=sizeof(unsigned long);
++ tmp_hptr+=sizeof(uint32_t);
+ }
+ 
+ /* Calculates and stores the basic header size */
+diff -Naur -x .svn -x CVS arj-3.10.22.orig/arj_proc.c arj-3.10.22/arj_proc.c
+--- arj-3.10.22.orig/arj_proc.c        2005-11-24 02:50:19.000000000 +0200
++++ arj-3.10.22/arj_proc.c     2005-11-24 02:50:31.000000000 +0200
+@@ -585,7 +585,7 @@
+ /* Returns the exact amount of data that could be safely written to the
+    destination volume */
+ 
+-unsigned long get_volfree(unsigned int increment)
++unsigned long get_volfree(unsigned long increment)
+ {
+  unsigned long pvol;
+  unsigned int arjsec_overhead;
+@@ -605,7 +605,7 @@
+  remain=volume_limit-ftell(aostream)-pvol-(long)arjsec_overhead-
+         (long)out_bytes-(long)cpos-(long)ext_voldata-
+         MULTIVOLUME_RESERVE-t_volume_offset;
+- return((unsigned long)min(remain, (unsigned long)increment));
++ return((unsigned long)min(remain, increment));
+ }
+ 
+ /* Performs various checks when multivolume data is packed to predict an
+@@ -2466,14 +2466,14 @@
+     *tsptr='\0';
+   endptr=tsptr;
+   tsptr=sptr;
+-  while((unsigned int)tsptr<(unsigned int)endptr&&patterns<SEARCH_STR_MAX)
++  while((intptr_t)tsptr<(intptr_t)endptr&&patterns<SEARCH_STR_MAX)
+   {
+    while(*tsptr=='\0')
+     tsptr++;
+-   if((unsigned int)tsptr<(unsigned int)endptr)
++   if((intptr_t)tsptr<(intptr_t)endptr)
+    {
+     search_str[patterns++]=tsptr;
+-    while(*tsptr!='\0'&&(unsigned int)tsptr<(unsigned int)endptr)
++    while(*tsptr!='\0'&&(intptr_t)tsptr<(intptr_t)endptr)
+      tsptr++;
+    }
+   }
+@@ -2901,9 +2901,9 @@
+ #if (defined(WORDS_BIGENDIAN) || defined(ALIGN_POINTERS)) && 
!defined(ARJDISP) && !defined(REGISTER)
+ /* Model-independent routine to get 2 bytes from far RAM */
+ 
+-unsigned int mget_word(char FAR *p)
++uint16_t mget_word(char FAR *p)
+ {
+- unsigned int b0, b1;
++ uint16_t b0, b1;
+ 
+  b0=mget_byte(p);
+  b1=mget_byte(p+1);
+@@ -2912,9 +2912,9 @@
+ 
+ /* Model-independent routine to get 4 bytes from far RAM */
+ 
+-unsigned long mget_dword(char FAR *p)
++uint32_t mget_dword(char FAR *p)
+ {
+- unsigned long w0, w1;
++ uint32_t w0, w1;
+ 
+  w0=mget_word(p);
+  w1=mget_word(p+2);
+@@ -2923,7 +2923,7 @@
+ 
+ /* Model-independent routine to store 2 bytes in far RAM */
+ 
+-void mput_word(unsigned int w, char FAR *p)
++void mput_word(uint16_t w, char FAR *p)
+ {
+  mput_byte(w&0xFF, p);
+  mput_byte(w>>8  , p+1);
+@@ -2931,7 +2931,7 @@
+ 
+ /* Model-independent routine to store 4 bytes in far RAM */
+ 
+-void mput_dword(unsigned long d, char FAR *p)
++void mput_dword(uint32_t d, char FAR *p)
+ {
+  mput_word(d&0xFFFF, p);
+  mput_word(d>>16   , p+2);
+diff -Naur -x .svn -x CVS arj-3.10.22.orig/arj_proc.h arj-3.10.22/arj_proc.h
+--- arj-3.10.22.orig/arj_proc.h        2005-11-24 02:50:19.000000000 +0200
++++ arj-3.10.22/arj_proc.h     2005-11-24 03:17:25.000000000 +0200
+@@ -8,15 +8,17 @@
+ #ifndef ARJ_PROC_INCLUDED
+ #define ARJ_PROC_INCLUDED
+ 
++#include <stdint.h>
++
+ /* Helper macros */
+ 
+-#define mget_byte(p) (*(unsigned char FAR *)(p)&0xFF)
+-#define mput_byte(c, p) *(unsigned char FAR *)(p)=(unsigned char)(c)
++#define mget_byte(p) (*(uint8_t FAR *)(p)&0xFF)
++#define mput_byte(c, p) *(uint8_t FAR *)(p)=(uint8_t)(c)
+ #if !defined(ALIGN_POINTERS) && !defined(WORDS_BIGENDIAN)
+-#define mget_word(p) (*(unsigned short *)(p)&0xFFFF)
+-#define mput_word(w,p) (*(unsigned short *)(p)=(unsigned short)(w))
+-#define mget_dword(p) (*(unsigned long *)(p))
+-#define mput_dword(w,p) (*(unsigned long *)(p)=(unsigned long)(w))
++#define mget_word(p) (*(uint16_t *)(p)&0xFFFF)
++#define mput_word(w,p) (*(uint16_t *)(p)=(uint16_t)(w))
++#define mget_dword(p) (*(uint32_t *)(p))
++#define mput_dword(w,p) (*(uint32_t *)(p)=(uint32_t)(w))
+ #endif
+ 
+ /* Prototypes */
+@@ -31,7 +33,7 @@
+ int translate_path(char *name);
+ void restart_proc(char *dest);
+ int search_for_extension(char *name, char *ext_list);
+-unsigned long get_volfree(unsigned int increment);
++unsigned long get_volfree(unsigned long increment);
+ unsigned int check_multivolume(unsigned int increment);
+ void store();
+ void hollow_encode();
+@@ -61,10 +63,10 @@
+ void strip_lf(char *str);
+ char *ltrim(char *str);
+ #if defined(ALIGN_POINTERS) || defined(WORDS_BIGENDIAN)
+-unsigned int mget_word(char FAR *p);
+-unsigned long mget_dword(char FAR *p);
+-void mput_word(unsigned int w, char FAR *p);
+-void mput_dword(unsigned long d, char FAR *p);
++uint16_t mget_word(char FAR *p);
++uint32_t mget_dword(char FAR *p);
++void mput_word(uint16_t w, char FAR *p);
++void mput_dword(uint32_t d, char FAR *p);
+ #endif
+ 
+ #endif

Copied: arj/repos/community-i686/PKGBUILD (from rev 101268, arj/trunk/PKGBUILD)
===================================================================
--- community-i686/PKGBUILD                             (rev 0)
+++ community-i686/PKGBUILD     2013-11-21 12:18:33 UTC (rev 101269)
@@ -0,0 +1,53 @@
+# $Id$
+# Maintainer:
+# Contributor: Travis Willard <trav...@wmpub.ca>
+# Contributor: Gergely Tamas <d...@mfa.kfki.hu>
+
+pkgname=arj
+pkgver=3.10.22
+pkgrel=8
+pkgdesc="Free and portable clone of the ARJ archiver"
+url="http://arj.sourceforge.net/";
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('glibc')
+options=('!makeflags')
+source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz";
+        001_arches_align.patch
+        002_no_remove_static_const.patch
+        003_64_bit_clean.patch
+        arj-3.10.22-custom-printf.patch)
+md5sums=('f263bf3cf6d42a8b7e85b4fb514336d3'
+         '550bc972d825036f17f202a2b11b35c2'
+         '395dfa8cc500ffae648777f8f241be88'
+         '56b3cf96ec485b0d824761457417fcc0'
+         '4630a7254dfc6c8d8c7e696aa4a58f4a')
+
+prepare() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  # Add gentoo patches
+  patch -p1 -i "${srcdir}/001_arches_align.patch"
+  patch -p1 -i "${srcdir}/002_no_remove_static_const.patch"
+  patch -p1 -i "${srcdir}/003_64_bit_clean.patch"
+  patch -p1 -i "${srcdir}/arj-3.10.22-custom-printf.patch"
+
+  cd gnu
+  aclocal
+  autoconf
+  rm -f config.{guess,sub}
+  cp /usr/share/automake-1.14/config.{guess,sub} .
+}
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}/gnu"
+  ./configure --prefix=/usr
+  cd ..
+  make prepare
+  make
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  make DESTDIR="${pkgdir}" install
+}

Copied: arj/repos/community-i686/arj-3.10.22-custom-printf.patch (from rev 
101268, arj/trunk/arj-3.10.22-custom-printf.patch)
===================================================================
--- community-i686/arj-3.10.22-custom-printf.patch                              
(rev 0)
+++ community-i686/arj-3.10.22-custom-printf.patch      2013-11-21 12:18:33 UTC 
(rev 101269)
@@ -0,0 +1,15 @@
+Patch by Lubomir Rintel <lkund...@v3.sk> for arj >= 3.10.22, which disables
+the custom printf to avoid conflicting strnlen definition with the glibc
+headers. By using custom printf (as in the past), we're completely loosing
+all the _FORTIFY_SOURCE printf protections.
+
+--- arj-3.10.22/fardata.c              2004-04-17 13:39:42.000000000 +0200
++++ arj-3.10.22/fardata.c.printf       2009-04-18 16:23:52.000000000 +0200
+@@ -13,7 +13,6 @@
+ /* ASR fix 02/05/2003: need that regardless of COLOR_OUTPUT to support -jp
+    correctly */
+ #if SFX_LEVEL>=ARJ
+- #define CUSTOM_PRINTF
+  #define CHUNK_SIZE               512    /* Size of the output block */
+  #define CHUNK_THRESHOLD (CHUNK_SIZE-256) /* Safety bound */
+ #endif

Copied: arj/repos/community-x86_64/001_arches_align.patch (from rev 101268, 
arj/trunk/001_arches_align.patch)
===================================================================
--- community-x86_64/001_arches_align.patch                             (rev 0)
+++ community-x86_64/001_arches_align.patch     2013-11-21 12:18:33 UTC (rev 
101269)
@@ -0,0 +1,34 @@
+#DPATCHLEVEL=1
+diff -Naur arj-3.10.19.orig/arj_proc.c arj-3.10.19/arj_proc.c
+--- arj-3.10.19.orig/arj_proc.c        2004-02-20 14:18:52.000000000 +0100
++++ arj-3.10.22/arj_proc.c     2004-04-08 14:06:58.000000000 +0200
+@@ -2898,7 +2898,7 @@
+ }
+ #endif
+ 
+-#if defined(WORDS_BIGENDIAN)&&!defined(ARJDISP)&&!defined(REGISTER)
++#if (defined(WORDS_BIGENDIAN) || defined(ALIGN_POINTERS)) && 
!defined(ARJDISP) && !defined(REGISTER)
+ /* Model-independent routine to get 2 bytes from far RAM */
+ 
+ unsigned int mget_word(char FAR *p)
+diff -Naur arj-3.10.19.orig/arj_proc.h arj-3.10.19/arj_proc.h
+--- arj-3.10.19.orig/arj_proc.h        2004-01-25 01:40:00.000000000 +0100
++++ arj-3.10.22/arj_proc.h     2004-04-08 14:07:18.000000000 +0200
+@@ -12,7 +12,7 @@
+ 
+ #define mget_byte(p) (*(unsigned char FAR *)(p)&0xFF)
+ #define mput_byte(c, p) *(unsigned char FAR *)(p)=(unsigned char)(c)
+-#ifndef WORDS_BIGENDIAN
++#if !defined(ALIGN_POINTERS) && !defined(WORDS_BIGENDIAN)
+ #define mget_word(p) (*(unsigned short *)(p)&0xFFFF)
+ #define mput_word(w,p) (*(unsigned short *)(p)=(unsigned short)(w))
+ #define mget_dword(p) (*(unsigned long *)(p))
+@@ -60,7 +60,7 @@
+ void unpack_mem(struct mempack *mempack);
+ void strip_lf(char *str);
+ char *ltrim(char *str);
+-#ifdef WORDS_BIGENDIAN
++#if defined(ALIGN_POINTERS) || defined(WORDS_BIGENDIAN)
+ unsigned int mget_word(char FAR *p);
+ unsigned long mget_dword(char FAR *p);
+ void mput_word(unsigned int w, char FAR *p);

Copied: arj/repos/community-x86_64/002_no_remove_static_const.patch (from rev 
101268, arj/trunk/002_no_remove_static_const.patch)
===================================================================
--- community-x86_64/002_no_remove_static_const.patch                           
(rev 0)
+++ community-x86_64/002_no_remove_static_const.patch   2013-11-21 12:18:33 UTC 
(rev 101269)
@@ -0,0 +1,20 @@
+#DPATCHLEVEL=1
+diff -Naur arj-3.10.22.orig/gnu/makefile.in arj-3.10.22/gnu/makefile.in
+--- arj-3.10.22.orig/gnu/makefile.in   2004-04-17 14:28:06.000000000 +0300
++++ arj-3.10.22/gnu/makefile.in        2005-08-04 21:50:24.000000000 +0300
+@@ -192,6 +192,15 @@
+ dispose:
+ 
+ #
++# XXX: Do not use -O2, it removes the static const variable with gcc 4.x
++#
++
++INTEGR_DIRS = $(ARJ_DIR) $(REARJ_DIR) $(ARJCRYPT_DIR) $(REGISTER_DIR)
++
++$(patsubst %,%/integr.o, $(INTEGR_DIRS)): $(SRC_DIR)/integr.c
++      $(CC) -Wall -g -c -o$@ $<
++
++#
+ # The tools
+ #
+ 

Copied: arj/repos/community-x86_64/003_64_bit_clean.patch (from rev 101268, 
arj/trunk/003_64_bit_clean.patch)
===================================================================
--- community-x86_64/003_64_bit_clean.patch                             (rev 0)
+++ community-x86_64/003_64_bit_clean.patch     2013-11-21 12:18:33 UTC (rev 
101269)
@@ -0,0 +1,194 @@
+#DPATCHLEVEL=1
+diff -Naur -x .svn -x CVS arj-3.10.22.orig/arj_arcv.c arj-3.10.22/arj_arcv.c
+--- arj-3.10.22.orig/arj_arcv.c        2005-06-21 22:53:12.000000000 +0300
++++ arj-3.10.22/arj_arcv.c     2005-11-24 02:50:31.000000000 +0200
+@@ -59,27 +59,27 @@
+ #define setup_hput(ptr) (tmp_hptr=(ptr))
+ 
+ #define hget_byte() (*(tmp_hptr++)&0xFF)
+-#define hput_byte(c) (*(tmp_hptr++)=(char) (c))
++#define hput_byte(c) (*(tmp_hptr++)=(uint8_t) (c))
+ 
+ /* Reads two bytes from the header, incrementing the pointer */
+ 
+-static unsigned int hget_word()
++static uint16_t hget_word()
+ {
+- unsigned int result;
++ uint16_t result;
+ 
+  result=mget_word(tmp_hptr);
+- tmp_hptr+=sizeof(short);
++ tmp_hptr+=sizeof(uint16_t);
+  return result;
+ }
+ 
+ /* Reads four bytes from the header, incrementing the pointer */
+ 
+-static unsigned long hget_longword()
++static uint32_t hget_longword()
+ {
+- unsigned long result;
++ uint32_t result;
+ 
+  result=mget_dword(tmp_hptr);
+- tmp_hptr+=sizeof(unsigned long);
++ tmp_hptr+=sizeof(uint32_t);
+  return result;
+ }
+ 
+@@ -87,18 +87,18 @@
+ 
+ /* Writes two bytes to the header, incrementing the pointer */
+ 
+-static void hput_word(unsigned int w)
++static void hput_word(uint16_t w)
+ {
+  mput_word(w,tmp_hptr); 
+- tmp_hptr+=sizeof(unsigned short);
++ tmp_hptr+=sizeof(uint16_t);
+ }
+ 
+ /* Writes four bytes to the header, incrementing the pointer */
+ 
+-static void hput_longword(unsigned long l)
++static void hput_longword(uint32_t l)
+ {
+  mput_dword(l,tmp_hptr);
+- tmp_hptr+=sizeof(unsigned long);
++ tmp_hptr+=sizeof(uint32_t);
+ }
+ 
+ /* Calculates and stores the basic header size */
+diff -Naur -x .svn -x CVS arj-3.10.22.orig/arj_proc.c arj-3.10.22/arj_proc.c
+--- arj-3.10.22.orig/arj_proc.c        2005-11-24 02:50:19.000000000 +0200
++++ arj-3.10.22/arj_proc.c     2005-11-24 02:50:31.000000000 +0200
+@@ -585,7 +585,7 @@
+ /* Returns the exact amount of data that could be safely written to the
+    destination volume */
+ 
+-unsigned long get_volfree(unsigned int increment)
++unsigned long get_volfree(unsigned long increment)
+ {
+  unsigned long pvol;
+  unsigned int arjsec_overhead;
+@@ -605,7 +605,7 @@
+  remain=volume_limit-ftell(aostream)-pvol-(long)arjsec_overhead-
+         (long)out_bytes-(long)cpos-(long)ext_voldata-
+         MULTIVOLUME_RESERVE-t_volume_offset;
+- return((unsigned long)min(remain, (unsigned long)increment));
++ return((unsigned long)min(remain, increment));
+ }
+ 
+ /* Performs various checks when multivolume data is packed to predict an
+@@ -2466,14 +2466,14 @@
+     *tsptr='\0';
+   endptr=tsptr;
+   tsptr=sptr;
+-  while((unsigned int)tsptr<(unsigned int)endptr&&patterns<SEARCH_STR_MAX)
++  while((intptr_t)tsptr<(intptr_t)endptr&&patterns<SEARCH_STR_MAX)
+   {
+    while(*tsptr=='\0')
+     tsptr++;
+-   if((unsigned int)tsptr<(unsigned int)endptr)
++   if((intptr_t)tsptr<(intptr_t)endptr)
+    {
+     search_str[patterns++]=tsptr;
+-    while(*tsptr!='\0'&&(unsigned int)tsptr<(unsigned int)endptr)
++    while(*tsptr!='\0'&&(intptr_t)tsptr<(intptr_t)endptr)
+      tsptr++;
+    }
+   }
+@@ -2901,9 +2901,9 @@
+ #if (defined(WORDS_BIGENDIAN) || defined(ALIGN_POINTERS)) && 
!defined(ARJDISP) && !defined(REGISTER)
+ /* Model-independent routine to get 2 bytes from far RAM */
+ 
+-unsigned int mget_word(char FAR *p)
++uint16_t mget_word(char FAR *p)
+ {
+- unsigned int b0, b1;
++ uint16_t b0, b1;
+ 
+  b0=mget_byte(p);
+  b1=mget_byte(p+1);
+@@ -2912,9 +2912,9 @@
+ 
+ /* Model-independent routine to get 4 bytes from far RAM */
+ 
+-unsigned long mget_dword(char FAR *p)
++uint32_t mget_dword(char FAR *p)
+ {
+- unsigned long w0, w1;
++ uint32_t w0, w1;
+ 
+  w0=mget_word(p);
+  w1=mget_word(p+2);
+@@ -2923,7 +2923,7 @@
+ 
+ /* Model-independent routine to store 2 bytes in far RAM */
+ 
+-void mput_word(unsigned int w, char FAR *p)
++void mput_word(uint16_t w, char FAR *p)
+ {
+  mput_byte(w&0xFF, p);
+  mput_byte(w>>8  , p+1);
+@@ -2931,7 +2931,7 @@
+ 
+ /* Model-independent routine to store 4 bytes in far RAM */
+ 
+-void mput_dword(unsigned long d, char FAR *p)
++void mput_dword(uint32_t d, char FAR *p)
+ {
+  mput_word(d&0xFFFF, p);
+  mput_word(d>>16   , p+2);
+diff -Naur -x .svn -x CVS arj-3.10.22.orig/arj_proc.h arj-3.10.22/arj_proc.h
+--- arj-3.10.22.orig/arj_proc.h        2005-11-24 02:50:19.000000000 +0200
++++ arj-3.10.22/arj_proc.h     2005-11-24 03:17:25.000000000 +0200
+@@ -8,15 +8,17 @@
+ #ifndef ARJ_PROC_INCLUDED
+ #define ARJ_PROC_INCLUDED
+ 
++#include <stdint.h>
++
+ /* Helper macros */
+ 
+-#define mget_byte(p) (*(unsigned char FAR *)(p)&0xFF)
+-#define mput_byte(c, p) *(unsigned char FAR *)(p)=(unsigned char)(c)
++#define mget_byte(p) (*(uint8_t FAR *)(p)&0xFF)
++#define mput_byte(c, p) *(uint8_t FAR *)(p)=(uint8_t)(c)
+ #if !defined(ALIGN_POINTERS) && !defined(WORDS_BIGENDIAN)
+-#define mget_word(p) (*(unsigned short *)(p)&0xFFFF)
+-#define mput_word(w,p) (*(unsigned short *)(p)=(unsigned short)(w))
+-#define mget_dword(p) (*(unsigned long *)(p))
+-#define mput_dword(w,p) (*(unsigned long *)(p)=(unsigned long)(w))
++#define mget_word(p) (*(uint16_t *)(p)&0xFFFF)
++#define mput_word(w,p) (*(uint16_t *)(p)=(uint16_t)(w))
++#define mget_dword(p) (*(uint32_t *)(p))
++#define mput_dword(w,p) (*(uint32_t *)(p)=(uint32_t)(w))
+ #endif
+ 
+ /* Prototypes */
+@@ -31,7 +33,7 @@
+ int translate_path(char *name);
+ void restart_proc(char *dest);
+ int search_for_extension(char *name, char *ext_list);
+-unsigned long get_volfree(unsigned int increment);
++unsigned long get_volfree(unsigned long increment);
+ unsigned int check_multivolume(unsigned int increment);
+ void store();
+ void hollow_encode();
+@@ -61,10 +63,10 @@
+ void strip_lf(char *str);
+ char *ltrim(char *str);
+ #if defined(ALIGN_POINTERS) || defined(WORDS_BIGENDIAN)
+-unsigned int mget_word(char FAR *p);
+-unsigned long mget_dword(char FAR *p);
+-void mput_word(unsigned int w, char FAR *p);
+-void mput_dword(unsigned long d, char FAR *p);
++uint16_t mget_word(char FAR *p);
++uint32_t mget_dword(char FAR *p);
++void mput_word(uint16_t w, char FAR *p);
++void mput_dword(uint32_t d, char FAR *p);
+ #endif
+ 
+ #endif

Copied: arj/repos/community-x86_64/PKGBUILD (from rev 101268, 
arj/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD                           (rev 0)
+++ community-x86_64/PKGBUILD   2013-11-21 12:18:33 UTC (rev 101269)
@@ -0,0 +1,53 @@
+# $Id$
+# Maintainer:
+# Contributor: Travis Willard <trav...@wmpub.ca>
+# Contributor: Gergely Tamas <d...@mfa.kfki.hu>
+
+pkgname=arj
+pkgver=3.10.22
+pkgrel=8
+pkgdesc="Free and portable clone of the ARJ archiver"
+url="http://arj.sourceforge.net/";
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('glibc')
+options=('!makeflags')
+source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz";
+        001_arches_align.patch
+        002_no_remove_static_const.patch
+        003_64_bit_clean.patch
+        arj-3.10.22-custom-printf.patch)
+md5sums=('f263bf3cf6d42a8b7e85b4fb514336d3'
+         '550bc972d825036f17f202a2b11b35c2'
+         '395dfa8cc500ffae648777f8f241be88'
+         '56b3cf96ec485b0d824761457417fcc0'
+         '4630a7254dfc6c8d8c7e696aa4a58f4a')
+
+prepare() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  # Add gentoo patches
+  patch -p1 -i "${srcdir}/001_arches_align.patch"
+  patch -p1 -i "${srcdir}/002_no_remove_static_const.patch"
+  patch -p1 -i "${srcdir}/003_64_bit_clean.patch"
+  patch -p1 -i "${srcdir}/arj-3.10.22-custom-printf.patch"
+
+  cd gnu
+  aclocal
+  autoconf
+  rm -f config.{guess,sub}
+  cp /usr/share/automake-1.14/config.{guess,sub} .
+}
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}/gnu"
+  ./configure --prefix=/usr
+  cd ..
+  make prepare
+  make
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  make DESTDIR="${pkgdir}" install
+}

Copied: arj/repos/community-x86_64/arj-3.10.22-custom-printf.patch (from rev 
101268, arj/trunk/arj-3.10.22-custom-printf.patch)
===================================================================
--- community-x86_64/arj-3.10.22-custom-printf.patch                            
(rev 0)
+++ community-x86_64/arj-3.10.22-custom-printf.patch    2013-11-21 12:18:33 UTC 
(rev 101269)
@@ -0,0 +1,15 @@
+Patch by Lubomir Rintel <lkund...@v3.sk> for arj >= 3.10.22, which disables
+the custom printf to avoid conflicting strnlen definition with the glibc
+headers. By using custom printf (as in the past), we're completely loosing
+all the _FORTIFY_SOURCE printf protections.
+
+--- arj-3.10.22/fardata.c              2004-04-17 13:39:42.000000000 +0200
++++ arj-3.10.22/fardata.c.printf       2009-04-18 16:23:52.000000000 +0200
+@@ -13,7 +13,6 @@
+ /* ASR fix 02/05/2003: need that regardless of COLOR_OUTPUT to support -jp
+    correctly */
+ #if SFX_LEVEL>=ARJ
+- #define CUSTOM_PRINTF
+  #define CHUNK_SIZE               512    /* Size of the output block */
+  #define CHUNK_THRESHOLD (CHUNK_SIZE-256) /* Safety bound */
+ #endif

Reply via email to