rpms/Falcon/F-9 Falcon-0.8.10-prefix.patch, NONE, 1.1 Falcon-core-0810-r401.patch, NONE, 1.1 Falcon.spec, 1.3, 1.4

Michel Alexandre Salim (salimma) fedora-extras-commits at redhat.com
Mon Jun 9 22:10:20 UTC 2008


Author: salimma

Update of /cvs/pkgs/rpms/Falcon/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11808/F-9

Modified Files:
	Falcon.spec 
Added Files:
	Falcon-0.8.10-prefix.patch Falcon-core-0810-r401.patch 
Log Message:
Falcon-0.8.10-2: fixed build script errors


Falcon-0.8.10-prefix.patch:

--- NEW FILE Falcon-0.8.10-prefix.patch ---
--- Falcon-0.8.10/core/CMakeLists.txt.prefix	2008-06-06 08:34:39.000000000 -0400
+++ Falcon-0.8.10/core/CMakeLists.txt	2008-06-09 18:01:24.000000000 -0400
@@ -112,7 +112,7 @@
          SET(FALCON_FINAL_DESTINATION  "C:\\\\Program Files\\\\falcon" )
       ENDIF($ENV{PRGORAMS})
    ELSE(WIN32)
-      SET(FALCON_FINAL_DESTINATION  "/usr/local" )
+      SET(FALCON_FINAL_DESTINATION  "/usr" )
    ENDIF(WIN32)
 ENDIF("${FALCON_FINAL_DESTINATION}" STREQUAL "" )
 

Falcon-core-0810-r401.patch:

