ソースを参照

make Perl support automatic; add automatic X11 support

Ralf S. Engelschall 23 年 前
コミット
a73dd22578
1 ファイル変更20 行追加3 行削除
  1. 20 3
      imagemagick/imagemagick.spec

+ 20 - 3
imagemagick/imagemagick.spec

@@ -25,7 +25,10 @@
 
 #   package options
 %ifndef       with_perl
-%define       with_perl   no
+%define       with_perl   %{l_test -p perl}
+%endif
+%ifndef       with_x11
+%define       with_x11    %{l_test -p x11}
 %endif
 
 #   package version
@@ -61,6 +64,10 @@ PreReq:       OpenPKG, openpkg >= 20020206
 BuildPreReq:  perl
 PreReq:       perl
 %endif
+%if "%{with_x11}" == "yes"
+BuildPreReq:  X11
+PreReq:       X11
+%endif
 AutoReq:      no
 AutoReqProv:  no
 
@@ -75,6 +82,10 @@ AutoReqProv:  no
     Image processing operations are available from the command line, as
     well as through C, C++, and PERL-based programming interfaces.
 
+    Options:
+    --define 'with_perl %{with_perl}'
+    --define 'with_x11 %{with_x11}'
+
 %prep
     %setup -q -n ImageMagick-%{V_major}
     %{l_shtool} subst \
@@ -98,8 +109,14 @@ AutoReqProv:  no
         --with-jpeg \
         --with-png \
         --without-perl \
-        --without-threads \
-        --without-x
+%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
+        --without-threads
     %{l_make} %{l_mflags}
 
 %install