summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2006-05-21 17:09:53 +0000
committerjoerg <joerg@pkgsrc.org>2006-05-21 17:09:53 +0000
commit36d6f5641a3c28b58017f38a7912e4a8f623c0e3 (patch)
tree96ec89662dba25d21b5f9e81ec36c96d484fc3cd /emulators
parent498ca1f48ab2d4fb37fc36201bf9d506ef6b6107 (diff)
downloadpkgsrc-36d6f5641a3c28b58017f38a7912e4a8f623c0e3.tar.gz
Fix stupid gentenv-linuxism: don't assume it is malloced.
From Rumko in #dragonflybsd. Bump revision.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/zsnes/Makefile4
-rw-r--r--emulators/zsnes/distinfo3
-rw-r--r--emulators/zsnes/patches/patch-af23
3 files changed, 27 insertions, 3 deletions
diff --git a/emulators/zsnes/Makefile b/emulators/zsnes/Makefile
index 9f515acfad5..090559af2bd 100644
--- a/emulators/zsnes/Makefile
+++ b/emulators/zsnes/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.33 2006/05/15 19:59:16 joerg Exp $
+# $NetBSD: Makefile,v 1.34 2006/05/21 17:09:53 joerg Exp $
#
DISTNAME= zsnes142src
PKGNAME= zsnes-1.42
-PKGREVISION= 4
+PKGREVISION= 5
CATEGORIES= emulators
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=zsnes/}
diff --git a/emulators/zsnes/distinfo b/emulators/zsnes/distinfo
index 5bc1814596c..56d7313c4bb 100644
--- a/emulators/zsnes/distinfo
+++ b/emulators/zsnes/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2006/03/28 18:06:10 joerg Exp $
+$NetBSD: distinfo,v 1.9 2006/05/21 17:09:53 joerg Exp $
SHA1 (zsnes142src.tar.gz) = d38ca8c1b4168edc5bb5815f504b52654100bc4b
RMD160 (zsnes142src.tar.gz) = d794c69e876265715e141c26ecb6ed1802ffc27d
@@ -8,3 +8,4 @@ SHA1 (patch-ab) = fdcec7ca532199189821bb89ea9baaa3908bd449
SHA1 (patch-ac) = 76e640aec3816eb4cbbfbe0dff1fcd2fa52f7876
SHA1 (patch-ad) = 3c79a4c3ffe65151cd4d299b9837c6d20c8f8522
SHA1 (patch-ae) = 81236ed52fe7095f6317f655374234ce17cf30dd
+SHA1 (patch-af) = a0a4da051a7370671c17160bca91a12e630cdb6a
diff --git a/emulators/zsnes/patches/patch-af b/emulators/zsnes/patches/patch-af
new file mode 100644
index 00000000000..757dbcc3806
--- /dev/null
+++ b/emulators/zsnes/patches/patch-af
@@ -0,0 +1,23 @@
+$NetBSD: patch-af,v 1.1 2006/05/21 17:09:53 joerg Exp $
+
+--- linux/zfilew.c.orig 2005-01-14 14:11:19.000000000 +0100
++++ linux/zfilew.c
+@@ -471,14 +471,17 @@ void obtaindir()
+ {
+ char *homedir = 0;
+ DIR *tmp;
++ int getenvSuccess = 0;
+
+ if ((homedir = (char *)getenv("HOME")) == 0)
+ {
+ homedir = (char *)malloc(ZCFG_DIR_LEN);
+ getcwd(homedir, ZCFG_DIR_LEN);
++ getenvSuccess = 1;
+ }
+ strcpy(zcfgdir, homedir);
+- free(homedir);
++ if (getenvSuccess == 1)
++ free(homedir);
+ strcat(zcfgdir, ZCFG_DIR);
+ tmp = opendir(zcfgdir);
+ if (tmp == NULL)