[SM-Commit] GIT changes to master grimoire by Pol Vinogradov (21bc05c77c8d4f2b6768761b85596756d2fceb01)

Pol Vinogradov scm at mail.sourcemage.org
Tue Dec 19 07:02:59 EST 2006


GIT changes to master grimoire by Pol Vinogradov <vin.public at gmail.com>:

 devel/refal5/DETAILS             |    1 
 devel/refal5/HISTORY             |    6 ++++
 devel/refal5/PRE_BUILD           |    3 ++
 devel/refal5/refal5-config.patch |   47 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 57 insertions(+)

New commits:
commit fbaa3520f9eb22c9da8acf511f3f84f517a6bf35
Author: Pol Vinogradov <vin.public at gmail.com>
Commit: Pol Vinogradov <vin.public at gmail.com>

    DETAILS: PATCHLEVEL++
    PRE_BUILD, refal5-config.patch: added patch for better handling of
    config files (found old patch in ALT Linux srpm here:
    http://sisyphus.ru/srpm/Refal-5/patches/0)

diff --git a/devel/refal5/DETAILS b/devel/refal5/DETAILS
index a91a967..37ff9c8 100755
--- a/devel/refal5/DETAILS
+++ b/devel/refal5/DETAILS
@@ -7,6 +7,7 @@ SOURCE_DIRECTORY=${BUILD_DIRECTORY}/${SP
         WEB_SITE=http://refal.org/
       LICENSE[0]=UNKNOWN
          ENTERED=20061218
+      PATCHLEVEL=1
         KEYWORDS="devel"
             DOCS="bf.txt copyright.txt news.txt readme.txt README"
            SHORT="REFAL is a REcursive Functions ALgorithmic programming language"
diff --git a/devel/refal5/HISTORY b/devel/refal5/HISTORY
index d0d6cfc..9aca8c6 100644
--- a/devel/refal5/HISTORY
+++ b/devel/refal5/HISTORY
@@ -1,2 +1,8 @@
+2006-12-19 Pol Vinogradov <vin.public at gmail.com>
+	* DETAILS: PATCHLEVEL++
+	* PRE_BUILD, refal5-config.patch: added patch for better handling of
+	  config files (found old patch in ALT Linux srpm here:
+	  http://sisyphus.ru/srpm/Refal-5/patches/0)
+
 2006-12-18 Pol Vinogradov <vin.public at gmail.com>
 	* DEPENDS, DETAILS, BUILD, INSTALL, PRE_BUILD: created spell
diff --git a/devel/refal5/PRE_BUILD b/devel/refal5/PRE_BUILD
index 546bd5d..d32c55a 100755
--- a/devel/refal5/PRE_BUILD
+++ b/devel/refal5/PRE_BUILD
@@ -2,10 +2,13 @@ mk_source_dir  ${SOURCE_DIRECTORY}  &&
 cd             ${SOURCE_DIRECTORY}  &&
 unpack_file  ''                     &&
 
+patch -p0 < ${SCRIPT_DIRECTORY}/${SPELL}-config.patch  &&
+
 cp makefile.lin makefile            &&
 
 rm -f *.rsl                         &&
 
+sedit "s:/etc/refal5.cfg:${TRACK_ROOT}/etc/${SPELL}.cfg:" load.c  &&
 sedit "s:-L./linux/:${LDFLAGS}:" makefile  &&
 sedit "s:-c:${CFLAGS} -c:" makefile        &&
 sedit "s:REF5RSL=.*:REF5RSL=${TRACK_ROOT}/usr/share/${SPELL}:" ${SPELL}.cf_
diff --git a/devel/refal5/refal5-config.patch b/devel/refal5/refal5-config.patch
new file mode 100644
index 0000000..b743be3
--- /dev/null
+++ b/devel/refal5/refal5-config.patch
@@ -0,0 +1,47 @@
+--- load.c.orig	2004-10-28 21:34:46.000000000 +0500
++++ load.c	2006-12-19 03:27:04.000000000 +0500
+@@ -1175,6 +1175,36 @@
+ 	if (NULL != (fp = fopen ("refal5.cfg", "rt"))) {
+ 		return fp;
+ 	}
++#ifdef FOR_OS_LINUX
++
++       if (NULL != (cp_path = getenv ("HOME"))) {
++
++               sprintf (ca_dir, "%s%s", cp_path, "/.refal5rc");
++
++               if (0 == stat (ca_dir, & st_buf)) {
++
++                       if (NULL == (fp = fopen (ca_dir, "rt"))) {
++
++                               fprintf (stderr, "Found config file, but it cannot open it!?\n");
++
++                       }
++
++                       return fp;
++
++               }
++
++       }
++
++       if (NULL != (fp = fopen ("/etc/refal5.cfg", "rt"))) {
++
++               return fp;
++
++       }
++
++#endif
++
++#if 0
++
+ 	/* No in a current directory */
+ 	if (NULL == (cp_path = getenv ("PATH"))) {
+ 		fprintf (stderr, "No global variable PATH, but there isn't config file in the current directory\n");
+@@ -1233,6 +1263,7 @@
+ 			return fp;
+ 		}
+ 	}
++#endif
+ 	return NULL;
+ }
+ 



More information about the SM-Commit mailing list