Explorar o código

initial release, qt option is broken

Michael van Elst %!s(int64=23) %!d(string=hai) anos
pai
achega
71723e6a5a
Modificáronse 1 ficheiros con 173 adicións e 0 borrados
  1. 173 0
      lyx/lyx.spec

+ 173 - 0
lyx/lyx.spec

@@ -0,0 +1,173 @@
+##
+##  lyx.spec -- OpenPKG RPM Specification
+##  Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
+##  Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
+##  Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
+##
+##  Permission to use, copy, modify, and distribute this software for
+##  any purpose with or without fee is hereby granted, provided that
+##  the above copyright notice and this permission notice appear in all
+##  copies.
+##
+##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+##  SUCH DAMAGE.
+##
+
+# FIXME mlelstv - JUNK because Qt does not yet build
+
+%define       V_lyx    1.3.0
+%define       V_xforms 1.0
+
+#   package information
+Name:         lyx
+Summary:      Graphical frontend for LaTeX (nearly WYSIWYG)
+URL:          http://www.lyx.org/
+Vendor:       The LyX Team
+Packager:     The OpenPKG Project
+Distribution: OpenPKG [JUNK]
+Group:        Print
+License:      GPL2
+Version:      %{V_lyx}
+Release:      20030226
+
+#   list of sources
+Source0:      ftp://ftp.lyx.org/pub/lyx/stable/lyx-%{V_lyx}.tar.gz
+Source1:      ftp://ncmir.ucsd.edu/pub/xforms/OpenSource/xforms-%{V_xforms}-release.tgz
+Patch0:       lyx.patch
+
+#   package options
+%option       with_xforms yes
+%option       with_qt     no
+
+%if "%{with_xforms}" == "yes"
+%undefine     with_qt
+%define       with_qt     no
+%endif
+%if "%{with_xforms}" == "no"
+%undefine     with_qt
+%define       with_qt     yes
+%endif
+
+#   build information
+Prefix:       %{l_prefix}
+BuildRoot:    %{l_buildroot}
+BuildPreReq:  OpenPKG, openpkg >= 20030103, make, gcc, perl
+BuildPreReq:  X11, tetex, gettext, libiconv
+%if "%{with_xforms}" == "yes"
+BuildPreReq:  jpeg, tiff, xpm
+%endif
+%if "%{with_qt}" == "yes"
+BuildPreReq:  qt
+%endif
+PreReq:       OpenPKG, openpkg >= 20030103
+PreReq:       X11, tetex, tetex::with_x11 = yes, gv, ghostscript
+AutoReq:      no
+AutoReqProv:  no
+
+%description
+    LyX is an advanced open source document processor that encourages
+    an approach to writing based on the structure of your documents,
+    not their appearance. LyX lets you concentrate on writing, leaving
+    details of visual layout to the software.
+
+%prep
+    %setup -q -c
+%if "%{with_xforms}" == "yes"
+    %setup -q -T -D -a 1
+    ( cd xforms-%{V_xforms}-release
+      %patch0 -p0
+    ) || exit 1
+%endif
+
+%build
+    x11_bin=`%{l_prefix}/etc/rc --query x11_bindir`
+    x11_inc=`%{l_prefix}/etc/rc --query x11_incdir`
+    x11_lib=`%{l_prefix}/etc/rc --query x11_libdir`
+%if "%{with_xforms}" == "yes"
+    ( cd xforms-%{V_xforms}-release
+      %{l_shtool} subst \
+        -e 's;@l_prefix@;%{l_prefix};g' \
+        Imakefile */Imakefile
+      PATH=$x11_bin:$PATH
+      imake -DHasGcc2 -UHasSunC -DUseInstalled -I$x11_lib/X11/config
+      %{l_make} Makefiles
+      %{l_make} includes
+      %{l_make} depend
+      %{l_make} %{l_mflags}
+      %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
+    ) || exit 1
+%endif
+
+    ( cd lyx-%{V_lyx}
+%if "%{with_qt}" == "yes"
+      echo "qt_cv_libname=qt-mt" > config.cache
+%endif
+      CC="%{l_cc}" \
+      CXX="%{l_cxx}" \
+      CFLAGS="%{l_cflags -O}" \
+      CXXFLAGS="%{l_cxxflags -O}" \
+      CPPFLAGS="%{l_cppflags}" \
+      LDFLAGS="%{l_ldflags}" \
+      ./configure \
+          --cache-file=config.cache \
+          --prefix=%{l_prefix} \
+          --with-libiconv-prefix=%{l_prefix} \
+          --x-includes=$x11_inc \
+          --x-libraries=$x11_lib \
+          --disable-shared \
+%if "%{with_qt}" == "yes"
+          --with-qt-dir=%{l_prefix} \
+          --with-qt-libraries="%{l_prefix}/lib" \
+          --with-qt-includes="%{l_prefix}/include/qt" \
+          --with-frontend=qt \
+%endif
+%if "%{with_xforms}" == "yes"
+          --with-frontend=xforms \
+          --with-extra-lib=$RPM_BUILD_ROOT%{l_prefix}/lib \
+          --with-extra-inc=$RPM_BUILD_ROOT%{l_prefix}/include/X11 \
+%endif
+          --without-aiksaurus
+      %{l_make} %{l_mflags -O}
+    ) || exit 1
+
+%install
+    ( cd lyx-%{V_lyx}
+      %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
+      strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
+    ) || exit 1
+
+%if "%{with_qt}" == "yes"
+%endif
+%if "%{with_xforms}" == "yes"
+    rm -rf $RPM_BUILD_ROOT%{l_prefix}/include
+    rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib
+%endif
+
+    # preset known helper applications
+    %{l_shtool} subst \
+        -e 's;^\(\\converter latex lyx \).*;\1 "reLyx -f $$i" "";' \
+        -e 's;^\(\\converter literate lyx \).*;\1 "noweb2lyx $$i $$o" "";' \
+        -e 's;^\(\\viewer dvi \).*;\1 "xdvi";' \
+        -e 's;^\(\\viewer pdf \).*;\1 "gv";' \
+        -e 's;^\(\\viewer ps \).*;\1 "gv -swap";' \
+        -e 's;^\(\\viewer eps \).*;\1 "gv";' \
+        -e 's;^\(\\pscommand \).*;\1 "gs";' \
+        $RPM_BUILD_ROOT%{l_prefix}/share/lyx/lyxrc.defaults
+
+    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
+
+%files -f files
+
+%clean
+    rm -rf $RPM_BUILD_ROOT
+