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

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   31-Oct-2005 14:26:34
  Branch: HEAD                             Handle: 2005103113263300

  Added files:
    openpkg-src/tidy        tidy.patch
  Modified files:
    openpkg-src/tidy        tidy.spec

  Log:
    add optional Perl support via HTML::Tidy module from CPAN; disable
    debugging

  Summary:
    Revision    Changes     Path
    1.6         +18 -0      openpkg-src/tidy/tidy.patch
    1.190       +36 -2      openpkg-src/tidy/tidy.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/tidy/tidy.patch
  ============================================================================
  $ cvs diff -u -r0 -r1.6 tidy.patch
  --- /dev/null 2005-10-31 14:26:30 +0100
  +++ tidy.patch        2005-10-31 14:26:34 +0100
  @@ -0,0 +1,18 @@
  +Index: build/gmake/Makefile
  +--- build/gmake/Makefile.orig        2005-07-15 08:58:10 +0200
  ++++ build/gmake/Makefile     2005-10-31 14:22:21 +0100
  +@@ -80,12 +80,12 @@
  + # For optimised builds, flags such as "-O2" should be added and -D_DEBUG=1
  + # disabled.
  + CC= gcc
  +-CFLAGS= -g -Wall -Wno-switch -Wno-parentheses -I $(INCDIR)
  ++CFLAGS= -I$(INCDIR)
  + # flags only supported with gcc 3.x
  + # CFLAGS += -Wunused-parameter
  + 
  + OTHERCFLAGS=
  +-OTHERCFLAGS+= -D_DEBUG=1
  ++# OTHERCFLAGS+= -D_DEBUG=1
  + # OTHERCFLAGS+= -DSUPPORT_ACCESSIBILITY_CHECKS=1 
-DSUPPORT_UTF16_ENCODINGS=1 -DSUPPORT_ASIAN_ENCODINGS=1
  + ifdef SUPPORT_UTF16_ENCODINGS
  + CFLAGS += -DSUPPORT_UTF16_ENCODINGS=$(SUPPORT_UTF16_ENCODINGS)
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/tidy/tidy.spec
  ============================================================================
  $ cvs diff -u -r1.189 -r1.190 tidy.spec
  --- openpkg-src/tidy/tidy.spec        27 Oct 2005 18:05:39 -0000      1.189
  +++ openpkg-src/tidy/tidy.spec        31 Oct 2005 13:26:33 -0000      1.190
  @@ -26,6 +26,7 @@
   %define       V_opkg 20051026
   %define       V_src  051026
   %define       V_doc  051020
  +%define       V_perl 1.06
   
   #   package information
   Name:         tidy
  @@ -38,17 +39,26 @@
   Group:        Text
   License:      GPL
   Version:      %{V_opkg}
  -Release:      20051027
  +Release:      20051031
  +
  +#   package options
  +%option       with_perl  no
   
   #   list of sources
   Source0:      http://tidy.sourceforge.net/src/tidy_src_%{V_src}.tgz
   Source1:      http://tidy.sourceforge.net/docs/tidy_docs_%{V_doc}.tgz
  +Source2:      
http://www.cpan.org/modules/by-module/HTML/HTML-Tidy-%{V_perl}.tar.gz
  +Patch0:       tidy.patch
   
   #   build information
   Prefix:       %{l_prefix}
   BuildRoot:    %{l_buildroot}
   BuildPreReq:  OpenPKG, openpkg >= 20040130, gcc, make, libxslt
   PreReq:       OpenPKG, openpkg >= 20040130
  +%if "%{with_perl}" == "yes"
  +BuildPreReq:  perl
  +PreReq:       perl
  +%endif
   AutoReq:      no
   AutoReqProv:  no
   
  @@ -66,10 +76,19 @@
           url       = http://tidy.sourceforge.net/docs/
           regex     = tidy_docs_(__VER__)\.tgz
       }
  +    prog tidy:perl = {
  +        version   = %{V_perl}
  +        url       = http://www.cpan.org/modules/by-module/HTML/
  +        regex     = HTML-Tidy-(__VER__)\.tar\.gz
  +    }
   
   %prep
       %setup -q -n tidy
       %setup -q -n tidy -T -D -a 1
  +%if "%{with_perl}" == "yes"
  +    %setup -q -n tidy -T -D -a 2
  +%endif
  +    %patch -p0
   
   %build
       ( cd build/gmake
  @@ -81,6 +100,14 @@
         ../../bin/tidy -xml-config >tidy-config.xml
         %{l_prefix}/bin/xsltproc tidy1.xsl tidy.xml >tidy.1
       ) || exit $?
  +%if "%{with_perl}" == "yes"
  +    %{l_shtool} subst \
  +        -e "s;-L/sw/lib;-L`pwd`/../tidy/lib;" \
  +        -e "s;-I/usr/include/tidy;-I`pwd`/../tidy/include;" \
  +        HTML-Tidy-%{V_perl}/Makefile.PL
  +    %{l_prefix}/bin/perl-openpkg prepare
  +    %{l_prefix}/bin/perl-openpkg -d HTML-Tidy-%{V_perl} configure build
  +%endif
   
   %install
       rm -rf $RPM_BUILD_ROOT
  @@ -97,7 +124,14 @@
           include/*.h $RPM_BUILD_ROOT%{l_prefix}/include/tidy/
       %{l_shtool} install -c -m 644 \
           tidy/htmldoc/tidy.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  -    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  +%if "%{with_perl}" == "yes"
  +    %{l_prefix}/bin/perl-openpkg -d HTML-Tidy-%{V_perl} install
  +    %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  +%else
  +    >perl-openpkg-files
  +%endif
  +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  +        %{l_files_std} `cat perl-openpkg-files`
   
   %files -f files
   
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     openpkg-cvs@openpkg.org

Reply via email to