aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2016-10-07 14:51:06 -0700
committerRobert Schumacher <roschuma@microsoft.com>2016-10-07 14:51:06 -0700
commit1a95b4a0eca0afe7cb3084ba02dc65931cdd65a0 (patch)
tree9cbe3a54f15fce8aeebec7892b7dd8f9b4f9e776
parent0838b4ae32e742e84d088bcf762df2fc668fbd97 (diff)
parent0de56e180f3806e76e0419c1ebd98726b9ac311a (diff)
downloadvcpkg-1a95b4a0eca0afe7cb3084ba02dc65931cdd65a0.tar.gz
vcpkg-1a95b4a0eca0afe7cb3084ba02dc65931cdd65a0.zip
Merge pull request #128 from adam4813/lua
-rw-r--r--ports/lua/CMakeLists.txt54
-rw-r--r--ports/lua/CONTROL3
-rw-r--r--ports/lua/COPYRIGHT6
-rw-r--r--ports/lua/portfile.cmake31
4 files changed, 94 insertions, 0 deletions
diff --git a/ports/lua/CMakeLists.txt b/ports/lua/CMakeLists.txt
new file mode 100644
index 000000000..76ee6e15c
--- /dev/null
+++ b/ports/lua/CMakeLists.txt
@@ -0,0 +1,54 @@
+PROJECT ( lua )
+
+IF( NOT WIN32 )
+ message( FATAL_ERROR "Written for window only" )
+ENDIF()
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+
+SET (HDR_LIBLUA
+src/lapi.h src/lauxlib.h src/lcode.h src/lctype.h src/ldebug.h src/ldo.h src/lfunc.h
+src/lgc.h src/llex.h src/llimits.h src/lmem.h src/lobject.h src/lopcodes.h src/lparser.h
+src/lstate.h src/lstring.h src/ltable.h src/ltm.h src/lua.h src/luaconf.h src/lualib.h
+src/lundump.h src/lvm.h src/lzio.h
+)
+
+# Build Libraries
+SET (SRC_LIBLUA
+src/lapi.c src/lauxlib.c src/lbaselib.c src/lbitlib.c src/lcode.c src/lcorolib.c
+src/lctype.c src/ldblib.c src/ldebug.c src/ldo.c src/ldump.c src/lfunc.c src/lgc.c
+src/linit.c src/liolib.c src/llex.c src/lmathlib.c src/lmem.c src/loadlib.c src/lobject.c
+src/lopcodes.c src/loslib.c src/lparser.c src/lstate.c src/lstring.c src/lstrlib.c
+src/ltable.c src/ltablib.c src/ltm.c src/lundump.c src/lutf8lib.c src/lvm.c src/lzio.c
+)
+
+# append headers to sources to make them show up in MSVC GUI
+LIST(APPEND SRC_LIBLUA ${HDR_LIBLUA})
+
+IF (BUILD_SHARED_LIBS)
+ ADD_DEFINITIONS ( -DLUA_BUILD_AS_DLL )
+ENDIF ()
+
+# remove warnings
+ADD_DEFINITIONS (-D_CRT_SECURE_NO_WARNINGS )
+
+#DLL
+ADD_LIBRARY ( lua ${SRC_LIBLUA} )
+
+INSTALL ( TARGETS lua
+ RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
+ LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
+)
+
+IF (NOT DEFINED SKIP_INSTALL_HEADERS)
+ INSTALL(
+ FILES
+ src/lualib.h
+ src/lua.h
+ src/luaconf.h
+ src/lua.hpp
+ src/lauxlib.h
+ DESTINATION include
+ )
+ENDIF () \ No newline at end of file
diff --git a/ports/lua/CONTROL b/ports/lua/CONTROL
new file mode 100644
index 000000000..ae661f3f6
--- /dev/null
+++ b/ports/lua/CONTROL
@@ -0,0 +1,3 @@
+Source: lua
+Version: 5.3.3
+Description: a powerful, fast, lightweight, embeddable scripting language
diff --git a/ports/lua/COPYRIGHT b/ports/lua/COPYRIGHT
new file mode 100644
index 000000000..729a2ccd5
--- /dev/null
+++ b/ports/lua/COPYRIGHT
@@ -0,0 +1,6 @@
+Copyright © 1994–2016 Lua.org, PUC-Rio.
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/ports/lua/portfile.cmake b/ports/lua/portfile.cmake
new file mode 100644
index 000000000..f8c1071f7
--- /dev/null
+++ b/ports/lua/portfile.cmake
@@ -0,0 +1,31 @@
+# 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}
+#
+
+include(${CMAKE_TRIPLET_FILE})
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/lua-5.3.3)
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://www.lua.org/ftp/lua-5.3.3.tar.gz"
+ FILENAME "lua-5.3.3.tar.gz"
+ SHA512 7b8122ed48ea2a9faa47d1b69b4a5b1523bb7be67e78f252bb4339bf75e957a88c5405156e22b4b63ccf607a5407bf017a4cee1ce12b1aa5262047655960a3cc
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS_DEBUG
+ -DSKIP_INSTALL_HEADERS=ON
+)
+
+vcpkg_install_cmake()
+
+# Handle copyright
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/lua)
+vcpkg_copy_pdbs()