ソースを参照

Add optional X11 support. Submitted by: Joerg Lehrke <jlehrke@noc.de>

Ralf S. Engelschall 24 年 前
コミット
2f29da710f
1 ファイル変更35 行追加2 行削除
  1. 35 2
      emacs/emacs.spec

+ 35 - 2
emacs/emacs.spec

@@ -23,6 +23,14 @@
 ##  SUCH DAMAGE. 
 ##  
 
+#   the additionally used features 
+%define       with_x                no
+
+#   more optional settings
+#   (requires with_x set to "yes" above)
+%define       with_jpeg             no
+%define       with_png              no
+
 #   package information
 Name:         emacs
 Summary:      The GNU EMACS Text Editor
@@ -33,7 +41,7 @@ Distribution: OpenPKG [REL]
 Group:        Editor
 License:      GPL
 Version:      21.1
-Release:      20011201
+Release:      20020125
 
 #   list of sources
 Source0:      ftp://ftp.gnu.org/gnu/emacs/emacs-%{version}.tar.gz
@@ -41,8 +49,18 @@ Source0:      ftp://ftp.gnu.org/gnu/emacs/emacs-%{version}.tar.gz
 #   build information
 Prefix:       %{l_prefix}
 BuildRoot:    %{l_buildroot}
-BuildPreReq:  OpenPKG, openpkg >= 20011227, make
+BuildPreReq:  OpenPKG, openpkg >= 20011227, make, texinfo
 PreReq:       OpenPKG, openpkg >= 20011227
+%if "%{with_x}" == "yes"
+BuildPreReq:  X11
+PreReq:       X11
+%if "%{with_jpeg}" == "yes"
+BuildPreReq:  jpeg
+%endif
+%if "%{with_png}" == "yes"
+BuildPreReq:  png, zlib
+%endif
+%endif
 AutoReq:      no
 AutoReqProv:  no
 
@@ -60,10 +78,25 @@ AutoReqProv:  no
         -- configure
     CC="%{l_cc}" \
     CFLAGS="%{l_cflags -O}" \
+    CPPFLAGS="-I%{l_prefix}/include" \
+    LDFLAGS="-L%{l_prefix}/lib" \
     ./configure \
         --prefix=%{l_prefix} \
+%if "%{with_x}" == "yes"
+        --with-x \
+        --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
+        --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
+%if "%{with_jpeg}" == "yes"
+        --with-jpeg \
+%endif
+%if "%{with_png}" == "yes"
+        --with-png \
+%endif
+        --with-x-toolkit=yes
+%else
         --with-x-toolkit=no \
         --without-x
+%endif
     %{l_make} %{l_mflags -O}
 
 %install