Commit 03ff85ad authored by Tristan Cavelier's avatar Tristan Cavelier

wip

parent a2cb49be
[buildout]
extends =
../nodejs/buildout.cfg
parts =
nodejs
npm
[npm]
recipe = slapos.recipe.cmmi
url = https://github.com/npm/npm/archive/v3.10.5.tar.gz
md5sum = dd53ff3f895defc66bef6cbfe28b6a32
configure-command = :
make-targets = install
environment =
PATH=${nodejs:location}/bin:%(PATH)s
[buildout]
extends =
../qt/buildout.cfg
parts +=
onlyoffice-core
[onlyoffice-core]
recipe = slapos.recipe.cmmi
url = https://github.com/ONLYOFFICE/core/archive/06a7ed6d6816d98c816b7f208427c19e57fe03e5.tar.gz
md5sum = f2f5ef3d53c4cf858eefba1b97abc1f1
patch-options = -p0
# error: 'to_wstring' is not a member of 'std' -> http://www.cplusplus.com/forum/general/109469/
#patches =
# ${:_profile_base_location_}/to_wstring-is-not-a-member-of-std3.patch#bcc755d9629613ff702b1ad0129b1587
# ${:_profile_base_location_}/to_wstring-is-not-a-member-of-std2.patch#cba83f96cf260f604e2bf96c4d7db380
# ${:_profile_base_location_}/to_wstring-is-not-a-member-of-std.patch#c02a96b863e89ef045c45fb6e9cfe9bd
# http://source.winehq.org/source/dlls/ntdll/wcstring.c
# template <typename T>
# std::wstring to_string(T value)
# {
# std::wostringstream os ;
# os << value ;
# return os.str() ;
# }
configure-command =
( cd Common/3dParty && ./make.sh )
sed 's,-spec \([^ ]\+\),-spec ${qmake:location}/mkspecs/\1 "QMAKE_CXXFLAGS += -std=c++11",g' -i Makefile
# echo 'QMAKE_CXXFLAGS += -std=c++11' >> PdfWriter/PdfWriter.pro
make-targets =
build/bin/linux/x2t
environment =
PATH=${qmake:location}/bin:%(PATH)s
CPPFLAGS=-I${qmake:location}/include
LD_LIBRARY_PATH=${qmake:location}/lib:${qmake:location}/lib64
# PATH=${gcc:location}/bin:${nodejs:location}/bin:%(PATH)s
# CPPFLAGS=-I${gcc:location}/include
# LD_LIBRARY_PATH=${gcc:location}/lib:${gcc:location}/lib64
## LDFLAGS=-Wl,-rpath=${gcc:location}/lib -Wl,-rpath=${gcc:location}/lib64 -Wl,-rpath=${openssl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
# LDFLAGS=-Wl,-rpath=${openssl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
#[onlyoffice-fileconverter]
#recipe = slapos.recipe.build
#url = https://lab.nexedi.com/bk/DocumentServer/raw/073f135e2373e82277e71b3201bb9302da147be0/ServerComponents/Bin/x2t
#md5sum = d91b489ef1e2836e89893abf158dd91d
## script to install.
#script =
# location = %(location)r
# self.failIfPathExists(location)
# import sys
# url = self.options['url']
# md5sum = self.options['md5sum']
# binary = self.download(url, md5sum)
# os.mkdir(location)
# x2t = os.path.join(location, "x2t")
# shutil.move(binary, x2t)
# os.chmod(x2t, 0755)
--- DesktopEditor/common/File.h.orig 2016-09-02 14:49:35.253085793 +0200
+++ DesktopEditor/common/File.h 2016-09-02 14:49:21.444085515 +0200
@@ -1032,13 +1032,9 @@
for (int nIndex = 0; nIndex < 1000; ++nIndex)
{
wsFileName = wsTemp;
-#if defined(_WIN32) || defined (_WIN64)
wchar_t buff[32] ={};
_itow(nTime + nIndex, buff, 10);
wsFileName.append(buff, wcslen(buff));
-#else
- wsFileName.append(std::to_wstring(nTime + nIndex));
-#endif
if (wsExt)
{
wsFileName.append(wsExt);
--- DesktopEditor/common/File.h.orig 2016-09-02 13:08:56.334057572 +0000
+++ DesktopEditor/common/File.h 2016-09-02 13:10:17.717322350 +0000
@@ -1037,7 +1037,9 @@
_itow(nTime + nIndex, buff, 10);
wsFileName.append(buff, wcslen(buff));
#else
- wsFileName.append(std::to_wstring(nTime + nIndex));
+ std::wostringstream buff;
+ buff << (nTime + nIndex);
+ wsFileName.append(buff.str());
#endif
if (wsExt)
{
--- DesktopEditor/common/File.h.orig 2016-09-02 14:11:22.471689073 +0000
+++ DesktopEditor/common/File.h 2016-09-02 14:14:16.330608243 +0000
@@ -46,6 +46,51 @@
#include <windows.h>
#endif
+#if defined(_WIN32) || defined (_WIN64)
+#else
+wchar_t* _itow(
+ long value, /* [I] Value to be converted */
+ wchar_t* str, /* [O] Destination for the converted value */
+ int radix) /* [I] Number base for conversion */
+{
+ unsigned long val;
+ int negative;
+ wchar_t buffer[33];
+ wchar_t *pos;
+ wchar_t digit;
+
+ if (value < 0 && radix == 10) {
+ negative = 1;
+ val = -value;
+ } else {
+ negative = 0;
+ val = value;
+ }
+
+ pos = &buffer[32];
+ *pos = '\0';
+
+ do {
+ digit = val % radix;
+ val = val / radix;
+ if (digit < 10) {
+ *--pos = '0' + digit;
+ } else {
+ *--pos = 'a' + digit - 10;
+ }
+ } while (val != 0L);
+
+ if (negative) {
+ *--pos = '-';
+ }
+
+ if (str != NULL) {
+ memcpy(str, pos, (&buffer[32] - pos + 1) * sizeof(wchar_t));
+ }
+ return str;
+}
+#endif
+
#define U_TO_UTF8(val) NSFile::CUtf8Converter::GetUtf8StringFromUnicode2(val.c_str(), val.length())
#if defined(__linux__) || defined(_MAC) && !defined(_IOS)
@@ -1032,13 +1077,9 @@
for (int nIndex = 0; nIndex < 1000; ++nIndex)
{
wsFileName = wsTemp;
-#if defined(_WIN32) || defined (_WIN64)
wchar_t buff[32] ={};
_itow(nTime + nIndex, buff, 10);
wsFileName.append(buff, wcslen(buff));
-#else
- wsFileName.append(std::to_wstring(nTime + nIndex));
-#endif
if (wsExt)
{
wsFileName.append(wsExt);
--- Makefile.orig 2016-08-02 16:42:41.226079897 +0000
+++ Makefile 2016-08-02 16:43:45.351422643 +0000
@@ -1,7 +1,7 @@
OUTPUT_DIR = build/server
OUTPUT = $(OUTPUT_DIR)
-GRUNT = grunt
+GRUNT = $$(pwd)/node_modules/grunt-cli/bin/grunt
GRUNT_FLAGS = --no-color -v
GRUNT_FILES = Gruntfile.js.out
[buildout]
#extends =
# ../dash/buildout.cfg
extends =
../nodejs/buildout.cfg
parts =
nodejs-4
onlyoffice-fileconverter
[onlyoffice-fileconverter]
recipe = slapos.recipe.cmmi
url = https://github.com/ONLYOFFICE/server/archive/onlyoffice-documentserver-4.1.0-142.tar.gz
md5sum = aa11a193e45a6aecaa6a767f3e8bd4aa
patch-options = -p0
patches =
${:_profile_base_location_}/Makefile.patch
configure-command = PATH=${nodejs:location}/bin:$PATH npm install grunt-cli
make-targets =
build/server/FileConverter/bin
environment =
PATH=${gcc:location}/bin:${nodejs:location}/bin:%(PATH)s
CPPFLAGS=-I${gcc:location}/include
LD_LIBRARY_PATH=${gcc:location}/lib:${gcc:location}/lib64
# LDFLAGS=-Wl,-rpath=${gcc:location}/lib -Wl,-rpath=${gcc:location}/lib64 -Wl,-rpath=${openssl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
LDFLAGS=-Wl,-rpath=${openssl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
#[onlyoffice-fileconverter]
#recipe = slapos.recipe.build
#url = https://lab.nexedi.com/bk/DocumentServer/raw/073f135e2373e82277e71b3201bb9302da147be0/ServerComponents/Bin/x2t
#md5sum = d91b489ef1e2836e89893abf158dd91d
## script to install.
#script =
# location = %(location)r
# self.failIfPathExists(location)
# import sys
# url = self.options['url']
# md5sum = self.options['md5sum']
# binary = self.download(url, md5sum)
# os.mkdir(location)
# x2t = os.path.join(location, "x2t")
# shutil.move(binary, x2t)
# os.chmod(x2t, 0755)
[buildout]
extends =
../component/xorg/buildout.cfg
../xorg/buildout.cfg
parts =
qt
parts =
qmake
[qmake]
# building [qmake] will download the full qt source anyway ~200MB
......@@ -19,39 +19,50 @@ configure-command =
./configure -v -no-separate-debug-info -release -no-fast -confirm-license -opensource
make-targets =
qmake
prefix = ${buildout:parts-directory}/${:_buildout_section_name_}
post-install =
mkdir ${buildout:parts-directory}/${:_buildout_section_name_}/bin 2>/dev/null || :
cp bin/qmake* -t ${buildout:parts-directory}/${:_buildout_section_name_}/bin
cp -rt ${:prefix} *
# mkdir ${:prefix}/bin 2>/dev/null || :
# cp bin/qmake* -t ${:prefix}/bin
# mkdir ${:prefix}/mkspecs 2>/dev/null || :
# cp -r mkspecs/* -t ${:prefix}/mkspecs
#environments =
# INSTALL_ROOT=../../qmake
#qmake-binary-path = ${:location}/bin/qmake
[qt]
recipe = slapos.recipe.build
slapos_promisee =
file:plop
#recipe = slapos.recipe.build
#slapos_promisee =
# file:plop
# Online installer
x86 = http://get.qt.nokia.com/qtsdk/Qt_SDK_Lin32_online_v1_1_3_en.run eae2e2a1396fec1369b66c71d7df6eab
x86-64 = http://get.qt.nokia.com/qtsdk/Qt_SDK_Lin64_online_v1_1_3_en.run a4d929bc4d6511290c07c3745477b77b
# Offline installer
#x86 = http://get.qt.nokia.com/qtsdk/Qt_SDK_Lin32_offline_v1_1_3_en.run 106fdae4ec8947c491ab0a827a02da12
#x86-64 = http://get.qt.nokia.com/qtsdk/Qt_SDK_Lin64_offline_v1_1_3_en.run 8c280beb11ee763840464572ed80e8b8
## Online installer
#x86 = http://get.qt.nokia.com/qtsdk/Qt_SDK_Lin32_online_v1_1_3_en.run eae2e2a1396fec1369b66c71d7df6eab
#x86-64 = http://get.qt.nokia.com/qtsdk/Qt_SDK_Lin64_online_v1_1_3_en.run a4d929bc4d6511290c07c3745477b77b
## Offline installer
##x86 = http://get.qt.nokia.com/qtsdk/Qt_SDK_Lin32_offline_v1_1_3_en.run 106fdae4ec8947c491ab0a827a02da12
##x86-64 = http://get.qt.nokia.com/qtsdk/Qt_SDK_Lin64_offline_v1_1_3_en.run 8c280beb11ee763840464572ed80e8b8
# Needs many dependencies.
## Needs many dependencies.
script =
if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
download_file = self.download(self.options['url'], self.options.get('md5sum'))
extract_dir = tempfile.mkdtemp(self.name)
os.chdir(extract_dir)
(download_dir, filename) = os.path.split(download_file)
auto_extract_bin = os.path.join(extract_dir, filename)
shutil.move(download_file, auto_extract_bin)
os.chmod(auto_extract_bin, 0755)
subprocess.call([auto_extract_bin])
self.cleanup_list.append(extract_dir)
workdir = guessworkdir(extract_dir)
import pdb; pdb.set_trace()
self.copyTree(os.path.join(workdir, "jre1.6.0_27"), "%(location)s")
#script =
# if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
# download_file = self.download(self.options['url'], self.options.get('md5sum'))
# extract_dir = tempfile.mkdtemp(self.name)
# os.chdir(extract_dir)
# (download_dir, filename) = os.path.split(download_file)
# auto_extract_bin = os.path.join(extract_dir, filename)
# shutil.move(download_file, auto_extract_bin)
# os.chmod(auto_extract_bin, 0755)
# subprocess.call([auto_extract_bin])
# #self.cleanup_list.append(extract_dir)
# self.cleanup_dir_list.append(extract_dir)
# workdir = guessworkdir(extract_dir)
# import pdb; pdb.set_trace()
# self.copyTree(os.path.join(workdir, "jre1.6.0_27"), "%(location)s")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment