[arch-commits] Commit in indent/trunk (3 files)

Eric Bélanger eric at archlinux.org
Mon Jun 13 05:26:28 UTC 2011


    Date: Monday, June 13, 2011 @ 01:26:28
  Author: eric
Revision: 127328

upgpkg: indent 2.2.11-1
Upstream update, Improved description, Removed texinfo depends, Added texi2html makedepends, Added patch to fix seg fault, PKGBUILD cleanup

Added:
  indent/trunk/indent-2.2.11-segfault.patch
Modified:
  indent/trunk/PKGBUILD
  indent/trunk/indent.install

------------------------------+
 PKGBUILD                     |   34 ++++++++++++++++++----------------
 indent-2.2.11-segfault.patch |   16 ++++++++++++++++
 indent.install               |    4 +++-
 3 files changed, 37 insertions(+), 17 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-06-13 04:12:18 UTC (rev 127327)
+++ PKGBUILD	2011-06-13 05:26:28 UTC (rev 127328)
@@ -4,28 +4,30 @@
 # Contributor: Herb Rose (hrose56 at yahoo.com)
 
 pkgname=indent
-pkgver=2.2.10
-pkgrel=4
-pkgdesc="The GNU Pretty-printer"
+pkgver=2.2.11
+pkgrel=1
+pkgdesc="A tool to change the appearance of a C program by inserting or deleting whitespace"
 arch=('i686' 'x86_64')
 url="http://indent.isidore-it.eu/beautify.html"
-depends=('glibc' 'texinfo')
+depends=('glibc')
+makedepends=('texi2html')
 license=('GPL3')
 install=indent.install
-source=(http://indent.isidore-it.eu/$pkgname-$pkgver.tar.gz)
-md5sums=('be35ea62705733859fbf8caf816d8959')
-sha1sums=('20fa8a7a4af6670c3254c8b87020291c3db37ed1')
+source=(http://indent.isidore-it.eu/$pkgname-$pkgver.tar.gz indent-2.2.11-segfault.patch)
+md5sums=('98beafca62472805a3739d3867d5d70f'
+         'e5ded8513547ff4555dec2bb805dd2ab')
+sha1sums=('9b242528bbc4914464117c69ffae9df24d3fa4a7'
+          '31a6dcd5edcac4decac81dbb52bc9415b8b148e4')
 
 build() {
   cd "$srcdir/$pkgname-$pkgver"
-  # Fix doc install path
-  sed -i 's|^docdir = .*$|docdir = @docdir@|' doc/Makefile.in || return 1
-  
-  # Fix manpage installation
-  sed -i 's|\(info texinfo2man\)\.c  Makefile\.am|\1|' man/Makefile.in || return 1
-  rm man/indent.1
+  patch -p1 -i ../indent-2.2.11-segfault.patch
+  sed -i 's/-number/-number-sections/' doc/Makefile.in
+  ./configure --prefix=/usr
+  make
+}
 
-  ./configure --prefix=/usr --datadir=/usr/share --docdir=/usr/share/doc/indent || return 1
-  make || return 1
-  make DESTDIR="$pkgdir" install || return 1
+package() {
+  cd "$srcdir/$pkgname-$pkgver"
+  make DESTDIR="$pkgdir" docdir=/usr/share/doc/indent install
 }

Added: indent-2.2.11-segfault.patch
===================================================================
--- indent-2.2.11-segfault.patch	                        (rev 0)
+++ indent-2.2.11-segfault.patch	2011-06-13 05:26:28 UTC (rev 127328)
@@ -0,0 +1,16 @@
+--- a/man/texinfo2man.c
++++ b/man/texinfo2man.c
+@@ -287,6 +287,13 @@
+    char buf[1024];
+    int line_no = 0;
+ 
++   if (argc != 3)
++   {
++      fprintf(stderr, "Usage: %s <man template> <info file>\n", argv[0]);
++      fprintf(stderr, "  The man page will be written to stdout.\n");
++      return -1;
++   }
++
+    texinfoname = argv[2];
+ 
+    in = fopen (argv[2], "r");

Modified: indent.install
===================================================================
--- indent.install	2011-06-13 04:12:18 UTC (rev 127327)
+++ indent.install	2011-06-13 05:26:28 UTC (rev 127328)
@@ -1,7 +1,8 @@
-info_dir=/usr/share/info
+info_dir=usr/share/info
 info_file=indent.info.gz
 
 post_install() {
+    [ -x usr/bin/install-info ] || return 0
     install-info ${info_dir}/$info_file ${info_dir}/dir 2> /dev/null
 }
 
@@ -10,5 +11,6 @@
 }
 
 pre_remove() {
+    [ -x usr/bin/install-info ] || return 0
     install-info --delete ${info_dir}/$info_file ${info_dir}/dir 2> /dev/null
 }




More information about the arch-commits mailing list