diff -u plr-0.6.2/debian/control plr-0.6.2/debian/control --- plr-0.6.2/debian/control +++ plr-0.6.2/debian/control @@ -1,7 +1,8 @@ Source: plr Priority: optional Section: libs -Maintainer: Martin Pitt +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Martin Pitt Uploaders: Oliver Elphick Build-Depends: debhelper (>= 4.0.0), postgresql-server-dev-7.4 (>= 1:7.4.8-15), postgresql-server-dev-8.1, r-base-core Standards-Version: 3.6.1 diff -u plr-0.6.2/debian/rules plr-0.6.2/debian/rules --- plr-0.6.2/debian/rules +++ plr-0.6.2/debian/rules @@ -12,6 +12,10 @@ endif export CFLAGS +LDFLAGS=-Wl,-rpath /usr/lib/R/lib +SHLIB_LINK=-Wl,-rpath /usr/lib/R/lib +export LDFLAGS SHLIB_LINK + clean: dh_testdir dh_testroot @@ -24,6 +28,7 @@ for v in 7.4 8.1; do \ mkdir build-$$v; \ tar -C build-$$v -xzf plr-*.tar.gz; \ + cd build-$$v; patch -N -p1 < ../debian/patches/R_HOME_default.patch; cd ..; \ done touch unpack-stamp diff -u plr-0.6.2/debian/changelog plr-0.6.2/debian/changelog --- plr-0.6.2/debian/changelog +++ plr-0.6.2/debian/changelog @@ -1,3 +1,12 @@ +plr (1:0.6.2-1ubuntu0.1) dapper-proposed; urgency=low + + * SRU for LP: #130059, list of changes: + - Fall back to /usr/lib/R if R_HOME is not defined + - Add rpath /usr/lib/R/lib to plr.so libraries in debian/rules + - Update Maintainer field in debian/control + + -- Luca Falavigna Fri, 24 Aug 2007 23:18:33 +0200 + plr (1:0.6.2-1) unstable; urgency=low * New upstream version. diff -u plr-0.6.2/debian/Makefile.Debian.7.4 plr-0.6.2/debian/Makefile.Debian.7.4 --- plr-0.6.2/debian/Makefile.Debian.7.4 +++ plr-0.6.2/debian/Makefile.Debian.7.4 @@ -14,7 +14,7 @@ all: $(LIB) plr.sql $(LIB): $(OBJS) - $(CC) -L/usr/lib/R/lib -fPIC -shared -Wl,-soname,$(SONAME) $(OBJS) -lR -o $@ + $(CC) $(LDFLAGS) -L/usr/lib/R/lib -fPIC -shared -Wl,-soname,$(SONAME) $(OBJS) -lR -o $@ clean: rm -f *.o $(LIB) plr.sql only in patch2: unchanged: --- plr-0.6.2.orig/debian/patches/R_HOME_default.patch +++ plr-0.6.2/debian/patches/R_HOME_default.patch @@ -0,0 +1,25 @@ +diff -Nur plr/plr/plr.c plr.new/plr/plr.c +--- plr/plr/plr.c 2007-08-24 21:39:57.000000000 +0200 ++++ plr.new/plr/plr.c 2007-08-24 21:43:00.000000000 +0200 +@@ -278,6 +278,9 @@ + /* refuse to start if R_HOME is not defined */ + r_home = getenv("R_HOME"); + if (r_home == NULL) ++ setenv("R_HOME", R_HOME_FALLBACK, 1); ++ r_home = getenv("R_HOME"); ++ if (r_home == NULL) + ereport(ERROR, + (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), + errmsg("environment variable R_HOME not defined"), +diff -Nur plr/plr/plr.h plr.new/plr/plr.h +--- plr/plr/plr.h 2005-03-31 02:02:35.000000000 +0200 ++++ plr.new/plr/plr.h 2007-08-24 21:43:43.000000000 +0200 +@@ -77,6 +77,8 @@ + #undef ELOG_H + #include "utils/elog.h" + ++#define R_HOME_FALLBACK "/usr/lib/R" ++ + /* working with postgres 7.3 compatible sources */ + #if (CATALOG_VERSION_NO <= 200211021) + #define PG_VERSION_73_COMPAT