Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 33106 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile.orig (-9 / +11 lines)
Lines 12-17 Link Here
12
SO_MINOR_VERSION= 0
12
SO_MINOR_VERSION= 0
13
13
14
POSTGRES_HOME=/usr/local/pgsql
14
POSTGRES_HOME=/usr/local/pgsql
15
POSTGRES_INCDIR=$(POSTGRES_HOME)/include
16
POSTGRES_LIBDIR=$(POSTGRES_HOME)/lib
15
CXXOPTS= -DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT=""
17
CXXOPTS= -DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT=""
16
18
17
TARGET= libpq++
19
TARGET= libpq++
Lines 20-43 Link Here
20
OBJS= pgconnection.o pgdatabase.o pgtransdb.o pgcursordb.o pglobject.o
22
OBJS= pgconnection.o pgdatabase.o pgtransdb.o pgcursordb.o pglobject.o
21
LIBPGXXHEADERS = pgconnection.h pgdatabase.h pgtransdb.h pgcursordb.h pglobject.h
23
LIBPGXXHEADERS = pgconnection.h pgdatabase.h pgtransdb.h pgcursordb.h pglobject.h
22
24
23
SHARED= -fpic -shared -Wl,-x,-soname,$(TARGET).so.$(SO_MAJOR_VERSION) -Wl,-rpath,$(POSTGRES_HOME)/lib
25
SHARED= -fpic -shared -Wl,-x,-soname,$(TARGET).so.$(SO_MAJOR_VERSION) -Wl,-rpath,$(POSTGRES_LIBDIR)
24
soname=$(TARGET).so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
26
soname=$(TARGET).so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
25
27
26
all:  $(soname)
28
all:  $(soname)
27
29
28
$(soname) : $(OBJS)
30
$(soname) : $(OBJS)
29
	$(CXX) $(CXXFLAGS) $(OBJS) -L$(POSTGRES_HOME)/lib -l$(LIBS) $(SHARED) -o $(soname)
31
	$(CXX) $(CXXFLAGS) $(OBJS) -L$(POSTGRES_LIBDIR) -l$(LIBS) $(SHARED) -o $(soname)
30
32
31
%.o	: %.cc
33
%.o	: %.cc
32
	$(CXX) -c $(CXXFLAGS) $(CXXOPTS) -I$(POSTGRES_HOME)/include $<
34
	$(CXX) -c $(CXXFLAGS) $(CXXOPTS) -I$(POSTGRES_INCDIR) $<
33
35
34
clean:
36
clean:
35
	rm -f $(OBJS) $(soname)
37
	rm -f $(OBJS) $(soname)
36
38
37
install:
39
install:
38
	install $(soname) $(POSTGRES_HOME)/lib
40
	install $(soname) $(POSTGRES_LIBDIR)
39
	rm -f $(POSTGRES_HOME)/lib/$(TARGET).so
41
	rm -f $(POSTGRES_LIBDIR)/$(TARGET).so
40
	ln -s $(POSTGRES_HOME)/lib/$(soname) $(POSTGRES_HOME)/lib/$(TARGET).so
42
	ln -s $(POSTGRES_LIBDIR)/$(soname) $(POSTGRES_LIBDIR)/$(TARGET).so
41
	install -c $(TARGET).h $(POSTGRES_HOME)/include
43
	install -c $(TARGET).h $(POSTGRES_INCDIR)
42
	-mkdir $(POSTGRES_HOME)/include/libpq++
44
	-mkdir $(POSTGRES_INCDIR)/libpq++
43
	for i in $(LIBPGXXHEADERS); do install -c $$i $(POSTGRES_HOME)/include/libpq++ || exit 1; done
45
	for i in $(LIBPGXXHEADERS); do install -c $$i $(POSTGRES_INCDIR)/libpq++ || exit 1; done

Return to bug 33106