--- NEW FILE Falcon-core-0810-r401.patch ---
Index: devtools/falmod.cmake
===================================================================
--- devtools/falmod.cmake	(revision 0)
+++ devtools/falmod.cmake	(revision 401)
@@ -0,0 +1,73 @@
+####################################################################
+# @MAIN_PRJ@
+#
+# @PROJECT_NAME@ - Macros and utilities for Falcon modules
+####################################################################
+
+#Set the default buid type to Debug
+IF(NOT CMAKE_BUILD_TYPE)
+  SET(CMAKE_BUILD_TYPE Debug CACHE STRING
+      "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
+      FORCE)
+ENDIF(NOT CMAKE_BUILD_TYPE)
+
+
+#determine falcon installation and set inc/lib paths
+IF("$ENV{FALCON_INC_PATH}" STREQUAL "" )
+
+   MESSAGE( "Configuring FALCON using falcon-conf" )
+
+   EXEC_PROGRAM( falcon-conf
+         ARGS -i
+         OUTPUT_VARIABLE FALCON_INC_DIR )
+   MESSAGE( "Read INCLUDE=${FALCON_INC_DIR} from falcon conf" )
+
+   EXEC_PROGRAM( falcon-conf
+         ARGS --libs-only-L
+         OUTPUT_VARIABLE FALCON_LIB_DIR )
+
+   MESSAGE( "Read LIB=${FALCON_LIB_DIR} from falcon conf" )
+
+   EXEC_PROGRAM( falcon-conf
+         ARGS --moddir
+         OUTPUT_VARIABLE FALCON_MOD_INSTALL )
+   MESSAGE( "Read MOD=${FALCON_MOD_INSTALL} from falcon conf" )
+
+ELSE("$ENV{FALCON_INC_PATH}" STREQUAL "" )
+   #Usually, this variables are set in a correctly configured MS-WINDOWS
+   #or similar environment to obviate the need for FALCON-CONF
+   MESSAGE( "Configuring FALCON from environmental settings" )
+
+   IF ("$ENV{FALCON_ACTIVE_TREE}" STREQUAL "")
+      SET( FALCON_INC_DIR "$ENV{FALCON_INC_PATH}" )
+      SET( FALCON_LIB_DIR "$ENV{FALCON_LIB_PATH}" )
+      SET( FALCON_MOD_INSTALL "$ENV{FALCON_BIN_PATH}" )
+   ELSE ("$ENV{FALCON_ACTIVE_TREE}" STREQUAL "")
+      SET( FALCON_INC_DIR "$ENV{FALCON_ACTIVE_TREE}/include" )
+      SET( FALCON_LIB_DIR "$ENV{FALCON_ACTIVE_TREE}/lib" )
+      SET( FALCON_MOD_INSTALL "$ENV{FALCON_ACTIVE_TREE}/bin" )
+   ENDIF ("$ENV{FALCON_ACTIVE_TREE}" STREQUAL "")
+
+ENDIF("$ENV{FALCON_INC_PATH}" STREQUAL "" )
+
+MACRO(FALCON_CLEANUP tgt)
+   IF(FALCON_STRIP_TARGET)
+      INSTALL( CODE "EXECUTE_PROCESS( COMMAND stirp --strip-unneeded ${FALCON_MOD_INSTALL}/${tgt}.${CMAKE_SHARED_LIBRARY_SUFFIX} )" )
+   ENDIF(FALCON_STRIP_TARGET)
+ENDMACRO(FALCON_CLEANUP)
+
+
+MACRO(FALCON_LINK_MODULE tgt )
+   TARGET_LINK_LIBRARIES(${tgt} falcon_engine)
+   FALCON_INSTALL_MODULE( ${tgt} )
+ENDMACRO(FALCON_LINK_MODULE)
+
+MACRO(FALCON_INSTALL_MODULE tgt )
+   SET_TARGET_PROPERTIES(${tgt}
+      PROPERTIES PREFIX "")
+
+   #Install
+   INSTALL( TARGETS ${tgt}
+            DESTINATION ${FALCON_MOD_INSTALL} )
+   FALCON_CLEANUP( ${tgt} )
+ENDMACRO(FALCON_INSTALL_MODULE)
Index: devtools/fallc.fal
===================================================================
--- devtools/fallc.fal	(revision 0)
+++ devtools/fallc.fal	(revision 401)
@@ -0,0 +1,451 @@
+#!/usr/bin/falcon
+/***********************************************************
+* Falcon international translation compiler
+*
+* See LICENSE file for licensing details.
+************************************************************/
+
+directive version=0x010000, lang="en_US"
+load mxml
+load regex
+
+
+//=============================================
+// Little class for simpler regex
+//
+class XRegex( expr, pcount ) from Regex(expr)
+   pcount = pcount
+
+   function replaceAll( str, chg )
+      try
+         return Regex.replaceAll( str, chg )
+      catch RegexError
+         > @i"fallc: Warning, cannot replace variables from $(str)"
+         return str
+      end
+   end
+
+   function grabAll( str )
+      s = self.pcount
+      try
+         return map( lambda part => str[part.first() + s : part.last()],
+               self.findAll( str )  )
+      catch RegexError
+         > @i"fallc: Warning, cannot grab variables from $(str)"
+         return []
+      end
+   end
+end
+
+reVars = XRegex( '\$([^+*/;:()|^!@#[\]\s?$-]+)', 1 )
+reParVars = XRegex( '\$\(([^+*/;:()|^!@#?$-]+)', 2 )
+reMover = XRegex( '\s+' )
+
+object Options from CmdlineParser
+   output = nil
+   inputs = []
+   globs = []
+   checkvars = true
+   merge = nil
+
+   function onOption( opt )
+      switch opt
+         case 'o', 'm'
+            self.expectValue()
+
+         case 'h': usage()
+         case 'v': version()
+         case 'c': self.checkvars = false
+
+         default
+            usage()
+            exit(1)
+      end
+   end
+
+   function onValue( opt, val )
+      switch opt
+         case 'o': self.output = val
+         case 'm': self.merge = val
+      end
+   end
+
+   function onFree( opt )
+      if "*" in opt or "?" in opt
+         self.globs += opt
+      else
+         self.inputs += opt
+      end
+   end
+end
+
+function usage()
+   version()
+   >
+   > i"Usage:\n"
+     "  fallc [options] files ...\n"
+     "\n"
+     "Options:\n"
+     "  -c            Do NOT check for consistency in \$(varname) blocks.\n"
+     "  -m <file>     Merge mode (get original file .ftt and insert translation.\n"
+     "  -o <output>   Writes the results to this file.\n"
+     "  -h            Prints this help\n"
+     "  -v            Prints version informations.\n"
+end
+
+function version()
+   ver = vmModuleVersionInfo()
+   > @"Falcon Language Tables Compiler, version $(ver[0]).$(ver[1]).$(ver[2])"
+end
+
+//====================================================
+// Class storing a filewide language table
+//
+class LanguageTable( fromLang, tglang, file, module )
+   fromLang = fromLang
+   name = tglang
+   file = file
+   modName = module
+   entries = [=>]
+   originals = [=>]
+end
+
+//====================================================
+// Parsing a language table
+//
+function parseLanguage( file )
[...5378 lines suppressed...]
 
   case 440:
 #line 1026 "/home/gian/Progetti/falcon/core/engine/fasm_parser.yy"
