Merge pull request #1061 from Kampbell/develop

Cross build a Poco i686 32 bits on a Linux x86_64 64 bits OS
This commit is contained in:
Aleksandar Fabijanic 2015-12-06 15:31:52 -06:00
commit c4f3de31d6
8 changed files with 94 additions and 25 deletions

5
.gitignore vendored
View File

@ -124,6 +124,11 @@ releases/
# openssl binaries #
####################
openssl/packages/
!openssl/Ionic/zip-v1.9/Release/*.dll
!openssl/Ionic/zlib-v1.9/Release/*.dll
!openssl/win32/bin/debug/*.dll
!openssl/win32/bin/debug/*.lib
!openssl/win32/bin/release/*.dll

View File

@ -17,6 +17,9 @@
#include "Poco/Path.h"
#include "Poco/File.h"
#include "Poco/Exception.h"
#include "Poco/Environment.h"
#include <sstream>
#include <iostream>
using Poco::SharedMemory;
@ -43,7 +46,7 @@ void SharedMemoryTest::testCreate()
void SharedMemoryTest::testCreateFromFile()
{
Poco::Path p = findDataFile("testdata.txt");
Poco::Path p = findDataFile("data", "testdata.txt");
Poco::File f(p);
assert (f.exists() && f.isFile());
SharedMemory mem(f, SharedMemory::AM_READ);
@ -54,24 +57,28 @@ void SharedMemoryTest::testCreateFromFile()
}
Poco::Path SharedMemoryTest::findDataFile(const std::string& afile)
Poco::Path SharedMemoryTest::findDataFile(const std::string& directory, const std::string& file)
{
Poco::Path root;
root.makeAbsolute();
Poco::Path result;
while (!Poco::Path::find(root.toString(), "data", result))
std::ostringstream ostr;
ostr << directory << '/' << file;
std::string validDir(ostr.str());
Poco::Path pathPattern(validDir);
if (Poco::File(pathPattern).exists())
{
root.makeParent();
if (root.toString().empty() || root.toString() == "/" || root.toString() == "\\")
throw Poco::FileNotFoundException("Didn't find data subdir");
return pathPattern;
}
result.makeDirectory();
result.setFileName(afile);
Poco::File aFile(result.toString());
if (!aFile.exists() || (aFile.exists() && !aFile.isFile()))
throw Poco::FileNotFoundException("Didn't find file " + afile);
return result;
ostr.str("");
ostr << "/Foundation/testsuite/" << directory << '/' << file;
validDir = Poco::Environment::get("POCO_BASE") + ostr.str();
pathPattern = validDir;
if (!Poco::File(pathPattern).exists())
{
std::cout << "Can't find " << validDir << std::endl;
throw Poco::NotFoundException("cannot locate directory containing valid Zip test files");
}
return pathPattern;
}

View File

@ -35,7 +35,7 @@ public:
static CppUnit::Test* suite();
static Poco::Path findDataFile(const std::string& afile);
static Poco::Path findDataFile(const std::string& directory, const std::string& file);
private:
};

View File

@ -39,20 +39,20 @@ SHAREDLIBLINKEXT = .so
# Compiler and Linker Flags
#
CFLAGS =
CFLAGS32 = -m32
CFLAGS64 = -m64
CFLAGS32 =
CFLAGS64 =
CXXFLAGS = -Wall -Wno-sign-compare
CXXFLAGS32 = -m32
CXXFLAGS64 = -m64
CXXFLAGS32 =
CXXFLAGS64 =
SHLIBFLAGS =
SHLIBFLAGS32 = -m32
SHLIBFLAGS64 = -m64
SHLIBFLAGS32 =
SHLIBFLAGS64 =
LIBFLAGS =
LIBFLAGS32 =
LIBFLAGS64 =
LINKFLAGS =
LINKFLAGS32 = -m32
LINKFLAGS64 = -m64
LINKFLAGS32 =
LINKFLAGS64 =
STATICOPT_CC =
STATICOPT_CXX =
STATICOPT_LINK = -static

24
build/config/Linux32-gcc Normal file
View File

@ -0,0 +1,24 @@
#
# $Id: //poco/1.4/build/config/Linux#2 $
#
# Linux
#
# Make settings for crossbuilding Poco Linux x86 on a Linux x86_64 OS.
#
#
include $(POCO_BASE)/build/config/Linux
#
# Crossbuild Settings
#
POCO_TARGET_OSNAME = Linux
POCO_TARGET_OSARCH = x86
#
# Compiler and Linker Flags
#
CFLAGS64 += -m32
CXXFLAGS64 += -m32
SHLIBFLAGS64 += -m32
LINKFLAGS64 += -m32

33
openssl/Ionic/License.txt Normal file
View File

@ -0,0 +1,33 @@
Microsoft Public License (Ms-PL)
This license governs use of the accompanying software, the DotNetZip library ("the software"). If you use the software, you accept this license. If you do not accept the license, do not use the software.
1. Definitions
The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.
A "contribution" is the original software, or any additions or changes to the software.
A "contributor" is any person that distributes its contribution under this license.
"Licensed patents" are a contributor's patent claims that read directly on its contribution.
2. Grant of Rights
(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
3. Conditions and Limitations
(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.

Binary file not shown.

Binary file not shown.