فهرست منبع

add explicit X11 support and do not stumble over our feets if libmicox.a cannot be moved

Ralf S. Engelschall 22 سال پیش
والد
کامیت
407bd13a92
1فایلهای تغییر یافته به همراه16 افزوده شده و 1 حذف شده
  1. 16 1
      mico/mico.spec

+ 16 - 1
mico/mico.spec

@@ -37,6 +37,7 @@ Release:      20030813
 
 #   package options
 %option       with_ssl      no
+%option       with_x11      no
 %option       with_qt       no
 %option       with_gtk      no
 %option       with_tcl      no
@@ -55,6 +56,10 @@ PreReq:       OpenPKG, openpkg >= 20030718
 BuildPreReq:  openssl
 PreReq:       openssl
 %endif
+%if "%{with_x11}" == "yes"
+BuildPreReq:  X11
+PreReq:       X11
+%endif
 %if "%{with_qt}" == "yes"
 BuildPreReq:  qt, pkgconfig
 PreReq:       qt
@@ -115,6 +120,13 @@ AutoReqProv:  no
 %if "%{with_ssl}" == "yes"
         --with-ssl=%{l_prefix} \
 %endif
+%if "%{with_x11}" == "yes"
+        --with-x \
+        --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
+        --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
+%else
+        --without-x \
+%endif
 %if "%{with_qt}" == "yes"
         --with-qt=%{l_prefix} \
 %endif
@@ -160,9 +172,12 @@ AutoReqProv:  no
     mv  $RPM_BUILD_ROOT%{l_prefix}/man/man8/nsd.8 \
         $RPM_BUILD_ROOT%{l_prefix}/man/man8/mico-nsd.8
     ( cd $RPM_BUILD_ROOT%{l_prefix}/lib
-      for name in mico micoaux micocoss micoir micox; do
+      for name in mico micoaux micocoss micoir; do
           mv lib${name}%{version}.a lib${name}.a
       done
+%if "%{with_x11}" == "yes"
+      mv libmicox%{version}.a libmicox.a
+%endif
 %if "%{with_qt}" == "yes"
       mv libmicoqt%{version}.a libmicoqt.a
 %endif