summaryrefslogtreecommitdiff
path: root/liborcus
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2013-04-15 14:22:38 +0300
committerTor Lillqvist <tlillqvist@suse.com>2013-04-15 14:37:38 +0300
commitfac06b7a925f6d74a877307fc91f54fc50f5d064 (patch)
treed5c77f51b0813662f480f1c733e976b63fa1dad9 /liborcus
parentbb9fce28d6d5f1cabc2af533bfdc7997ffb7184a (diff)
Revert "Go back to using Visual Studio project files to build"
I could not get it to build using the project files and VS2012... With one additional patch to drop the use of dllimport in env.hpp, the "gcc-wrapper" way builds fine for me, using VS2012. It is not necessary to specify the dllimport attribute for functions imported from a DLL. Specifying dllimport if the library actually is a static library (as it is here) leads to linking errors. The way the ifdefs and -D options were set up here, the utility and/or test programs that are built as part of the liborcus build were compiled using dllimport, and thus failed to link. So just don't bother with dllimport. This reverts commit 58b4cd934fd28b796dc12590f33971dd32ec95ee. Change-Id: I2ffc90d47ae018a9a14b1c6d07fb0a225ce10d6d
Diffstat (limited to 'liborcus')
-rw-r--r--liborcus/ExternalPackage_liborcus.mk4
-rw-r--r--liborcus/ExternalProject_liborcus.mk30
-rw-r--r--liborcus/UnpackedTarball_orcus.mk3
-rw-r--r--liborcus/liborcus_0.1.0-dllimport.patch18
4 files changed, 23 insertions, 32 deletions
diff --git a/liborcus/ExternalPackage_liborcus.mk b/liborcus/ExternalPackage_liborcus.mk
index a310e9fea22a..8ed7a6773e3a 100644
--- a/liborcus/ExternalPackage_liborcus.mk
+++ b/liborcus/ExternalPackage_liborcus.mk
@@ -12,8 +12,8 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,liborcus,orcus))
$(eval $(call gb_ExternalPackage_use_external_project,liborcus,liborcus))
ifeq ($(OS)$(COM),WNTMSC)
-$(eval $(call gb_ExternalPackage_add_file,liborcus,lib/orcus.lib,vsprojects/liborcus-static/Release/liborcus-static.lib))
-$(eval $(call gb_ExternalPackage_add_file,liborcus,lib/orcus-parser.lib,vsprojects/liborcus-parser-static/Release/liborcus-parser-static.lib))
+$(eval $(call gb_ExternalPackage_add_file,liborcus,lib/orcus.lib,src/liborcus/.libs/liborcus-0.6.lib))
+$(eval $(call gb_ExternalPackage_add_file,liborcus,lib/orcus-parser.lib,src/parser/.libs/liborcus-parser-0.6.lib))
else
$(eval $(call gb_ExternalPackage_add_file,liborcus,lib/liborcus.a,src/liborcus/.libs/liborcus-0.6.a))
$(eval $(call gb_ExternalPackage_add_file,liborcus,lib/liborcus-parser.a,src/parser/.libs/liborcus-parser-0.6.a))
diff --git a/liborcus/ExternalProject_liborcus.mk b/liborcus/ExternalProject_liborcus.mk
index b4592de5f535..08f4efb7215d 100644
--- a/liborcus/ExternalProject_liborcus.mk
+++ b/liborcus/ExternalProject_liborcus.mk
@@ -22,34 +22,6 @@ $(eval $(call gb_ExternalProject_register_targets,liborcus,\
build \
))
-ifeq ($(OS)$(COM),WNTMSC)
-
-ifeq ($(VCVER),90)
-$(call gb_ExternalProject_get_state_target,liborcus,build) :
- export BOOST_INCLUDE_DIR=$(WORKDIR)/UnpackedTarball/boost \
- && export ZLIB_INCLUDE_DIR=$(OUTDIR)/inc/external/zlib \
- && export BOOST_LIB_DIR=$(OUTDIR)/lib \
- && cd $(EXTERNAL_WORKDIR)/vsprojects/liborcus-static \
- && $(COMPATH)/vcpackages/vcbuild.exe liborcus-static.vcproj "Release|Win32" \
- && cd $(EXTERNAL_WORKDIR)/vsprojects/liborcus-parser-static \
- && $(COMPATH)/vcpackages/vcbuild.exe liborcus-parser-static.vcproj "Release|Win32" \
- && touch $@
-else
-$(call gb_ExternalProject_get_state_target,liborcus,build) :
- export BOOST_INCLUDE_DIR=$(WORKDIR)/UnpackedTarball/boost \
- && export ZLIB_INCLUDE_DIR=$(OUTDIR)/inc/external/zlib \
- && export BOOST_LIB_DIR=$(OUTDIR)/lib \
- && cd $(EXTERNAL_WORKDIR)/vsprojects/liborcus-static \
- && $(COMPATH)/../Common7/Tools/vcupgrade.exe liborcus-static.vcproj \
- && MSBuild.exe liborcus-static.vcxproj /p:Configuration=Release /p:OutDir=Release/ /p:TargetName=liborcus-static /p:WholeProgramOptimization=no \
- && cd $(EXTERNAL_WORKDIR)/vsprojects/liborcus-parser-static \
- && $(COMPATH)/../Common7/Tools/vcupgrade.exe liborcus-parser-static.vcproj \
- && MSBuild.exe liborcus-parser-static.vcxproj /p:Configuration=Release /p:OutDir=Release/ /p:TargetName=liborcus-parser-static /p:WholeProgramOptimization=no \
- && touch $@
-endif
-
-else
-
# Must be built with debug GNU C++ library if --enable-dbgutil has
# caused the LO code to be built thusly.
@@ -109,6 +81,4 @@ $(call gb_ExternalProject_get_state_target,liborcus,build) :
&& $(MAKE) \
)
-endif
-
# vim: set noet sw=4 ts=4:
diff --git a/liborcus/UnpackedTarball_orcus.mk b/liborcus/UnpackedTarball_orcus.mk
index 4e9113041da8..9f690284125f 100644
--- a/liborcus/UnpackedTarball_orcus.mk
+++ b/liborcus/UnpackedTarball_orcus.mk
@@ -18,6 +18,9 @@ orcus_patches :=
# make config.sub recognize arm-linux-androideabi
orcus_patches += liborcus_0.1.0-configure.patch
+# don't use dllimport
+orcus_patches += liborcus_0.1.0-dllimport.patch
+
# <https://gitorious.org/orcus/orcus/merge_requests/2#
# f60d6eecee72349993a392a9a63ddf3383d3b8c8-
# f60d6eecee72349993a392a9a63ddf3383d3b8c8@2>:
diff --git a/liborcus/liborcus_0.1.0-dllimport.patch b/liborcus/liborcus_0.1.0-dllimport.patch
new file mode 100644
index 000000000000..005085b2d9cd
--- /dev/null
+++ b/liborcus/liborcus_0.1.0-dllimport.patch
@@ -0,0 +1,18 @@
+--- include/orcus/env.hpp
++++ include/orcus/env.hpp
+@@ -35,15 +35,9 @@
+ #else
+ #define ORCUS_DLLPUBLIC __declspec(dllexport)
+ #endif
+- #elif defined __ORCUS_STATIC_LIB
++ #else
+ #define ORCUS_DLLPUBLIC
+- #else
+- #ifdef __GNUC__
+- #define ORCUS_DLLPUBLIC __attribute__ ((dllimport))
+- #else
+- #define ORCUS_DLLPUBLIC __declspec(dllimport)
+- #endif
+ #endif
+ #define ORCUS_DLLLOCAL
+ #else