-    { COMPILER->addInstr( P_STO, (yyvsp[(2) - (4)]), (yyvsp[(4) - (4)]) ); ;}
+    { COMPILER->addInstr( P_STO, (yyvsp[(2) - (4)]), (yyvsp[(4) - (4)]) ); }
     break;
 
   case 441:
 #line 1027 "/home/gian/Progetti/falcon/core/engine/fasm_parser.yy"
-    { COMPILER->raiseError(Falcon::e_invop, "STO" ); ;}
+    { COMPILER->raiseError(Falcon::e_invop, "STO" ); }
     break;
 
 
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 393)
+++ CMakeLists.txt	(working copy)
@@ -3,27 +3,165 @@
 #
 # CMake configuration file for Core falcon
 ####################################################################
-
+cmake_minimum_required(VERSION 2.4)
 PROJECT(Falcon_Core)
-SET(FALCON_PROJECT_BASE "core")
 
-#Check for environment
-IF($ENV{FALCON_DEVEL_TREE} STREQUAL "" )
+IF("$ENV{FALCON_DEVEL_TREE}" STREQUAL "")
    MESSAGE( FATAL_ERROR "Sorry, Falcon environment not correctly configured" )
-ENDIF($ENV{FALCON_DEVEL_TREE} STREQUAL "")
+ENDIF("$ENV{FALCON_DEVEL_TREE}" STREQUAL "")
 
-#Include falcon configuration
-INCLUDE("$ENV{FALCON_DEVEL_TREE}/config.cmake")
+#Set the default buid type to Debug
+IF(NOT CMAKE_BUILD_TYPE)
+   SET( CMAKE_BUILD_TYPE $ENV{FALCON_BUILD_TYPE} )
 
-#set common include directory
-FALCON_INCLUDE_SETTINGS()
+   #Still unset?
+   IF(NOT CMAKE_BUILD_TYPE)
+   SET(CMAKE_BUILD_TYPE Debug CACHE STRING
+      "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
+      FORCE)
+   ENDIF(NOT CMAKE_BUILD_TYPE)
+ENDIF(NOT CMAKE_BUILD_TYPE)
 
-FALCON_ADD_SUBDIRECTORY(engine)
-FALCON_ADD_SUBDIRECTORY(rtl)
-FALCON_ADD_SUBDIRECTORY(clt)
+# This is the "product version"
+SET(FALCON_VERSION_MAJOR      "$ENV{FALCON_VERSION_MAJOR}")
+SET(FALCON_VERSION_MINOR      "$ENV{FALCON_VERSION_MINOR}")
+SET(FALCON_VERSION_REVISION   "$ENV{FALCON_VERSION_REVISION}")
+SET(FALCON_VERSION_PATCH      "$ENV{FALCON_VERSION_PATCH}")
 
