[arch-commits] Commit in memprof/trunk (PKGBUILD binutils.patch memprof.install)

Eric Bélanger eric at archlinux.org
Tue Jul 6 02:32:40 EDT 2010


    Date: Tuesday, July 6, 2010 @ 02:32:40
  Author: eric
Revision: 84994

upgpkg: memprof 0.6.2-1
Upstream update, Cleaned up PKGBUILD, Updated install scriptlet, Removed old patch

Modified:
  memprof/trunk/PKGBUILD
  memprof/trunk/memprof.install
Deleted:
  memprof/trunk/binutils.patch

-----------------+
 PKGBUILD        |   37 +++++++++++++++----------------
 binutils.patch  |   63 ------------------------------------------------------
 memprof.install |   19 +---------------
 3 files changed, 20 insertions(+), 99 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-07-06 05:32:54 UTC (rev 84993)
+++ PKGBUILD	2010-07-06 06:32:40 UTC (rev 84994)
@@ -3,32 +3,31 @@
 # Contributor: Aurelien Foret <orelien at chez.com>
 
 pkgname=memprof
-pkgver=0.6
-pkgrel=3
+pkgver=0.6.2
+pkgrel=1
 pkgdesc="A tool for profiling memory usage and finding memory leaks"
-arch=(i686 x86_64)
+arch=('i686')
 url="http://www.secretlabs.de/projects/memprof/"
-depends=('libgnomeui>=2.18.1-2' 'perlxml')
-makedepends=('pkgconfig')
 license=('GPL')
-source=(http://ftp.gnome.org/pub/GNOME/sources/memprof/0.6/${pkgname}-${pkgver}.tar.gz
-        binutils.patch)
-install=memprof.install
+depends=('libgnomeui')
+makedepends=('pkg-config' 'perl-xml-parser' 'intltool')
 options=('!libtool')
-md5sums=('3fa53d937e1e703c1b2d4cec0c6c9645' 'bb554fb98897f47f8390cd24a752c0e5')
+install=memprof.install
+source=(http://ftp.gnome.org/pub/GNOME/sources/memprof/0.6/${pkgname}-${pkgver}.tar.gz)
+md5sums=('48b549139a06bd1bf89374a19890f087')
+sha1sums=('580feffc62cfe700d1b25667d4364df5c348f859')
 
 build() {
-  cd ${startdir}/src/${pkgname}-${pkgver}
-  [ "$CARCH" = "x86_64" ] && (patch -Np0 -i ${startdir}/src/binutils.patch || return 1)
-
+  cd "${srcdir}/${pkgname}-${pkgver}"
   ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --disable-static
-  # fix this just in the Makefile for now... memprof bugzilla knows about it
-  sed -i "s|cd \$(bindir)|cd \$(DESTDIR)\$(bindir)|" Makefile
+  make
+}
 
-  make || return 1
-  make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR=${startdir}/pkg install
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install
    
-  mkdir -p ${startdir}/pkg/usr/share/gconf/schemas
-  gconf-merge-schema ${startdir}/pkg/usr/share/gconf/schemas/${pkgname}.schemas ${startdir}/pkg/etc/gconf/schemas/*.schemas
-  rm -f ${startdir}/pkg/etc/gconf/schemas/*.schemas
+  install -d "${pkgdir}/usr/share/gconf/schemas"
+  gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" "${pkgdir}"/etc/gconf/schemas/*.schemas
+  rm -f "${pkgdir}"/etc/gconf/schemas/*.schemas
 }

Deleted: binutils.patch
===================================================================
--- binutils.patch	2010-07-06 05:32:54 UTC (rev 84993)
+++ binutils.patch	2010-07-06 06:32:40 UTC (rev 84994)
@@ -1,63 +0,0 @@
---- ./memintercept-utils.c-	2005-02-17 16:59:56.000000000 -0500
-+++ ./memintercept-utils.c	2005-07-11 10:02:08.000000000 -0400
-@@ -30,6 +30,12 @@
- 
- #include "memintercept-utils.h"
- 
-+/* include atomic operations macros from glibc */
-+#ifndef __KERNEL__
-+#define __KERNEL__
-+#endif
-+#include <asm/atomic.h>
-+
- static int
- write_all (int         fd,
- 	   const void *buf,
-@@ -264,30 +270,22 @@
- uint32_t
- mi_atomic_increment(uint32_t *addr)
- {
--#if defined (__GNUC__) && defined (__i386__)
--	uint32_t result;
--	__asm__ __volatile__("lock; xaddl %0, %1; incl %0"
--			     : "=r"(result), "=m"(*(addr))
--			     : "0" (1), "m"(*(addr)) : "memory");
--	return result;
-+#if defined (__GNUC__)
-+	return((uint32_t)atomic_inc_return((atomic_t *)addr));
- #else
- 	/* Hope for the best */
--	return *++p;
-+	return *++addr;
- #endif
- }
- 
- uint32_t
- mi_atomic_decrement(uint32_t *addr)
- {
--#if defined (__GNUC__) && defined (__i386__)
--	uint32_t result;
--	__asm__ __volatile__("lock; xaddl %0, %1; decl %0"
--			     : "=r"(result), "=m"(*(addr))
--			     : "0" (-1), "m"(*(addr)) : "memory");
--	return result;
-+#if defined (__GNUC__)
-+	return((uint32_t)atomic_dec_return((atomic_t *)addr));
- #else
- 	/* Hope for the best */
--	return *--p;
-+	return *--addr;
- #endif
- }
- 
---- ./stack-frame.c-	2005-02-17 17:02:22.000000000 -0500
-+++ ./stack-frame.c	2005-02-17 17:02:37.000000000 -0500
-@@ -69,7 +69,7 @@
- 
- #define HAVE_FRAME_ACCESSORS
- 
--#if defined (__GNUC__) && defined (__i386__)
-+#if defined (__GNUC__) 
- typedef struct stack_frame_struct stack_frame;
- struct stack_frame_struct {
-     stack_frame *next;

Modified: memprof.install
===================================================================
--- memprof.install	2010-07-06 05:32:54 UTC (rev 84993)
+++ memprof.install	2010-07-06 06:32:40 UTC (rev 84994)
@@ -1,8 +1,7 @@
 pkgname=memprof
 
 post_install() {
-  export GCONF_CONFIG_SOURCE=`usr/bin/gconftool-2 --get-default-source`
-  usr/bin/gconftool-2 --makefile-install-rule usr/share/gconf/schemas/${pkgname}.schemas >/dev/null
+  usr/sbin/gconfpkg --install ${pkgname}
 }
 
 pre_upgrade() {
@@ -14,19 +13,5 @@
 }
 
 pre_remove() {
-  if [ -f usr/share/gconf/schemas/${pkgname}.schemas ]; then
-    schemas=(usr/share/gconf/schemas/${pkgname}.schemas)
-  elif [ -f opt/gnome/share/gconf/schemas/${pkgname}.schemas ]; then
-    schemas=(opt/gnome/share/gconf/schemas/${pkgname}.schemas)
-  else
-    schemas=(`pacman -Ql $pkgname | grep 'gconf/schemas/.*schemas$' | awk '{ print $2 }'`)
-  fi
-  export GCONF_CONFIG_SOURCE=`usr/bin/gconftool-2 --get-default-source`
-  
-  usr/bin/gconftool-2 --makefile-uninstall-rule ${schemas[@]} >/dev/null
+ usr/sbin/gconfpkg --uninstall ${pkgname}
 }
-
-op=$1
-shift
-
-$op $*



More information about the arch-commits mailing list