瀏覽代碼

Fix option handling and dependencies, add patchcode to correct missing namespaces in TCL library code

Michael Schloh von Bennewitz 23 年之前
父節點
當前提交
51416ced1e
共有 2 個文件被更改,包括 109 次插入3 次删除
  1. 81 0
      mico/mico.patch
  2. 28 3
      mico/mico.spec

+ 81 - 0
mico/mico.patch

@@ -58,3 +58,84 @@ diff -Naur mico.orig/include/mico/os-math.h mico/include/mico/os-math.h
  #if defined(HAVE_ISNANL)
  	return isnanl (d);
  #elif defined(HAVE_ISNAN)
+diff -Naur mico.orig/auxdir/tclmico.cc mico/auxdir/tclmico.cc
+--- mico.orig/auxdir/tclmico.cc	Fri Dec 11 14:24:55 1998
++++ mico/auxdir/tclmico.cc	Wed Jul 30 16:14:17 2003
+@@ -46,9 +46,9 @@
+     TclDispatcher *disp = event->disp;
+     CORBA::Long handle = event->handle;
+ 
+-    set<FileEvent *, less<FileEvent *> > seen;
++    std::set<FileEvent *, std::less<FileEvent *> > seen;
+     while (42) {
+-	list<FileEvent *>::iterator i;
++	std::list<FileEvent *>::iterator i;
+ 	for (i = disp->fevents.begin(); i != disp->fevents.end(); ++i) {
+ 	    if ((*i)->handle != handle)
+ 		continue;
+@@ -80,7 +80,7 @@
+     TimerEvent *event = (TimerEvent *)_event;
+     TclDispatcher *disp = event->disp;
+ 
+-    list<TimerEvent *>::iterator i;
++    std::list<TimerEvent *>::iterator i;
+     for (i = disp->tevents.begin(); i != disp->tevents.end(); ++i) {
+         if ((*i) == event) {
+ 	  disp->tevents.erase(i);
+@@ -97,13 +97,13 @@
+ 
+ TclDispatcher::~TclDispatcher ()
+ {
+-    list<FileEvent *>::iterator i;
++    std::list<FileEvent *>::iterator i;
+     for (i = fevents.begin(); i != fevents.end(); ++i) {
+ 	(*i)->cb->callback (this, Remove);
+ 	delete *i;
+     }
+ 
+-    list<TimerEvent *>::iterator j;
++    std::list<TimerEvent *>::iterator j;
+     for (j = tevents.begin(); j != tevents.end(); ++j) {
+ 	(*j)->cb->callback (this, Remove);
+ 	delete *j;
+@@ -123,7 +123,7 @@
+     ev = 0;
+     int mask = 0;
+ 
+-    list<FileEvent *>::iterator i;
++    std::list<FileEvent *>::iterator i;
+     for (i = fevents.begin(); i != fevents.end(); ++i) {
+ 	if ((*i)->handle != handle)
+ 	    continue;
+@@ -183,7 +183,7 @@
+ TclDispatcher::remove (CORBA::DispatcherCallback *cb, Event e)
+ {
+     if (e == All || e == Timer) {
+-	list<TimerEvent *>::iterator i, next;
++	std::list<TimerEvent *>::iterator i, next;
+ 	for (i = tevents.begin(); i != tevents.end(); i = next) {
+ 	    next = i;
+ 	    ++next;
+@@ -195,7 +195,7 @@
+ 	}
+     }
+     if (e == All || e == Read || e == Write || e == Except) {
+-	list<FileEvent *>::iterator i, next;
++	std::list<FileEvent *>::iterator i, next;
+ 	for (i = fevents.begin(); i != fevents.end(); i = next) {
+ 	    next = i;
+ 	    ++next;
+diff -Naur mico.orig/include/mico/tclmico.h mico/include/mico/tclmico.h
+--- mico.orig/include/mico/tclmico.h	Mon May 26 12:55:46 2003
++++ mico/include/mico/tclmico.h	Wed Jul 30 16:13:57 2003
+@@ -57,8 +57,8 @@
+ 	    : disp (_disp), token (_token), cb (_cb)
+ 	{}
+     };
+-    list<FileEvent *> fevents;
+-    list<TimerEvent *> tevents;
++    std::list<FileEvent *> fevents;
++    std::list<TimerEvent *> tevents;
+ 
+     static void input_callback (ClientData, int mask);
+     static void timer_callback (ClientData);

+ 28 - 3
mico/mico.spec

@@ -33,7 +33,7 @@ Distribution: OpenPKG [PLUS]
 Group:        System
 License:      LGPL/GPL
 Version:      2.3.10
-Release:      20030723
+Release:      20030730
 
 #   package options
 %option       with_ssl      no
@@ -59,6 +59,14 @@ PreReq:       openssl
 BuildPreReq:  qt
 PreReq:       qt
 %endif
+%if "%{with_gtk}" == "yes"
+BuildPreReq:  gtk
+PreReq:       gtk
+%endif
+%if "%{with_tcl}" == "yes"
+BuildPreReq:  tcl
+PreReq:       tcl
+%endif
 AutoReq:      no
 AutoReqProv:  no
 
@@ -83,10 +91,19 @@ AutoReqProv:  no
     CXX="%{l_cxx}"
     CFLAGS="%{l_cflags -O}"
     CXXFLAGS="%{l_cxxflags -O} -Wno-deprecated"
+    CPPFLAGS="%{l_cppflags}"
+%if "%{with_ssl}" == "yes"
+    CPPFLAGS="$CPPFLAGS -I%{l_prefix}/include/openssl}"
+%endif
 %if "%{with_qt}" == "yes"
-    CXXFLAGS="$CXXFLAGS %{l_cppflags qt}"
+    CPPFLAGS="$CPPFLAGS -I%{l_prefix}/include/qt}"
+%endif
+%if "%{with_gtk}" == "yes"
+    CPPFLAGS="$CPPFLAGS -I%{l_prefix}/include/gtk}"
+%endif
+%if "%{with_tcl}" == "yes"
+    CPPFLAGS="$CPPFLAGS -I%{l_prefix}/include/tcl}"
 %endif
-    CPPFLAGS="%{l_cppflags}"
     LDFLAGS="%{l_ldflags}"
     JAVAC=no
     export CC CXX CFLAGS CXXFLAGS CPPFLAGS LDFLAGS JAVAC
@@ -94,15 +111,23 @@ AutoReqProv:  no
         --prefix=%{l_prefix} \
 %if "%{with_ssl}" == "yes"
         --with-ssl=%{l_prefix} \
+%else
+        --with-ssl=no \
 %endif
 %if "%{with_qt}" == "yes"
         --with-qt=%{l_prefix} \
+%else
+        --with-qt=no \
 %endif
 %if "%{with_gtk}" == "yes"
         --with-gtk=%{l_prefix} \
+%else
+        --with-gtk=no \
 %endif
 %if "%{with_tcl}" == "yes"
         --with-tcl=%{l_prefix} \
+%else
+        --with-tcl=no \
 %endif
         --disable-mini-stl \
         --disable-shared