pkgsrc/misc/openoffice3/patches/patch-de
2009-05-09 18:43:41 +00:00

92 lines
3.1 KiB
Text

$NetBSD: patch-de,v 1.2 2009/05/09 18:43:41 hira Exp $
--- lpsolve/lp_solve_5.5.patch.orig 2009-05-09 15:08:35.000000000 +0900
+++ lpsolve/lp_solve_5.5.patch 2009-05-09 22:42:55.000000000 +0900
@@ -1,12 +1,32 @@
--- misc/lp_solve_5.5/lpsolve55/ccc Sat Jun 11 21:27:18 2005
+++ misc/build/lp_solve_5.5/lpsolve55/ccc Wed May 21 17:19:56 2008
-@@ -1,5 +1,5 @@
+@@ -1,12 +1,15 @@
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
def=
so=
+ if [ "$PLATFORM" = "SCO_UNIX" ]
+ then def='-dy -K PIC -DNOLONGLONG'
+ dl=-lc
+-else dl=-ldl
++else if [ x"$OS" = x"NETBSD" -o x"$OS" = x"FREEBSD" ]
++ then dl=-lc
++ else dl=-ldl
++ fi
+ so=y
+ fi
+
+@@ -19,7 +22,7 @@
+ 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 -shared -Wl,-Bsymbolic -Wl,-soname,liblpsolve55.so -o liblpsolve55.so `echo $src|sed s/[.]c/.o/g|sed 's/[^ ]*\///g'` -lc -lm $dl
+ fi
+
+ rm *.o 2>/dev/null
--- misc/lp_solve_5.5/lpsolve55/ccc.os2 2008-11-26 12:49:36.000000000 +0100
+++ misc/build/lp_solve_5.5/lpsolve55/ccc.os2 2008-09-25 17:27:48.000000000 +0200
@@ -1 +1,13 @@
@@ -89,3 +109,53 @@
+fi
+
+rm *.o 2>/dev/null
+--- misc/lp_solve_5.5/shared/commonlib.c 2007-01-15 03:33:14.000000000 +0900
++++ misc/build/lp_solve_5.5/shared/commonlib.c 2008-06-27 18:16:17.000000000 +0900
+@@ -4,7 +4,7 @@
+ #ifdef INTEGERTIME
+ # include <time.h>
+ #else
+-# include <sys/timeb.h>
++# include <sys/time.h>
+ #endif
+
+ #include <stdlib.h>
+@@ -700,10 +700,10 @@
+ #elif defined CLOCKTIME
+ return((double)clock()/CLOCKS_PER_SEC /* CLK_TCK */);
+ #else
+- struct timeb buf;
++ struct timeval buf;
+
+- ftime(&buf);
+- return((double)buf.time+((double) buf.millitm)/1000.0);
++ gettimeofday(&buf, NULL);
++ return((double)buf.tv_sec+((double) buf.tv_usec)/1000000.0);
+ #endif
+ }
+
+--- misc/lp_solve_5.5/bfp/bfp_LUSOL/LUSOL/commonlib.c 2007-01-15 03:29:20.000000000 +0900
++++ misc/build/lp_solve_5.5/bfp/bfp_LUSOL/LUSOL/commonlib.c 2008-06-27 18:17:35.000000000 +0900
+@@ -4,7 +4,7 @@
+ #ifdef INTEGERTIME
+ # include <time.h>
+ #else
+-# include <sys/timeb.h>
++# include <sys/time.h>
+ #endif
+
+ #include <stdlib.h>
+@@ -673,10 +673,10 @@
+ #elif defined CLOCKTIME
+ return((double)clock()/CLOCKS_PER_SEC /* CLK_TCK */);
+ #else
+- struct timeb buf;
++ struct timeval buf;
+
+- ftime(&buf);
+- return((double)buf.time+((double) buf.millitm)/1000.0);
++ gettimeofday(&buf);
++ return((double)buf.tv_sec+((double) buf.tv_usec)/1000000.0);
+ #endif
+ }
+