Merge pull request #117 from vlj/master

This commit is contained in:
Robert Schumacher 2016-10-04 17:19:57 -07:00
commit 779ccb9fa6
7 changed files with 271 additions and 0 deletions

View File

@ -0,0 +1,24 @@
From 4a337ce9475c75497f4221cadd9d2dd8126835c7 Mon Sep 17 00:00:00 2001
From: vlj <vljn.ovi@gmail.com>
Date: Tue, 4 Oct 2016 17:54:22 +0200
Subject: [PATCH 1/2] Remove unistd.h include 1
---
ragel-6.9/ragel/main.cpp | 1 -
1 file changed, 1 deletion(-)
diff --git a/ragel-6.9/ragel/main.cpp b/ragel-6.9/ragel/main.cpp
index f5fbd7b..e3bcc18 100644
--- a/ragel-6.9/ragel/main.cpp
+++ b/ragel-6.9/ragel/main.cpp
@@ -24,7 +24,6 @@
#include <stdio.h>
#include <iostream>
#include <fstream>
-#include <unistd.h>
#include <sstream>
#include <unistd.h>
#include <sys/types.h>
--
2.10.0.windows.1

View File

@ -0,0 +1,24 @@
From 259bb8be3f66e32063652cb4f1a456b7327ca513 Mon Sep 17 00:00:00 2001
From: vlj <vljn.ovi@gmail.com>
Date: Tue, 4 Oct 2016 17:54:38 +0200
Subject: [PATCH 2/2] Remove unistd.h include 2
---
ragel-6.9/ragel/main.cpp | 1 -
1 file changed, 1 deletion(-)
diff --git a/ragel-6.9/ragel/main.cpp b/ragel-6.9/ragel/main.cpp
index e3bcc18..947b1c8 100644
--- a/ragel-6.9/ragel/main.cpp
+++ b/ragel-6.9/ragel/main.cpp
@@ -25,7 +25,6 @@
#include <iostream>
#include <fstream>
#include <sstream>
-#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
--
2.10.0.windows.1

View File

@ -0,0 +1,25 @@
From 852aebf39d85964141cf9243d89abc2d5ee761ce Mon Sep 17 00:00:00 2001
From: vlj <vljn.ovi@gmail.com>
Date: Tue, 4 Oct 2016 18:22:41 +0200
Subject: [PATCH 3/3] Fix rsxgoto.cpp build.
---
ragel-6.9/ragel/rbxgoto.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ragel-6.9/ragel/rbxgoto.cpp b/ragel-6.9/ragel/rbxgoto.cpp
index c54cb00..9e33425 100644
--- a/ragel-6.9/ragel/rbxgoto.cpp
+++ b/ragel-6.9/ragel/rbxgoto.cpp
@@ -658,7 +658,7 @@ void RbxGotoCodeGen::BREAK( ostream &ret, int targState )
out <<
" begin\n"
" " << P() << " += 1\n"
- " " << rbxGoto(ret, "_out") << "\n"
+ " "; rbxGoto(ret, "_out") << "\n"
" end\n";
}
--
2.8.3.windows.1

128
ports/ragel/CMakeLists.txt Normal file
View File

