diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2013-10-18 22:30:25 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2013-10-19 07:42:34 +0000 |
commit | 79832d9259d609e8189ecfb48cd2856e83bb8d75 (patch) | |
tree | 64edcfefc39ef6fc0c80ae2526d7fec87711fba0 /external/lpsolve | |
parent | 8d46e3968cf68b6ef6a370084b4cc37dbdda1708 (diff) |
fdo#70393: move lpsolve to a subdir of external
Change-Id: I6c4a3bbd2cb514b979165bb041524706f3c28b0a
Reviewed-on: https://gerrit.libreoffice.org/6341
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'external/lpsolve')
-rw-r--r-- | external/lpsolve/ExternalPackage_lpsolve.mk | 36 | ||||
-rw-r--r-- | external/lpsolve/ExternalProject_lpsolve.mk | 41 | ||||
-rw-r--r-- | external/lpsolve/Makefile | 7 | ||||
-rw-r--r-- | external/lpsolve/Module_lpsolve.mk | 18 | ||||
-rw-r--r-- | external/lpsolve/README | 1 | ||||
-rw-r--r-- | external/lpsolve/UnpackedTarball_lpsolve.mk | 36 | ||||
-rw-r--r-- | external/lpsolve/ccc.static | 11 | ||||
-rw-r--r-- | external/lpsolve/lp_solve-aix.patch | 39 | ||||
-rw-r--r-- | external/lpsolve/lp_solve-fixed-warn.patch | 84 | ||||
-rw-r--r-- | external/lpsolve/lp_solve_5.5-windows.patch | 60 | ||||
-rw-r--r-- | external/lpsolve/lp_solve_5.5.patch | 101 |
11 files changed, 434 insertions, 0 deletions
diff --git a/external/lpsolve/ExternalPackage_lpsolve.mk b/external/lpsolve/ExternalPackage_lpsolve.mk new file mode 100644 index 000000000000..70bfa67ed5eb --- /dev/null +++ b/external/lpsolve/ExternalPackage_lpsolve.mk @@ -0,0 +1,36 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalPackage_ExternalPackage,lpsolve,lpsolve)) +$(eval $(call gb_ExternalPackage_use_external_project,lpsolve,lpsolve)) + +ifeq ($(OS),WNT) +ifeq ($(COM),GCC) +ifneq ($(OS_FOR_BUILD),WNT) +$(eval $(call gb_ExternalPackage_add_files,lpsolve,lib,lpsolve55/liblpsolve55.dll.a)) +endif # $(OS_FOR_BUILD) +else # $(COM) +$(eval $(call gb_ExternalPackage_add_files,lpsolve,lib,lpsolve55/lpsolve55.lib)) +endif # $(COM) +$(eval $(call gb_ExternalPackage_add_library_for_install,lpsolve,bin/lpsolve55.dll,lpsolve55/lpsolve55.dll)) +else # $(OS) + +ifeq ($(OS),MACOSX) +$(eval $(call gb_ExternalPackage_add_library_for_install,lpsolve,lib/liblpsolve55.dylib,lpsolve55/liblpsolve55.dylib)) +else +ifeq ($(DISABLE_DYNLOADING),TRUE) +$(eval $(call gb_ExternalPackage_add_files,lpsolve,lib,lpsolve55/liblpsolve55.a)) +else +$(eval $(call gb_ExternalPackage_add_library_for_install,lpsolve,lib/liblpsolve55.so,lpsolve55/liblpsolve55.so)) +endif # $(DISABLE_DYNLOADING) + +endif # $(OS) +endif # $(OS) + +# vim: set noet sw=4 ts=4: diff --git a/external/lpsolve/ExternalProject_lpsolve.mk b/external/lpsolve/ExternalProject_lpsolve.mk new file mode 100644 index 000000000000..55da70457538 --- /dev/null +++ b/external/lpsolve/ExternalProject_lpsolve.mk @@ -0,0 +1,41 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalProject_ExternalProject,lpsolve)) + +$(eval $(call gb_ExternalProject_register_targets,lpsolve,\ + build \ +)) + +ifeq ($(OS),WNT) +ifeq ($(COM),GCC) +$(call gb_ExternalProject_get_state_target,lpsolve,build): + $(call gb_ExternalProject_run,build,\ + $(if $(filter WNT,$(OS_FOR_BUILD)), \ + $(if $(filter YES,$(MINGW_SHARED_GCCLIB)) lpsolve_LDFLAGS="-shared-libgcc") \ + $(if $(filter YES,$(MINGW_SHARED_GXXLIB)) lpsolve_LIBS="$(MINGW_SHARED_LIBSTDCPP)") \ + cmd /c cgcc.bat, sh ccc) \ + ,lpsolve55) +else # $(COM)!=GCC +$(call gb_ExternalProject_get_state_target,lpsolve,build): + $(call gb_ExternalProject_run,build,\ + LIB="$(ILIB)" RUNTIME_FLAG="$(if $(MSVC_USE_DEBUG_RUNTIME),/MDd,/MD)" \ + cmd /c cvc6.bat \ + ,lpsolve55) +endif # $(COM) +else # $(OS)!=WNT +$(call gb_ExternalProject_get_state_target,lpsolve,build): + $(call gb_ExternalProject_run,build,\ + sh $(if $(filter MACOSX,$(OS)),ccc.osx, \ + $(if $(filter TRUE,$(DISABLE_DYNLOADING)),ccc.static, \ + $(if $(filter AIXGCC,$(OS)$(COM)),ccc.aix.gcc, \ + ccc))) \ + ,lpsolve55) +endif # $(OS) +# vim: set noet sw=4 ts=4: diff --git a/external/lpsolve/Makefile b/external/lpsolve/Makefile new file mode 100644 index 000000000000..e4968cf85fb6 --- /dev/null +++ b/external/lpsolve/Makefile @@ -0,0 +1,7 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- + +module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) + +include $(module_directory)/../../solenv/gbuild/partial_build.mk + +# vim: set noet sw=4 ts=4: diff --git a/external/lpsolve/Module_lpsolve.mk b/external/lpsolve/Module_lpsolve.mk new file mode 100644 index 000000000000..e0094f609c7d --- /dev/null +++ b/external/lpsolve/Module_lpsolve.mk @@ -0,0 +1,18 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Module_Module,lpsolve)) + +$(eval $(call gb_Module_add_targets,lpsolve,\ + UnpackedTarball_lpsolve \ + ExternalPackage_lpsolve \ + ExternalProject_lpsolve \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/lpsolve/README b/external/lpsolve/README new file mode 100644 index 000000000000..3ef9db3e1cdd --- /dev/null +++ b/external/lpsolve/README @@ -0,0 +1 @@ +A mixed Integer Linear Programming (MILP) solver from [http://lpsolve.sourceforge.net/]. diff --git a/external/lpsolve/UnpackedTarball_lpsolve.mk b/external/lpsolve/UnpackedTarball_lpsolve.mk new file mode 100644 index 000000000000..464fcab8a1ef --- /dev/null +++ b/external/lpsolve/UnpackedTarball_lpsolve.mk @@ -0,0 +1,36 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,lpsolve)) + +$(eval $(call gb_UnpackedTarball_set_tarball,lpsolve,$(LPSOLVE_TARBALL))) + +$(eval $(call gb_UnpackedTarball_set_patchlevel,lpsolve,3)) + +ifeq ($(OS_FOR_BUILD),WNT) + +$(eval $(call gb_UnpackedTarball_set_patchflags,lpsolve,--binary)) +$(eval $(call gb_UnpackedTarball_add_patches,lpsolve,\ + external/lpsolve/lp_solve_5.5-windows.patch \ +)) + +else + +$(eval $(call gb_UnpackedTarball_add_patches,lpsolve,\ + external/lpsolve/lp_solve-aix.patch \ + external/lpsolve/lp_solve-fixed-warn.patch \ + external/lpsolve/lp_solve_5.5.patch \ +)) + +$(eval $(call gb_UnpackedTarball_add_file,lpsolve,lpsolve55/ccc.static,external/lpsolve/ccc.static)) + +endif +# vim: set noet sw=4 ts=4: + + diff --git a/external/lpsolve/ccc.static b/external/lpsolve/ccc.static new file mode 100644 index 000000000000..6911c4b2c892 --- /dev/null +++ b/external/lpsolve/ccc.static @@ -0,0 +1,11 @@ +src='../lp_MDO.c ../shared/commonlib.c ../shared/mmio.c ../shared/myblas.c ../ini.c ../fortify.c ../colamd/colamd.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c' +obj=`echo $src|sed -e 's/\.c/.o/g' -e 's!\([^ ]*/\)*!!g'` + +opts='-O3' + +def= + +$CC -I.. -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I../shared $opts $def -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine -c $src + +$AR -r liblpsolve55.a $obj +rm $obj diff --git a/external/lpsolve/lp_solve-aix.patch b/external/lpsolve/lp_solve-aix.patch new file mode 100644 index 000000000000..6ad5877ca499 --- /dev/null +++ b/external/lpsolve/lp_solve-aix.patch @@ -0,0 +1,39 @@ +--- /dev/null 2010-07-28 04:47:47.000000000 -0500 ++++ misc/build/lp_solve_5.5/lpsolve55/ccc.aix.gcc 2010-06-29 17:44:53.000000000 -0500 +@@ -0,0 +1,25 @@ ++src='../lp_MDO.c ../shared/commonlib.c ../shared/mmio.c ../shared/myblas.c ../ini.c ../fortify.c ../colamd/colamd.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c' ++c=$CC ++ ++def= ++so= ++if [ "$PLATFORM" = "SCO_UNIX" ] ++then def='-dy -K PIC -DNOLONGLONG' ++ dl=-lc ++else dl=-ldl ++ so=y ++fi ++ ++opts='-O3' ++ ++$c -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd $opts $def -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src ++ar rv liblpsolve55.a `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` ++ranlib liblpsolve55.a ++ ++if [ "$so" != "" ] ++then ++ $c -fpic -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I. $opts -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src ++ $c -shared $lpsolve_LDFLAGS -o liblpsolve55.so `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` -lc -lm -ldl ++fi ++ ++rm *.o 2>/dev/null +--- misc/lp_solve_5.5/lp_lib.h 2010-07-28 05:15:10.000000000 -0500 ++++ misc/build/lp_solve_5.5/lp_lib.h 2010-07-28 05:15:55.000000000 -0500 +@@ -56,7 +56,7 @@ + /* Define user program feature option switches */ + /* ------------------------------------------------------------------------- */ + +-#if !defined _WINDOWS && !defined _WIN32 && !defined WIN32 ++#if !defined _WINDOWS && !defined _WIN32 && !defined WIN32 && !defined(_AIX) + # define _isnan(x) FALSE + #endif + diff --git a/external/lpsolve/lp_solve-fixed-warn.patch b/external/lpsolve/lp_solve-fixed-warn.patch new file mode 100644 index 000000000000..46742887a85f --- /dev/null +++ b/external/lpsolve/lp_solve-fixed-warn.patch @@ -0,0 +1,84 @@ +--- misc/build/lp_solve_5.5/lp_report.c 2007-01-14 10:31:34.000000000 -0800 ++++ misc/build/lp_solve_5.5/lp_report.c 2007-01-14 10:31:34.000000000 -0800 +@@ -160,7 +160,7 @@ + { + int i, k = 0; + +- fprintf(output, label); ++ fputs(label, output); + fprintf(output, "\n"); + for(i = first; i <= last; i++) { + fprintf(output, " %18g", vector[i]); +@@ -189,7 +189,7 @@ + if(last < 0) + last = lp->rows; + +- fprintf(output, label); ++ fputs(label, output); + fprintf(output, "\n"); + + if(first == 0) { +@@ -254,7 +254,7 @@ + if(last < 0) + last = lp->rows; + +- fprintf(output, label); ++ fputs(label, output); + fprintf(output, "\n"); + + for(i = first; i <= last; i++) { +--- misc/build/lp_solve_5.5/lp_rlp.h 2007-01-14 10:31:52.000000000 -0800 ++++ misc/build/lp_solve_5.5/lp_rlp.h 2007-01-14 10:31:52.000000000 -0800 +@@ -615,7 +615,7 @@ + /* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +-#define ECHO (void) fwrite( lp_yytext, lp_yyleng, 1, lp_yyout ) ++#define ECHO if(fwrite( lp_yytext, lp_yyleng, 1, lp_yyout ) != 1) YY_FATAL_ERROR( "can't write into lp_yytext" ) + #endif + + /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, +--- misc/build/lp_solve_5.5/shared/commonlib.c 2007-01-14 10:33:14.000000000 -0800 ++++ misc/build/lp_solve_5.5/shared/commonlib.c 2007-01-14 10:33:14.000000000 -0800 +@@ -715,7 +715,7 @@ + { + int i, k = 0; + +- fprintf(output, label); ++ fputs(label, output); + fprintf(output, "\n"); + for(i = first; i <= last; i++) { + fprintf(output, " %5d", myvector[i]); +@@ -734,7 +734,7 @@ + { + int i, k = 0; + +- fprintf(output, label); ++ fputs(label, output); + fprintf(output, "\n"); + for(i = first; i <= last; i++) { + if(asRaw) +@@ -756,7 +756,7 @@ + { + int i, k = 0; + +- fprintf(output, label); ++ fputs(label, output); + fprintf(output, "\n"); + for(i = first; i <= last; i++) { + fprintf(output, " %18g", myvector[i]); +--- misc/build/lp_solve_5.5/shared/mmio.c 2007-01-14 10:33:14.000000000 -0800 ++++ misc/build/lp_solve_5.5/shared/mmio.c 2007-01-14 10:33:14.000000000 -0800 +@@ -74,7 +74,11 @@ + + for (i=0; i<nz; i++) + { +- fscanf(f, "%d %d %lg\n", &I[i], &J[i], &val[i]); ++ if(fscanf(f, "%d %d %lg\n", &I[i], &J[i], &val[i]) != 3) ++ { ++ fprintf(stderr, "read_unsymmetric_sparse(): could not parse values.\n"); ++ return -1; ++ } + I[i]--; /* adjust from 1-based to 0-based */ + J[i]--; + } diff --git a/external/lpsolve/lp_solve_5.5-windows.patch b/external/lpsolve/lp_solve_5.5-windows.patch new file mode 100644 index 000000000000..70fb553fcdc9 --- /dev/null +++ b/external/lpsolve/lp_solve_5.5-windows.patch @@ -0,0 +1,60 @@ +*** misc/lp_solve_5.5/lpsolve55/cgcc.bat Sun Jun 12 04:27:28 2005 +--- misc/build/lp_solve_5.5/lpsolve55/cgcc.bat Sun Dec 14 07:55:19 2008 +*************** +*** 7,14 **** +
+ set c=gcc
+
+! rem rc lpsolve.rc
+! %c% -DINLINE=static -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -s -O3 -shared -mno-cygwin -enable-stdcall-fixup -D_USRDLL -DWIN32 -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine %src% ..\lp_solve.def -o lpsolve55.dll
+
+ %c% -DINLINE=static -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -s -O3 -shared -D_USRDLL -DWIN32 -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine %src% -o liblpsolve55.so
+
+--- 7,14 ---- +
+ set c=gcc
+
+! windres lpsolve.rc lpsolve_res.obj
+! %c% -DINLINE=static -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -s -O3 -shared -mno-cygwin -enable-stdcall-fixup -mthreads %lpsolve_LDFLAGS% -D_USRDLL -DWIN32 -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine %src% lpsolve_res.obj ..\lp_solve.def %lpsolve_LIBS% -o lpsolve55.dll
+
+ %c% -DINLINE=static -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -s -O3 -shared -D_USRDLL -DWIN32 -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine %src% -o liblpsolve55.so
+
+*** misc/lp_solve_5.5/lpsolve55/lpsolve.rc Sun Jun 4 00:15:24 2006 +--- misc/build/lp_solve_5.5/lpsolve55/lpsolve.rc Fri Nov 23 16:34:22 2007 +*************** +*** 7,13 **** + //
+ // Generated from the TEXTINCLUDE 2 resource.
+ //
+! #include "afxres.h"
+
+ /////////////////////////////////////////////////////////////////////////////
+ #undef APSTUDIO_READONLY_SYMBOLS
+--- 7,13 ---- + //
+ // Generated from the TEXTINCLUDE 2 resource.
+ //
+! #include "winresrc.h"
+
+ /////////////////////////////////////////////////////////////////////////////
+ #undef APSTUDIO_READONLY_SYMBOLS
+--- misc/lp_solve_5.5/lpsolve55/cvc6.bat ++++ misc/build/lp_solve_5.5/lpsolve55/cvc6.bat +@@ -14,15 +14,4 @@ + set c=cl
+
+-rc lpsolve.rc
++rc %SOLARINC% lpsolve.rc
+-%c% -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd /LD /MD /O1 /Zp8 /Gz -D_WINDLL -D_USRDLL -DWIN32 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine %src% lpsolve.res ..\lp_solve.def -o lpsolve55.dll
++%c% -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd %SOLARINC% /LD %RUNTIME_FLAG% /O1 /Zp8 /Gz -D_WINDLL -D_USRDLL -DWIN32 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine %src% lpsolve.res ..\lp_solve.def -Felpsolve55.dll
+-rem /link /LINK50COMPAT
+-
+-if exist a.obj del a.obj
+-%c% -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd /MT /O1 /Zp8 /Gd /c -DWIN32 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine %src%
+-lib *.obj /OUT:liblpsolve55.lib
+-
+-if exist a.obj del a.obj
+-%c% -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd /MTd /O1 /Zp8 /Gd /c -DWIN32 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine %src%
+-lib *.obj /OUT:liblpsolve55d.lib
+-
+-if exist *.obj del *.obj
diff --git a/external/lpsolve/lp_solve_5.5.patch b/external/lpsolve/lp_solve_5.5.patch new file mode 100644 index 000000000000..124fed82343a --- /dev/null +++ b/external/lpsolve/lp_solve_5.5.patch @@ -0,0 +1,101 @@ +--- misc/build/lp_solve_5.5/lpsolve55/ccc.orig Sat Jun 11 21:27:18 2005 ++++ misc/build/lp_solve_5.5/lpsolve55/ccc Sun May 22 11:20:19 2011 +@@ -1,25 +1,42 @@ + src='../lp_MDO.c ../shared/commonlib.c ../shared/mmio.c ../shared/myblas.c ../ini.c ../fortify.c ../colamd/colamd.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c' +-c=cc ++ar=$AR ++c=$CC ++ranlib=$RANLIB + + def= + so= +-if [ "$PLATFORM" = "SCO_UNIX" ] +-then def='-dy -K PIC -DNOLONGLONG' +- dl=-lc +-else dl=-ldl +- so=y ++soprefix= ++libs= ++pic= ++ldflags= ++inline= ++if [ "$OS" = "WNT" -a "$COM" = "GCC" ]; then ++ so=dll ++ a=dll.a ++ inline=-DINLINE=static ++else ++ so=so ++ a=a ++ soprefix=lib ++ libs="-lm" ++ pic=-fpic ++ ldflags="-Wl,-Bsymbolic -Wl,-soname,liblpsolve55.$so" + fi + ++if [ "$OS" = "LINUX" ]; then ++ libs="$libs -ldl" ++fi ++ + opts='-O3' + +-$c -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd $opts $def -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src ++$c -s $inline -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd $opts $def -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src +-ar rv liblpsolve55.a `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` +-ranlib liblpsolve55.a ++$ar rv liblpsolve55.$a `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` ++$ranlib liblpsolve55.$a + + if [ "$so" != "" ] + then +- $c -fpic -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I. $opts -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src +- $c -shared -Wl,-Bsymbolic -Wl,-soname,liblpsolve55.so -o liblpsolve55.so `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` -lc -lm -ldl ++ $c $pic -s $inline -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I. $opts -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src ++ $c -shared $ldflags -o ${soprefix}lpsolve55.$so `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` $libs + fi + + rm *.o 2>/dev/null +--- misc/build/lp_solve_5.5/lpsolve55/ccc.osx.orig Thu Jun 23 22:53:08 2005 ++++ misc/build/lp_solve_5.5/lpsolve55/ccc.osx Sun May 22 11:19:48 2011 +@@ -1,23 +1,36 @@ + src='../lp_MDO.c ../shared/commonlib.c ../shared/mmio.c ../shared/myblas.c ../ini.c ../fortify.c ../colamd/colamd.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c' +-c=cc ++c=$CC + ++if test -n "$verbose"; then ++ set -x ++fi ++ + def= + so= ++extra_cflags=$EXTRA_CFLAGS ++extra_cdefs=$EXTRA_CDEFS ++extra_linkflags=$EXTRA_LINKFLAGS ++ + if [ "$PLATFORM" = "SCO_UNIX" ] + then def='-DLoadInverseLib=0 -DLoadLanguageLib=0 -D__HYPER=long' + else dl=-ldl + so=y + fi + +-opts='-idirafter /usr/include/sys -O3 -DINTEGERTIME -Wno-long-double' ++if [ "$HAVE_GCC_NO_LONG_DOUBLE" = "YES" ] ; then ++ opts='-idirafter /usr/include/sys -O3 -DINTEGERTIME -Wno-long-double' ++else ++ opts='-idirafter /usr/include/sys -O3 -DINTEGERTIME' ++fi ++ + +-$c -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd $opts $def -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src ++$c $extra_cflags -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd $opts $def -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $extra_cdefs $src +-libtool -static -o liblpsolve55.a `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` ++$LIBTOOL -static -o liblpsolve55.a `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` + + if [ "$so" != "" ] + then +- $c -fPIC -fno-common -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I. $opts -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src +- $c -dynamiclib liblpsolve55.a -compatibility_version 5.5.0 -current_version 5.5.0 -o liblpsolve55.dylib `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` -lc ++ $c $extra_cflags -fPIC -fno-common -s -c -I.. -I../shared -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I. $opts -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $extra_cdefs $src ++ $c $extra_linkflags -dynamiclib liblpsolve55.a -compatibility_version 5.5.0 -current_version 5.5.0 -o liblpsolve55.dylib `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` -lc + fi + + rm *.o 2>/dev/null |