[csw-devel] SF.net SVN: gar:[10669] csw/mgar/pkg/rbgems

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Thu Jul 29 18:12:34 CEST 2010


Revision: 10669
          http://gar.svn.sourceforge.net/gar/?rev=10669&view=rev
Author:   dmichelsen
Date:     2010-07-29 16:12:34 +0000 (Thu, 29 Jul 2010)

Log Message:
-----------
rbgems/pg: Initial commit

Modified Paths:
--------------
    csw/mgar/pkg/rbgems/pg/trunk/Makefile
    csw/mgar/pkg/rbgems/pg/trunk/checksums

Added Paths:
-----------
    csw/mgar/pkg/rbgems/pg/
    csw/mgar/pkg/rbgems/pg/trunk/files/0001-Remove-gcc-specific-Wall.patch
    csw/mgar/pkg/rbgems/pg/trunk/files/0002-Add-DESTDIR-support.patch

Removed Paths:
-------------
    csw/mgar/pkg/rbgems/pg/trunk/files/0001-Remove-gcc-specific-flags.patch

Modified: csw/mgar/pkg/rbgems/pg/trunk/Makefile
===================================================================
--- csw/mgar/pkg/rbgems/sqlite3-ruby/trunk/Makefile	2010-07-28 13:16:16 UTC (rev 10634)
+++ csw/mgar/pkg/rbgems/pg/trunk/Makefile	2010-07-29 16:12:34 UTC (rev 10669)
@@ -1,24 +1,29 @@
-GARNAME = sqlite3-ruby
-GARVERSION = 1.3.1
+GARNAME = pg
+GARVERSION = 0.9.0
 CATEGORIES = rbgems
 
-DESCRIPTION = Ruby interface to SQLite3
+DESCRIPTION = Access a PostgreSQL database from Ruby
 define BLURB