@ -0,0 +1,128 @@
cmake_minimum_required(VERSION 3.0)
project(ragel CXX)
file(GLOB HEADERS
ragel/buffer.h
ragel/cdgoto.h
ragel/cscodegen.h
ragel/csipgoto.h
ragel/inputdata.h
ragel/rbxgoto.h
ragel/rubyflat.h
ragel/cdcodegen.h
ragel/cdipgoto.h
ragel/csfflat.h
ragel/cssplit.h
ragel/javacodegen.h
ragel/redfsm.h
ragel/rubyftable.h
ragel/cdfflat.h
ragel/cdsplit.h
ragel/csfgoto.h
ragel/cstable.h
ragel/parsedata.h
ragel/rlparse.h
ragel/rubytable.h
ragel/cdfgoto.h
ragel/cdtable.h
ragel/csflat.h
ragel/dotcodegen.h
ragel/parsetree.h
ragel/rlscan.h
ragel/version.h
ragel/cdflat.h
ragel/common.h
ragel/csftable.h
ragel/fsmgraph.h
ragel/pcheck.h
ragel/rubycodegen.h
ragel/xmlcodegen.h
ragel/cdftable.h
ragel/csgoto.h
ragel/gendata.h
ragel/ragel.h
ragel/rubyfflat.h
ragel/gocodegen.h
ragel/gotable.h
ragel/goftable.h
ragel/goflat.h
ragel/gofflat.h
ragel/gogoto.h
ragel/gofgoto.h
ragel/goipgoto.h
ragel/gotablish.h
ragel/mlcodegen.h
ragel/mltable.h
ragel/mlftable.h
ragel/mlflat.h
ragel/mlfflat.h
ragel/mlgoto.h
ragel/mlfgoto.h
)
file(GLOB SRC
ragel/main.cpp
ragel/parsetree.cpp
ragel/parsedata.cpp
ragel/fsmstate.cpp
ragel/fsmbase.cpp
ragel/fsmattach.cpp
ragel/fsmmin.cpp
ragel/fsmgraph.cpp
ragel/fsmap.cpp
ragel/rlscan.cpp
ragel/rlparse.cpp
ragel/inputdata.cpp
ragel/common.cpp
ragel/redfsm.cpp
ragel/gendata.cpp
ragel/cdcodegen.cpp
ragel/cdtable.cpp
ragel/cdftable.cpp
ragel/cdflat.cpp
ragel/cdfflat.cpp
ragel/cdgoto.cpp
ragel/cdfgoto.cpp
ragel/cdipgoto.cpp
ragel/cdsplit.cpp
ragel/javacodegen.cpp
ragel/rubycodegen.cpp
ragel/rubytable.cpp
ragel/rubyftable.cpp
ragel/rubyflat.cpp
ragel/rubyfflat.cpp
ragel/rbxgoto.cpp
ragel/cscodegen.cpp
ragel/cstable.cpp
ragel/csftable.cpp
ragel/csflat.cpp
ragel/csfflat.cpp
ragel/csgoto.cpp
ragel/csfgoto.cpp
ragel/csipgoto.cpp
ragel/cssplit.cpp
ragel/dotcodegen.cpp
ragel/xmlcodegen.cpp
ragel/gocodegen.cpp
ragel/gotable.cpp
ragel/goftable.cpp
ragel/goflat.cpp
ragel/gofflat.cpp
ragel/gogoto.cpp
ragel/gofgoto.cpp
ragel/goipgoto.cpp
ragel/gotablish.cpp
ragel/mlcodegen.cpp
ragel/mltable.cpp
ragel/mlftable.cpp
ragel/mlflat.cpp
ragel/mlfflat.cpp
ragel/mlgoto.cpp
ragel/mlfgoto.cpp
)
include_directories(aapl)
add_executable(ragel ${SRC})
install(TARGETS ragel DESTINATION tools CONFIGURATIONS Release)

3
ports/ragel/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: ragel
Version: 6.9
Description:

26
ports/ragel/config.h Normal file
View File

@ -0,0 +1,26 @@
/* ragel/config.h. Generated from config.h.in by configure. */
/* ragel/config.h.in. Generated from configure.in by autoheader. */
/* Name of package */
#define PACKAGE "ragel"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME "ragel"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "ragel 6.9"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "ragel"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "6.9"
/* Version number of package */
#define VERSION "6.9"

View File

@ -0,0 +1,41 @@
# Common Ambient Variables:
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
# TARGET_TRIPLET is the current triplet (x86-windows, etc)
# PORT is the current port name (zlib, etc)
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
#
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ragel-6.9)
include(${CMAKE_TRIPLET_FILE})
include(vcpkg_common_functions)
vcpkg_download_distfile(ARCHIVE
URLS "http://www.colm.net/files/ragel/ragel-6.9.tar.gz"
FILENAME "ragel-6.9.tar.gz"
SHA512 46886a37fa0b785574c03ba6581d99bbeaa11ca65cf4fdc37ceef42f4869bd695694cd69b4b974a25cf539f004cb106e3debda17fc26e1a9a6a4295992733dbd
)
vcpkg_extract_source_archive(${ARCHIVE})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}/ragel)
vcpkg_apply_patches(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src
PATCHES
"${CMAKE_CURRENT_LIST_DIR}/0001-Remove-unistd.h-include-1.patch"
"${CMAKE_CURRENT_LIST_DIR}/0002-Remove-unistd.h-include-2.patch"
"${CMAKE_CURRENT_LIST_DIR}/0003-Fix-rsxgoto.cpp-build.patch"
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
GENERATOR "Visual Studio 14 2015"
)
vcpkg_install_cmake()
file(WRITE ${CURRENT_PACKAGES_DIR}/include/ragel.txt)
# Handle copyright
file(COPY ${CURRENT_BUILDTREES_DIR}/src/ragel-6.9/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ragel)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/ragel/COPYING ${CURRENT_PACKAGES_DIR}/share/ragel/copyright)