public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in games-emulation/hatari/files: hatari-1.7.0-gentoo-docdir.patch hatari-1.7.0-gentoo.patch
@ 2015-01-27  7:11 Michael Sterrett (mr_bones_)
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Sterrett (mr_bones_) @ 2015-01-27  7:11 UTC (permalink / raw
  To: gentoo-commits

mr_bones_    15/01/27 07:11:18

  Removed:              hatari-1.7.0-gentoo-docdir.patch
                        hatari-1.7.0-gentoo.patch
  Log:
  old
  
  (Portage version: 2.2.14/cvs/Linux x86_64, unsigned Manifest commit)


^ permalink raw reply	[flat|nested] 2+ messages in thread
* [gentoo-commits] gentoo-x86 commit in games-emulation/hatari/files: hatari-1.7.0-gentoo-docdir.patch hatari-1.7.0-gentoo.patch
@ 2014-07-16  2:48 Michael Sterrett (mr_bones_)
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Sterrett (mr_bones_) @ 2014-07-16  2:48 UTC (permalink / raw
  To: gentoo-commits

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); */
 }





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-01-27  7:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-27  7:11 [gentoo-commits] gentoo-x86 commit in games-emulation/hatari/files: hatari-1.7.0-gentoo-docdir.patch hatari-1.7.0-gentoo.patch Michael Sterrett (mr_bones_)
  -- strict thread matches above, loose matches on Subject: below --
2014-07-16  2:48 Michael Sterrett (mr_bones_)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox