OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   21-May-2004 12:11:59
  Branch: HEAD                             Handle: 2004052111115900

  Added files:
    openpkg-src/ocaml-gtk   ocaml-gtk.patch
  Modified files:
    openpkg-src/ocaml-gtk   ocaml-gtk.spec

  Log:
    provide both Gtk 1.x and Gtk 2.x bindings

  Summary:
    Revision    Changes     Path
    1.1         +12 -0      openpkg-src/ocaml-gtk/ocaml-gtk.patch
    1.2         +65 -19     openpkg-src/ocaml-gtk/ocaml-gtk.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/ocaml-gtk/ocaml-gtk.patch
  ============================================================================
  $ cvs diff -u -r0 -r1.1 ocaml-gtk.patch
  --- /dev/null 2004-05-21 12:11:59.000000000 +0200
  +++ ocaml-gtk.patch   2004-05-21 12:11:59.000000000 +0200
  @@ -0,0 +1,12 @@
  +Index: src/Makefile
  +--- src/Makefile.orig        2003-10-10 08:30:46 +0200
  ++++ src/Makefile     2004-05-21 12:00:10 +0200
  +@@ -201,7 +201,7 @@
  +     rm -f testcc.ml
  + 
  + install:
  +-    mkdir -p "$(INSTALLDIR)" "$(BINDIR)" "$(DLLDIR)"
  ++    mkdir -p "$(INSTALLDIR)" "$(BINDIR)" "$(DLLDIR)" >/dev/null 2>&1 || true
  +     cp $(ALLOBJS:.cmo=.cmi) $(THOBJS:.cmo=.cmi) "$(INSTALLDIR)"
  +     cp -p *.mli "$(INSTALLDIR)"
  +     cp -p $(ALLOBJS:.cmo=.ml) $(ALLTHOBJS:.cmo=.ml) "$(INSTALLDIR)"
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/ocaml-gtk/ocaml-gtk.spec
  ============================================================================
  $ cvs diff -u -r1.1 -r1.2 ocaml-gtk.spec
  --- openpkg-src/ocaml-gtk/ocaml-gtk.spec      21 May 2004 09:36:23 -0000      1.1
  +++ openpkg-src/ocaml-gtk/ocaml-gtk.spec      21 May 2004 10:11:59 -0000      1.2
  @@ -23,6 +23,10 @@
   ##  SUCH DAMAGE.
   ##
   
  +#   package version
  +%define       V_gtk2  2.2.0
  +%define       V_gtk1  1.2.6
  +
   #   package information
   Name:         ocaml-gtk
   Summary:      Gtk/X11 Interface for OCaml
  @@ -33,19 +37,33 @@
   Class:        EVAL
   Group:        X11
   License:      LGPL
  -Version:      2.2.0
  +Version:      %{V_gtk2}
   Release:      20040521
   
  +#   package options
  +%option       with_gtk1  yes
  +%option       with_gtk2  yes
  +
   #   list of sources
  -Source0:      
http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/lablgtk-%{version}.tar.gz
  +Source0:      
http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/lablgtk-%{V_gtk2}.tar.gz
  +Source1:      
http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/lablgtk-%{V_gtk1}.tar.gz
  +Patch0:       ocaml-gtk.patch
   
   #   build information
   Prefix:       %{l_prefix}
   BuildRoot:    %{l_buildroot}
   BuildPreReq:  OpenPKG, openpkg >= 20040130, make, pkgconfig
   PreReq:       OpenPKG, openpkg >= 20040130
  -BuildPreReq:  X11, gtk2
  -PreReq:       X11, gtk2
  +BuildPreReq:  X11
  +PreReq:       X11
  +%if "%{with_gtk1}" == "yes"
  +BuildPreReq:  gtk
  +PreReq:       gtk
  +%endif
  +%if "%{with_gtk2}" == "yes"
  +BuildPreReq:  gtk2
  +PreReq:       gtk2
  +%endif
   AutoReq:      no
   AutoReqProv:  no
   
  @@ -60,26 +78,54 @@
       }
   
   %prep
  -    %setup -q -n lablgtk-%{version}
  +    %setup -q -c
  +    %setup -q -T -D -a 1
  +    %patch -d lablgtk-%{V_gtk2} -p0
   
   %build
  -    CC="%{l_cc}" \
  -    CFLAGS="%{l_cflags -O}" \
  -    CPPFLAGS="%{l_cppflags}" \
  -    LDFLAGS="%{l_ldflags}" \
  -    ./configure \
  -        --prefix=%{l_prefix} \
  -        --without-gl \
  -        --without-glade \
  -        --without-rsvg \
  -        --without-gnomecanvas \
  -        --without-gnomeui \
  -        --without-panel
  -    %{l_make} %{l_mflags -O}
  +%if "%{with_gtk1}" == "yes"
  +    ( cd lablgtk-%{V_gtk1}
  +      %{l_make} %{l_mflags} configure \
  +          CAMLP4O="camlp4 pa_o.cmo pa_op.cmo pr_dump.cmo"
  +      %{l_make} %{l_mflags}
  +    ) || exit $?
  +%endif
  +%if "%{with_gtk2}" == "yes"
  +    ( cd lablgtk-%{V_gtk2}
  +      CC="%{l_cc}" \
  +      CFLAGS="%{l_cflags -O}" \
  +      CPPFLAGS="%{l_cppflags}" \
  +      LDFLAGS="%{l_ldflags}" \
  +      ./configure \
  +          --prefix=%{l_prefix} \
  +          --without-gl \
  +          --without-glade \
  +          --without-rsvg \
  +          --without-gnomecanvas \
  +          --without-gnomeui \
  +          --without-panel
  +      %{l_make} %{l_mflags}
  +    ) || exit $?
  +%endif
   
   %install
       rm -rf $RPM_BUILD_ROOT
  -    %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  +    %{l_shtool} mkdir -f -p -m 755 \
  +        $RPM_BUILD_ROOT%{l_prefix}/bin
  +%if "%{with_gtk1}" == "yes"
  +    ( cd lablgtk-%{V_gtk1}
  +      %{l_make} %{l_mflags} install \
  +          LIBDIR=$RPM_BUILD_ROOT%{l_prefix}/lib/ocaml \
  +          BINDIR=$RPM_BUILD_ROOT%{l_prefix}/bin \
  +          INSTALLDIR=$RPM_BUILD_ROOT%{l_prefix}/lib/ocaml/lablgtk \
  +          DLLDIR=$RPM_BUILD_ROOT%{l_prefix}/lib/ocaml/stublibs
  +    ) || exit $?
  +%endif
  +%if "%{with_gtk2}" == "yes"
  +    ( cd lablgtk-%{V_gtk2}
  +      %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  +    ) || exit $?
  +%endif
       strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
       %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to