Bug 148936 - Patch to spec file to conditionally deactivate X11 support
Patch to spec file to conditionally deactivate X11 support
Product: Fedora
Classification: Fedora
Component: VFlib2 (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Akira TAGOH
Bill Huang
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2005-02-16 20:31 EST by Philip Gwyn
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 2.25.6-27
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-02-23 01:57:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Philip Gwyn 2005-02-16 20:31:17 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)

Description of problem:
This patch adds %define use_X to the spec file.  This define is then
used to conditionnaly turn functionnaly that needs X11 on or off.

Deactivating X11 is useful for servers.

VFlib2 without X11 will not have disol, fmtest, kban, vfperf, vftest.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Do a default install of FC3
2. rpm -e xorg-x11-libs
Step 2 fails, because, amoungst others, VFlib2 requires the X11 libraries

Additional info:

--- SPECS/VFlib2.spec   2004-10-04 06:22:17.000000000 -0400
+++ SPECS.noX/VFlib2.spec   2005-02-16 19:29:51.162990239 -0500
@@ -1,10 +1,20 @@
+# set to 0 to disable X11 bits
+%define use_X 0
 Name:      VFlib2
 Version:   2.25.6
+%if %{use_X} 
 Release:   25
+Release:   25.noX
 License:   GPL
 URL:       http://TypeHack.aial.hiroshima-u.ac.jp/VFlib/
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
-BuildPreReq:   freetype-devel XFree86-devel
+BuildPreReq:   freetype-devel
+%if %{use_X}
+BuildPreReq: XFree86-devel
 ## re-compressed bzip2 instead of gzip
 # Source: 
@@ -108,7 +118,11 @@
-OPTS="--with-x --with-freetype --enable-shared --enable-static"
+%if %{use_X}
+   OPTS="--with-x --with-freetype --enable-shared --enable-static"
+   OPTS="--without-x --with-freetype --enable-shared --enable-static"
 if [ -d %{_includedir}/freetype1 ]; then
 %configure ${OPTS}
@@ -130,11 +144,13 @@
 (cd $RPM_BUILD_ROOT%{_sysconfdir} ; ln -fs
..%{_datadir}/VFlib/%{version}/vfontcap .)   
 (cd $RPM_BUILD_ROOT%{_sysconfdir} ; ln -fs
..%{_datadir}/VFlib/%{version}/vfontcap.ja .)
+%if %{use_X}
 install -c -m 0755 tools/.libs/disol  $RPM_BUILD_ROOT%{_bindir}
 install -c -m 0755 tools/.libs/fmtest $RPM_BUILD_ROOT%{_bindir}
 install -c -m 0755 tools/.libs/kban   $RPM_BUILD_ROOT%{_bindir}
 install -c -m 0755 tools/.libs/vfperf $RPM_BUILD_ROOT%{_bindir}
 install -c -m 0755 tools/.libs/vftest $RPM_BUILD_ROOT%{_bindir}
 cp -ar jTeX $RPM_BUILD_ROOT%{_datadir}/VFlib/VFjfm
 cp -ar dynafont $RPM_BUILD_ROOT%{_datadir}/VFlib/VFjfm
@@ -168,12 +184,14 @@
+%if %{use_X}
Comment 1 Akira TAGOH 2005-02-17 04:13:15 EST
Well, what do you want to do? if you don't just want to install
xorg-x11 by VFlib2, I'd recommend to separate out the binaries which
depends on X to the sub package. does it make sense?
Comment 2 Philip Gwyn 2005-02-17 14:50:12 EST
Yes.  In fact, it's a better idea then having with-X and without-X
packages.  Is there any chance this would make it into the distro?
Comment 3 Akira TAGOH 2005-02-18 03:05:22 EST
Yes, will do soon.
Comment 4 Akira TAGOH 2005-02-23 01:57:22 EST
Fixed in 2.25.6-27 and VFlib2-xtools contains the utilities which depends on X

Note You need to log in before you can comment on or make changes to this bug.