-  This module allows Ruby programs to interface with the SQLite3 database engine (http://www.sqlite.org). You must have the SQLite engine installed in order to build this module. Note that this module is NOT compatible with SQLite 2.x.
+  This is the extension library to access a PostgreSQL database from Ruby. This library works with PostgreSQL 7.4 and later.
 endef
 
-PATCHFILES = 0001-Remove-gcc-specific-flags.patch
+PATCHFILES  = 0001-Remove-gcc-specific-Wall.patch
+PATCHFILES += 0002-Add-DESTDIR-support.patch
 
-PACKAGES = CSWgem-sqlite3ruby
-CATALOGNAME = gem_sqlite3ruby
+PACKAGES = CSWgem-pg
+CATALOGNAME = gem_pg
 
-BUILD_DEP_PKGS = CSWsqlite3devel
-RUNTIME_DEP_PKGS = CSWsqlite3rt
+BUILD_DEP_PKGS = CSWpostgresql CSWgem-rakecompiler
+RUNTIME_DEP_PKGS = CSWlibpq
 
 LICENSE = LICENSE
 
-CONFIGURE_SCRIPTS = ruby-setup
-BUILD_SCRIPTS = ruby-setup
+# This must go into the runpath
+NOISALIST = 1
+EXTRA_LIB = /opt/csw/postgresql/lib
+
+#CONFIGURE_SCRIPTS = ruby-setup
+#BUILD_SCRIPTS = ruby-setup
 INSTALL_SCRIPTS = ruby-setup
 
 include gar/category.mk
@@ -31,8 +36,19 @@
 	cd $(WORKSRC) && ruby setup.rb setup
 	@$(MAKECOOKIE)
 
+install-ruby-setup: GEM_BUILD_FLAGS=--with-pg-config=/opt/csw/postgresql/bin/pg_config32
 install-ruby-setup:
-	cd $(WORKSRC) && ruby setup.rb install \
-		--prefix=$(DESTDIR)
+	# cd $(WORKSRC) && ruby setup.rb install \
+	#	--prefix=$(DESTDIR)
+	cd $(WORKSRC) && rake gem
+	#cd $(WORKSRC) && DESTDIR=$(DESTDIR) rake install -- --with-pg-config=/opt/csw/postgresql/bin/pg_config32
+	LD_OPTIONS="$(LD_OPTIONS)" gem install \
+		--ignore-dependencies \
+		--local \
+		--no-test \
+		--install-dir $(DESTDIR)$(GEMDIR) \
+		$(EXTRA_GEM_INSTALL_ARGS) \
+		$(WORKSRC)/pkg/$(GEMFILE) \
+		$(if $(GEM_BUILD_FLAGS),-- --build-flags $(GEM_BUILD_FLAGS))
 	@$(MAKECOOKIE)
 

Modified: csw/mgar/pkg/rbgems/pg/trunk/checksums
===================================================================
--- csw/mgar/pkg/rbgems/sqlite3-ruby/trunk/checksums	2010-07-28 13:16:16 UTC (rev 10634)
+++ csw/mgar/pkg/rbgems/pg/trunk/checksums	2010-07-29 16:12:34 UTC (rev 10669)
@@ -1,2 +1,3 @@
-ac9fdaa9cac52ac85f9010dc23000edd  0001-Remove-gcc-specific-flags.patch
-4b79bb5feeb652a522f6fe5071a84ff9  sqlite3-ruby-1.3.1.gem
+ecef2abc5d9e924913fa7ef6c434e46b  0001-Remove-gcc-specific-Wall.patch
+7e0928edce56bfe7ec4e3b17157e0004  0002-Add-DESTDIR-support.patch
+fa129ab6d009cf32502cfda2bf1614b5  pg-0.9.0.gem

Added: csw/mgar/pkg/rbgems/pg/trunk/files/0001-Remove-gcc-specific-Wall.patch
===================================================================
--- csw/mgar/pkg/rbgems/pg/trunk/files/0001-Remove-gcc-specific-Wall.patch	                        (rev 0)
+++ csw/mgar/pkg/rbgems/pg/trunk/files/0001-Remove-gcc-specific-Wall.patch	2010-07-29 16:12:34 UTC (rev 10669)
@@ -0,0 +1,25 @@
+From 078997843bef14704571421c3b7c0c2d62ca62d4 Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Thu, 29 Jul 2010 17:55:35 +0200
+Subject: [PATCH] Remove gcc specific Wall
+
+---
+ ext/extconf.rb |    2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+diff --git a/ext/extconf.rb b/ext/extconf.rb
+index 40a4be4..eed6f93 100644
+--- a/ext/extconf.rb
++++ b/ext/extconf.rb
+@@ -119,8 +119,6 @@ have_func 'PQsetClientEncoding'
+ # unistd.h confilicts with ruby/win32.h when cross compiling for win32 and ruby 1.9.1
+ have_header 'unistd.h' unless enable_config("static-build")
+ 
+-$CFLAGS << ' -Wall'
+-
+ create_header()
+ create_makefile( "pg_ext" )
+ 
+-- 
+1.7.1
+

Deleted: csw/mgar/pkg/rbgems/pg/trunk/files/0001-Remove-gcc-specific-flags.patch
===================================================================
--- csw/mgar/pkg/rbgems/sqlite3-ruby/trunk/files/0001-Remove-gcc-specific-flags.patch	2010-07-28 13:16:16 UTC (rev 10634)
+++ csw/mgar/pkg/rbgems/pg/trunk/files/0001-Remove-gcc-specific-flags.patch	2010-07-29 16:12:34 UTC (rev 10669)
@@ -1,32 +0,0 @@
-From be44bd9b7a143ec7fd737c1d67fdee19a2c17592 Mon Sep 17 00:00:00 2001
-From: Dagobert Michelsen <dam at opencsw.org>
-Date: Wed, 28 Jul 2010 14:40:01 +0200
-Subject: [PATCH] Remove gcc specific flags
-
----
- ext/sqlite3/extconf.rb |    5 ++---
- 1 files changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/ext/sqlite3/extconf.rb b/ext/sqlite3/extconf.rb
-index 5898927..88bfc6c 100644
---- a/ext/sqlite3/extconf.rb
-+++ b/ext/sqlite3/extconf.rb
-@@ -6,13 +6,12 @@ require 'mkmf'
- 
- RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
- 
--sqlite = dir_config('sqlite3', ['/usr/local', '/opt/local', '/usr'])
-+sqlite = dir_config('sqlite3', ['/opt/csw'])
- 
- if RUBY_PLATFORM =~ /mswin/
-   $CFLAGS << ' -W3'
- else
--  $CFLAGS << ' -O3 -Wall -Wcast-qual -Wwrite-strings -Wconversion' <<
--             ' -Wmissing-noreturn -Winline'
-+  $CFLAGS << ''
- end
- 
- def asplode missing
--- 
-1.7.1
-

Added: csw/mgar/pkg/rbgems/pg/trunk/files/0002-Add-DESTDIR-support.patch
===================================================================
--- csw/mgar/pkg/rbgems/pg/trunk/files/0002-Add-DESTDIR-support.patch	                        (rev 0)
+++ csw/mgar/pkg/rbgems/pg/trunk/files/0002-Add-DESTDIR-support.patch	2010-07-29 16:12:34 UTC (rev 10669)
@@ -0,0 +1,25 @@
+From a0e0003f3d81635f4f57427d60caa5bff2286f80 Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Thu, 29 Jul 2010 15:29:29 +0200
+Subject: [PATCH] Add DESTDIR support
+
+---
+ rake/packaging.rb |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/rake/packaging.rb b/rake/packaging.rb
+index da8354d..5801946 100644
+--- a/rake/packaging.rb
++++ b/rake/packaging.rb
+@@ -43,7 +43,7 @@ task :install => "spec:quiet" do
+ 	Dir.chdir( LIBDIR ) do
+ 		LIB_FILES.collect {|path| Pathname(path) }.each do |libfile|
+ 			relpath = libfile.relative_path_from( LIBDIR )
+-			target = sitelib + relpath
++			target = Pathname.new( ENV['DESTDIR'] + sitelib + relpath )
+ 			FileUtils.mkpath target.dirname,
+ 				:mode => 0755, :verbose => true, :noop => $dryrun unless target.dirname.directory?
+ 			FileUtils.install relpath, target,
+-- 
+1.7.1
+


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list