+SET(FALCON_VERSION_NAME "$ENV{FALCON_VERSION_NAME}")
+
+#SONAME and soversion (unix so library informations for engine)
+# Remember that SONAME never follows project versioning, but
+# uses a VERSION, REVISION, AGE format, where
+# VERSION: generational version of the project
+# REVISION: times this version has been touched
+# AGE: Number of version for which binary compatibility is granted
+# In eample, 1.12.5 means that this lib may be dynlinked against
+# every program using this lib versioned from 1.8 to 1.12.
+
+IF( NOT "$ENV{FALCON_SONAME_AGE}" STREQUAL "" )
+   SET(FALCON_SONAME_VERSION $ENV{FALCON_SONAME_VERSION})
+   SET(FALCON_SONAME_REVISION $ENV{FALCON_SONAME_REVISION})
+   SET(FALCON_SONAME_AGE $ENV{FALCON_SONAME_AGE})
+
+   # A couple of useful shortcuts
+   SET(FALCON_SONAME "${FALCON_SONAME_VERSION}.${FALCON_SONAME_REVISION}.${FALCON_SONAME_AGE}")
+   SET(FALCON_SONAME_REV "${FALCON_SONAME_VERSION}.${FALCON_SONAME_REVISION}")
+ENDIF( NOT "$ENV{FALCON_SONAME_AGE}" STREQUAL "" )
+
+#Automatically generated version info for RC scripts and sources
+#CMAKE is good at this, let's use this feature
+SET(FALCON_VERSION_RC   "${FALCON_VERSION_MAJOR}, ${FALCON_VERSION_MINOR}, ${FALCON_VERSION_REVISION}, ${FALCON_VERSION_PATCH}")
+SET(FALCON_VERSION_ID   "${FALCON_VERSION_MAJOR}.${FALCON_VERSION_MINOR}.${FALCON_VERSION_REVISION}.${FALCON_VERSION_PATCH}")
+
+#Import environment variables
+SET(FALCON_BUILD_NAME   $ENV{FALCON_BUILD_NAME})
+SET(FALCON_ACTIVE_TREE  $ENV{FALCON_ACTIVE_TREE})
+SET(FALCON_SRC_TREE     $ENV{FALCON_SRC_TREE})
+SET(FALCON_DEVEL_TREE   $ENV{FALCON_DEVEL_TREE})
+SET(FALCON_BUILD_TREE   $ENV{FALCON_BUILD_TREE})
+
+##############################################################################
+# Including specific build informations
+# This is a user-configurable script containing vars
+##############################################################################
+INCLUDE("${FALCON_DEVEL_TREE}/settings.cmake" OPTIONAL)
+
+#install will happen in FALCON_INSTALL_TREE (With optional FALCON_INSTALL_TREE_LIB)
+IF( "${FALCON_INSTALL_TREE}" STREQUAL "" )
+   SET( FALCON_INSTALL_TREE  "${FALCON_ACTIVE_TREE}" )
+ENDIF( "${FALCON_INSTALL_TREE}" STREQUAL "" )
+
+IF( "${FALCON_INSTALL_TREE_LIB}" STREQUAL "" )
+   SET( FALCON_INSTALL_TREE_LIB  "lib" )
+ENDIF( "${FALCON_INSTALL_TREE_LIB}" STREQUAL "" )
+
+#sets default installation target dirs.
+
+SET( FALCON_INC_DIR "${FALCON_INSTALL_TREE}/include" )
+SET( FALCON_BIN_DIR "${FALCON_INSTALL_TREE}/bin" )
+SET( FALCON_LIB_DIR "${FALCON_INSTALL_TREE}/${FALCON_INSTALL_TREE_LIB}" )
+IF(WIN32)
+   SET( FALCON_MOD_INSTALL "$ENV{FALCON_ACTIVE_TREE}/bin" )
+ELSE(WIN32)
+   SET( FALCON_MOD_INSTALL "${FALCON_LIB_DIR}/falcon" )
+ENDIF(WIN32)
+
+##############################################################################
+#  Other defaults
+##############################################################################
+INCLUDE(TestBigEndian)
+
+TEST_BIG_ENDIAN(falcon_big_endian)
+IF(falcon_big_endian)
+   SET(FALCON_LITTLE_ENDIAN 0)
+ELSE(falcon_big_endian)
+   SET(FALCON_LITTLE_ENDIAN 1)
+ENDIF(falcon_big_endian)
+
+
+#IMPORT final destination - the default install directory.
+IF("${FALCON_FINAL_DESTINATION}" STREQUAL "" )
+   #In windows, we normally install in c:\falcon
+   IF(WIN32)
+      IF($ENV{PRGORAMS})
+         SET(FALCON_FINAL_DESTINATION  "C:\\\\$ENV{PROGRAMS}\\\\falcon" )
+      ELSE($ENV{PRGORAMS})
+         SET(FALCON_FINAL_DESTINATION  "C:\\\\Program Files\\\\falcon" )
+      ENDIF($ENV{PRGORAMS})
+   ELSE(WIN32)
+      SET(FALCON_FINAL_DESTINATION  "/usr/local" )
+   ENDIF(WIN32)
+ENDIF("${FALCON_FINAL_DESTINATION}" STREQUAL "" )
+
+IF("${FALCON_FINAL_DESTINATION_LIB}" STREQUAL "" )
+   SET(FALCON_FINAL_DESTINATION_LIB  "${FALCON_INSTALL_TREE_LIB}" )
+ENDIF("${FALCON_FINAL_DESTINATION_LIB}" STREQUAL "" )
+
+#In windows, we normally install in c:\falcon
+IF(WIN32)
+   SET( FALCON_HOST_SYSTEM "WINDOWS" )
+   SET( FALCON_SYSTEM_WIN 1 )
+ELSE(WIN32)
+   IF(APPLE)
+      SET( FALCON_HOST_SYSTEM "MAC" )
+      SET( FALCON_SYSTEM_MAC 1 )
+   ELSEIF(UNIX)
+      SET( FALCON_HOST_SYSTEM "UNIX" )
+      SET( FALCON_SYSTEM_UNIX 1 )
+   ELSE(APPLE)
+      MESSAGE( "Sorry, can't determine system type" )
+   ENDIF(APPLE)
+ENDIF(WIN32)
+
+
+##############################################################################
+#  Used macro
+##############################################################################
+
+MACRO(FALCON_CONFIG itemlist)
+   FOREACH(item ${${itemlist}} )
+      MESSAGE( "Configuring ${item}.in into ${item}" )
+      CONFIGURE_FILE(
+         ${item}.in
+         ${item}
+         ESCAPE_QUOTES
+         @ONLY )
+   ENDFOREACH(item)
+ENDMACRO(FALCON_CONFIG)
+
+#include also from-source builds to allow compilation from source
+INCLUDE_DIRECTORIES(BEFORE ${FALCON_SRC_TREE}/core/include)
+INCLUDE_DIRECTORIES( BEFORE ${FALCON_BUILD_TREE}/core/include)
+LINK_DIRECTORIES( ${FALCON_BUILD_TREE}/core/engine )
+
+#We'll take cares of prefixes
+SET(CMAKE_INSTALL_PREFIX "")
+
+ADD_SUBDIRECTORY(engine)
+ADD_SUBDIRECTORY(rtl)
+ADD_SUBDIRECTORY(clt)
+ADD_SUBDIRECTORY(devtools)
+
 #also performs installation of the include directory
