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

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  r...@openpkg.org
  Module: openpkg-src                      Date:   12-Jul-2009 11:50:48
  Branch: HEAD                             Handle: 2009071210504700

  Modified files:
    openpkg-src/postgresql  postgresql.patch postgresql.spec

  Log:
    allow building against OSSP uuid

  Summary:
    Revision    Changes     Path
    1.7         +36 -3      openpkg-src/postgresql/postgresql.patch
    1.281       +30 -0      openpkg-src/postgresql/postgresql.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/postgresql/postgresql.patch
  ============================================================================
  $ cvs diff -u -r1.6 -r1.7 postgresql.patch
  --- openpkg-src/postgresql/postgresql.patch   12 Jul 2009 09:04:29 -0000      
1.6
  +++ openpkg-src/postgresql/postgresql.patch   12 Jul 2009 09:50:47 -0000      
1.7
  @@ -1,6 +1,6 @@
   Index: src/Makefile.shlib
   --- src/Makefile.shlib.orig  2009-01-05 10:27:19 +0100
  -+++ src/Makefile.shlib       2009-07-12 10:25:42 +0200
  ++++ src/Makefile.shlib       2009-07-12 11:40:16 +0200
   @@ -339,7 +339,7 @@
    
    .PHONY: all-lib all-static-lib all-shared-lib
  @@ -12,7 +12,7 @@
    all-lib: all-static-lib
   Index: src/backend/Makefile
   --- src/backend/Makefile.orig        2009-01-01 18:23:34 +0100
  -+++ src/backend/Makefile     2009-07-12 10:25:01 +0200
  ++++ src/backend/Makefile     2009-07-12 11:40:16 +0200
   @@ -32,7 +32,7 @@
    LIBS := $(filter-out -lpgport, $(LIBS)) $(LDAP_LIBS_BE)
    
  @@ -24,7 +24,7 @@
    
   Index: src/include/port.h
   --- src/include/port.h.orig  2009-06-11 16:49:08 +0200
  -+++ src/include/port.h       2009-07-12 10:25:01 +0200
  ++++ src/include/port.h       2009-07-12 11:40:16 +0200
   @@ -360,7 +360,7 @@
    extern int  getopt(int nargc, char *const * nargv, const char *ostr);
    #endif
  @@ -34,3 +34,36 @@
    extern int  isinf(double x);
    #endif
    
  +Index: src/makefiles/Makefile.freebsd
  +--- src/makefiles/Makefile.freebsd.orig      2008-11-14 11:22:47 +0100
  ++++ src/makefiles/Makefile.freebsd   2009-07-12 11:41:40 +0200
  +@@ -16,7 +16,7 @@
  + 
  + %.so: %.o
  + ifdef ELF_SYSTEM
  +-    $(CC) $(CFLAGS) -shared -o $@ $<
  ++    $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< $(SHLIB_LINK)
  + else
  +     $(LD) $(LDREL) $(LDOUT) $<.obj -x $<
  +     @echo building shared object $@
  +Index: src/makefiles/Makefile.linux
  +--- src/makefiles/Makefile.linux.orig        2008-11-14 11:22:47 +0100
  ++++ src/makefiles/Makefile.linux     2009-07-12 11:42:16 +0200
  +@@ -11,4 +11,4 @@
  + endif
  + 
  + %.so: %.o
  +-    $(CC) $(CFLAGS) -shared -o $@ $<
  ++    $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< $(SHLIB_LINK)
  +Index: src/makefiles/Makefile.solaris
  +--- src/makefiles/Makefile.solaris.orig      2009-07-12 11:40:16 +0200
  ++++ src/makefiles/Makefile.solaris   2009-07-12 11:42:07 +0200
  +@@ -18,7 +18,7 @@
  + 
  + %.so: %.o
  + ifeq ($(GCC), yes)
  +-    $(CC) $(CFLAGS) -shared -o $@ $<
  ++    $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< $(SHLIB_LINK)
  + else
  +     $(CC) $(CFLAGS) -G -o $@ $<
  + endif
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/postgresql/postgresql.spec
  ============================================================================
  $ cvs diff -u -r1.280 -r1.281 postgresql.spec
  --- openpkg-src/postgresql/postgresql.spec    12 Jul 2009 09:04:29 -0000      
1.280
  +++ openpkg-src/postgresql/postgresql.spec    12 Jul 2009 09:50:47 -0000      
1.281
  @@ -63,6 +63,7 @@
   %option       with_kerberos     no
   %option       with_mysqlcompat  no
   %option       with_xml          no
  +%option       with_uuid         no
   %option       with_conversion   no
   
   #   list of sources
  @@ -110,6 +111,10 @@
   BuildPreReq:  libxml, libxslt, zlib
   PreReq:       libxml, libxslt, zlib
   %endif
  +%if "%{with_uuid}" == "yes"
  +BuildPreReq:  uuid
  +PreReq:       uuid
  +%endif
   AutoReq:      no
   AutoReqProv:  no
   
  @@ -238,6 +243,11 @@
           -e '/^all:/{x;s/.*/enable_shared = yes/;G;}' \
           src/backend/utils/mb/conversion_procs/proc.mk
   %endif
  +%if "%{with_uuid}" == "yes"
  +    %{l_shtool} subst \
  +        -e '/^SHLIB_LINK/{x;s/.*/enable_shared = yes/;G;}' \
  +        contrib/uuid-ossp/Makefile
  +%endif
       %{l_shtool} subst \
           -e 's;# Shared library stuff;enable_shared = yes;g' \
           src/pl/plpgsql/src/Makefile
  @@ -298,6 +308,9 @@
           --with-libxml \
           --with-libxslt \
   %endif
  +%if "%{with_uuid}" == "yes"
  +        --with-ossp-uuid \
  +%endif
           --disable-shared
   
       #   build package
  @@ -406,6 +419,14 @@
       ) || exit $?
   %endif
   
  +    #   build OSSP uuid based UUID generator functions
  +%if "%{with_uuid}" == "yes"
  +    ( cd contrib/uuid-ossp
  +      %{l_make} %{l_mflags}
  +      %{l_make} %{l_mflags} uuid-ossp.so
  +    ) || exit $?
  +%endif
  +
       #   rebuild pg_config with hard-coded path to avoid that it provides
       #   dynamically resolved paths which circumvent symlinks, etc.
       ( cd src/bin/pg_config
  @@ -538,6 +559,15 @@
       ) || exit $?
   %endif
   
  +    #   install OSSP uuid based UUID generator functions
  +%if "%{with_uuid}" == "yes"
  +    ( cd contrib/uuid-ossp
  +      %{l_shtool} install -c -m 644 \
  +          uuid-ossp.sql uuid-ossp.so \
  +          $RPM_BUILD_ROOT%{l_prefix}/lib/postgresql/
  +    ) || exit $?
  +%endif
  +
       #   adjust default configuration for hourly auto-vacuum operation
       %{l_shtool} subst \
           -e 's;^# *\(stats_start_collector *=\) *[^#]*\(#.*\);\1 on \2;' \
  @@ .
______________________________________________________________________
OpenPKG                                             http://openpkg.org
CVS Repository Commit List                     openpkg-cvs@openpkg.org

Reply via email to