mingw-w64-squirrel - 3.1-1 = New package

A light-weight scripting language that fits in the size, memory bandwidth, and real-time requirements of applications like video games
This commit is contained in:
JPeterMugaas
2019-04-03 13:37:42 -04:00
parent 4a7eb3e90b
commit 3699824863
2 changed files with 169 additions and 0 deletions

View File

@@ -0,0 +1,76 @@
# Maintainer: Some One <some.one@some.email.com>
_realname=squirrel
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=3.1
pkgrel=1
pkgdesc="A light-weight scripting language that fits in the size, memory bandwidth, and real-time requirements of applications like video games (mingw-w64)"
arch=('any')
url='http://www.squirrel-lang.org'
license=('MIT')
source=("http://sourceforge.net/projects/squirrel/files/squirrel3/squirrel%20${pkgver}%20stable/${_realname}_3_1_stable.tar.gz"
squirrel-3.1-1-cmake-name.patch)
sha256sums=('4845a7fb82e4740bde01b0854112e3bb92a0816ad959c5758236e73f4409d0cb'
'4c661e1d9840a519ba6d7f6ccd0383a0767b4f1d5295fca1d35fb72ceafca54b')
# Helper macros to help make tasks easier #
apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying $_patch"
patch -Nbp1 -i "${srcdir}/$_patch"
done
}
del_file_exists() {
for _fname in "$@"
do
if [ -f $_fname ]; then
rm -rf $_fname
fi
done
}
# =========================================== #
prepare() {
cd ${srcdir}/${_realname}3
apply_patch_with_msg squirrel-3.1-1-cmake-name.patch
}
build() {
cd "${srcdir}"/${_realname}3
[[ -d "${srcdir}"/build-${CARCH} ]] && rm -rf "${srcdir}"/build-${CARCH}
mkdir -p "${srcdir}"/build-${CARCH} && cd "${srcdir}"/build-${CARCH}
declare -a extra_config
if check_option "debug" "n"; then
extra_config+=("-DCMAKE_BUILD_TYPE=Release")
else
extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
fi
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
${MINGW_PREFIX}/bin/cmake \
-G'MSYS Makefiles' \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
"${extra_config[@]}" \
-DBUILD_SHARED_LIBS=ON \
-DINSTALL_INC_DIR=include \
../${_realname}3
make
}
#check() {
# cd "${srcdir}"/build-${CARCH}
# make check
#}
package() {
cd "${srcdir}"/build-${CARCH}
make install DESTDIR="${pkgdir}"
# install -Dm644 ${srcdir}/${_realname}-${pkgver}/LICENSE ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE
}

View File

@@ -0,0 +1,93 @@
--- squirrel3/squirrel/CMakeLists.txt.orig 2016-03-17 14:09:06.000000000 -0400
+++ squirrel3/squirrel/CMakeLists.txt 2019-04-02 00:40:42.049942400 -0400
@@ -1,30 +1,37 @@
-set(SQUIRREL_SRC sqapi.cpp
- sqbaselib.cpp
- sqclass.cpp
- sqcompiler.cpp
- sqdebug.cpp
- sqfuncstate.cpp
- sqlexer.cpp
- sqmem.cpp
- sqobject.cpp
- sqstate.cpp
- sqtable.cpp
- sqvm.cpp)
-
-add_library(squirrel SHARED ${SQUIRREL_SRC})
-install(TARGETS squirrel RUNTIME DESTINATION ${INSTALL_BIN_DIR}
- LIBRARY DESTINATION ${INSTALL_LIB_DIR}
- ARCHIVE DESTINATION ${INSTALL_LIB_DIR})
-
-if(NOT DEFINED DISABLE_STATIC)
- add_library(squirrel_static STATIC ${SQUIRREL_SRC})
- install(TARGETS squirrel_static ARCHIVE DESTINATION ${INSTALL_LIB_DIR})
-endif()
-
-if(DEFINED LONG_OUTPUT_NAMES)
- set_target_properties(squirrel PROPERTIES OUTPUT_NAME squirrel3)
-
- if(NOT DEFINED DISABLE_STATIC)
- set_target_properties(squirrel_static PROPERTIES OUTPUT_NAME squirrel3_static)
- endif()
-endif()
+set(SQUIRREL_SRC sqapi.cpp
+ sqbaselib.cpp
+ sqclass.cpp
+ sqcompiler.cpp
+ sqdebug.cpp
+ sqfuncstate.cpp
+ sqlexer.cpp
+ sqmem.cpp
+ sqobject.cpp
+ sqstate.cpp
+ sqtable.cpp
+ sqvm.cpp)
+
+add_library(squirrel SHARED ${SQUIRREL_SRC})
+install(TARGETS squirrel RUNTIME DESTINATION ${INSTALL_BIN_DIR}
+ LIBRARY DESTINATION ${INSTALL_LIB_DIR}
+ ARCHIVE DESTINATION ${INSTALL_LIB_DIR})
+
+if(NOT DEFINED DISABLE_STATIC)
+ add_library(squirrel_static STATIC ${SQUIRREL_SRC})
+ install(TARGETS squirrel_static ARCHIVE DESTINATION ${INSTALL_LIB_DIR})
+ if(MINGW)
+ set_target_properties(squirrel_static PROPERTIES OUTPUT_NAME squirrel)
+ endif()
+endif()
+
+if(DEFINED LONG_OUTPUT_NAMES)
+ set_target_properties(squirrel PROPERTIES OUTPUT_NAME squirrel3)
+
+ if(NOT DEFINED DISABLE_STATIC)
+ if(MINGW)
+ set_target_properties(squirrel_static PROPERTIES OUTPUT_NAME squirrel3)
+ else()
+ set_target_properties(squirrel_static PROPERTIES OUTPUT_NAME squirrel3_static)
+ endif(MINGW)
+ endif()
+endif()
--- squirrel3/sqstdlib/CMakeLists.txt.orig 2016-03-17 14:09:06.000000000 -0400
+++ squirrel3/sqstdlib/CMakeLists.txt 2019-04-02 00:52:45.409115900 -0400
@@ -16,12 +16,19 @@ install(TARGETS sqstdlib RUNTIME DESTINA
if(NOT DEFINED DISABLE_STATIC)
add_library(sqstdlib_static STATIC ${SQSTDLIB_SRC})
install(TARGETS sqstdlib_static ARCHIVE DESTINATION ${INSTALL_LIB_DIR})
+ if(MINGW)
+ set_target_properties(sqstdlib_static PROPERTIES OUTPUT_NAME sqstdlib)
+ endif(MINGW)
endif()
if(DEFINED LONG_OUTPUT_NAMES)
set_target_properties(sqstdlib PROPERTIES OUTPUT_NAME sqstdlib3)
if(NOT DEFINED DISABLE_STATIC)
- set_target_properties(sqstdlib_static PROPERTIES OUTPUT_NAME sqstdlib3_static)
+ if(MINGW)
+ set_target_properties(sqstdlib_static PROPERTIES OUTPUT_NAME sqstdlib)
+ else()
+ set_target_properties(sqstdlib_static PROPERTIES OUTPUT_NAME sqstdlib3_static)
+ endif(MINGW)
endif()
endif()