-FALCON_ADD_SUBDIRECTORY("include")
-
-#Setting project wide include directories.
-MESSAGE( "INCLUDING TARGET DIR  ${TARGET_DIR}" )
+ADD_SUBDIRECTORY("include")


Index: Falcon.spec
===================================================================
RCS file: /cvs/pkgs/rpms/Falcon/F-9/Falcon.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Falcon.spec	7 Jun 2008 18:38:59 -0000	1.3
+++ Falcon.spec	9 Jun 2008 22:09:36 -0000	1.4
@@ -2,13 +2,15 @@
 
 Name:            Falcon
 Version:         0.8.10
-Release:         1%{?dist}
+Release:         2%{?dist}
 Summary:         The Falcon Programming Language
 Summary(it):     Il linguaggio di programmazione Falcon
 License:        GPLv2+
 Group:          Development/Languages
 URL:            http://%{host}/
 Source:         http://%{host}/project_dl/_official_rel/%{name}-%{version}.tar.gz
+Patch0:         Falcon-core-0810-r401.patch
+Patch1:         Falcon-0.8.10-prefix.patch
 BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 BuildRequires:  bison cmake pcre-devel zlib-devel
 
@@ -48,6 +50,8 @@
 
 %prep
 %setup -q
+(cd core && %patch0 -p0 -b .r401)
+%patch1 -p1 -b .prefix
 
 
 %build
@@ -58,10 +62,8 @@
 %install
 rm -rf $RPM_BUILD_ROOT
 ./build.sh -i
-# with cmake-2.6, the default install target misses some files
-[ -f $RPM_BUILD_ROOT%{_bindir}/faltest ] || \
-  (cd devel/release/build/core && make install && \
-   cd ../modules/feathers && make install)
+sed -i "s|#!/bin/falcon|#!%{_bindir}/falcon|" \
+  $RPM_BUILD_ROOT%{_bindir}/falconeer.fal
 
 
 %clean
@@ -98,6 +100,12 @@
 %{_mandir}/man1/faltest*
 
 %changelog
+* Mon Jun  9 2008 Michel Alexandre Salim <salimma at fedoraproject.org> - 0.8.10-2
+- Merge in cmake fixes from core/trunk r401
+- Patch core/CMakeLists.txt to default to /usr, as it appears that the
+  requested prefix is not properly used
+- Fix incorrect #! interpreter in falconeer.fal
+
 * Sat Jun  7 2008 Michel Alexandre Salim <salimma at fedoraproject.org> - 0.8.10-1
 - Update to 0.8.10
 




More information about the fedora-extras-commits mailing list