From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id A600113877A for ; Wed, 16 Jul 2014 02:48:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3934EE08A6; Wed, 16 Jul 2014 02:48:33 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9EF4FE08A6 for ; Wed, 16 Jul 2014 02:48:32 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1548833F87D for ; Wed, 16 Jul 2014 02:48:31 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 665) id BB7502004F; Wed, 16 Jul 2014 02:48:29 +0000 (UTC) From: "Michael Sterrett (mr_bones_)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, mr_bones_@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in games-emulation/hatari/files: hatari-1.7.0-gentoo-docdir.patch hatari-1.7.0-gentoo.patch X-VCS-Repository: gentoo-x86 X-VCS-Files: hatari-1.7.0-gentoo-docdir.patch hatari-1.7.0-gentoo.patch X-VCS-Directories: games-emulation/hatari/files X-VCS-Committer: mr_bones_ X-VCS-Committer-Name: Michael Sterrett Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Message-Id: <20140716024829.BB7502004F@flycatcher.gentoo.org> Date: Wed, 16 Jul 2014 02:48:29 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 9336f42e-0e76-4a43-a6cc-258849bf56f5 X-Archives-Hash: c01cd02e45e17b6ca7ab9f171fe6c70a mr_bones_ 14/07/16 02:48:29 Added: hatari-1.7.0-gentoo-docdir.patch hatari-1.7.0-gentoo.patch Log: version bump (Portage version: 2.2.8-r1/cvs/Linux x86_64, unsigned Manifest commit) Revision Changes Path 1.1 games-emulation/hatari/files/hatari-1.7.0-gentoo-docdir.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-emulation/hatari/files/hatari-1.7.0-gentoo-docdir.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-emulation/hatari/files/hatari-1.7.0-gentoo-docdir.patch?rev=1.1&content-type=text/plain Index: hatari-1.7.0-gentoo-docdir.patch =================================================================== --- hatari-1.6.1/python-ui/uihelpers.py +++ hatari-1.6.1/python-ui/uihelpers.py @@ -97,9 +97,7 @@ # first try whether there are local Hatari docs in standard place # for this Hatari/UI version sep = os.sep - path = self.get_binary_path("hatari") - path = sep.join(path.split(sep)[:-2]) # remove "bin/hatari" - path = path + sep + "share" + sep + "doc" + sep + "hatari" + sep + path = "@DOCDIR@" if os.path.exists(path + "manual.html"): return path # if not, point to latest Hatari HG version docs 1.1 games-emulation/hatari/files/hatari-1.7.0-gentoo.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-emulation/hatari/files/hatari-1.7.0-gentoo.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-emulation/hatari/files/hatari-1.7.0-gentoo.patch?rev=1.1&content-type=text/plain Index: hatari-1.7.0-gentoo.patch =================================================================== --- hatari-1.4.0.orig/src/paths.c +++ hatari-1.4.0/src/paths.c @@ -109,71 +109,6 @@ free(pTmpName); } - -/** - * Locate the directory where the hatari executable resides - */ -static char *Paths_InitExecDir(const char *argv0) -{ - char *psExecDir; /* Path string where the hatari executable can be found */ - - /* Allocate memory for storing the path string of the executable */ - psExecDir = malloc(FILENAME_MAX); - if (!psExecDir) - { - fprintf(stderr, "Out of memory (Paths_Init)\n"); - exit(-1); - } - - /* Determine the bindir... - * Start with empty string, then try to use OS specific functions, - * and finally analyze the PATH variable if it has not been found yet. */ - psExecDir[0] = '\0'; - -#if defined(__linux__) - { - int i; - /* On Linux, we can analyze the symlink /proc/self/exe */ - i = readlink("/proc/self/exe", psExecDir, FILENAME_MAX); - if (i > 0) - { - char *p; - psExecDir[i] = '\0'; - p = strrchr(psExecDir, '/'); /* Search last slash */ - if (p) - *p = 0; /* Strip file name from path */ - } - } -//#elif defined(WIN32) || defined(__CEGCC__) -// /* On Windows we can use GetModuleFileName for getting the exe path */ -// GetModuleFileName(NULL, psExecDir, FILENAME_MAX); -#endif - - /* If we do not have the execdir yet, analyze argv[0] and the PATH: */ - if (psExecDir[0] == 0) - { - if (strchr(argv0, PATHSEP) == 0) - { - /* No separator in argv[0], we have to explore PATH... */ - Paths_GetExecDirFromPATH(argv0, psExecDir, FILENAME_MAX); - } - else - { - /* There was a path separator in argv[0], so let's assume a - * relative or absolute path to the current directory in argv[0] */ - char *p; - strncpy(psExecDir, argv0, FILENAME_MAX); - psExecDir[FILENAME_MAX-1] = 0; - p = strrchr(psExecDir, PATHSEP); /* Search last slash */ - if (p) - *p = 0; /* Strip file name from path */ - } - } - - return psExecDir; -} - - /** * Initialize the users home directory string * and Hatari's home directory (~/.hatari) @@ -226,8 +161,6 @@ */ void Paths_Init(const char *argv0) { - char *psExecDir; /* Path string where the hatari executable can be found */ - /* Init working directory string */ if (getcwd(sWorkingDir, FILENAME_MAX) == NULL) { @@ -238,27 +171,11 @@ /* Init the user's home directory string */ Paths_InitHomeDirs(); - /* Get the directory where the executable resides */ - psExecDir = Paths_InitExecDir(argv0); - - /* Now create the datadir path name from the bindir path name: */ - if (psExecDir && strlen(psExecDir) > 0) - { - snprintf(sDataDir, sizeof(sDataDir), "%s%c%s", - psExecDir, PATHSEP, BIN2DATADIR); - } - else - { - /* bindir could not be determined, let's assume datadir is relative - * to current working directory... */ - strcpy(sDataDir, BIN2DATADIR); - } + strcpy(sDataDir, BIN2DATADIR); /* And finally make a proper absolute path out of datadir: */ File_MakeAbsoluteName(sDataDir); - free(psExecDir); - /* fprintf(stderr, " WorkingDir = %s\n DataDir = %s\n UserHomeDir = %s\n HatariHomeDir = %s\n", sWorkingDir, sDataDir, sUserHomeDir, sHatariHomeDir); */ }