Deleted:
/trunk/RPostgreSQL/src/install.libs.R
Modified:
/trunk/RPostgreSQL/ChangeLog
/trunk/RPostgreSQL/DESCRIPTION
/trunk/RPostgreSQL/src/Makevars.win
/trunk/RPostgreSQL/src/libpq/Makefile.global.win64
/trunk/RPostgreSQL/src/libpq/Makefile.shlib
/trunk/RPostgreSQL/src/libpq/Makefile.win
=======================================
--- /trunk/RPostgreSQL/src/install.libs.R Sat Nov 12 01:07:20 2011
+++ /dev/null
@@ -1,20 +0,0 @@
-## the following variables are defined to be available,
-## and to prevent abuse we don't expose anything else
-files <- Sys.glob(paste("*", SHLIB_EXT, sep=""))
-if (length(files)) {
- libarch <- if (nzchar(R_ARCH)) paste("libs", R_ARCH, sep="")
else "libs"
- dest <- file.path(R_PACKAGE_DIR, libarch)
- message('installing to ', dest)
- dir.create(dest, recursive = TRUE, showWarnings = FALSE)
- file.copy(files, dest, overwrite = TRUE)
- if(WINDOWS){
- file.copy('libpq/libpq.dll', dest, overwrite = TRUE)
- }
- ## not clear if this is still necessary, but sh version did so
- if (!WINDOWS) Sys.chmod(file.path(dest, files), "755")
- if (nzchar(Sys.getenv("PKG_MAKE_DSYM")) && length(grep("^darwin",
R.version$os))) {
- message('generating debug symbols (dSYM)')
- dylib <- Sys.glob(paste(dest, "/*", SHLIB_EXT, sep=""))
- if (length(dylib)) for (file in dylib) system(paste("dsymutil ",
file, sep=""))
- }
-}
=======================================
--- /trunk/RPostgreSQL/ChangeLog Sat Dec 31 05:11:32 2011
+++ /trunk/RPostgreSQL/ChangeLog Tue Jan 10 00:51:04 2012
@@ -1,3 +1,17 @@
+2012-01-10 Tomoaki NISHIYAMA <tomo...@kenroku.asrc.kanazawa-u.ac.jp>
+
+ Windows support for r-devel.
+ Make libpq.a with ar directly from $(OBJ) not via dll.
+ Thus, install.libs.R is no more required.
+
+ * ChangeLog
+ * DESCRIPTION
+ * src/Makevars.win
+ * src/install.libs.R: delete
+ * src/libpq/Makefile.global.win64
+ * src/libpq/Makefile.win
+ * src/libpq/Makefile.shlib
+
2011-12-31 Tomoaki NISHIYAMA <tomo...@kenroku.asrc.kanazawa-u.ac.jp>
Move conditionals from Makevars.in to configure.in and
=======================================
--- /trunk/RPostgreSQL/DESCRIPTION Sat Dec 31 05:11:32 2011
+++ /trunk/RPostgreSQL/DESCRIPTION Tue Jan 10 00:51:04 2012
@@ -1,5 +1,5 @@
Package: RPostgreSQL
-Version: 0.3-1
+Version: 0.3-2
Date: $Date$
Title: R interface to the PostgreSQL database system
Author: Joe Conway, Dirk Eddelbuettel, Tomoaki Nishiyama, Sameer Kumar
Prayaga (during 2008), Neil Tiffin
=======================================
--- /trunk/RPostgreSQL/src/Makevars.win Tue Nov 22 02:15:30 2011
+++ /trunk/RPostgreSQL/src/Makevars.win Tue Jan 10 00:51:04 2012
@@ -1,9 +1,11 @@
PKG_CPPFLAGS=-I./libpq
-PKG_LIBS=libpq/libpq.a
+PKG_LIBS=libpq/libpq.a -lshfolder -lwsock32 -lws2_32 -lsecur32
.PHONY: all
all: $(SHLIB)
$(SHLIB): libpq/libpq.a
+export CC
+
libpq/libpq.a:
(cd libpq; make -f Makefile.win)
=======================================
--- /trunk/RPostgreSQL/src/libpq/Makefile.global.win64 Mon Nov 14 00:53:58
2011
+++ /trunk/RPostgreSQL/src/libpq/Makefile.global.win64 Tue Jan 10 00:51:04
2012
@@ -51,7 +51,7 @@
vpathsearch = `for f in $(addsuffix /$(1),$(subst :, ,. $(VPATH))); do
test -r $$f && echo $$f && break; done`
# Saved arguments from configure
-configure_args
= '--host=x86_64-w64-mingw32' '--without-zlib' 'host_alias=x86_64-w64-mingw32'
+# configure_args
= '--host=x86_64-w64-mingw32' '--without-zlib' 'host_alias=x86_64-w64-mingw32'
##########################################################################
@@ -201,7 +201,8 @@
# Compilers
-CPP = x86_64-w64-mingw32-gcc -E
+#CPP = x86_64-w64-mingw32-gcc -E
+# hope this is set appropriately by the system
CPPFLAGS = -I./src/include/port/win32 -DEXEC_BACKEND
ifdef PGXS
@@ -213,7 +214,14 @@
endif
endif # not PGXS
-CC = x86_64-w64-mingw32-gcc
+#CC = x86_64-w64-mingw32-gcc
+ifeq ($(CC),gcc)
+CC=gcc -m64
+endif
+ifeq "$(CC)" "x86_64-w64-mingw32-gcc "
+CC=x86_64-w64-mingw32-gcc
+endif
+# hope this variable is set appropriately by the system
GCC = yes
SUN_STUDIO_CC = no
CFLAGS = -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -Wformat-security
-fno-strict-aliasing -fwrapv
@@ -230,14 +238,23 @@
# Linking
+ifeq "$(CC)" "x86_64-w64-mingw32-gcc"
AR = x86_64-w64-mingw32-ar
+endif
+# hope this variable is set appropriately by the system
+ifeq "$(CC)" "x86_64-w64-mingw32-gcc"
DLLTOOL = x86_64-w64-mingw32-dlltool
DLLWRAP = x86_64-w64-mingw32-dllwrap
+else
+DLLTOOL = dlltool -m64
+DLLWRAP = dllwrap -m64
+endif
LIBS = -lwsock32 -lm
LDAP_LIBS_FE =
LDAP_LIBS_BE =
OSSP_UUID_LIBS =
-LD = c:/rtools/mingw64/x86_64-w64-mingw32/bin/ld.exe
+#LD = c:/rtools/mingw64/x86_64-w64-mingw32/bin/ld.exe
+# hope this variable is set appropriately by the system
with_gnu_ld = yes
ld_R_works =
@@ -257,8 +274,14 @@
LDFLAGS_SL +=
LDREL = -r
LDOUT = -o
+
+ifeq "$(CC)" "x86_64-w64-mingw32-gcc"
RANLIB = x86_64-w64-mingw32-ranlib
WINDRES = x86_64-w64-mingw32-windres
+else
+RANLIB = ranlib
+WINDRES = windres -F pe-x86-64
+endif
X = .exe
# Perl
@@ -305,9 +328,15 @@
missing = $(SHELL) $(top_srcdir)/config/missing
+ifeq "$(CC)" "x86_64-w64-mingw32-gcc"
STRIP = x86_64-w64-mingw32-strip
STRIP_STATIC_LIB = x86_64-w64-mingw32-strip -x
STRIP_SHARED_LIB = x86_64-w64-mingw32-strip --strip-unneeded
+else
+STRIP = strip
+STRIP_STATIC_LIB = strip -x
+STRIP_SHARED_LIB = strip --strip-unneeded
+endif
# Documentation
=======================================
--- /trunk/RPostgreSQL/src/libpq/Makefile.shlib Mon Nov 14 00:53:58 2011
+++ /trunk/RPostgreSQL/src/libpq/Makefile.shlib Tue Jan 10 00:51:04 2012
@@ -409,11 +409,22 @@
DLL_DEFFILE = lib$(NAME)dll.def
endif
+ifeq "$(WIN)" "64"
+$(shlib): $(OBJS) $(DLL_DEFFILE)
+ $(LD) -shared --dll -o $@ $(OBJS) $(DLL_DEFFILE)
+ifeq "$(AR)" "x86_64-w64-mingw32-ar"
+$(stlib): $(OBJS)
+ $(AR) rcs $@ $(OBJS)
+else
+$(stlib): $(OBJS)
+ $(AR) rcs --target pe-x86-64 $@ $(OBJS)
+endif
+else
$(shlib): $(OBJS) $(DLL_DEFFILE)
$(DLLWRAP) -o $@ --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(DLL_DEFFILE)
$(OBJS) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK)
-
-$(stlib): $(shlib) $(DLL_DEFFILE)
- $(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(DLL_DEFFILE)
--output-lib $@
+$(stlib): $(OBJS)
+ $(AR) rcs $@ $(OBJS)
+endif
endif # PORTNAME == cygwin || PORTNAME == win32
=======================================
--- /trunk/RPostgreSQL/src/libpq/Makefile.win Tue Nov 22 02:15:30 2011
+++ /trunk/RPostgreSQL/src/libpq/Makefile.win Tue Jan 10 00:51:04 2012
@@ -88,7 +88,7 @@
SHLIB_EXPORTS = exports.txt
-all: all-lib
+all: all-static-lib
# Shared library stuff
include Makefile.shlib